bug#81054: [PATCH] Add comment-prefixed outline heading recognition

Juri Linkov <[email protected]> Sun, 02 Aug 2026 18:27:28 +0300
Newsgroups gmane.emacs.bugs
Organization LINKOV.NET
Message-ID <[email protected]>
> The revised patch is attached.

Thanks, I will try and test it.

> 1. Since 29.1, several modes set outline-search-function, which takes
> precedence over outline-regexp.  If setup only touched outline-regexp,
> the comment headings would never be found in those modes, defeating the
> "works in any mode with a comment-start" goal.  So setup also does
>  
>   (setq-local outline-search-function nil)
>  
> (saving the old value), forcing the regexp path onto the comment regexp.
> That is the right behaviour for the 't' (replace) case, and stays
> correct for 'combined.  Let me know if you'd rather handle it another
> way.

Elisp mode sets outline-search-function to elisp-outline-search.
This might cause a problem.