Mercurial > emacs
comparison lisp/emacs-lisp/lisp-mode.el @ 25630:4feb8ce584a5
(lisp-imenu-generic-expression): Recognize define-widget.
(emacs-lisp-mode-hook, lisp-mode-hook, lisp-interaction-mode-hook):
Customize.
author | Dave Love <fx@gnu.org> |
---|---|
date | Fri, 10 Sep 1999 18:08:06 +0000 |
parents | 9a7891b32d1a |
children | 556711217681 |
comparison
equal
deleted
inserted
replaced
25629:ddc2a0543928 | 25630:4feb8ce584a5 |
---|---|
89 (define-abbrev-table 'lisp-mode-abbrev-table ()) | 89 (define-abbrev-table 'lisp-mode-abbrev-table ()) |
90 | 90 |
91 (defvar lisp-imenu-generic-expression | 91 (defvar lisp-imenu-generic-expression |
92 '( | 92 '( |
93 (nil | 93 (nil |
94 "^\\s-*(def\\(un\\|subst\\|macro\\|advice\\|ine-skeleton\\)\\s-+\\([-A-Za-z0-9+*|:/]+\\)" 2) | 94 "^\\s-*(def\\(un\\|subst\\|macro\\|advice\\|ine-skeleton\\)\ |
95 \\s-+\\([-A-Za-z0-9+*|:/]+\\)" 2) | |
95 ("Variables" | 96 ("Variables" |
96 "^\\s-*(def\\(var\\|const\\|custom\\)\\s-+\\([-A-Za-z0-9+*|:/]+\\)" 2) | 97 "^\\s-*(def\\(var\\|const\\|custom\\)\\s-+\\([-A-Za-z0-9+*|:/]+\\)" 2) |
97 ("Types" | 98 ("Types" |
98 "^\\s-*(def\\(group\\|type\\|struct\\|class\\|ine-condition\\)\\s-+\\([-A-Za-z0-9+*|:/]+\\)" | 99 "^\\s-*(def\\(group\\|type\\|struct\\|class\\|ine-condition\ |
100 \\|ine-widget\\)\\s-+'?\\([-A-Za-z0-9+*|:/]+\\)" | |
99 2)) | 101 2)) |
100 | 102 |
101 "Imenu generic expression for Lisp mode. See `imenu-generic-expression'.") | 103 "Imenu generic expression for Lisp mode. See `imenu-generic-expression'.") |
102 | 104 |
103 (defun lisp-mode-variables (lisp-syntax) | 105 (defun lisp-mode-variables (lisp-syntax) |
202 (save-buffer)) | 204 (save-buffer)) |
203 (let ((compiled-file-name (byte-compile-dest-file buffer-file-name))) | 205 (let ((compiled-file-name (byte-compile-dest-file buffer-file-name))) |
204 (if (file-newer-than-file-p compiled-file-name buffer-file-name) | 206 (if (file-newer-than-file-p compiled-file-name buffer-file-name) |
205 (load-file compiled-file-name) | 207 (load-file compiled-file-name) |
206 (byte-compile-file buffer-file-name t)))) | 208 (byte-compile-file buffer-file-name t)))) |
209 | |
210 (defcustom emacs-lisp-mode-hook nil | |
211 "Hook run when entering Emacs Lisp mode." | |
212 :options '(turn-on-eldoc-mode imenu-add-menubar-index) | |
213 :type 'hook | |
214 :group 'lisp) | |
215 | |
216 (defcustom lisp-mode-hook nil | |
217 "Hook run when entering Lisp mode." | |
218 :options '(imenu-add-menubar-index) | |
219 :type 'hook | |
220 :group 'lisp) | |
221 | |
222 (defcustom lisp-interaction-mode-hook nil | |
223 "Hook run when entering Lisp Interaction mode." | |
224 :options '(turn-on-eldoc-mode) | |
225 :type 'hook | |
226 :group 'lisp) | |
207 | 227 |
208 (defun emacs-lisp-mode () | 228 (defun emacs-lisp-mode () |
209 "Major mode for editing Lisp code to run in Emacs. | 229 "Major mode for editing Lisp code to run in Emacs. |
210 Commands: | 230 Commands: |
211 Delete converts tabs to spaces as it moves back. | 231 Delete converts tabs to spaces as it moves back. |