diff options
| author | E Sabof | 2013-06-12 22:10:48 -0700 |
|---|---|---|
| committer | Glenn Morris | 2013-06-12 22:10:48 -0700 |
| commit | 1261d2daeecea574cac763e3e7b729e6b6b36dad (patch) | |
| tree | 512026fdf15f84d00eca3701daa74e75f14469d2 | |
| parent | 65e704b9ab10582945b4342ce5f7478f7109a873 (diff) | |
| download | emacs-1261d2daeecea574cac763e3e7b729e6b6b36dad.tar.gz emacs-1261d2daeecea574cac763e3e7b729e6b6b36dad.zip | |
image-dired-dired-toggle-marked-thumbs tiny change
* lisp/image-dired.el (image-dired-dired-toggle-marked-thumbs):
Only remove a `thumb-file' overlay.
Fixes: debbugs:14548
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/image-dired.el | 12 |
2 files changed, 13 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 48124b85fe4..5ff36f1539c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2013-06-13 E Sabof <esabof@gmail.com> (tiny change) | ||
| 2 | |||
| 3 | * image-dired.el (image-dired-dired-toggle-marked-thumbs): | ||
| 4 | Only remove a `thumb-file' overlay. (Bug#14548) | ||
| 5 | |||
| 1 | 2013-06-12 Grégoire Jadi <daimrod@gmail.com> | 6 | 2013-06-12 Grégoire Jadi <daimrod@gmail.com> |
| 2 | 7 | ||
| 3 | * mail/reporter.el (reporter-submit-bug-report): | 8 | * mail/reporter.el (reporter-submit-bug-report): |
diff --git a/lisp/image-dired.el b/lisp/image-dired.el index bbb41d49a1d..afb940fe337 100644 --- a/lisp/image-dired.el +++ b/lisp/image-dired.el | |||
| @@ -156,8 +156,9 @@ | |||
| 156 | (require 'format-spec) | 156 | (require 'format-spec) |
| 157 | (require 'widget) | 157 | (require 'widget) |
| 158 | 158 | ||
| 159 | (require 'cl-lib) | ||
| 160 | |||
| 159 | (eval-when-compile | 161 | (eval-when-compile |
| 160 | (require 'cl-lib) | ||
| 161 | (require 'wid-edit)) | 162 | (require 'wid-edit)) |
| 162 | 163 | ||
| 163 | (defgroup image-dired nil | 164 | (defgroup image-dired nil |
| @@ -657,9 +658,12 @@ previous -ARG, if ARG<0) files." | |||
| 657 | (string-match-p (image-file-name-regexp) image-file)) | 658 | (string-match-p (image-file-name-regexp) image-file)) |
| 658 | (setq thumb-file (image-dired-get-thumbnail-image image-file)) | 659 | (setq thumb-file (image-dired-get-thumbnail-image image-file)) |
| 659 | ;; If image is not already added, then add it. | 660 | ;; If image is not already added, then add it. |
| 660 | (let ((cur-ov (overlays-in (point) (1+ (point))))) | 661 | (let* ((cur-ovs (overlays-in (point) (1+ (point)))) |
| 661 | (if cur-ov | 662 | (thumb-ov (car (cl-remove-if-not |
| 662 | (delete-overlay (car cur-ov)) | 663 | (lambda (ov) (overlay-get ov 'thumb-file)) |
| 664 | cur-ovs)))) | ||
| 665 | (if thumb-ov | ||
| 666 | (delete-overlay thumb-ov) | ||
| 663 | (put-image thumb-file image-pos) | 667 | (put-image thumb-file image-pos) |
| 664 | (setq overlay | 668 | (setq overlay |
| 665 | (cl-loop for o in (overlays-in (point) (1+ (point))) | 669 | (cl-loop for o in (overlays-in (point) (1+ (point))) |