]> git.eshelyaron.com Git - emacs.git/commitdiff
Make the unflag-p parameter in dired-mark-unmarked-files work
authorLars Ingebrigtsen <larsi@gnus.org>
Sun, 21 Jul 2019 15:40:51 +0000 (17:40 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Sun, 21 Jul 2019 15:40:51 +0000 (17:40 +0200)
* lisp/dired-x.el (dired-mark-unmarked-files): Make the unflag-p
parameter work (bug#27465).

lisp/dired-x.el

index b7ec41aa95ff20760d8487d9d41fe61add57051d..462fa4ee15296d86f60ba79ffec1c22b565a7fa9 100644 (file)
@@ -629,9 +629,12 @@ Optional fifth argument CASE-FOLD-P specifies the value of
   (let ((dired-marker-char (if unflag-p ?\s dired-marker-char)))
     (dired-mark-if
      (and
-      ;; not already marked
-      (= (following-char) ?\s)
-      ;; uninteresting
+      (if unflag-p
+          ;; Already marked.
+          (not (= (following-char) ?\s))
+        ;; Not already marked.
+        (= (following-char) ?\s))
+      ;; Interesting.
       (let ((fn (dired-get-filename localp t))
             ;; Match patterns case-insensitively on case-insensitive
             ;; systems