]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix dired-number-of-marked-files when there are no marked files
authorDaniel Martín <mardani29@yahoo.es>
Tue, 13 Jul 2021 20:09:43 +0000 (22:09 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Tue, 13 Jul 2021 20:40:12 +0000 (22:40 +0200)
* lisp/dired.el (dired-number-of-marked-files): Fix if expression so
that the else part is evaluated correctly.

lisp/dired.el

index da803feaa1808e8192802584d66bb6af7facf096..28448be06ce0f512de33ed5f2fda544280ac699c 100644 (file)
@@ -3850,13 +3850,13 @@ object files--just `.o' will mark more than you might think."
                         when (stringp file)
                         sum (file-attribute-size (file-attributes file)))))
     (if (zerop nmarked)
-        (message "No marked files"))
-    (message "%d marked file%s (%s total size)"
-             nmarked
-             (if (= nmarked 1)
-                 ""
-               "s")
-             (funcall byte-count-to-string-function size))))
+        (message "No marked files")
+      (message "%d marked file%s (%s total size)"
+               nmarked
+               (if (= nmarked 1)
+                   ""
+                 "s")
+               (funcall byte-count-to-string-function size)))))
 
 (defun dired-mark-files-containing-regexp (regexp &optional marker-char)
   "Mark all files with contents containing REGEXP for use in later commands.