mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
fix(emacs-lisp): handle malformed outline-regexp
Sometimes elisp files specify an outline-regexp which does not match any groups so this causes it to return a default value of 0 instead of an error.
This commit is contained in:
committed by
Henrik Lissner
parent
2bceb217d9
commit
90d2834bef
@ -32,7 +32,9 @@ to a pop up buffer."
|
||||
(defun +emacs-lisp-outline-level ()
|
||||
"Return outline level for comment at point.
|
||||
Intended to replace `lisp-outline-level'."
|
||||
(- (match-end 1) (match-beginning 1)))
|
||||
(if (match-beginning 1)
|
||||
(- (match-end 1) (match-beginning 1))
|
||||
0))
|
||||
|
||||
|
||||
;;
|
||||
|
Reference in New Issue
Block a user