]> git.eshelyaron.com Git - emacs.git/commitdiff
; Eliminate warning when `dired-map-over-marks` value is unused
authorMattias Engdegård <mattiase@acm.org>
Mon, 10 Apr 2023 09:15:57 +0000 (11:15 +0200)
committerMattias Engdegård <mattiase@acm.org>
Mon, 10 Apr 2023 09:45:09 +0000 (11:45 +0200)
* lisp/dired.el (dired-map-over-marks): Reformulate.

lisp/dired.el

index 8e3244356fe36761618977d985382c925b5a8dff..d1471e993a1972b579e7a59b7152ee6a23f70297 100644 (file)
@@ -927,9 +927,9 @@ marked file, return (t FILENAME) instead of (FILENAME)."
                    (lambda ()
                      (if ,show-progress (sit-for 0))
                      (setq results (cons ,body results))))
-                  (if (< ,arg 0)
-                      (nreverse results)
-                    results))
+                  (when (< ,arg 0)
+                    (setq results (nreverse results)))
+                  results)
               ;; non-nil, non-integer, non-marked ARG means use current file:
                (list ,body))
           (let ((regexp (dired-marker-regexp)) next-position)