1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-29 07:58:28 +00:00

* lisp/image.el (image--get-image): Remove nonsensical code.

; 1) put-image does not add a display property to its overlay
; 2) it does add a display text property
; 3) an overlay is not a cons whose car is 'image
This commit is contained in:
Glenn Morris 2016-05-23 12:51:44 -04:00
parent 9c969e1f84
commit d5f42ab6f0

View File

@ -973,13 +973,7 @@ default is 20%."
0.8))) 0.8)))
(defun image--get-image () (defun image--get-image ()
(let ((image (or (get-text-property (point) 'display) (let ((image (get-text-property (point) 'display)))
;; `put-image' uses overlays, so find an image in
;; the overlays.
(catch 'found
(dolist (o (overlays-at (point)))
(if (overlay-get o 'display)
(throw 'found o)))))))
(when (or (not (consp image)) (when (or (not (consp image))
(not (eq (car image) 'image))) (not (eq (car image) 'image)))
(error "No image under point")) (error "No image under point"))