emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] fix/subst-char-in-region 4d77181: subst-char-in-region sig


From: Phillip Lord
Subject: [Emacs-diffs] fix/subst-char-in-region 4d77181: subst-char-in-region signals consistent changes.
Date: Fri, 12 Dec 2014 11:29:10 +0000

branch: fix/subst-char-in-region
commit 4d771815acc4cd4cef9c9d8353034c654fc2d29f
Author: Phillip Lord <address@hidden>
Commit: Phillip Lord <address@hidden>

    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 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/editfns.c b/src/editfns.c
index 0a07886..af02036 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);
     }
 



reply via email to

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