Function: image-dired--with-marked
image-dired--with-marked is a macro defined in image-dired.el.gz.
Signature
(image-dired--with-marked &rest BODY)
Documentation
Eval BODY with point on each marked thumbnail.
If no marked file could be found, execute BODY on the current thumbnail. It's expected that a thumbnail is always followed by exactly one space or one newline character.
Source Code
;; Defined in /usr/src/emacs/lisp/image/image-dired.el.gz
(defmacro image-dired--with-marked (&rest body)
"Eval BODY with point on each marked thumbnail.
If no marked file could be found, execute BODY on the current
thumbnail. It's expected that a thumbnail is always followed
by exactly one space or one newline character."
`(with-current-buffer image-dired-thumbnail-buffer
(let (found)
(save-mark-and-excursion
(goto-char (point-min))
(while (not (eobp))
(when (image-dired-thumb-file-marked-p)
(setq found t)
,@body)
(forward-char 2)))
(unless found
,@body))))