]> code.delx.au - gnu-emacs/commitdiff
* lisp/image.el (image--get-image): Remove nonsensical code.
authorGlenn Morris <rgm@gnu.org>
Mon, 23 May 2016 16:51:44 +0000 (12:51 -0400)
committerGlenn Morris <rgm@gnu.org>
Mon, 23 May 2016 16:51:44 +0000 (12:51 -0400)
; 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

lisp/image.el

index e855d5e97db719d0c00db124484a501be9cabe75..296d4300558a2c305ade50da46dd95fe372d7cc7 100644 (file)
@@ -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"))