emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs-27 2b12c2b 3/3: Make sure not to mark directories


From: Dmitry Gutov
Subject: emacs-27 2b12c2b 3/3: Make sure not to mark directories
Date: Tue, 11 Feb 2020 17:29:56 -0500 (EST)

branch: emacs-27
commit 2b12c2b6f22187536f54f32b11589bf5f21c1f09
Author: Wolfgang Scherer <address@hidden>
Commit: Dmitry Gutov <address@hidden>

    Make sure not to mark directories
    
    * lisp/vc/vc-dir.el (vc-dir-mark-all-files):
    Make sure not to mark directories (bug#37182).
---
 lisp/vc/vc-dir.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lisp/vc/vc-dir.el b/lisp/vc/vc-dir.el
index 0c29352..033cb27 100644
--- a/lisp/vc/vc-dir.el
+++ b/lisp/vc/vc-dir.el
@@ -649,7 +649,7 @@ line."
 
 (defun vc-dir-mark-all-files (arg)
   "Mark all files with the same state as the current one.
-With a prefix argument mark all files.
+With a prefix argument mark all files (not directories).
 If the current entry is a directory, mark all child files.
 
 The commands operate on files that are on the same state.
@@ -670,7 +670,8 @@ share the same state."
         vc-ewoc)
        (ewoc-map
         (lambda (filearg)
-          (unless (vc-dir-fileinfo->marked filearg)
+          (unless (or (vc-dir-fileinfo->directory filearg)
+                       (vc-dir-fileinfo->marked filearg))
             (setf (vc-dir-fileinfo->marked filearg) t)
             t))
         vc-ewoc))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]