emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r111790: Fix bug #13720 with auto-sav


From: Eli Zaretskii
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r111790: Fix bug #13720 with auto-save-timeout less than 4 seconds.
Date: Fri, 15 Feb 2013 20:52:16 +0200
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 111790
fixes bug: http://debbugs.gnu.org/13720
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Fri 2013-02-15 20:52:16 +0200
message:
  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.
modified:
  src/ChangeLog
  src/keyboard.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2013-02-15 17:31:12 +0000
+++ b/src/ChangeLog     2013-02-15 18:52:16 +0000
@@ -1,5 +1,8 @@
 2013-02-15  Eli Zaretskii  <address@hidden>
 
+       * keyboard.c (read_char): Fix calculation of auto-save time out
+       when auto-save-timeout is less than 4.  (Bug#13720)
+
        * w32proc.c (new_child): Free up to 2 slots of dead processes at a
        time.  Improve diagnostics in DebPrint.
        (reader_thread): If cp->char_avail is NULL, set the FILE_AT_EOF

=== modified file 'src/keyboard.c'
--- a/src/keyboard.c    2013-02-14 14:40:54 +0000
+++ b/src/keyboard.c    2013-02-15 18:52:16 +0000
@@ -2657,9 +2657,10 @@
          && XINT (Vauto_save_timeout) > 0)
        {
          Lisp_Object tem0;
-         EMACS_INT timeout = (delay_level
-                              * min (XFASTINT (Vauto_save_timeout) / 4,
-                                     MOST_POSITIVE_FIXNUM / delay_level));
+         EMACS_INT timeout = XFASTINT (Vauto_save_timeout);
+
+         timeout = min (timeout, MOST_POSITIVE_FIXNUM / delay_level * 4);
+         timeout = delay_level * timeout / 4;
          save_getcjmp (save_jump);
          restore_getcjmp (local_getcjmp);
          tem0 = sit_for (make_number (timeout), 1, 1);


reply via email to

[Prev in Thread] Current Thread [Next in Thread]