emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master c99c9ec: Provide facility to ignore all marked file


From: Lars Ingebrigtsen
Subject: [Emacs-diffs] master c99c9ec: Provide facility to ignore all marked files in vc
Date: Sun, 15 Sep 2019 09:00:59 -0400 (EDT)

branch: master
commit c99c9ec28c440d42a66b737651b1095151d85957
Author: Wolfgang Scherer <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>

    Provide facility to ignore all marked files in vc
    
    * lisp/vc/vc-dir.el: (vc-dir-ignore) With prefix argument, ignore all
    marked files (bug#37240).
---
 etc/NEWS          |  4 ++++
 lisp/vc/vc-dir.el | 16 ++++++++++++----
 2 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/etc/NEWS b/etc/NEWS
index 252c6bf..09535a5 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -743,6 +743,10 @@ file.
 *** New customizable variable 'vc-find-revision-no-save'.
 With non-nil, 'vc-find-revision' doesn't write the created buffer to file.
 
+---
+*** 'vc-dir-ignore' now takes a prefix argument to ignore all marked
+files.
+
 *** New customizable variable 'vc-git-grep-template'.
 This new variable allows customizing the default arguments passed to
 'git-grep' when 'vc-git-grep' is used.
diff --git a/lisp/vc/vc-dir.el b/lisp/vc/vc-dir.el
index 9a6f6bb..e225978 100644
--- a/lisp/vc/vc-dir.el
+++ b/lisp/vc/vc-dir.el
@@ -864,10 +864,18 @@ with the command \\[tags-loop-continue]."
    delimited)
   (fileloop-continue))
 
-(defun vc-dir-ignore ()
-  "Ignore the current file."
-  (interactive)
-  (vc-ignore (vc-dir-current-file)))
+(defun vc-dir-ignore (&optional arg)
+  "Ignore the current file.
+If a prefix argument is given, ignore all marked files."
+  (interactive "P")
+  (if arg
+      (ewoc-map
+       (lambda (filearg)
+        (when (vc-dir-fileinfo->marked filearg)
+          (vc-ignore (vc-dir-fileinfo->name filearg))
+          t))
+       vc-ewoc)
+    (vc-ignore (vc-dir-current-file))))
 
 (defun vc-dir-current-file ()
   (let ((node (ewoc-locate vc-ewoc)))



reply via email to

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