diff options
| author | Gerd Moellmann | 1999-08-21 19:29:20 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 1999-08-21 19:29:20 +0000 |
| commit | c71106e5dd2dc758d4c3509d3ab50561ae16eb2a (patch) | |
| tree | 74a44bca921c48cda10ed89fa738bd24629a89da /src | |
| parent | 189437a7112beef383b7b03055f8c0a26a0f4765 (diff) | |
| download | emacs-c71106e5dd2dc758d4c3509d3ab50561ae16eb2a.tar.gz emacs-c71106e5dd2dc758d4c3509d3ab50561ae16eb2a.zip | |
(Fdo_auto_save): Use push_message, restore_message,
pop_message.
Diffstat (limited to 'src')
| -rw-r--r-- | src/fileio.c | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/src/fileio.c b/src/fileio.c index 04c12858e4c..e9f9a9872ef 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -5090,10 +5090,6 @@ A non-nil CURRENT-ONLY argument means save only current buffer.") | |||
| 5090 | struct buffer *old = current_buffer, *b; | 5090 | struct buffer *old = current_buffer, *b; |
| 5091 | Lisp_Object tail, buf; | 5091 | Lisp_Object tail, buf; |
| 5092 | int auto_saved = 0; | 5092 | int auto_saved = 0; |
| 5093 | char *omessage = echo_area_glyphs; | ||
| 5094 | Lisp_Object omessage_string = echo_area_message; | ||
| 5095 | int omessage_length = echo_area_glyphs_length; | ||
| 5096 | int oldmultibyte = message_enable_multibyte; | ||
| 5097 | int do_handled_files; | 5093 | int do_handled_files; |
| 5098 | Lisp_Object oquit; | 5094 | Lisp_Object oquit; |
| 5099 | FILE *stream; | 5095 | FILE *stream; |
| @@ -5101,9 +5097,7 @@ A non-nil CURRENT-ONLY argument means save only current buffer.") | |||
| 5101 | int count = specpdl_ptr - specpdl; | 5097 | int count = specpdl_ptr - specpdl; |
| 5102 | int *ptr; | 5098 | int *ptr; |
| 5103 | int orig_minibuffer_auto_raise = minibuffer_auto_raise; | 5099 | int orig_minibuffer_auto_raise = minibuffer_auto_raise; |
| 5104 | struct gcpro gcpro1; | 5100 | int message_p = push_message (); |
| 5105 | |||
| 5106 | GCPRO1 (omessage_string); | ||
| 5107 | 5101 | ||
| 5108 | /* Ordinarily don't quit within this function, | 5102 | /* Ordinarily don't quit within this function, |
| 5109 | but don't make it impossible to quit (in case we get hung in I/O). */ | 5103 | but don't make it impossible to quit (in case we get hung in I/O). */ |
| @@ -5248,15 +5242,10 @@ A non-nil CURRENT-ONLY argument means save only current buffer.") | |||
| 5248 | 5242 | ||
| 5249 | if (auto_saved && NILP (no_message)) | 5243 | if (auto_saved && NILP (no_message)) |
| 5250 | { | 5244 | { |
| 5251 | if (STRINGP (omessage_string)) | 5245 | if (message_p) |
| 5252 | { | ||
| 5253 | sit_for (1, 0, 0, 0, 0); | ||
| 5254 | message3 (omessage_string, omessage_length, oldmultibyte); | ||
| 5255 | } | ||
| 5256 | else if (omessage) | ||
| 5257 | { | 5246 | { |
| 5258 | sit_for (1, 0, 0, 0, 0); | 5247 | sit_for (1, 0, 0, 0, 0); |
| 5259 | message2 (omessage, omessage_length, oldmultibyte); | 5248 | restore_message (); |
| 5260 | } | 5249 | } |
| 5261 | else | 5250 | else |
| 5262 | message1 ("Auto-saving...done"); | 5251 | message1 ("Auto-saving...done"); |
| @@ -5264,7 +5253,7 @@ A non-nil CURRENT-ONLY argument means save only current buffer.") | |||
| 5264 | 5253 | ||
| 5265 | Vquit_flag = oquit; | 5254 | Vquit_flag = oquit; |
| 5266 | 5255 | ||
| 5267 | UNGCPRO; | 5256 | pop_message (); |
| 5268 | unbind_to (count, Qnil); | 5257 | unbind_to (count, Qnil); |
| 5269 | return Qnil; | 5258 | return Qnil; |
| 5270 | } | 5259 | } |