# HG changeset patch # User Dave Love # Date 938978732 0 # Node ID fdc2bd91cf632038f9b5dc0863feec2ca2e2f03e # Parent 354e0c45cedfb1150f33902064788c1d9e8b2cff (defimage): Remove redundant code. Substitute file on image plist. diff -r 354e0c45cedf -r fdc2bd91cf63 lisp/image.el --- 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)))