emacs-devel
[Top][All Lists]
Advanced

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

Re: delayed-warnings-hook versus deferred-action-function


From: Juanma Barranquero
Subject: Re: delayed-warnings-hook versus deferred-action-function
Date: Wed, 8 Feb 2012 05:28:35 +0100

> Trying to document this, I'm confused as to what this functionality is
> for. It only seems to be used for warning about a _emacs file on MS
> Windows?

And also for the case that HOME is being defaulted to C:\ (because
there's a .emacs in C:\) but not set explicitly. That was, in fact,
the original use, because at that point elisp code can not yet run.

> Is it supposed to be used by external Lisp libraries for
> something (if so, what?), or is it fully internal to Emacs (in which it
> may not need documenting anywhere)?

I'd say it is more for internal use. I'd like to see some warnings
that currently are generated through l?warn and display-warning turned
into delayed warnings, for two reasons: eventually it will allow the
user to filter them out or otherwise customize them, and it allows
more control in some cases. For example, in bug#10578 I proposed it as
a way to display errors from the redisplay and image library code in a
relatively unobtrusive way (using an idle timer).

Anway, if we supply a trivial macro

  (defmacro delay-warning (&rest args)
    "...
  \n(fn type message &optional level buffer-name)"
    `(push args delayed-warnings-list))

there's no reason it could not be used from external libraries.

    Juanma



reply via email to

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