diff options
author | Wolfgang Scherer <wolfgang.scherer@gmx.de> | 2019-09-15 15:00:20 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2019-09-15 15:00:20 +0200 |
commit | c99c9ec28c440d42a66b737651b1095151d85957 (patch) | |
tree | de89aa029eaffae2eee96452bade5b08c2b1dfb5 /lisp/vc/vc-dir.el | |
parent | f198a5c5144fdded1400df6e8454e4b1b912c7de (diff) | |
download | emacs-c99c9ec28c440d42a66b737651b1095151d85957.tar.gz |
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).
Diffstat (limited to 'lisp/vc/vc-dir.el')
-rw-r--r-- | lisp/vc/vc-dir.el | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/lisp/vc/vc-dir.el b/lisp/vc/vc-dir.el index 9a6f6bb6874..e2259785923 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))) |