In Imenu, don't show defvars with no second argument.
* lisp/emacs-lisp/lisp-mode.el (lisp-imenu-generic-expression): Don't show defvars which have no second argument. * lisp/imenu.el (imenu-generic-expression): Move documentation here from imenu--generic-function. (imenu--generic-function): Refer to imenu-generic-expression. Fixes: debbugs:8638
This commit is contained in:
parent
d32e47aff6
commit
b7ccbdc2e3
3 changed files with 50 additions and 43 deletions
|
@ -117,10 +117,15 @@ It has `lisp-mode-abbrev-table' as its parent."
|
|||
(purecopy (concat "^\\s-*("
|
||||
(eval-when-compile
|
||||
(regexp-opt
|
||||
'("defvar" "defconst" "defconstant" "defcustom"
|
||||
'("defconst" "defconstant" "defcustom"
|
||||
"defparameter" "define-symbol-macro") t))
|
||||
"\\s-+\\(\\(\\sw\\|\\s_\\)+\\)"))
|
||||
2)
|
||||
;; For `defvar', we ignore (defvar FOO) constructs.
|
||||
(list (purecopy "Variables")
|
||||
(purecopy (concat "^\\s-*(defvar\\s-+\\(\\(\\sw\\|\\s_\\)+\\)"
|
||||
"[[:space:]\n]+[^)]"))
|
||||
1)
|
||||
(list (purecopy "Types")
|
||||
(purecopy (concat "^\\s-*("
|
||||
(eval-when-compile
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue