[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: deferred-action
From: |
Stefan Monnier |
Subject: |
Re: deferred-action |
Date: |
Mon, 21 Mar 2011 10:01:12 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
> What are the variables deferred-action-list and
> deferred-action-function used for?
> Their API is a bit surprising: there's a list of things to do, and a
> function to do things (so, a sort of a poor man's hook) with
> absolutely no explanation (nor documentation on the Elisp manual) of
> how it is intended to be used, how to manage conflicts supposing that
> different pieces of code want to use it, etc.
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.
> The only reference to them on the Emacs sources is in
> emacs-lisp/ert-x.el, and it's really just aping the Emacs
> command-loop.
Right, ERT is not actually using that variable, it's just obeying it in
case the command uses it.
> And the only other reference I find is in anything.el (in the Emacs
> wiki), where they are basically used as a sort of post-command hook.
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.
> I think Roland McGrath asked basically this same question back in 1994
> (http://www.maths.tcd.ie/local/JUNK/cyclic/mailing-lists/arcana/0022.html),
> so perhaps it is time to document these variables or deprecate them.
Let's deprecate them.
Stefan
- deferred-action, Juanma Barranquero, 2011/03/20
- Re: deferred-action,
Stefan Monnier <=