Description
outline-regexp
was changed in b1ea6de to address #550. The updated regexp deleted one pattern too many.
tl;dr: In order to both fix the issue described in #550 and enable unified comment and code folding using bicycle (or a similar package), outline-regexp
should be changed from ;;;;*
to ;;;;* \\|(
.
bicycle
uses outline-regexp
to identify code blocks as well as headings. It's just a light wrapper that unifies two built-in folding packages:outline-minor-mode
(for comments) and hideshow
(for code). Removing the alternate pattern \\|(
in outline-regexp
prevents bicycle
from finding top-level code blocks to fold; it only permits comment folding. The alternate pattern to match top-level code blocks can be added back to outline-regexp
without effecting the fix for outline-insert-heading
:
;; Preserve the fix to issue #550, while enabling code + comment folding
(setq-local outline-regexp ";;;;* \\|(")
Originally posted by @jeffvalk in #550 (comment)