[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Toning down font-lock
From: |
Augusto Stoffel |
Subject: |
Re: Toning down font-lock |
Date: |
Tue, 08 Mar 2022 12:50:38 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.91 (gnu/linux) |
On Mon, 7 Mar 2022 at 18:55, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
>> And here is the code. It's too much of a hack for core, but maybe
>> sufficiently useful for a package?
>
> Nice. I'd suggest you merge `font-lock-ignore--test` and
> `font-lock-ignore--test-one` into a single (recursive) function.
The exclamation marks are not a recursive thing. But I added `and' and
`not' rules that use recursion.
> I can't see why we shouldn't include it into core.
Okay, well, in this case this is how the patch would look like, modulo
the manual update etc. (And I need to test more before merging.)
I changed a bit the meaning of the different rules, as explained in the
docstring. So now you can say
```
(setq font-lock-ignore
'((prog-mode font-lock-*-face
! help-echo
;; Uningnore the rule that matches a defun
(emacs-lisp-mode ! "(defun"))))
```
0001-New-customization-variable-font-lock-ignore.patch
Description: Text Data