]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix glitches caused by addition of psec to timers.
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 13 Sep 2012 06:09:45 +0000 (23:09 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 13 Sep 2012 06:09:45 +0000 (23:09 -0700)
* etc/NEWS: Document timer format change.
* lisp/image.el (image-animate-timer):
* lisp/time.el (display-time-world-timer):
Use timer--function and timer--args rather than raw access to
timer vector.
* lisp/gnus/gnus-art.el (gnus-article-stop-animations):
Use timer--function rather than raw access to timer vector.

Fixes: debbugs:12430
etc/ChangeLog
etc/NEWS
lisp/ChangeLog
lisp/gnus/ChangeLog
lisp/gnus/gnus-art.el
lisp/image.el
lisp/time.el

index 11e7e5ca108554cf78cc60f2cfb07886ddea74ed..20ded2fd847ba6d4a1fd586259a568f0b38e9b87 100644 (file)
@@ -1,3 +1,7 @@
+2012-09-13  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * NEWS: Document timer format change (Bug#12430).
+
 2012-09-11  Paul Eggert  <eggert@cs.ucla.edu>
 
        Simplify, document, and port floating-point (Bug#12381).
index a7388c4e9faf049d19e22babe8a68638109c44dd..eb5a2ed66606f6c06b7e19dab6704c888b964fab 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -101,6 +101,11 @@ machines.  Other functions that use this format, such as
 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].
+The PSECS slot is new, and uses picosecond resolution.  It can be
+accessed via the new timer--psecs accessor.
+
 ** Emacs now generates backtraces on fatal errors.
 On encountering a fatal error, Emacs now outputs a textual description
 of the fatal signal, and a short backtrace on platforms like glibc
index 41dc46021f689ef8aee021a4db8999f80002c14d..1bb8f913c201a9cddb14e6d58149578e9af812e2 100644 (file)
@@ -1,3 +1,11 @@
+2012-09-13  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Fix glitches caused by addition of psec to timers (Bug#12430).
+       * image.el (image-animate-timer):
+       * time.el (display-time-world-timer):
+       Use timer--function and timer--args rather than raw access to
+       timer vector.
+
 2012-09-13  Glenn Morris  <rgm@gnu.org>
 
        * emacs-lisp/bytecomp.el (byte-compile-warning-prefix):
index 5c7f106f6db9648e6ce0f6b7ff30598a1ea58205..3f69a84db880b4a4d5fe09e4d07a23363ca819d9 100644 (file)
@@ -1,3 +1,9 @@
+2012-09-13  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Fix glitches caused by addition of psec to timers.
+       * gnus-art.el (gnus-article-stop-animations): Use timer--function
+       rather than raw access to timer vector.
+
 2012-09-11  Julien Danjou  <julien@danjou.info>
 
        * gnus-notifications.el (gnus-notifications): Check for nil values in
index b9020a40b7502e3a9074509205470c285379c66d..4dc004f04d476d4aac93dceb44645628ff72ee9a 100644 (file)
@@ -4554,7 +4554,7 @@ commands:
 (defun gnus-article-stop-animations ()
   (dolist (timer (and (boundp 'timer-list)
                      timer-list))
-    (when (eq (elt timer 5) 'image-animate-timeout)
+    (when (eq (timer--function timer) 'image-animate-timeout)
       (cancel-timer timer))))
 
 (defun gnus-stop-downloads ()
index 7801923c3fe660f9764724d4156a89462b1eb6c3..99c0a74a5123e3838954836904c67a30384cbc4a 100644 (file)
@@ -645,8 +645,8 @@ number, play until that number of seconds has elapsed."
     (while tail
       (setq timer (car tail)
            tail (cdr tail))
-      (if (and (eq (aref timer 5) 'image-animate-timeout)
-              (eq (car-safe (aref timer 6)) image))
+      (if (and (eq (timer--function timer) 'image-animate-timeout)
+              (eq (car-safe (timer--args timer)) image))
          (setq tail nil)
        (setq timer nil)))
     timer))
index 8d43b565416e64391303a4e5785b685fb40145a0..fe3cdbb57be9ae977d43f5e122f9711a4980b1ae 100644 (file)
@@ -575,7 +575,8 @@ To turn off the world time display, go to that window and type `q'."
     (let ((list timer-list))
       (while list
         (let ((elt (pop list)))
-          (when (equal (symbol-name (aref elt 5)) "display-time-world-timer")
+          (when (equal (symbol-name (timer--function elt))
+                      "display-time-world-timer")
             (cancel-timer elt)))))))
 
 ;;;###autoload