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.

Source Code

;; Defined in /usr/src/emacs/lisp/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."
  `(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)))
       (unless found
         ,@body))))