]> code.delx.au - gnu-emacs/blobdiff - src/keyboard.c
Merge from trunk after a lot of time.
[gnu-emacs] / src / keyboard.c
index ed70e288c8485fd29f413117a413682625fda5be..c90ddba81c7ae6bef16378f6f990627e96a9bb6f 100644 (file)
@@ -2361,6 +2361,7 @@ read_decoded_event_from_main_queue (struct timespec *end_time,
 /* Read a character from the keyboard; call the redisplay if needed.  */
 /* commandflag 0 means do not autosave, but do redisplay.
    -1 means do not redisplay, but do autosave.
+   -2 means do neither.
    1 means do both.  */
 
 /* The arguments MAP is for menu prompting.  MAP is a keymap.
@@ -2727,7 +2728,7 @@ read_char (int commandflag, Lisp_Object map,
 
   /* Maybe auto save due to number of keystrokes.  */
 
-  if (commandflag != 0
+  if (commandflag != 0 && commandflag != -2
       && auto_save_interval > 0
       && num_nonmacro_input_events - last_auto_save > max (auto_save_interval, 20)
       && !detect_input_pending_run_timers (0))
@@ -2779,7 +2780,7 @@ read_char (int commandflag, Lisp_Object map,
         9 at 200k, 11 at 300k, and 12 at 500k.  It is 15 at 1 meg.  */
 
       /* Auto save if enough time goes by without input.  */
-      if (commandflag != 0
+      if (commandflag != 0 && commandflag != -2
          && num_nonmacro_input_events > last_auto_save
          && INTEGERP (Vauto_save_timeout)
          && XINT (Vauto_save_timeout) > 0)