aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2013-09-17 21:26:19 -0700
committerGlenn Morris2013-09-17 21:26:19 -0700
commit9019d095dfd04fffc000c2f00515c661f1a083f3 (patch)
treeddcd065dd6eb778ac519c4d7afc3dae34b9ed631
parent67645389fc19c3573bb94f9f7d94195ac0b7b48f (diff)
downloademacs-9019d095dfd04fffc000c2f00515c661f1a083f3.tar.gz
emacs-9019d095dfd04fffc000c2f00515c661f1a083f3.zip
* image.el (image-multi-frame-p): Remove --without-x warning/error.
-rw-r--r--lisp/ChangeLog3
-rw-r--r--lisp/image.el15
2 files changed, 10 insertions, 8 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 747a2bf5265..9b18e252aff 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,6 +1,7 @@
12013-09-18 Glenn Morris <rgm@gnu.org> 12013-09-18 Glenn Morris <rgm@gnu.org>
2 2
3 * image.el (image-type-from-buffer): Remove --without-x warning/error. 3 * image.el (image-type-from-buffer, image-multi-frame-p):
4 Remove --without-x warning/error.
4 5
5 * mouse.el (mouse-yank-primary): 6 * mouse.el (mouse-yank-primary):
6 Reorder to silence --without-x compilation. 7 Reorder to silence --without-x compilation.
diff --git a/lisp/image.el b/lisp/image.el
index 8afe3e14b10..91cc3addb06 100644
--- a/lisp/image.el
+++ b/lisp/image.el
@@ -625,13 +625,14 @@ The actual return value is a cons (NIMAGES . DELAY), where NIMAGES is
625the number of frames (or sub-images) in the image and DELAY is the delay 625the number of frames (or sub-images) in the image and DELAY is the delay
626in seconds that the image specifies between each frame. DELAY may be nil, 626in seconds that the image specifies between each frame. DELAY may be nil,
627in which case you might want to use `image-default-frame-delay'." 627in which case you might want to use `image-default-frame-delay'."
628 (let* ((metadata (image-metadata image)) 628 (when (fboundp 'image-metadata)
629 (images (plist-get metadata 'count)) 629 (let* ((metadata (image-metadata image))
630 (delay (plist-get metadata 'delay))) 630 (images (plist-get metadata 'count))
631 (when (and images (> images 1)) 631 (delay (plist-get metadata 'delay)))
632 (if (or (not (numberp delay)) (< delay 0)) 632 (when (and images (> images 1))
633 (setq delay image-default-frame-delay)) 633 (if (or (not (numberp delay)) (< delay 0))
634 (cons images delay)))) 634 (setq delay image-default-frame-delay))
635 (cons images delay)))))
635 636
636(defun image-animated-p (image) 637(defun image-animated-p (image)
637 "Like `image-multi-frame-p', but returns nil if no delay is specified." 638 "Like `image-multi-frame-p', but returns nil if no delay is specified."