]> git.eshelyaron.com Git - emacs.git/commitdiff
Use a more backwards-compatible timer format.
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 13 Sep 2012 16:23:06 +0000 (09:23 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 13 Sep 2012 16:23:06 +0000 (09:23 -0700)
* etc/NEWS: Document it.
* lisp/emacs-lisp/timer.el (timer): PSECS is now at the end, rather than
being right after USECS, as that better supports old code that
inadvisedly looked directly at the timer vector.
* src/keyboard.c (decode_timer): Get PSECS from the 8th (origin-0)
vector element, not from the 4th, since PSECS is now at the end.
(Fcurrent_idle_time): Doc fix.

Fixes: debbugs:12430
etc/ChangeLog
etc/NEWS
lisp/ChangeLog
lisp/emacs-lisp/timer.el
src/ChangeLog
src/keyboard.c

index 26e9ada74da4700d8215e91b3843c6c0ffd82f76..66c229eaf784c635b4228a122c23de4d0643cdf8 100644 (file)
@@ -1,3 +1,8 @@
+2012-09-13  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Use a more backwards-compatible timer format (Bug#12430).
+       * NEWS: Document it, plus fix a typo.
+
 2012-09-13  Jan Djärv  <jan.h.d@swipnet.se>
 
        * NEWS (--with-x-toolkit): Mention that Gtk+ 3 is now default.
index cbf13c2e87df2cfdc9df882f4199a18de6613c10..4c6ceae168842eda8f94ad2e7276605b06c2a0bb 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -110,7 +110,7 @@ file-attributes and format-time-string, have been changed accordingly.
 Old-format time stamps are still accepted.
 
 ** The format of timers in timer-list and timer-idle-list is now
-[HIGH-SECONDS LOW-SECONDS USECS PSECS REPEAT-DELAY FUNCTION ARGS IDLE-DELAY].
+[TRIGGERED-P HI-SECS LO-SECS USECS REPEAT-DELAY FUNCTION ARGS IDLE-DELAY PSECS].
 The PSECS slot is new, and uses picosecond resolution.  It can be
 accessed via the new timer--psecs accessor.
 
index 6b132bb913447384cd1df61c000e711c165af0ae..5e51c67e8e8078d940cd660e10f7a64baa9b49e9 100644 (file)
@@ -1,3 +1,10 @@
+2012-09-13  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Use a more backwards-compatible timer format (Bug#12430).
+       * emacs-lisp/timer.el (timer): PSECS is now at the end, rather than
+       being right after USECS, as that better supports old code that
+       inadvisedly looked directly at the timer vector.
+
 2012-09-13  Kenichi Handa  <handa@gnu.org>
 
        * language/chinese.el ("Chinese-GB", "Chinese-BIG5")
index a66d5972d826533790ac59399463b54b54112356..2248dde8c03b2624f45dbd634b69da1eff03d801 100644 (file)
@@ -28,8 +28,8 @@
 ;;; Code:
 
 ;; Layout of a timer vector:
-;; [triggered-p high-seconds low-seconds usecs psecs repeat-delay
-;;  function args idle-delay]
+;; [triggered-p high-seconds low-seconds usecs repeat-delay
+;;  function args idle-delay psecs]
 ;; triggered-p is nil if the timer is active (waiting to be triggered),
 ;;  t if it is inactive ("already triggered", in theory)
 
@@ -42,7 +42,7 @@
             (:type vector)
             (:conc-name timer--))
   (triggered t)
-  high-seconds low-seconds usecs psecs repeat-delay function args idle-delay)
+  high-seconds low-seconds usecs repeat-delay function args idle-delay psecs)
 
 (defun timerp (object)
   "Return t if OBJECT is a timer."
index 153a0b59c6254f6a8371aa9c6c40a58dd78fb38f..a7fe68646d0861f8e87c31528cdb25067207e7ed 100644 (file)
@@ -1,3 +1,10 @@
+2012-09-13  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Use a more backwards-compatible timer format (Bug#12430).
+       * keyboard.c (decode_timer): Get PSECS from the 8th (origin-0)
+       vector element, not from the 4th, since PSECS is now at the end.
+       (Fcurrent_idle_time): Doc fix.
+
 2012-09-13  Dmitry Antipov  <dmantipov@yandex.ru>
 
        Function to mark objects and remove killed buffers at once.
index aec9028ae943aec49309ecf6cbe66148c3eefd16..45638bc412b5920865af42f3e65c8eda4e8ae3e6 100644 (file)
@@ -4330,7 +4330,7 @@ decode_timer (Lisp_Object timer, EMACS_TIME *result)
   if (! NILP (vector[0]))
     return 0;
 
-  return decode_time_components (vector[1], vector[2], vector[3], vector[4],
+  return decode_time_components (vector[1], vector[2], vector[3], vector[8],
                                 result, 0);
 }
 
@@ -4532,7 +4532,7 @@ in the same style as (current-time).
 
 The value when Emacs is not idle is nil.
 
-NSEC is a multiple of the system clock resolution.  */)
+PSEC is a multiple of the system clock resolution.  */)
   (void)
 {
   if (EMACS_TIME_VALID_P (timer_idleness_start_time))