unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Alan Mackenzie <acm@muc.de>
Cc: emacs-devel@gnu.org
Subject: Re: (insert ?\n) spuriously calls before-change-functions twice. Help!
Date: Wed, 06 Jan 2010 09:33:36 -0500	[thread overview]
Message-ID: <jwv1vi3gvc0.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <20100106130521.GA2447@muc.de> (Alan Mackenzie's message of "Wed,  6 Jan 2010 13:05:21 +0000")

>> Even if we fix the bug, there can be any number of reasons why the two
>> hooks may occasionally not be paired, .....
> Really?  I would have thought they should be rigorously paired, without
> any "recursive" invocations in-between (barring elisp code doing this
> deliberately).

There's combine-after-change-functions for one.  Or there's the case
where a signal is thrown in between the two.  Of course, there's also
the nesting case.

>> .... so your hooks should be robust against such situations.  IOW it's
>> best to try and avoid relying in the after-hook on info passed from the
>> before hook.
> Haven't we discussed this before at some time?  ;-)

You mean I should just have said "Told ya!"?


        Stefan




  reply	other threads:[~2010-01-06 14:33 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-05 11:09 (insert ?\n) spuriously calls before-change-functions twice. Help! Alan Mackenzie
2010-01-05 15:22 ` Stefan Monnier
2010-01-05 17:31   ` Alan Mackenzie
2010-01-05 19:52     ` Stefan Monnier
2010-01-06 13:05       ` Alan Mackenzie
2010-01-06 14:33         ` Stefan Monnier [this message]
2010-01-19 13:23       ` Alan Mackenzie
2010-01-19 15:11         ` Chong Yidong
2010-01-19 17:11           ` Alan Mackenzie
2010-01-19 18:02             ` Chong Yidong
2010-01-19 22:30               ` Alan Mackenzie

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=jwv1vi3gvc0.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=acm@muc.de \
    --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 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).