lang/emacs-lisp: fix imenu regexp for sections
Otherwise, section labels with non-symbol characters would be excluded from imenu's results.
This commit is contained in:
parent
47739698a8
commit
39faabab6a
1 changed files with 1 additions and 1 deletions
|
@ -108,7 +108,7 @@ if it's callable, `apropos' otherwise."
|
||||||
(defun +emacs-lisp|extend-imenu ()
|
(defun +emacs-lisp|extend-imenu ()
|
||||||
"Improve imenu support in `emacs-lisp-mode', including recognition for Doom's API."
|
"Improve imenu support in `emacs-lisp-mode', including recognition for Doom's API."
|
||||||
(setq imenu-generic-expression
|
(setq imenu-generic-expression
|
||||||
`(("Section" "^[ \t]*;;;;* \\(\\_<[^\n]+\\_>\\)" 1)
|
`(("Section" "^[ \t]*;;;;*[ \t]+\\([^\n]+\\)" 1)
|
||||||
("Evil commands" "^\\s-*(evil-define-\\(?:command\\|operator\\|motion\\) +\\(\\_<[^ ()\n]+\\_>\\)" 1)
|
("Evil commands" "^\\s-*(evil-define-\\(?:command\\|operator\\|motion\\) +\\(\\_<[^ ()\n]+\\_>\\)" 1)
|
||||||
("Unit tests" "^\\s-*(\\(?:ert-deftest\\|describe\\) +\"\\([^\")]+\\)\"" 1)
|
("Unit tests" "^\\s-*(\\(?:ert-deftest\\|describe\\) +\"\\([^\")]+\\)\"" 1)
|
||||||
("Package" "^\\s-*(\\(?:;;;###package\\|def-package!\\|package!\\|use-package\\|after!\\) +\\(\\_<[^ ()\n]+\\_>\\)" 1)
|
("Package" "^\\s-*(\\(?:;;;###package\\|def-package!\\|package!\\|use-package\\|after!\\) +\\(\\_<[^ ()\n]+\\_>\\)" 1)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue