Tony Graham | 14 Nov 2011 14:14

Imenu for `RNC-mode'

If you are using `rnc--mode' by David Rosenborg [1] when editing RNC
schemas, you may be interested in adding the following to your .emacs to
add a 'RNC' menu for locating named patterns, etc.

--------------------------------------------------------
(require 'rnc-mode)
(add-hook 'rnc-mode-hook
	  (lambda ()
	    (set-variable
	     'imenu-generic-expression
	     (list
	      (list nil "^\\([a-zA-Z][-a-zA-Z0-9._]*\\)\\s-*[&|]?=" 1)
	      (list "include"
"^include\\s-+['\"]\\([a-zA-Z][-a-zA-Z0-9._]*\\)['\"]" 1)
	      (list "namespace"
"^\\(default\\s-+\\)?namespace\\s-+\\([a-zA-Z][-a-zA-Z0-9._]*\\)\\s-*="
2)
	      (list "dataypes"
"^datatypes\\s-+\\([a-zA-Z][-a-zA-Z0-9._]*\\)\\s-*=" 1)))
	    (imenu-add-to-menubar "RNC")))
--------------------------------------------------------

Regards,

Tony Graham                                   tgraham <at> mentea.net
Consultant                                 http://www.mentea.net
Mentea       13 Kelly's Bay Beach, Skerries, Co. Dublin, Ireland
 --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --
    XML, XSL-FO and XSLT consulting, training and programming

(Continue reading)

Dave Pawson | 14 Nov 2011 14:29
Picon
Gravatar

Re: Imenu for `RNC-mode'

On 14 November 2011 13:14, Tony Graham <tgraham <at> mentea.net> wrote:
> If you are using `rnc--mode' by David Rosenborg [1]

! Not seen that, thanks.

 when editing RNC
> schemas, you may be interested in adding the following to your .emacs to
> add a 'RNC' menu for locating named patterns, etc.

Thanks. Appreciated.

regards

--

-- 
Dave Pawson
XSLT XSL-FO FAQ.
Docbook FAQ.
http://www.dpawson.co.uk

------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/emacs-nxml-mode/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
(Continue reading)


Gmane