this post was submitted on 09 Nov 2023
1 points (100.0% liked)

Emacs

311 readers
1 users here now

A community for the timeless and infinitely powerful editor. Want to see what Emacs is capable of?!

Get Emacs

Rules

  1. Posts should be emacs related
  2. Be kind please
  3. Yes, we already know: Google results for "emacs" and "vi" link to each other. We good.

Emacs Resources

Emacs Tutorials

Useful Emacs configuration files and distributions

Quick pain-saver tip

founded 1 year ago
MODERATORS
 

I want to be able to use outline-minor-mode to fold my use-package blocks at convenient points. Ideally, I want to be able to fold sections following :config, :init, :custom, etc. as well as definitions inside those blocks. The current value of outline-regexp when in emacs-lisp-mode is:

";;;;* [^ 	\n]\\|(\\|\\(^;;;###\\(\\([-[:alnum:]]+?\\)-\\)?\\(autoload\\)\\)"

I thought appending \\|[[:space:]]*:\\(init|config|custom\\) to this would work, but it doesn't. Any help would be much appreciated.

(I see there's a related post here, but I didn't find anything there that helped me.)

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 1 points 1 year ago

You're matching the literal text :init|config|custom

Tip: Use M-x re-builder to test.