Commit d5f42ab6 authored by Glenn Morris's avatar Glenn Morris

* 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
parent 9c969e1f
......@@ -973,13 +973,7 @@ default is 20%."
0.8)))
(defun image--get-image ()
(let ((image (or (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)))))))
(let ((image (get-text-property (point) 'display)))
(when (or (not (consp image))
(not (eq (car image) 'image)))
(error "No image under point"))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment