emacs-devel
[Top][All Lists]
Advanced

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

Re: Making outline-minor-mode's outline-regexp more flexible


From: Stefan Monnier
Subject: Re: Making outline-minor-mode's outline-regexp more flexible
Date: Tue, 08 Jan 2019 22:10:33 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

>> I don't see why outline-level would need to do any matching.
> How would you compute the outline level of 2 for "  // ***", and level
> 3 for both "     // ****" and ” // ****”?

Based on the match-data: when outline-level is called, outline-rege3xp
has just been matched, as described in C-h v outline-level:

    Function of no args to compute a header’s nesting level in an outline.
    It can assume point is at the beginning of a header line and that the match
    data reflects the ‘outline-regexp’.


-- Stefan




reply via email to

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