From: Daniel Martín Date: Tue, 13 Jul 2021 20:09:43 +0000 (+0200) Subject: Fix dired-number-of-marked-files when there are no marked files X-Git-Tag: emacs-28.0.90~1882 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e368f5603734394525417c886b0b3871aef72755;p=emacs.git Fix dired-number-of-marked-files when there are no marked files * lisp/dired.el (dired-number-of-marked-files): Fix if expression so that the else part is evaluated correctly. --- diff --git a/lisp/dired.el b/lisp/dired.el index da803feaa18..28448be06ce 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -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.