Mercurial > emacs
changeset 25857:fdc2bd91cf63
(defimage): Remove redundant code. Substitute file on image plist.
author | Dave Love <fx@gnu.org> |
---|---|
date | Sun, 03 Oct 1999 19:25:32 +0000 |
parents | 354e0c45cedf |
children | bbce331da1be |
files | lisp/image.el |
diffstat | 1 files changed, 6 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/image.el Sun Oct 03 15:56:58 1999 +0000 +++ b/lisp/image.el Sun Oct 03 19:25:32 1999 +0000 @@ -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 @@ (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 @@ (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)))