emacs-devel
[Top][All Lists]
Advanced

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

Re: deferred-action


From: Juanma Barranquero
Subject: Re: deferred-action
Date: Mon, 21 Mar 2011 15:56:21 +0100

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

> The docstrings seem to hold enough info for someone like me, at least.
> They say explicitly that the action-list's format is completely up (it
> is only tested for non-nil content before running the action-function)
> to the action-function.

I understand that. And no, I don't think it's enough, because each
piece of code using them is quite  free to do it as it pleases (some
could use deferred-action-list as a flag, other as a list of items to
treat, a third as a list of functions to run, etc.), but on the other
hand, deferred-action-function is intended to contain just a function,
so there's nowhere explained HOW would several packages coordinate
their different uses. Perhaps some kind of chaining where everyone
which uses them wraps the previous deferred-action-function and calls
it at the end... but it is far from clear and well-defined.

> They're run right after post-command-hook, so I think that whenever
> they're used we can use post-command-hook for it instead.

Yes, when I looked at anything.el's code I didn't understand why the
author chose to use deferred-action-* instead of just using
post-command-hook.

> Let's deprecate them.

Thanks.

    Juanma



reply via email to

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