summaryrefslogtreecommitdiff
path: root/lisp/image.el
diff options
context:
space:
mode:
authorDave Love <fx@gnu.org>1999-10-03 19:25:32 +0000
committerDave Love <fx@gnu.org>1999-10-03 19:25:32 +0000
commit0c898dd963a3277b5ec8d59f0a350e3fb50e50c3 (patch)
treea980cc87abd697deeb95c3992dd067c951b42020 /lisp/image.el
parenta4a9692da15ec1531a5075b671b62ebf1f2b9d92 (diff)
downloademacs-0c898dd963a3277b5ec8d59f0a350e3fb50e50c3.tar.gz
(defimage): Remove redundant code. Substitute file on image plist.
Diffstat (limited to 'lisp/image.el')
-rw-r--r--lisp/image.el14
1 files changed, 6 insertions, 8 deletions
diff --git a/lisp/image.el b/lisp/image.el
index d59ab80cf7e..76c84579357 100644
--- a/lisp/image.el
+++ b/lisp/image.el
@@ -1,6 +1,6 @@
;;; image.el --- image API
-;; Copyright (C) 1998 Free Software Foundation, Inc.
+;; Copyright (C) 1998, 1999 Free Software Foundation, Inc.
;; Keywords: multimedia
;; This file is part of GNU Emacs.
@@ -148,8 +148,8 @@ BUFFER nil or omitted means use the current buffer."
(while overlays
(let ((overlay (car overlays)))
(when (overlay-get overlay 'put-image)
- (delete-overlay overlay)
- (setq overlays (cdr overlays)))))))
+ (delete-overlay overlay)))
+ (setq overlays (cdr overlays)))))
;;;###autoload
@@ -176,11 +176,9 @@ Example:
(type (plist-get spec :type))
(file (plist-get spec :file)))
(when (and (image-type-available-p type) (stringp file))
- (setq file (expand-file-name file))
- (unless (file-name-absolute-p file)
- (setq file (concat data-directory "/" file)))
- (when (file-exists-p file)
- (setq image (cons 'image spec))))
+ (setq file (expand-file-name file data-directory))
+ (when (file-readable-p file)
+ (setq image (cons 'image (plist-put spec :file file)))))
(setq specs (cdr specs))))
`(defvar ,symbol ',image ,doc)))