diff options
| author | Jim Blandy | 1993-01-14 15:08:15 +0000 |
|---|---|---|
| committer | Jim Blandy | 1993-01-14 15:08:15 +0000 |
| commit | 178577827e99f3a78604c3391177e33e57acd6f0 (patch) | |
| tree | 1641b57afc408206a874b3e09a652361226106c3 /src | |
| parent | 40be253a3beaad98e64d3dc765ff3ae39c6de0b3 (diff) | |
| download | emacs-178577827e99f3a78604c3391177e33e57acd6f0.tar.gz emacs-178577827e99f3a78604c3391177e33e57acd6f0.zip | |
* fileio.c (Fdo_auto_save): Add CURRENT_ONLY argument, as
described in doc string.
Diffstat (limited to 'src')
| -rw-r--r-- | src/fileio.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/fileio.c b/src/fileio.c index be02de608d9..e17dc6d8e46 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -2867,8 +2867,8 @@ so that your editing is not lost if the system crashes.\n\ | |||
| 2867 | This file is not the file you visited; that changes only when you save.\n\n\ | 2867 | This file is not the file you visited; that changes only when you save.\n\n\ |
| 2868 | Non-nil first argument means do not print any message if successful.\n\ | 2868 | Non-nil first argument means do not print any message if successful.\n\ |
| 2869 | Non-nil second argument means save only current buffer.") | 2869 | Non-nil second argument means save only current buffer.") |
| 2870 | (nomsg) | 2870 | (no_message, current_only) |
| 2871 | Lisp_Object nomsg; | 2871 | Lisp_Object no_message, current_only; |
| 2872 | { | 2872 | { |
| 2873 | struct buffer *old = current_buffer, *b; | 2873 | struct buffer *old = current_buffer, *b; |
| 2874 | Lisp_Object tail, buf; | 2874 | Lisp_Object tail, buf; |
| @@ -2881,7 +2881,7 @@ Non-nil second argument means save only current buffer.") | |||
| 2881 | 2881 | ||
| 2882 | auto_saving = 1; | 2882 | auto_saving = 1; |
| 2883 | if (minibuf_level) | 2883 | if (minibuf_level) |
| 2884 | nomsg = Qt; | 2884 | no_message = Qt; |
| 2885 | 2885 | ||
| 2886 | /* Vrun_hooks is nil before emacs is dumped, and inc-vers.el will | 2886 | /* Vrun_hooks is nil before emacs is dumped, and inc-vers.el will |
| 2887 | eventually call do-auto-save, so don't err here in that case. */ | 2887 | eventually call do-auto-save, so don't err here in that case. */ |
| @@ -2893,6 +2893,11 @@ Non-nil second argument means save only current buffer.") | |||
| 2893 | { | 2893 | { |
| 2894 | buf = XCONS (XCONS (tail)->car)->cdr; | 2894 | buf = XCONS (XCONS (tail)->car)->cdr; |
| 2895 | b = XBUFFER (buf); | 2895 | b = XBUFFER (buf); |
| 2896 | |||
| 2897 | if (!NILP (current_only) | ||
| 2898 | && b != current_buffer) | ||
| 2899 | continue; | ||
| 2900 | |||
| 2896 | /* Check for auto save enabled | 2901 | /* Check for auto save enabled |
| 2897 | and file changed since last auto save | 2902 | and file changed since last auto save |
| 2898 | and file changed since last real save. */ | 2903 | and file changed since last real save. */ |
| @@ -2919,7 +2924,7 @@ Non-nil second argument means save only current buffer.") | |||
| 2919 | continue; | 2924 | continue; |
| 2920 | } | 2925 | } |
| 2921 | set_buffer_internal (b); | 2926 | set_buffer_internal (b); |
| 2922 | if (!auto_saved && NILP (nomsg)) | 2927 | if (!auto_saved && NILP (no_message)) |
| 2923 | message1 ("Auto-saving..."); | 2928 | message1 ("Auto-saving..."); |
| 2924 | internal_condition_case (auto_save_1, Qt, auto_save_error); | 2929 | internal_condition_case (auto_save_1, Qt, auto_save_error); |
| 2925 | auto_saved++; | 2930 | auto_saved++; |
| @@ -2932,7 +2937,7 @@ Non-nil second argument means save only current buffer.") | |||
| 2932 | /* Prevent another auto save till enough input events come in. */ | 2937 | /* Prevent another auto save till enough input events come in. */ |
| 2933 | record_auto_save (); | 2938 | record_auto_save (); |
| 2934 | 2939 | ||
| 2935 | if (auto_saved && NILP (nomsg)) | 2940 | if (auto_saved && NILP (no_message)) |
| 2936 | message1 (omessage ? omessage : "Auto-saving...done"); | 2941 | message1 (omessage ? omessage : "Auto-saving...done"); |
| 2937 | 2942 | ||
| 2938 | auto_saving = 0; | 2943 | auto_saving = 0; |