[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r114353: * image.el (image-multi-frame-p): Remove --
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] trunk r114353: * image.el (image-multi-frame-p): Remove --without-x warning/error. |
Date: |
Wed, 18 Sep 2013 04:26:43 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 114353
revision-id: address@hidden
parent: address@hidden
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Tue 2013-09-17 21:26:19 -0700
message:
* image.el (image-multi-frame-p): Remove --without-x warning/error.
modified:
lisp/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1432
lisp/image.el image.el-20091113204419-o5vbwnq5f7feedwu-1320
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2013-09-18 04:24:14 +0000
+++ b/lisp/ChangeLog 2013-09-18 04:26:19 +0000
@@ -1,6 +1,7 @@
2013-09-18 Glenn Morris <address@hidden>
- * image.el (image-type-from-buffer): Remove --without-x warning/error.
+ * image.el (image-type-from-buffer, image-multi-frame-p):
+ Remove --without-x warning/error.
* mouse.el (mouse-yank-primary):
Reorder to silence --without-x compilation.
=== modified file 'lisp/image.el'
--- a/lisp/image.el 2013-09-18 04:24:14 +0000
+++ b/lisp/image.el 2013-09-18 04:26:19 +0000
@@ -625,13 +625,14 @@
the number of frames (or sub-images) in the image and DELAY is the delay
in seconds that the image specifies between each frame. DELAY may be nil,
in which case you might want to use `image-default-frame-delay'."
- (let* ((metadata (image-metadata image))
- (images (plist-get metadata 'count))
- (delay (plist-get metadata 'delay)))
- (when (and images (> images 1))
- (if (or (not (numberp delay)) (< delay 0))
- (setq delay image-default-frame-delay))
- (cons images delay))))
+ (when (fboundp 'image-metadata)
+ (let* ((metadata (image-metadata image))
+ (images (plist-get metadata 'count))
+ (delay (plist-get metadata 'delay)))
+ (when (and images (> images 1))
+ (if (or (not (numberp delay)) (< delay 0))
+ (setq delay image-default-frame-delay))
+ (cons images delay)))))
(defun image-animated-p (image)
"Like `image-multi-frame-p', but returns nil if no delay is specified."
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r114353: * image.el (image-multi-frame-p): Remove --without-x warning/error.,
Glenn Morris <=