Mercurial > emacs
changeset 12689:83ef0f002ecf
(pascal-mode): Added imenu support.
(pascal-imenu-generic-expression): New variable.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Thu, 27 Jul 1995 18:50:02 +0000 |
parents | c56f1c77ce73 |
children | e2d3fa52d100 |
files | lisp/progmodes/pascal.el |
diffstat | 1 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/progmodes/pascal.el Thu Jul 27 07:40:22 1995 +0000 +++ b/lisp/progmodes/pascal.el Thu Jul 27 18:50:02 1995 +0000 @@ -93,6 +93,10 @@ ; (define-key pascal-mode-map "\C-cu" 'pascal-upcase-keywords) ; (define-key pascal-mode-map "\C-cc" 'pascal-capitalize-keywords) ) + +(defvar pascal-imenu-generic-expression + '("^[ \t]*\\(function\\|procedure\\)[ \t\n]+\\([a-zA-Z0-9_.:]+\\)" . (2)) + "Imenu expression for Pascal-mode. See `imenu-generic-expression'.") (defvar pascal-keywords '("and" "array" "begin" "case" "const" "div" "do" "downto" "else" "end" @@ -320,8 +324,12 @@ (setq comment-start-skip "(\\*+ *\\|{ *") (make-local-variable 'comment-end) (setq comment-end "}") + ;; Font lock support (make-local-variable 'font-lock-defaults) (setq font-lock-defaults '(pascal-font-lock-keywords nil t)) + ;; Imenu support + (make-local-variable 'imenu-generic-expression) + (setq imenu-generic-expression pascal-imenu-generic-expression) (run-hooks 'pascal-mode-hook))