From ce4a052415b70030ee591af3cb5bed0fb79ef3aa Mon Sep 17 00:00:00 2001 From: Leo Liu Date: Thu, 7 Jan 2016 11:00:52 +0800 Subject: [PATCH] Add defvar-local to lisp-imenu-generic-expression * lisp/emacs-lisp/lisp-mode.el (lisp-imenu-generic-expression): Add defvar-local. --- lisp/emacs-lisp/lisp-mode.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index 574ecef0cde..cb8abde52ed 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el @@ -131,9 +131,10 @@ t)) "\\s-+\\(" lisp-mode-symbol-regexp "\\)")) 2) - ;; For `defvar', we ignore (defvar FOO) constructs. + ;; For `defvar'/`defvar-local', we ignore (defvar FOO) constructs. (list (purecopy "Variables") - (purecopy (concat "^\\s-*(defvar\\s-+\\(" lisp-mode-symbol-regexp "\\)" + (purecopy (concat "^\\s-*(defvar\\(?:-local\\)?\\s-+\\(" + lisp-mode-symbol-regexp "\\)" "[[:space:]\n]+[^)]")) 1) (list (purecopy "Types") -- 2.39.2