From: Juanma Barranquero <lekktu@gmail.com>
To: Glenn Morris <rgm@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: delayed-warnings-hook versus deferred-action-function
Date: Sun, 5 Feb 2012 01:29:36 +0100 [thread overview]
Message-ID: <CAAeL0SQswSN=TNs8NeZnJQ2hYvUUEJPKw-VBpmv6gQW-nnPRjg@mail.gmail.com> (raw)
In-Reply-To: <n2lioinnyr.fsf@fencepost.gnu.org>
On Sun, Feb 5, 2012 at 01:06, Glenn Morris <rgm@gnu.org> wrote:
> In 24.1, deferred-action-function has been deprecated in favour of just
> using post-command-hook. Fair enough, the former was never really used
> for anything.
deferred-function-action was deprecated for the two reasons you
mention: it was never used (I think googling it gave just one use, and
it was used just like post-command-hook), and it was poorly
documented. There was not way to resolve conflicts between two
applications wanting to use it for different purposes.
> However, delayed-warnings-hook has been added, and, although it has a
> more clearly documented purpose, seems to be functionally equivalent to
> the deprecated interface.
It is functionally equivalent, but the documented API of
deferred-function-(action|list) was so vague that using it for delayed
warnings made impossible to guarantee that someone else would not
trample over the warnings. So deprecating one and adding the other is
a way of documenting the delayed warnings use. For non-warnings,
post-command-hook is enough.
> Why couldn't an element just be
> added to post-command-hook to process delayed-warnings?
The idea is, some day, to add a defcustom interface to allow the user
adding other warnings-processing functions. In my .emacs I have one to
filter out specific warnings, for example. That could be done from
post-command-hook, but it would be messier.
Juanma
next prev parent reply other threads:[~2012-02-05 0:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-05 0:06 delayed-warnings-hook versus deferred-action-function Glenn Morris
2012-02-05 0:29 ` Juanma Barranquero [this message]
2012-02-05 2:25 ` Glenn Morris
2012-02-08 4:01 ` Glenn Morris
2012-02-08 4:28 ` Juanma Barranquero
2012-02-08 8:32 ` Glenn Morris
2012-02-08 10:02 ` Juanma Barranquero
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAAeL0SQswSN=TNs8NeZnJQ2hYvUUEJPKw-VBpmv6gQW-nnPRjg@mail.gmail.com' \
--to=lekktu@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=rgm@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).