diff options
author | Chong Yidong <cyd@stupidchicken.com> | 2008-02-23 23:12:52 +0000 |
---|---|---|
committer | Chong Yidong <cyd@stupidchicken.com> | 2008-02-23 23:12:52 +0000 |
commit | ca730bf009b4c5d02157a66f4533c3b6e3055822 (patch) | |
tree | a85b6984ac4028cdb18af5e464d60e7548d6e5d2 /src/fileio.c | |
parent | 9997701e25eef933aca2e3fb0c9ff1e60515389e (diff) | |
download | emacs-ca730bf009b4c5d02157a66f4533c3b6e3055822.tar.gz emacs-ca730bf009b4c5d02157a66f4533c3b6e3055822.tar.bz2 emacs-ca730bf009b4c5d02157a66f4533c3b6e3055822.zip |
(auto_save_error_occurred): New var.
(auto_save_error): Set it.
(Fdo_auto_save): Don't overwrite the error message if an auto-save
error occurred.
Diffstat (limited to 'src/fileio.c')
-rw-r--r-- | src/fileio.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/fileio.c b/src/fileio.c index 269dd33455e..525d2c889b1 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -158,6 +158,9 @@ int auto_saving; 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 @@ -5728,6 +5731,8 @@ auto_save_error (error) char *msgbuf; USE_SAFE_ALLOCA; + auto_save_error_occurred = 1; + ring_bell (XFRAME (selected_frame)); args[0] = build_string ("Auto-saving %s: %s"); @@ -5899,6 +5904,7 @@ A non-nil CURRENT-ONLY argument means save only current buffer. */) 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. @@ -6013,7 +6019,8 @@ A non-nil CURRENT-ONLY argument means save only current buffer. */) sit_for (make_number (1), 0, 0); restore_message (); } - else + 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"); |