diff options
author | Karl Heuer <kwzh@gnu.org> | 1995-07-28 00:14:15 +0000 |
---|---|---|
committer | Karl Heuer <kwzh@gnu.org> | 1995-07-28 00:14:15 +0000 |
commit | 6c2cf8668a6de294bf048139254d5ab10e36fdd7 (patch) | |
tree | 0e774d33f5f68a9b7039d72f3591f06aa6b01f74 /lisp/emacs-lisp | |
parent | 5c69dbfc013af5857e50f064ef62aeff7e7cbacc (diff) | |
download | emacs-6c2cf8668a6de294bf048139254d5ab10e36fdd7.tar.gz emacs-6c2cf8668a6de294bf048139254d5ab10e36fdd7.tar.bz2 emacs-6c2cf8668a6de294bf048139254d5ab10e36fdd7.zip |
(lisp-imenu-generic-expression): Var defined.
(lisp-mode-variables): Set imenu-generic-expression.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/lisp-mode.el | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index f493a615d30..ab08912cad7 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el @@ -78,6 +78,18 @@ (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))) @@ -105,7 +117,9 @@ (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)) (defvar shared-lisp-mode-map () "Keymap for commands shared by all sorts of Lisp modes.") |