From: Tino Calancha Date: Wed, 9 Aug 2017 05:37:21 +0000 (+0900) Subject: Ask files for deletion in buffer order: top first, botton later X-Git-Tag: emacs-26.0.90~497 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9ecbdeeaa845a75c63210057a8a554eedc9387bf;p=emacs.git Ask files for deletion in buffer order: top first, botton later * lisp/dired.el (dired-do-flagged-delete, dired-do-delete): Call `nreverse' t invert the output of `dired-map-over-marks'. --- diff --git a/lisp/dired.el b/lisp/dired.el index 54bc6217031..2e5b847f9b2 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -3057,9 +3057,10 @@ non-empty directories is allowed." (if (save-excursion (goto-char (point-min)) (re-search-forward regexp nil t)) (dired-internal-do-deletions - ;; this can't move point since ARG is nil - (dired-map-over-marks (cons (dired-get-filename) (point)) - nil) + (nreverse + ;; this can't move point since ARG is nil + (dired-map-over-marks (cons (dired-get-filename) (point)) + nil)) nil t) (or nomessage (message "(No deletions requested)"))))) @@ -3072,9 +3073,10 @@ non-empty directories is allowed." ;; dired-do-flagged-delete. (interactive "P") (dired-internal-do-deletions - ;; this may move point if ARG is an integer - (dired-map-over-marks (cons (dired-get-filename) (point)) - arg) + (nreverse + ;; this may move point if ARG is an integer + (dired-map-over-marks (cons (dired-get-filename) (point)) + arg)) arg t)) (defvar dired-deletion-confirmer 'yes-or-no-p) ; or y-or-n-p?