]> git.eshelyaron.com Git - emacs.git/commitdiff
(pascal-mode): Added imenu support.
authorRichard M. Stallman <rms@gnu.org>
Thu, 27 Jul 1995 18:50:02 +0000 (18:50 +0000)
committerRichard M. Stallman <rms@gnu.org>
Thu, 27 Jul 1995 18:50:02 +0000 (18:50 +0000)
(pascal-imenu-generic-expression): New variable.

lisp/progmodes/pascal.el

index b7b2fa70c845e7d06998b882dab3180c3b28bfb8..02d884f28f23b445a76b6fb1230e09defadde048 100644 (file)
 ;  (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 @@ no args, if that value is non-nil."
   (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))
 
 \f