From 4d771815acc4cd4cef9c9d8353034c654fc2d29f Mon Sep 17 00:00:00 2001 From: Phillip Lord Date: Fri, 12 Dec 2014 10:35:13 +0000 Subject: subst-char-in-region signals consistent changes. Currently, subst-char-in-region appears to signal inconsistent ranges to before-change and after-change functions -- it signals the maximal range of stop to before-change, but the actual range of stop to after-change. This fix results in a consistent behaviour, although it is currently overly conservative. It signals the maximal range both before and after. --- src/editfns.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/editfns.c b/src/editfns.c index 0a07886934c..af02036f224 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -3069,7 +3069,7 @@ Both characters must have the same length of multi-byte form. */) else if (!changed) { changed = -1; - modify_text (pos, XINT (end)); + modify_text (XINT(start), XINT (end)); if (! NILP (noundo)) { @@ -3136,8 +3136,9 @@ Both characters must have the same length of multi-byte form. */) if (changed > 0) { - signal_after_change (changed, - last_changed - changed, last_changed - changed); + signal_after_change(XINT(start),XINT(end),XINT(end)-XINT(start)); + //signal_after_change (changed, + //last_changed - changed, last_changed - changed); update_compositions (changed, last_changed, CHECK_ALL); } -- cgit v1.2.1