]> git.eshelyaron.com Git - emacs.git/commitdiff
Ask files for deletion in buffer order: top first, botton later
authorTino Calancha <tino.calancha@gmail.com>
Wed, 9 Aug 2017 05:37:21 +0000 (14:37 +0900)
committerTino Calancha <tino.calancha@gmail.com>
Wed, 9 Aug 2017 05:37:21 +0000 (14:37 +0900)
* lisp/dired.el (dired-do-flagged-delete, dired-do-delete):
Call `nreverse' t invert the output of `dired-map-over-marks'.

lisp/dired.el

index 54bc621703114d408f2d52570b386ad3356b3d68..2e5b847f9b2a89ea58ab7992a228914027547ef5 100644 (file)
@@ -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?