[Top][All Lists]

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

Re: doc on define-minor-mode hook variable(s)

From: Juanma Barranquero
Subject: Re: doc on define-minor-mode hook variable(s)
Date: Mon, 29 Oct 2007 11:55:00 +0100

On 3/8/06, Kevin Rodgers <address@hidden> wrote:

> (defmacro defhook (symbol &rest optional-args)
>    "Define SYMBOL as a hook.
> Just kidding,

Hmm. Well, kidding or not, that could be useful (yes, I know that many
people will consider it utterly unnecessary :-).

I'd love a defhook that would get a ":hook-type SOMEVALUE" keyword
argument and would do

  (put my-hook 'hook SOMEVALUE)

where SOMEVALUE could be as simple `t' (normal) or `special', or
perhaps something more sophisticate indicating the expected use
(number or arguments, whether it will return something or not).

No, I don't have a use case for the "more sophisticate" case (though
it could conceivably be used by add-hook to check validity of
functions added). But certainly having all hooks marked with a
property would have uses, the first one getting rid of

Just dreaming,


reply via email to

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