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

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

Re: Why call font-lock-add-keywords in a mode hook?


From: Stefan Monnier
Subject: Re: Why call font-lock-add-keywords in a mode hook?
Date: Mon, 25 Jan 2016 23:14:58 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

> My question: why would I want to call this function in a hook if I can
> specify the mode in its invocation?

Because the other use is fundamentally unclean, requiring
a re-implementation of major-mode's inheritance, whereas you get it for
free if you use nil for `mode' and call it from the mode's hook instead.


        Stefan




reply via email to

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