* Updating outline-regexp and outline-heading-alist for various major modes
@ 2023-06-21 10:41 uzibalqa
0 siblings, 0 replies; only message in thread
From: uzibalqa @ 2023-06-21 10:41 UTC (permalink / raw)
To: uzibalqa via Users list for the GNU Emacs text editor
I am setting outline-regexp and outline-heading-alist for various major modes.
As I increase the number of major modes I handle, it would be good not to repeat
things so much.
(cond
((eq major-mode 'emacs-lisp-mode)
(let ( (hrklevels elisp-hrklevels) )
(setq outline-regexp
(concat (regexp-opt (mapcar 'car hrklevels)) "\\>"))
(setq outline-heading-alist hrklevels)))
((eq major-mode 'sh-mode)
(let ( (hrklevels bash-hrklevels) )
(setq outline-regexp
(concat (regexp-opt (mapcar 'car hrklevels)) "\\>"))
(setq outline-heading-alist hrklevels))) ))
Sent with Proton Mail secure email.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-06-21 10:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-21 10:41 Updating outline-regexp and outline-heading-alist for various major modes uzibalqa
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).