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

lisp/emacs-lisp/lisp-mode.el

index f493a615d30e961796ae131680bf0de85e8b7e13..ab08912cad7fce332561f02eadba9156067b654f 100644 (file)
 
 (define-abbrev-table 'lisp-mode-abbrev-table ())
 
+(defvar lisp-imenu-generic-expression
+      '(
+       (nil 
+        "^\\s-*(def\\(un\\|subst\\|macro\\|advice\\)\\s-+\\([-A-Za-z0-9+]+\\)" 2)
+       ("Variables" 
+        "^\\s-*(def\\(var\\|const\\)\\s-+\\([-A-Za-z0-9+]+\\)" 2)
+       ("Types" 
+        "^\\s-*(def\\(type\\|struct\\|class\\|ine-condition\\)\\s-+\\([-A-Za-z0-9+]+\\)" 
+        2))
+
+  "Imenu generic expression for Lisp mode.  See `imenu-generic-expression'.")
+
 (defun lisp-mode-variables (lisp-syntax)
   (cond (lisp-syntax
          (set-syntax-table lisp-mode-syntax-table)))
   (make-local-variable 'comment-column)
   (setq comment-column 40)
   (make-local-variable 'comment-indent-function)
-  (setq comment-indent-function 'lisp-comment-indent))
+  (setq comment-indent-function 'lisp-comment-indent)
+  (make-local-variable 'imenu-generic-expression)
+  (setq imenu-generic-expression lisp-imenu-generic-expression))
 \f
 (defvar shared-lisp-mode-map ()
   "Keymap for commands shared by all sorts of Lisp modes.")