diff options
| author | Glenn Morris | 2016-05-23 12:48:19 -0400 |
|---|---|---|
| committer | Glenn Morris | 2016-05-23 12:48:19 -0400 |
| commit | 9c969e1f848e65b24e06d3919cde9a7ae668bfb8 (patch) | |
| tree | 470fc660a17cfc332bb4bb250aecfea1bbe3c4f9 /lisp | |
| parent | 918ef71538fd43049496e4370eba63e3096a4933 (diff) | |
| download | emacs-9c969e1f848e65b24e06d3919cde9a7ae668bfb8.tar.gz emacs-9c969e1f848e65b24e06d3919cde9a7ae668bfb8.zip | |
* lisp/image.el (image--get-image): Avoid requiring a library for
one trivial operation.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/image.el | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lisp/image.el b/lisp/image.el index e06cb6f4733..e855d5e97db 100644 --- a/lisp/image.el +++ b/lisp/image.el | |||
| @@ -973,13 +973,13 @@ default is 20%." | |||
| 973 | 0.8))) | 973 | 0.8))) |
| 974 | 974 | ||
| 975 | (defun image--get-image () | 975 | (defun image--get-image () |
| 976 | (require 'seq) | ||
| 977 | (let ((image (or (get-text-property (point) 'display) | 976 | (let ((image (or (get-text-property (point) 'display) |
| 978 | ;; `put-image' uses overlays, so find an image in | 977 | ;; `put-image' uses overlays, so find an image in |
| 979 | ;; the overlays. | 978 | ;; the overlays. |
| 980 | (seq-find (lambda (overlay) | 979 | (catch 'found |
| 981 | (overlay-get overlay 'display)) | 980 | (dolist (o (overlays-at (point))) |
| 982 | (overlays-at (point)))))) | 981 | (if (overlay-get o 'display) |
| 982 | (throw 'found o))))))) | ||
| 983 | (when (or (not (consp image)) | 983 | (when (or (not (consp image)) |
| 984 | (not (eq (car image) 'image))) | 984 | (not (eq (car image) 'image))) |
| 985 | (error "No image under point")) | 985 | (error "No image under point")) |