14 Nov 2011 14:14
Imenu for `RNC-mode'
Tony Graham <tgraham <at> mentea.net>
2011-11-14 13:14:45 GMT
2011-11-14 13:14:45 GMT
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)
RSS Feed