aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/image.el6
1 files changed, 3 insertions, 3 deletions
diff --git a/lisp/image.el b/lisp/image.el
index 81ca8cfc4a9..daee7994b27 100644
--- a/lisp/image.el
+++ b/lisp/image.el
@@ -87,8 +87,8 @@ Optional DATA-P non-nil means FILE-OR-DATA is a string containing image data.
87Optional PROPS are additional image attributes to assign to the image, 87Optional PROPS are additional image attributes to assign to the image,
88like, e.g. `:heuristic-mask t'. 88like, e.g. `:heuristic-mask t'.
89Value is the image created, or nil if images of type TYPE are not supported." 89Value is the image created, or nil if images of type TYPE are not supported."
90 (unless (stringp file-or-data) 90 (when (and (not data-p) (not (stringp file-or-data)))
91 (error "Invalid image file name or data `%s'" file-or-data)) 91 (error "Invalid image file name `%s'" file-or-data))
92 (cond ((null data-p) 92 (cond ((null data-p)
93 ;; FILE-OR-DATA is a file name. 93 ;; FILE-OR-DATA is a file name.
94 (unless (or type 94 (unless (or type
@@ -206,7 +206,7 @@ Example:
206 (setq file (expand-file-name file data-directory)) 206 (setq file (expand-file-name file data-directory))
207 (when (file-readable-p file) 207 (when (file-readable-p file)
208 (setq image (cons 'image (plist-put spec :file file))))) 208 (setq image (cons 'image (plist-put spec :file file)))))
209 ((stringp data) 209 ((not (null data))
210 (setq image (cons 'image spec))))) 210 (setq image (cons 'image spec)))))
211 (setq specs (cdr specs)))) 211 (setq specs (cdr specs))))
212 `(defvar ,symbol ',image ,doc))) 212 `(defvar ,symbol ',image ,doc)))