# HG changeset patch # User Dave Love # Date 936986886 0 # Node ID 4feb8ce584a589e46eee16d2a2580a60d6f243d7 # Parent ddc2a0543928ef84557cb24b676a3e082551196f (lisp-imenu-generic-expression): Recognize define-widget. (emacs-lisp-mode-hook, lisp-mode-hook, lisp-interaction-mode-hook): Customize. diff -r ddc2a0543928 -r 4feb8ce584a5 lisp/emacs-lisp/lisp-mode.el --- 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: