From: Glenn Morris Date: Mon, 23 May 2016 16:48:19 +0000 (-0400) Subject: * lisp/image.el (image--get-image): Avoid requiring a library for X-Git-Url: https://code.delx.au/gnu-emacs/commitdiff_plain/9c969e1f848e65b24e06d3919cde9a7ae668bfb8 * lisp/image.el (image--get-image): Avoid requiring a library for one trivial operation. --- diff --git a/lisp/image.el b/lisp/image.el index e06cb6f473..e855d5e97d 100644 --- a/lisp/image.el +++ b/lisp/image.el @@ -973,13 +973,13 @@ default is 20%." 0.8))) (defun image--get-image () - (require 'seq) (let ((image (or (get-text-property (point) 'display) ;; `put-image' uses overlays, so find an image in ;; the overlays. - (seq-find (lambda (overlay) - (overlay-get overlay 'display)) - (overlays-at (point)))))) + (catch 'found + (dolist (o (overlays-at (point))) + (if (overlay-get o 'display) + (throw 'found o))))))) (when (or (not (consp image)) (not (eq (car image) 'image))) (error "No image under point"))