emacs-devel
[Top][All Lists]
Advanced

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

Re: Delayed warnings


From: Juanma Barranquero
Subject: Re: Delayed warnings
Date: Tue, 22 Mar 2011 12:59:02 +0100

On Mon, Mar 21, 2011 at 23:05, Stefan Monnier <address@hidden> wrote:

> Or you could have your C code all `add-hook-once' on post-command-hook
> which would be a new function that adds a function onto a hook such that
> the function is only run once and then automatically removed.

I like Martin's proposal more, for two reasons (in addition to the
concern expressed by him about errors in post-command-hook):

1.- I want to allow the user to easily disable these warnings from
their .emacs; it's cleaner to locate '(initialization "such and such
warning" :warning) in the delayed-warnings variable than a lambda
expression.

2.- What you propose is more general, but it adds complexity for the
simple case of just wanting to display a warning, and that generality
is not really needed IMO, unless you envision there's a common need to
delay things other than errors and warnings and the like. I'd say the
limited success of `deferred-action-*' would seem to indicate there
isn't any such need, and for those rare cases, they have
post-command-hook.

So, summarizing: I have nothing again `add-hook-once' and surely will
find it useful (my .emacs would benefit from it right now); but I
don't think it's the right thing to use for delayed initialization
warnings.

    Juanma



reply via email to

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