diff --git a/lisp/dired.el b/lisp/dired.el index 6c7445c..b69e611 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -627,7 +627,7 @@ dired-map-over-marks ;; save-excursion loses, again (dired-move-to-filename))) -(defun dired-get-marked-files (&optional localp arg filter distinguish-one-marked) +(defun dired-get-marked-files (&optional localp arg filter distinguish-one-marked marker-char) "Return the marked files' names as list of strings. The list is in the same order as the buffer, that is, the car is the first marked file. @@ -644,22 +644,26 @@ dired-get-marked-files If DISTINGUISH-ONE-MARKED is non-nil, then if we find just one marked file, return (t FILENAME) instead of (FILENAME). -Don't use that together with FILTER." - (let ((all-of-them - (save-excursion - (delq nil (dired-map-over-marks - (dired-get-filename localp 'no-error-if-not-filep) - arg nil distinguish-one-marked)))) - result) +Don't use that together with FILTER. + +Optional arg MARKER-CHAR, if non-nil, then it is the marker +char to search. Otherwise `dired-marker-char' is used." + (let* ((dired-marker-char (or marker-char dired-marker-char)) + (all-of-them + (save-excursion + (delq nil (dired-map-over-marks + (dired-get-filename localp 'no-error-if-not-filep) + arg nil distinguish-one-marked)))) + result) (when (equal all-of-them '(t)) (setq all-of-them nil)) (if (not filter) - (if (and distinguish-one-marked (eq (car all-of-them) t)) - all-of-them - (nreverse all-of-them)) + (if (and distinguish-one-marked (eq (car all-of-them) t)) + all-of-them + (nreverse all-of-them)) (dolist (file all-of-them) - (if (funcall filter file) - (push file result))) + (if (funcall filter file) + (push file result))) result))) ;; The dired command