emacs-devel
[Top][All Lists]
Advanced

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

Re: eval-after-load as a macro (and eval-next-after-load)


From: Kai Großjohann
Subject: Re: eval-after-load as a macro (and eval-next-after-load)
Date: Tue, 08 Apr 2003 12:21:33 +0200
User-agent: Gnus/5.090018 (Oort Gnus v0.18) Emacs/21.3.50 (gnu/linux)

address@hidden (Kim F. Storm) writes:

> However, such hooks (e.g. cua-mode-hook) are normally for users to
> set, so if a package like crisp modifies it (too), Customize will
> report "this variable is set outside custom" -- and saving it will
> cause the crisp addition to be saved as well (potentially adding to
> the hook a reference to a function which isn't defined on next emacs
> startup).
>
> Doing this via a hook would require having two hooks -- one for emacs
> internal use and another for the user...  

That's right, but it's a general problem.  So I think it makes no
sense to try to solve it in this specific case only.

run-hooks could be extended to run two hooks, a "public" hook and a
"private" hook.  The arg would be the name of the public hook, and the
name of the corresponding private hook could be derived from the name
of the public hook.  (Running the private hook would be skipped if it
doesn't exist.)  What do people think?

Does one normally use defvar or defcustom to define the hook
variables?  If so, it might be useful to create a define-hook macro
that creates both variables.
-- 
A preposition is not a good thing to end a sentence with.





reply via email to

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