diff options
| author | Richard M. Stallman | 2003-12-29 11:24:14 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2003-12-29 11:24:14 +0000 |
| commit | dc2628c1136068e34a39f6ddb13415cfdef26528 (patch) | |
| tree | ba1da697cfadb7285e631e55771cd2e139dcd076 /src | |
| parent | 6c2ef893427b86cbbcadcb271bf9b45e68e4b72e (diff) | |
| download | emacs-dc2628c1136068e34a39f6ddb13415cfdef26528.tar.gz emacs-dc2628c1136068e34a39f6ddb13415cfdef26528.zip | |
(choose_write_coding_system): Ignore auto_saving
if using the visited file for auto saves.
(Fwrite_region): Don't update SAVE_MODIFF
if auto-saving in visited file.
Diffstat (limited to 'src')
| -rw-r--r-- | src/fileio.c | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/src/fileio.c b/src/fileio.c index e586407cecc..a2b207169cf 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -4685,7 +4685,9 @@ choose_write_coding_system (start, end, filename, | |||
| 4685 | { | 4685 | { |
| 4686 | Lisp_Object val; | 4686 | Lisp_Object val; |
| 4687 | 4687 | ||
| 4688 | if (auto_saving) | 4688 | if (auto_saving |
| 4689 | && NILP (Fstring_equal (current_buffer->filename, | ||
| 4690 | current_buffer->auto_save_file_name))) | ||
| 4689 | { | 4691 | { |
| 4690 | /* We use emacs-mule for auto saving... */ | 4692 | /* We use emacs-mule for auto saving... */ |
| 4691 | setup_coding_system (Qemacs_mule, coding); | 4693 | setup_coding_system (Qemacs_mule, coding); |
| @@ -5221,7 +5223,14 @@ This does code conversion according to the value of | |||
| 5221 | update_mode_lines++; | 5223 | update_mode_lines++; |
| 5222 | } | 5224 | } |
| 5223 | else if (quietly) | 5225 | else if (quietly) |
| 5224 | return Qnil; | 5226 | { |
| 5227 | if (auto_saving | ||
| 5228 | && ! NILP (Fstring_equal (current_buffer->filename, | ||
| 5229 | current_buffer->auto_save_file_name))) | ||
| 5230 | SAVE_MODIFF = MODIFF; | ||
| 5231 | |||
| 5232 | return Qnil; | ||
| 5233 | } | ||
| 5225 | 5234 | ||
| 5226 | if (!auto_saving) | 5235 | if (!auto_saving) |
| 5227 | message_with_string ((INTEGERP (append) | 5236 | message_with_string ((INTEGERP (append) |
| @@ -5776,11 +5785,14 @@ A non-nil CURRENT-ONLY argument means save only current buffer. */) | |||
| 5776 | minibuffer_auto_raise = 0; | 5785 | minibuffer_auto_raise = 0; |
| 5777 | auto_saving = 1; | 5786 | auto_saving = 1; |
| 5778 | 5787 | ||
| 5779 | /* First, save all files which don't have handlers. If Emacs is | 5788 | /* On first pass, save all files that don't have handlers. |
| 5780 | crashing, the handlers may tweak what is causing Emacs to crash | 5789 | On second pass, save all files that do have handlers. |
| 5781 | in the first place, and it would be a shame if Emacs failed to | 5790 | |
| 5782 | autosave perfectly ordinary files because it couldn't handle some | 5791 | If Emacs is crashing, the handlers may tweak what is causing |
| 5783 | ange-ftp'd file. */ | 5792 | Emacs to crash in the first place, and it would be a shame if |
| 5793 | Emacs failed to autosave perfectly ordinary files because it | ||
| 5794 | couldn't handle some ange-ftp'd file. */ | ||
| 5795 | |||
| 5784 | for (do_handled_files = 0; do_handled_files < 2; do_handled_files++) | 5796 | for (do_handled_files = 0; do_handled_files < 2; do_handled_files++) |
| 5785 | for (tail = Vbuffer_alist; GC_CONSP (tail); tail = XCDR (tail)) | 5797 | for (tail = Vbuffer_alist; GC_CONSP (tail); tail = XCDR (tail)) |
| 5786 | { | 5798 | { |