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
Cc: Alan Mackenzie <acm@muc.de>
Subject: Re: [Emacs-diffs] master 4d74873 2/2: Fix miscellaneous glitches in cc-mode.el. Fixes debbugs#20245.
Date: Sat, 12 Sep 2015 00:01:10 -0400	[thread overview]
Message-ID: <jwvsi6kgutr.fsf-monnier+emacsdiffs@gnu.org> (raw)
In-Reply-To: <E1YfFRm-0000wd-A6@vcs.savannah.gnu.org> (Alan Mackenzie's message of "Mon, 06 Apr 2015 22:24:46 +0000")

> +      (let (before-change-functions after-change-functions)

Let-binding these vars can have some annoying side effects.

So instead you should use

   (let ((inhibit-modification-hooks t)) ...)

This variable exists in Emacs since Emacs-21.  AFAICT it does not exist
in XEmacs, but that shouldn't matter since XEmacs doesn't run
before/after-change-functions upon text-property changes, IIUC.


        Stefan


PS: Even better would be to use `with-silent-modifications', but that's
a fairly recent addition.



           reply	other threads:[~2015-09-12  4:01 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <E1YfFRm-0000wd-A6@vcs.savannah.gnu.org>]

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=jwvsi6kgutr.fsf-monnier+emacsdiffs@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 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.