emacs-devel
[Top][All Lists]
Advanced

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

Re: What is font-lock-mode-hook?


From: Lennart Borgman (gmail)
Subject: Re: What is font-lock-mode-hook?
Date: Sun, 23 Mar 2008 02:24:19 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666

Jonathan Rockway wrote:
* On Sat, Mar 22 2008, Lennart Borgman (gmail) wrote:
I can't see where it is defined or run.


It's created automatically by define-minor-mode.

From font-core.el:

  (define-minor-mode font-lock-mode ...)

Then in easy-mode.el:

  (defmacro define-minor-mode (mode ...
    ...
    ; mode-name is (symbol-name mode)
    (hook (intern (concat mode-name "-hook")))
    (hook-on (intern (concat mode-name "-on-hook")))
    (hook-off (intern (concat mode-name "-off-hook")))

Anyway, this is documented pretty well (in the docstrings and the Elisp
manual), so please refer to that for more detail.

Thanks Jonathan, sorry for not observing this.

It would be nice if the actual hook variables doc strings had some explanation of this of course.




reply via email to

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