From e596094db5644575a362e7cbbd233d3f6432e81f Mon Sep 17 00:00:00 2001 From: Dave Love Date: Fri, 10 Sep 1999 18:08:06 +0000 Subject: [PATCH] (lisp-imenu-generic-expression): Recognize define-widget. (emacs-lisp-mode-hook, lisp-mode-hook, lisp-interaction-mode-hook): Customize. --- lisp/emacs-lisp/lisp-mode.el | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index 65fa9c1b7d5..f5755bc4b8c 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el @@ -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 @@ All commands in `shared-lisp-mode-map' are inherited by this map.") (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: -- 2.39.5