all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: [Emacs-diffs] master 4d74873 2/2: Fix miscellaneous glitches in cc-mode.el. Fixes debbugs#20245.
       [not found] ` <E1YfFRm-0000wd-A6@vcs.savannah.gnu.org>
@ 2015-09-12  4:01   ` Stefan Monnier
  0 siblings, 0 replies; only message in thread
From: Stefan Monnier @ 2015-09-12  4:01 UTC (permalink / raw)
  To: emacs-devel; +Cc: Alan Mackenzie

> +      (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.



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-09-12  4:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20150406222445.3566.44486@vcs.savannah.gnu.org>
     [not found] ` <E1YfFRm-0000wd-A6@vcs.savannah.gnu.org>
2015-09-12  4:01   ` [Emacs-diffs] master 4d74873 2/2: Fix miscellaneous glitches in cc-mode.el. Fixes debbugs#20245 Stefan Monnier

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.