]> git.eshelyaron.com Git - emacs.git/commit
Ignore parens in strings for outline headings in emacs-lisp-mode.
authorJuri Linkov <juri@linkov.net>
Tue, 29 Apr 2025 16:55:48 +0000 (19:55 +0300)
committerEshel Yaron <me@eshelyaron.com>
Thu, 1 May 2025 07:24:00 +0000 (09:24 +0200)
commite95d448782d7088a8f015b1693ae28dd5c89e3cc
tree255a0278aae157999cf2d1adca72eaab574c895e
parentfcd0333a620a0a29f18195ae32793969e5e7ed7b
Ignore parens in strings for outline headings in emacs-lisp-mode.

* lisp/outline.el (outline-font-lock-keywords): For non-nil
outline-search-function return a lambda that calls the function,
then sets the match data to the end of the line that is equivalent
to adding ".*" in the regexp.  Then search functions don't need to
match ".*" themselves.

* lisp/progmodes/elisp-mode.el (elisp-outline-search):
New function to skip leading parens in strings when searching
for outline headings.
(emacs-lisp-mode): Set buffer-local 'outline-search-function' to
'elisp-outline-search'.
https://lists.gnu.org/archive/html/emacs-devel/2025-04/msg00934.html

(cherry picked from commit 746a3cb3143194436c4a1a63d26aac890c1a705f)
lisp/outline.el
lisp/progmodes/elisp-mode.el