emacs-orgmode
[Top][All Lists]
Advanced

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

Re: How to add font-lock keywords


From: Bruno Barbier
Subject: Re: How to add font-lock keywords
Date: Tue, 21 Dec 2021 20:35:22 +0100

Hi,

Daniel Fleischer <danflscr@gmail.com> writes:

> Hi, I want to add custom keywords to be highlighted. I used
>     (font-lock-add-keywords nil '(("books" . org-level-4)) t)
>
> but nothing happens after I restart orgmode or call 'font-lock-update'.

The following works for me, in an org mode buffer:

,----
| (font-lock-add-keywords nil '(("books" . 'org-level-4)) t)
`----

(I added a quote before the face name).

No need to call font-lock-update or restart: any new or modified text
gets the new fontification.

Bruno

> -- 
> Daniel Fleischer



reply via email to

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