* image.el (image-animated-p): Tweak definition.
authorGlenn Morris <rgm@gnu.org>
Thu, 30 May 2013 03:24:30 +0000 (20:24 -0700)
committerGlenn Morris <rgm@gnu.org>
Thu, 30 May 2013 03:24:30 +0000 (20:24 -0700)
* gnus/shr.el (shr-put-image): Silence compiler.

lisp/ChangeLog
lisp/gnus/ChangeLog
lisp/gnus/shr.el
lisp/image.el

index 7c702f0..66e8c22 100644 (file)
@@ -1,5 +1,7 @@
 2013-05-30  Glenn Morris  <rgm@gnu.org>
 
+       * image.el (image-animated-p): Tweak definition.
+
        * net/rlogin.el (rlogin-program, rlogin-explicit-args): Default to ssh.
        (rlogin-process-connection-type): Tweak default.  Add set-after.
        (rlogin-host): Doc fix.
index 3cfca45..b45abb6 100644 (file)
@@ -1,3 +1,7 @@
+2013-05-30  Glenn Morris  <rgm@gnu.org>
+
+       * shr.el (shr-put-image): Silence compiler.
+
 2013-05-29  Glenn Morris  <rgm@gnu.org>
 
        * gnus-ems.el (set-process-plist): Every supported Emacs has this.
index 2d2272d..9284da4 100644 (file)
@@ -631,12 +631,13 @@ size, and full-buffer size."
                  (overlay-put overlay 'face 'default)))
            (insert-image image (or alt "*")))
          (put-text-property start (point) 'image-size size)
-         (when (if (fboundp 'image-multi-frame-p)
-                   ;; Only animate multi-frame things that specify a
-                   ;; delay; eg animated gifs as opposed to
-                   ;; multi-page tiffs.  FIXME?
-                   (cdr (image-multi-frame-p image))
-                 (image-animated-p image))
+         (when (cond ((fboundp 'image-multi-frame-p)
+                      ;; Only animate multi-frame things that specify a
+                      ;; delay; eg animated gifs as opposed to
+                      ;; multi-page tiffs.  FIXME?
+                      (cdr (image-multi-frame-p image)))
+                     ((fboundp 'image-animated-p)
+                      (image-animated-p image)))
            (image-animate image nil 60)))
        image)
     (insert alt)))
index ec7b41b..804dc3a 100644 (file)
@@ -624,7 +624,12 @@ in which case you might want to use `image-default-frame-delay'."
          (setq delay image-default-frame-delay))
       (cons images delay))))
 
-(define-obsolete-function-alias 'image-animated-p 'image-multi-frame-p "24.4")
+(defun image-animated-p (image)
+  "Like `image-multi-frame-p', but returns nil if no delay is specified."
+  (let ((multi (image-multi-frame-p image)))
+    (and (cdr multi) multi)))
+
+(make-obsolete 'image-animated-p 'image-multi-frame-p "24.4")
 
 ;; "Destructively"?
 (defun image-animate (image &optional index limit)