emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r109595: Fix for undo recording in de


From: Chong Yidong
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r109595: Fix for undo recording in decode_coding.
Date: Tue, 14 Aug 2012 13:09:35 +0800
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 109595
fixes bug: http://debbugs.gnu.org/11773
author: Gergely Risko <address@hidden>
committer: Chong Yidong <address@hidden>
branch nick: trunk
timestamp: Tue 2012-08-14 13:09:35 +0800
message:
  Fix for undo recording in decode_coding.
  
  * coding.c (decode_coding): Record buffer modification before
  disabling undo_list.
modified:
  src/ChangeLog
  src/coding.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2012-08-14 04:49:18 +0000
+++ b/src/ChangeLog     2012-08-14 05:09:35 +0000
@@ -1,3 +1,8 @@
+2012-08-14  Gergely Risko  <address@hidden>
+
+       * coding.c (decode_coding): Record buffer modification before
+       disabling undo_list (Bug#11773).
+
 2012-08-14  Dmitry Antipov  <address@hidden>
 
        Revert and cleanup some recent overlay changes.

=== modified file 'src/coding.c'
--- a/src/coding.c      2012-08-13 03:39:07 +0000
+++ b/src/coding.c      2012-08-14 05:09:35 +0000
@@ -7102,6 +7102,15 @@
        set_buffer_internal (XBUFFER (coding->dst_object));
       if (GPT != PT)
        move_gap_both (PT, PT_BYTE);
+
+      /* We must disable undo_list in order to record the whole insert
+        transaction via record_insert at the end.  But doing so also
+        disables the recording of the first change to the undo_list.
+        Therefore we check for first change here and record it via
+        record_first_change if needed.  */
+      if (MODIFF <= SAVE_MODIFF)
+       record_first_change ();
+
       undo_list = BVAR (current_buffer, undo_list);
       BSET (current_buffer, undo_list, Qt);
     }


reply via email to

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