diff options
author | Phillip Lord <phillip.lord@newcastle.ac.uk> | 2014-12-12 10:35:13 +0000 |
---|---|---|
committer | Phillip Lord <phillip.lord@newcastle.ac.uk> | 2014-12-12 10:35:13 +0000 |
commit | 4d771815acc4cd4cef9c9d8353034c654fc2d29f (patch) | |
tree | c123e869ced89e6dc3a94f6c7dcfecb21d353ae5 | |
parent | aeeaf082e69ec088d6bbb140ddf0ce8119580a67 (diff) | |
download | emacs-fix/subst-char-in-region.tar.gz |
subst-char-in-region signals consistent changes.fix/subst-char-in-region
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.
-rw-r--r-- | src/editfns.c | 7 |
1 files 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); } |