diff options
| author | Federico Tedin | 2018-08-06 19:53:05 -0300 |
|---|---|---|
| committer | Eli Zaretskii | 2018-08-11 12:24:04 +0300 |
| commit | c024a05e5990f0f9777ff88fffa02382b7522ccc (patch) | |
| tree | 7e3046c8280c4193130a9b5bbbfe7bc011d94d43 /src | |
| parent | 33344ab911ed6933294b501cb28ff63012f7a567 (diff) | |
| download | emacs-c024a05e5990f0f9777ff88fffa02382b7522ccc.tar.gz emacs-c024a05e5990f0f9777ff88fffa02382b7522ccc.zip | |
Add variable auto-save-no-message
* src/keyboard.c (auto-save-no-message): New variable, allows
suppressing auto-saving message.
* lisp/cus-start.el (standard): Add 'auto-save-no-message' variable.
* doc/emacs/files.texi (Auto Save): Document 'auto-save-no-message'.
* etc/NEWS: Mention 'auto-save-no-message'. (Bug#31039)
Diffstat (limited to 'src')
| -rw-r--r-- | src/keyboard.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index 7ab9a6069ad..66041f317b5 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -2626,7 +2626,7 @@ read_char (int commandflag, Lisp_Object map, | |||
| 2626 | && num_nonmacro_input_events - last_auto_save > max (auto_save_interval, 20) | 2626 | && num_nonmacro_input_events - last_auto_save > max (auto_save_interval, 20) |
| 2627 | && !detect_input_pending_run_timers (0)) | 2627 | && !detect_input_pending_run_timers (0)) |
| 2628 | { | 2628 | { |
| 2629 | Fdo_auto_save (Qnil, Qnil); | 2629 | Fdo_auto_save (auto_save_no_message ? Qt : Qnil, Qnil); |
| 2630 | /* Hooks can actually change some buffers in auto save. */ | 2630 | /* Hooks can actually change some buffers in auto save. */ |
| 2631 | redisplay (); | 2631 | redisplay (); |
| 2632 | } | 2632 | } |
| @@ -2691,7 +2691,7 @@ read_char (int commandflag, Lisp_Object map, | |||
| 2691 | if (EQ (tem0, Qt) | 2691 | if (EQ (tem0, Qt) |
| 2692 | && ! CONSP (Vunread_command_events)) | 2692 | && ! CONSP (Vunread_command_events)) |
| 2693 | { | 2693 | { |
| 2694 | Fdo_auto_save (Qnil, Qnil); | 2694 | Fdo_auto_save (auto_save_no_message ? Qt : Qnil, Qnil); |
| 2695 | redisplay (); | 2695 | redisplay (); |
| 2696 | } | 2696 | } |
| 2697 | } | 2697 | } |
| @@ -11391,6 +11391,10 @@ result of looking up the original command in the active keymaps. */); | |||
| 11391 | Zero means disable autosaving due to number of characters typed. */); | 11391 | Zero means disable autosaving due to number of characters typed. */); |
| 11392 | auto_save_interval = 300; | 11392 | auto_save_interval = 300; |
| 11393 | 11393 | ||
| 11394 | DEFVAR_BOOL ("auto-save-no-message", auto_save_no_message, | ||
| 11395 | doc: /* Non-nil means do not print any message when auto-saving. */); | ||
| 11396 | auto_save_no_message = false; | ||
| 11397 | |||
| 11394 | DEFVAR_LISP ("auto-save-timeout", Vauto_save_timeout, | 11398 | DEFVAR_LISP ("auto-save-timeout", Vauto_save_timeout, |
| 11395 | doc: /* Number of seconds idle time before auto-save. | 11399 | doc: /* Number of seconds idle time before auto-save. |
| 11396 | Zero or nil means disable auto-saving due to idleness. | 11400 | Zero or nil means disable auto-saving due to idleness. |