From: Juri Linkov Date: Tue, 25 May 2010 15:54:53 +0000 (+0300) Subject: * image.el (image-animated-p): When delay between animated images is 0, X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~438^2~191 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=fc93792445a4414df998a6122c0c90ba69029c13;p=emacs.git * image.el (image-animated-p): When delay between animated images is 0, set it to 10 (0.1 sec). (Bug#6258) --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index af6a03fd1aa..cfc0f927346 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2010-05-25 Juri Linkov + + * image.el (image-animated-p): When delay between animated images + is 0, set it to 10 (0.1 sec). (Bug#6258) + 2010-05-25 Christian Lynbech (tiny change) * net/tramp.el (tramp-handle-insert-directory): Don't use diff --git a/lisp/image.el b/lisp/image.el index b3a0f1a8a7d..287cca81570 100644 --- a/lisp/image.el +++ b/lisp/image.el @@ -685,10 +685,13 @@ shall be displayed." (let* ((metadata (image-metadata image)) (images (plist-get metadata 'count)) (extdata (plist-get metadata 'extension-data)) - (anim (plist-get extdata #xF9))) - (and (integerp images) (> images 1) - (stringp anim) (>= (length anim) 4) - (cons images (+ (aref anim 1) (* (aref anim 2) 256)))))))) + (anim (plist-get extdata #xF9)) + (tmo (and (integerp images) (> images 1) + (stringp anim) (>= (length anim) 4) + (+ (aref anim 1) (* (aref anim 2) 256))))) + (when tmo + (if (eq tmo 0) (setq tmo 10)) + (cons images tmo)))))) (provide 'image)