help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Allowing spaces in the regexp for outlines


From: Heime
Subject: Re: Allowing spaces in the regexp for outlines
Date: Thu, 21 Mar 2024 04:44:16 +0000





Sent with Proton Mail secure email.

On Thursday, March 21st, 2024 at 7:45 AM, Emanuel Berg <incal@dataswamp.org> 
wrote:

> Heime wrote:
> 
> > (defvar el-hglevels
> > '( (";;; H1" . 1) (";;; H2" . 2) (";;; H3" . 3) (";;; H4" . 4) )
> > "Outline levels for elisp major mode.")
> 
> 
> You can also use `comment-start' instead of hardcoding ';',
> and use explicit repitition instead of hardcoding 3 - see
> 
> (info "(elisp) Regexp Backslash")
> 
> - and then also not hardcode the 1s, 2s, 3s, and 4s in pairs
> but inserting them as integers into the string.
> 
> So yes, you can improve a lot! And spend all weekend on it.
 
This is not about improving existing functionality, bet allowing
aty number of spaces between ;;; and H.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]