diff options
| author | Dave Love | 1999-10-03 19:25:32 +0000 |
|---|---|---|
| committer | Dave Love | 1999-10-03 19:25:32 +0000 |
| commit | 0c898dd963a3277b5ec8d59f0a350e3fb50e50c3 (patch) | |
| tree | a980cc87abd697deeb95c3992dd067c951b42020 | |
| parent | a4a9692da15ec1531a5075b671b62ebf1f2b9d92 (diff) | |
| download | emacs-0c898dd963a3277b5ec8d59f0a350e3fb50e50c3.tar.gz emacs-0c898dd963a3277b5ec8d59f0a350e3fb50e50c3.zip | |
(defimage): Remove redundant code. Substitute file on image plist.
| -rw-r--r-- | lisp/image.el | 14 |
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 @@ | |||
| 1 | ;;; image.el --- image API | 1 | ;;; image.el --- image API |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1998 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1998, 1999 Free Software Foundation, Inc. |
| 4 | ;; Keywords: multimedia | 4 | ;; Keywords: multimedia |
| 5 | 5 | ||
| 6 | ;; This file is part of GNU Emacs. | 6 | ;; This file is part of GNU Emacs. |
| @@ -148,8 +148,8 @@ BUFFER nil or omitted means use the current buffer." | |||
| 148 | (while overlays | 148 | (while overlays |
| 149 | (let ((overlay (car overlays))) | 149 | (let ((overlay (car overlays))) |
| 150 | (when (overlay-get overlay 'put-image) | 150 | (when (overlay-get overlay 'put-image) |
| 151 | (delete-overlay overlay) | 151 | (delete-overlay overlay))) |
| 152 | (setq overlays (cdr overlays))))))) | 152 | (setq overlays (cdr overlays))))) |
| 153 | 153 | ||
| 154 | 154 | ||
| 155 | ;;;###autoload | 155 | ;;;###autoload |
| @@ -176,11 +176,9 @@ Example: | |||
| 176 | (type (plist-get spec :type)) | 176 | (type (plist-get spec :type)) |
| 177 | (file (plist-get spec :file))) | 177 | (file (plist-get spec :file))) |
| 178 | (when (and (image-type-available-p type) (stringp file)) | 178 | (when (and (image-type-available-p type) (stringp file)) |
| 179 | (setq file (expand-file-name file)) | 179 | (setq file (expand-file-name file data-directory)) |
| 180 | (unless (file-name-absolute-p file) | 180 | (when (file-readable-p file) |
| 181 | (setq file (concat data-directory "/" file))) | 181 | (setq image (cons 'image (plist-put spec :file file))))) |
| 182 | (when (file-exists-p file) | ||
| 183 | (setq image (cons 'image spec)))) | ||
| 184 | (setq specs (cdr specs)))) | 182 | (setq specs (cdr specs)))) |
| 185 | `(defvar ,symbol ',image ,doc))) | 183 | `(defvar ,symbol ',image ,doc))) |
| 186 | 184 | ||