all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: emacs-devel@gnu.org
Subject: Re: replacing process sentinels and filters with hooks
Date: Tue, 13 Nov 2012 17:58:54 +0000 (UTC)	[thread overview]
Message-ID: <loom.20121113T185537-960@post.gmane.org> (raw)
In-Reply-To: jwvpq4zd790.fsf-monnier+emacs@gnu.org

> I think something along the lines of what with-wrapper-hook does is
> a good model (i.e. (add-function (process-filter proc) fun) would take
> a `fun' which expects 3 args: the proc, the string, and a
> "keep-running-the-hook" function which expects 2 args (the proc and the
> string)).

This is now implemented on the Emacs trunk.  It's called `add-function' and
takes an additional argument, for convenience, which says whether to add the
function before, after, or around the existing function.

It's the basis of the new advice mechanism (whose main entry point
is `advice-add').


        Stefan




  reply	other threads:[~2012-11-13 17:58 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-01 13:14 replacing process sentinels and filters with hooks Christopher Monsanto
2012-10-01 14:42 ` Paul Eggert
2012-10-01 15:20   ` Christopher Monsanto
2012-10-01 15:34 ` Stefan Monnier
     [not found]   ` <CAC5n7TGfMktPFOwpSqeqC6pF9rtpx14_fQaouEVnWmma2SfzdA@mail.gmail.com>
2012-10-01 16:53     ` Christopher Monsanto
     [not found]     ` <jwvboglmxm8.fsf-monnier+emacs@gnu.org>
2012-10-03 10:59       ` Christopher Monsanto
2012-10-03 13:37         ` Stefan Monnier
2012-11-13 17:58           ` Stefan Monnier [this message]
2012-10-03 14:39         ` Stephen J. Turnbull

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=loom.20121113T185537-960@post.gmane.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.