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 [EMACS_22_BASE]


From: Chong Yidong
Subject: [Emacs-diffs] Changes to emacs/src/fileio.c,v [EMACS_22_BASE]
Date: Mon, 31 Mar 2008 22:07:41 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Branch:         EMACS_22_BASE
Changes by:     Chong Yidong <cyd>      08/03/31 22:07:41

Index: fileio.c
===================================================================
RCS file: /sources/emacs/emacs/src/fileio.c,v
retrieving revision 1.580.2.12
retrieving revision 1.580.2.13
diff -u -b -r1.580.2.12 -r1.580.2.13
--- fileio.c    10 Mar 2008 12:19:35 -0000      1.580.2.12
+++ fileio.c    31 Mar 2008 22:07:40 -0000      1.580.2.13
@@ -159,6 +159,9 @@
    a new file with the same mode as the original */
 int auto_save_mode_bits;
 
+/* Set by auto_save_1 if an error occurred during the last auto-save. */
+int auto_save_error_occurred;
+
 /* The symbol bound to coding-system-for-read when
    insert-file-contents is called for recovering a file.  This is not
    an actual coding system name, but just an indicator to tell
@@ -5757,6 +5760,8 @@
   char *msgbuf;
   USE_SAFE_ALLOCA;
 
+  auto_save_error_occurred = 1;
+
   ring_bell ();
 
   args[0] = build_string ("Auto-saving %s: %s");
@@ -5928,6 +5933,7 @@
                         make_number (minibuffer_auto_raise));
   minibuffer_auto_raise = 0;
   auto_saving = 1;
+  auto_save_error_occurred = 0;
 
   /* On first pass, save all files that don't have handlers.
      On second pass, save all files that do have handlers.
@@ -6042,8 +6048,9 @@
          sit_for (make_number (1), 0, 0);
          restore_message ();
        }
-      else
-       /* If we displayed a message and then restored a state
+      else if (!auto_save_error_occurred)
+       /* Don't overwrite the error message if an error occurred.
+          If we displayed a message and then restored a state
           with no message, leave a "done" message on the screen.  */
        message1 ("Auto-saving...done");
     }




reply via email to

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