aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorKarl Heuer <[email protected]>1995-07-28 00:18:42 +0000
committerKarl Heuer <[email protected]>1995-07-28 00:18:42 +0000
commit74480345ab76d05cf117ec0a29c3ae29c1bc4f23 (patch)
treeecf345b4a612b808b288af3d68880d940eecf831 /lisp
parent6c2cf8668a6de294bf048139254d5ab10e36fdd7 (diff)
(ada-imenu-generic-expression): Var defined.
(ada-mode): Set imenu-generic-expression.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/progmodes/ada-mode.el11
1 files changed, 11 insertions, 0 deletions
diff --git a/lisp/progmodes/ada-mode.el b/lisp/progmodes/ada-mode.el
index 2014f8e8b0..d280b31ed4 100644
--- a/lisp/progmodes/ada-mode.el
+++ b/lisp/progmodes/ada-mode.el
@@ -281,6 +281,14 @@ task\\|accept\\|entry\\)\\>"
"Regexp for the start of a subprogram.")
+;; Written by Christian Egli <[email protected]>
+;;
+(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'.")
+
;;;-------------
;;; 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"))))