You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 #550and 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 ";;;;* \\|(")
It's worth mentioning that this change does alter the behavior of outline-promote and outline-demote...though not meaningfully. These functions didn't work correctly in clojure-mode before the change, and they don't after either. 😄 Of course, they also don't work correctly in emacs-lisp-mode, so presumably they're just not something anyone uses in a Lisp.
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
usesoutline-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) andhideshow
(for code). Removing the alternate pattern\\|(
inoutline-regexp
preventsbicycle
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 tooutline-regexp
without effecting the fix foroutline-insert-heading
:Originally posted by @jeffvalk in #550 (comment)
The text was updated successfully, but these errors were encountered: