aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2013-02-15 20:52:16 +0200
committerEli Zaretskii2013-02-15 20:52:16 +0200
commitef9c57e27aad0105ec058cc68377460763438af4 (patch)
tree34a5a0afa5b9c6730cc3d007f1895c52c578de3e /src
parentd64d97e537301a9787a569982d67eed8ecdabe8b (diff)
downloademacs-ef9c57e27aad0105ec058cc68377460763438af4.tar.gz
emacs-ef9c57e27aad0105ec058cc68377460763438af4.zip
Fix bug #13720 with auto-save-timeout less than 4 seconds.
src/keyboard.c (read_char): Fix calculation of auto-save time out when auto-save-timeout is less than 4.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog3
-rw-r--r--src/keyboard.c7
2 files changed, 7 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 1e1fe641ee5..1175e97688d 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,8 @@
12013-02-15 Eli Zaretskii <eliz@gnu.org> 12013-02-15 Eli Zaretskii <eliz@gnu.org>
2 2
3 * keyboard.c (read_char): Fix calculation of auto-save time out
4 when auto-save-timeout is less than 4. (Bug#13720)
5
3 * w32proc.c (new_child): Free up to 2 slots of dead processes at a 6 * w32proc.c (new_child): Free up to 2 slots of dead processes at a
4 time. Improve diagnostics in DebPrint. 7 time. Improve diagnostics in DebPrint.
5 (reader_thread): If cp->char_avail is NULL, set the FILE_AT_EOF 8 (reader_thread): If cp->char_avail is NULL, set the FILE_AT_EOF
diff --git a/src/keyboard.c b/src/keyboard.c
index fe1c3d77eb6..69c68d13943 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -2657,9 +2657,10 @@ read_char (int commandflag, Lisp_Object map,
2657 && XINT (Vauto_save_timeout) > 0) 2657 && XINT (Vauto_save_timeout) > 0)
2658 { 2658 {
2659 Lisp_Object tem0; 2659 Lisp_Object tem0;
2660 EMACS_INT timeout = (delay_level 2660 EMACS_INT timeout = XFASTINT (Vauto_save_timeout);
2661 * min (XFASTINT (Vauto_save_timeout) / 4, 2661
2662 MOST_POSITIVE_FIXNUM / delay_level)); 2662 timeout = min (timeout, MOST_POSITIVE_FIXNUM / delay_level * 4);
2663 timeout = delay_level * timeout / 4;
2663 save_getcjmp (save_jump); 2664 save_getcjmp (save_jump);
2664 restore_getcjmp (local_getcjmp); 2665 restore_getcjmp (local_getcjmp);
2665 tem0 = sit_for (make_number (timeout), 1, 1); 2666 tem0 = sit_for (make_number (timeout), 1, 1);