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

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

Re: An idea: controlling the order of execution of elisp hook functions


From: David Kastrup
Subject: Re: An idea: controlling the order of execution of elisp hook functions
Date: 06 Dec 2001 22:52:39 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1

>>>>> "Alan" == Alan Mackenzie <none@example.invalid> writes:

 Alan> Sometimes it is desirable to be able to control the order of
 Alan> execution of elisp hook functions.

 Alan> For example, both font-lock and major modes insert hooks into
 Alan> after-change-functions.  Ideally, the major mode hook should be
 Alan> run first, because the results of its syntactic analysis may
 Alan> well influence the font-locking (for example by setting the
 Alan> syntax-table text property).  This is currently difficult to
 Alan> arrange.

Is it?

 DOC> add-hook is a compiled Lisp function in `subr'.
 DOC> (add-hook HOOK FUNCTION &optional APPEND LOCAL)

 DOC> Add to the value of HOOK the function FUNCTION.
 DOC> FUNCTION is not added if already present.
 DOC> FUNCTION is added (if necessary) at the beginning of the hook list
 DOC> unless the optional argument APPEND is non-nil, in which case
 DOC> FUNCTION is added at the end.
 DOC> [...]

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum
Email: David.Kastrup@t-online.de



reply via email to

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