From 7e2fd7641a15a11eca50af490c51927c170a7bb0 Mon Sep 17 00:00:00 2001 From: Wolfgang Scherer Date: Sat, 31 Aug 2019 00:01:40 +0200 Subject: [PATCH] Provide facility to ignore all marked files * lisp/vc/vc-dir.el: (vc-dir-ignore) With prefix argument, ignore all marked files. --- lisp/vc/vc-dir.el | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) 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))) -- 2.7.4