emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master d5f42ab 2/2: * lisp/image.el (image--get-image): Re


From: Glenn Morris
Subject: [Emacs-diffs] master d5f42ab 2/2: * lisp/image.el (image--get-image): Remove nonsensical code.
Date: Mon, 23 May 2016 16:52:05 +0000 (UTC)

branch: master
commit d5f42ab6f06e1d468c6b92f2c1ef7b4d5f97ff84
Author: Glenn Morris <address@hidden>
Commit: Glenn Morris <address@hidden>

    * 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
---
 lisp/image.el |    8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/lisp/image.el b/lisp/image.el
index e855d5e..296d430 100644
--- a/lisp/image.el
+++ b/lisp/image.el
@@ -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"))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]