]> git.eshelyaron.com Git - emacs.git/commitdiff
(ada-imenu-generic-expression): Var defined.
authorKarl Heuer <kwzh@gnu.org>
Fri, 28 Jul 1995 00:18:42 +0000 (00:18 +0000)
committerKarl Heuer <kwzh@gnu.org>
Fri, 28 Jul 1995 00:18:42 +0000 (00:18 +0000)
(ada-mode): Set imenu-generic-expression.

lisp/progmodes/ada-mode.el

index 2014f8e8b023d2632f2b5517dfd05fce25e19e13..d280b31ed46eb28105f32b0b8f4ae82c92041c32 100644 (file)
@@ -281,6 +281,14 @@ task\\|accept\\|entry\\)\\>"
   "Regexp for the start of a subprogram.")
 
 \f
+;; Written by Christian Egli <Christian.Egli@hcsd.hac.com>
+;;
+(defvar ada-imenu-generic-expression
+      '((nil "^\\s-*\\(procedure\\|function\\)\\s-+\\([A-Za-z0-9_]+\\)" 2)
+       ("Type Defs" "^\\s-*\\(sub\\)?type\\s-+\\([A-Za-z0-9_]+\\)" 2))
+
+  "Imenu generic expression for Ada mode.  See `imenu-generic-expression'.")
+\f
 ;;;-------------
 ;;;  functions
 ;;;-------------
@@ -428,6 +436,9 @@ If you use ada-xref.el:
   (make-local-variable 'fill-paragraph-function)
   (setq fill-paragraph-function 'ada-fill-comment-paragraph)
 
+  (make-local-variable 'imenu-generic-expression)
+  (setq imenu-generic-expression ada-imenu-generic-expression)
+
   (make-local-variable 'font-lock-defaults)
   (setq font-lock-defaults '(ada-font-lock-keywords nil t ((?\_ . "w"))))