changeset 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 ddc2a0543928
children 0987f52a0674
files lisp/emacs-lisp/lisp-mode.el
diffstat 1 files changed, 22 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/emacs-lisp/lisp-mode.el	Fri Sep 10 17:54:30 1999 +0000
+++ b/lisp/emacs-lisp/lisp-mode.el	Fri Sep 10 18:08:06 1999 +0000
@@ -91,11 +91,13 @@
 (defvar lisp-imenu-generic-expression
       '(
 	(nil 
-	 "^\\s-*(def\\(un\\|subst\\|macro\\|advice\\|ine-skeleton\\)\\s-+\\([-A-Za-z0-9+*|:/]+\\)" 2)
+	 "^\\s-*(def\\(un\\|subst\\|macro\\|advice\\|ine-skeleton\\)\
+\\s-+\\([-A-Za-z0-9+*|:/]+\\)" 2)
 	("Variables" 
 	 "^\\s-*(def\\(var\\|const\\|custom\\)\\s-+\\([-A-Za-z0-9+*|:/]+\\)" 2)
 	("Types" 
-	 "^\\s-*(def\\(group\\|type\\|struct\\|class\\|ine-condition\\)\\s-+\\([-A-Za-z0-9+*|:/]+\\)" 
+	 "^\\s-*(def\\(group\\|type\\|struct\\|class\\|ine-condition\
+\\|ine-widget\\)\\s-+'?\\([-A-Za-z0-9+*|:/]+\\)" 
 	 2))
 
   "Imenu generic expression for Lisp mode.  See `imenu-generic-expression'.")
@@ -205,6 +207,24 @@
 	(load-file compiled-file-name)
       (byte-compile-file buffer-file-name t))))
 
+(defcustom emacs-lisp-mode-hook nil
+  "Hook run when entering Emacs Lisp mode."
+  :options '(turn-on-eldoc-mode imenu-add-menubar-index)
+  :type 'hook
+  :group 'lisp)
+
+(defcustom lisp-mode-hook nil
+  "Hook run when entering Lisp mode."
+  :options '(imenu-add-menubar-index)
+  :type 'hook
+  :group 'lisp)
+
+(defcustom lisp-interaction-mode-hook nil
+  "Hook run when entering Lisp Interaction mode."
+  :options '(turn-on-eldoc-mode)
+  :type 'hook
+  :group 'lisp)
+
 (defun emacs-lisp-mode ()
   "Major mode for editing Lisp code to run in Emacs.
 Commands: