gnus-art.el (gnus-article-stop-animations): Fix glitches caused by addition of psec...
authorKatsumi Yamaoka <yamaoka@jpl.org>
Thu, 13 Sep 2012 11:17:02 +0000 (11:17 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Thu, 13 Sep 2012 11:17:02 +0000 (11:17 +0000)
lisp/ChangeLog
lisp/gnus-art.el
lisp/gnus-util.el

index a2900b3..6ea7776 100644 (file)
@@ -1,3 +1,15 @@
+2012-09-13  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * gnus-util.el (gnus-timer--function): New function.
+
+       * gnus-art.el (gnus-article-stop-animations): Use it.
+
+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 b9020a4..7dcbd61 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 (gnus-timer--function timer) 'image-animate-timeout)
       (cancel-timer timer))))
 
 (defun gnus-stop-downloads ()
index 4c5eaba..f5e1077 100644 (file)
@@ -1964,6 +1964,11 @@ definitions to shadow the loaded ones for use in file byte-compilation."
 (defun gnus-bound-and-true-p (sym)
   (and (boundp sym) (symbol-value sym)))
 
+(if (fboundp 'timer--function)
+    (defalias 'gnus-timer--function 'timer--function)
+  (defun gnus-timer--function (timer)
+    (elt timer 5)))
+
 (provide 'gnus-util)
 
 ;;; gnus-util.el ends here