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

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

Re: `font-lock-add-keywords' works... sometimes


From: Michael Heerdegen
Subject: Re: `font-lock-add-keywords' works... sometimes
Date: Tue, 19 Mar 2019 15:42:57 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Emanuel Berg <moasenwood@zoho.eu> writes:

> Why does this work
>
>     (font-lock-add-keywords 'message-mode
>      '(
>        ("yellow" . font-lock-function-name-face)
>       )
>      t) ; append [2]
>
> but not this
>
>     (font-lock-add-keywords 'text-mode
>      '(
>        ("yellow" . font-lock-function-name-face)
>       )
>      t) ; append [3]
>
> ?

This works:

(progn
  (font-lock-add-keywords 'text-mode
     '(("yellow" . font-lock-function-name-face))
     t)
  (font-lock-ensure))

But I don't know much about the details.


Michael.



reply via email to

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