emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Emacs treatment of match-data during change hooks


From: Barry OReilly
Subject: Emacs treatment of match-data during change hooks
Date: Mon, 29 Apr 2013 10:36:14 -0400

Investigating bug 14281[1], I found this passage in the Elisp
manual[2]:

   The functions you use in these [change] hooks should save and
   restore the match data if they do anything that uses regular
   expressions; otherwise, they will interfere in bizarre ways with
   the editing operations that call them.

I suppose that caveat would pin the bug on one of the third party
packages I use. However, why couldn't Emacs save off the match-data
itself and restore it after the after-change-functions? Is there any
legit situation where a change hook would want to change the
match-data in effect after the change hook returns?

[1] https://lists.gnu.org/archive/html/bug-gnu-emacs/2013-04/msg00703.html
[2] http://www.gnu.org/software/emacs/manual/html_node/elisp/Change-Hooks.html


reply via email to

[Prev in Thread] Current Thread [Next in Thread]