diff options
| author | Karl Heuer | 1995-07-28 00:14:15 +0000 |
|---|---|---|
| committer | Karl Heuer | 1995-07-28 00:14:15 +0000 |
| commit | 6c2cf8668a6de294bf048139254d5ab10e36fdd7 (patch) | |
| tree | 0e774d33f5f68a9b7039d72f3591f06aa6b01f74 | |
| parent | 5c69dbfc013af5857e50f064ef62aeff7e7cbacc (diff) | |
| download | emacs-6c2cf8668a6de294bf048139254d5ab10e36fdd7.tar.gz emacs-6c2cf8668a6de294bf048139254d5ab10e36fdd7.zip | |
(lisp-imenu-generic-expression): Var defined.
(lisp-mode-variables): Set imenu-generic-expression.
| -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 @@ | |||
| 78 | 78 | ||
| 79 | (define-abbrev-table 'lisp-mode-abbrev-table ()) | 79 | (define-abbrev-table 'lisp-mode-abbrev-table ()) |
| 80 | 80 | ||
| 81 | (defvar lisp-imenu-generic-expression | ||
| 82 | '( | ||
| 83 | (nil | ||
| 84 | "^\\s-*(def\\(un\\|subst\\|macro\\|advice\\)\\s-+\\([-A-Za-z0-9+]+\\)" 2) | ||
| 85 | ("Variables" | ||
| 86 | "^\\s-*(def\\(var\\|const\\)\\s-+\\([-A-Za-z0-9+]+\\)" 2) | ||
| 87 | ("Types" | ||
| 88 | "^\\s-*(def\\(type\\|struct\\|class\\|ine-condition\\)\\s-+\\([-A-Za-z0-9+]+\\)" | ||
| 89 | 2)) | ||
| 90 | |||
| 91 | "Imenu generic expression for Lisp mode. See `imenu-generic-expression'.") | ||
| 92 | |||
| 81 | (defun lisp-mode-variables (lisp-syntax) | 93 | (defun lisp-mode-variables (lisp-syntax) |
| 82 | (cond (lisp-syntax | 94 | (cond (lisp-syntax |
| 83 | (set-syntax-table lisp-mode-syntax-table))) | 95 | (set-syntax-table lisp-mode-syntax-table))) |
| @@ -105,7 +117,9 @@ | |||
| 105 | (make-local-variable 'comment-column) | 117 | (make-local-variable 'comment-column) |
| 106 | (setq comment-column 40) | 118 | (setq comment-column 40) |
| 107 | (make-local-variable 'comment-indent-function) | 119 | (make-local-variable 'comment-indent-function) |
| 108 | (setq comment-indent-function 'lisp-comment-indent)) | 120 | (setq comment-indent-function 'lisp-comment-indent) |
| 121 | (make-local-variable 'imenu-generic-expression) | ||
| 122 | (setq imenu-generic-expression lisp-imenu-generic-expression)) | ||
| 109 | 123 | ||
| 110 | (defvar shared-lisp-mode-map () | 124 | (defvar shared-lisp-mode-map () |
| 111 | "Keymap for commands shared by all sorts of Lisp modes.") | 125 | "Keymap for commands shared by all sorts of Lisp modes.") |