emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/src/fileio.c,v


From: Stefan Monnier
Subject: [Emacs-diffs] Changes to emacs/src/fileio.c,v
Date: Wed, 27 Feb 2008 04:10:18 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Stefan Monnier <monnier>        08/02/27 04:10:17

Index: fileio.c
===================================================================
RCS file: /sources/emacs/emacs/src/fileio.c,v
retrieving revision 1.604
retrieving revision 1.605
diff -u -b -r1.604 -r1.605
--- fileio.c    24 Feb 2008 10:09:03 -0000      1.604
+++ fileio.c    27 Feb 2008 04:10:15 -0000      1.605
@@ -3716,6 +3716,7 @@
   struct stat st;
   register int fd;
   int inserted = 0;
+  int nochange = 0;
   register int how_much;
   register int unprocessed;
   int count = SPECPDL_INDEX ();
@@ -4281,6 +4282,9 @@
        {
          specpdl_ptr--;
          /* Truncate the buffer to the size of the file.  */
+         if (same_at_start == same_at_end)
+           nochange = 1;
+         else
          del_range_byte (same_at_start, same_at_end, 0);
          inserted = 0;
 
@@ -4628,7 +4632,7 @@
 
   if (!NILP (visit))
     {
-      if (!EQ (current_buffer->undo_list, Qt))
+      if (!EQ (current_buffer->undo_list, Qt) && !nochange)
        current_buffer->undo_list = Qnil;
 
       if (NILP (handler))




reply via email to

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