+2013-06-13 E Sabof <esabof@gmail.com> (tiny change)
+
+ * image-dired.el (image-dired-dired-toggle-marked-thumbs):
+ Only remove a `thumb-file' overlay. (Bug#14548)
+
2013-06-12 Grégoire Jadi <daimrod@gmail.com>
* mail/reporter.el (reporter-submit-bug-report):
(require 'format-spec)
(require 'widget)
+(require 'cl-lib)
+
(eval-when-compile
- (require 'cl-lib)
(require 'wid-edit))
(defgroup image-dired nil
(string-match-p (image-file-name-regexp) image-file))
(setq thumb-file (image-dired-get-thumbnail-image image-file))
;; If image is not already added, then add it.
- (let ((cur-ov (overlays-in (point) (1+ (point)))))
- (if cur-ov
- (delete-overlay (car cur-ov))
+ (let* ((cur-ovs (overlays-in (point) (1+ (point))))
+ (thumb-ov (car (cl-remove-if-not
+ (lambda (ov) (overlay-get ov 'thumb-file))
+ cur-ovs))))
+ (if thumb-ov
+ (delete-overlay thumb-ov)
(put-image thumb-file image-pos)
(setq overlay
(cl-loop for o in (overlays-in (point) (1+ (point)))