aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChong Yidong2008-02-23 23:12:52 +0000
committerChong Yidong2008-02-23 23:12:52 +0000
commitca730bf009b4c5d02157a66f4533c3b6e3055822 (patch)
treea85b6984ac4028cdb18af5e464d60e7548d6e5d2 /src
parent9997701e25eef933aca2e3fb0c9ff1e60515389e (diff)
downloademacs-ca730bf009b4c5d02157a66f4533c3b6e3055822.tar.gz
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')
-rw-r--r--src/fileio.c9
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;
158 a new file with the same mode as the original */ 158 a new file with the same mode as the original */
159int auto_save_mode_bits; 159int auto_save_mode_bits;
160 160
161/* Set by auto_save_1 if an error occurred during the last auto-save. */
162int auto_save_error_occurred;
163
161/* The symbol bound to coding-system-for-read when 164/* The symbol bound to coding-system-for-read when
162 insert-file-contents is called for recovering a file. This is not 165 insert-file-contents is called for recovering a file. This is not
163 an actual coding system name, but just an indicator to tell 166 an actual coding system name, but just an indicator to tell
@@ -5728,6 +5731,8 @@ auto_save_error (error)
5728 char *msgbuf; 5731 char *msgbuf;
5729 USE_SAFE_ALLOCA; 5732 USE_SAFE_ALLOCA;
5730 5733
5734 auto_save_error_occurred = 1;
5735
5731 ring_bell (XFRAME (selected_frame)); 5736 ring_bell (XFRAME (selected_frame));
5732 5737
5733 args[0] = build_string ("Auto-saving %s: %s"); 5738 args[0] = build_string ("Auto-saving %s: %s");
@@ -5899,6 +5904,7 @@ A non-nil CURRENT-ONLY argument means save only current buffer. */)
5899 make_number (minibuffer_auto_raise)); 5904 make_number (minibuffer_auto_raise));
5900 minibuffer_auto_raise = 0; 5905 minibuffer_auto_raise = 0;
5901 auto_saving = 1; 5906 auto_saving = 1;
5907 auto_save_error_occurred = 0;
5902 5908
5903 /* On first pass, save all files that don't have handlers. 5909 /* On first pass, save all files that don't have handlers.
5904 On second pass, save all files that do have handlers. 5910 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. */)
6013 sit_for (make_number (1), 0, 0); 6019 sit_for (make_number (1), 0, 0);
6014 restore_message (); 6020 restore_message ();
6015 } 6021 }
6016 else 6022 else if (!auto_save_error_occurred)
6023 /* Don't overwrite the error message if an error occurred. */
6017 /* If we displayed a message and then restored a state 6024 /* If we displayed a message and then restored a state
6018 with no message, leave a "done" message on the screen. */ 6025 with no message, leave a "done" message on the screen. */
6019 message1 ("Auto-saving...done"); 6026 message1 ("Auto-saving...done");