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

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

bug#66166: 30.0.50; [PATCH] Consider outline-heading-end-regexp in outli


From: Stefan Kangas
Subject: bug#66166: 30.0.50; [PATCH] Consider outline-heading-end-regexp in outline-font-lock-keywords
Date: Wed, 10 Jan 2024 13:30:41 -0800

Juri Linkov <juri@linkov.net> writes:

>> Consider outline-heading-end-regexp in outline-font-lock-keywords.
>>
>> Example of use case:
>> 1) emacs -Q
>> 2) in *scratch* buffer, type ";;; Hello" in a new line, plus some line breaks
>> 3) eval:
>>    (setq-local outline-regexp ";;;*")
>>    (setq-local outline-heading-end-regexp "\n")
>>    (setq-local outline-minor-mode-highlight 'override)
>>    (custom-set-faces '(outline-1 ((t :background "red" :extend t))))
>>    (outline-minor-mode 1)
>> 4) expected: since the outline-1 face has the extend attribute and the
>> heading regexp ends in a line break, the outline-1 face on ";;; Hello"
>> should be applied until the line break (extended)
>>
>> Patch:
>> -                      (concat "^\\(?:" outline-regexp "\\).*"))
>> +                      (concat "^\\(?:" outline-regexp "\\).*" 
>> outline-heading-end-regexp))
>
> Thanks, your patch looks right.  I wonder if it might break something,
> maybe need more testing.

Did you have a chance to do more testing here?  Should this patch be
installed?  Thanks in advance.

> Then it will fix the extend attribute only when outlines are expanded.
> But when collapsed, changes in the display engine are required
> to support the extend attribute over the ellipsis (bug#65896).





reply via email to

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