feat(emacs-lisp,lispy): recognize ;;* outline headings
Permit `;;* ...` be recognized by imenu and outline-minor-mode (and outline's commands). This also patches Lispy to reflect this new configuration (if :lang emacs-lisp is active). Close: #6732 Co-authored-by: LemonBreezes <LemonBreezes@users.noreply.github.com>
This commit is contained in:
parent
6887998c23
commit
a0ccb6b95b
3 changed files with 19 additions and 4 deletions
|
@ -3,7 +3,7 @@
|
|||
(defvar +emacs-lisp-enable-extra-fontification t
|
||||
"If non-nil, highlight special forms, and defined functions and variables.")
|
||||
|
||||
(defvar +emacs-lisp-outline-regexp "[ \t]*;;;;* [^ \t\n]"
|
||||
(defvar +emacs-lisp-outline-regexp "[ \t]*;;;\\(;*\\**\\) [^ \t\n]"
|
||||
"Regexp to use for `outline-regexp' in `emacs-lisp-mode'.
|
||||
This marks a foldable marker for `outline-minor-mode' in elisp buffers.")
|
||||
|
||||
|
@ -60,7 +60,8 @@ See `+emacs-lisp-non-package-mode' for details.")
|
|||
mode-name "Elisp"
|
||||
;; Don't treat autoloads or sexp openers as outline headers, we have
|
||||
;; hideshow for that.
|
||||
outline-regexp +emacs-lisp-outline-regexp)
|
||||
outline-regexp +emacs-lisp-outline-regexp
|
||||
outline-level #'+emacs-lisp-outline-level)
|
||||
|
||||
;; Fixed indenter that intends plists sensibly.
|
||||
(advice-add #'calculate-lisp-indent :override #'+emacs-lisp--calculate-lisp-indent-a)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue