aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/vc
diff options
context:
space:
mode:
authorDmitry Gutov2015-07-12 17:18:09 +0300
committerDmitry Gutov2015-07-12 17:19:08 +0300
commit62d5d46551c2adca780d5da1e58ea7f37d6fb933 (patch)
tree156727f3c45ff8c7e3fd7ec3d5a1a80b35ab39b2 /lisp/vc
parent714f7313f7e2043cd128bf6730c5bb2e5263b3ec (diff)
downloademacs-62d5d46551c2adca780d5da1e58ea7f37d6fb933.tar.gz
emacs-62d5d46551c2adca780d5da1e58ea7f37d6fb933.zip
Add `project-ignores'
* lisp/progmodes/project.el (project-ignores): New generic function, and an implementation for the VC project type. * lisp/progmodes/xref.el (xref--rgrep-command): Split, as a variant of rgrep-default-command that handles a generic list of ignores. (xref-collect-matches): Use it, and pass through to it the value of the newly added argument. (xref-find-regexp): Handle ignored paths within the project. Remove outdated comment. * lisp/vc/vc.el (vc-default-ignore-completion-table): Skip the comments and the empty lines.
Diffstat (limited to 'lisp/vc')
-rw-r--r--lisp/vc/vc.el8
1 files changed, 6 insertions, 2 deletions
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index 1bd04e13430..3b9e788b7ab 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -1423,8 +1423,12 @@ Argument BACKEND is the backend you are using."
1423 1423
1424(defun vc-default-ignore-completion-table (backend file) 1424(defun vc-default-ignore-completion-table (backend file)
1425 "Return the list of ignored files under BACKEND." 1425 "Return the list of ignored files under BACKEND."
1426 (vc--read-lines 1426 (cl-delete-if
1427 (vc-call-backend backend 'find-ignore-file file))) 1427 (lambda (str)
1428 ;; Commented or empty lines.
1429 (string-match-p "\\`\\(?:#\\|[ \t\r\n]*\\'\\)" str))
1430 (vc--read-lines
1431 (vc-call-backend backend 'find-ignore-file file))))
1428 1432
1429(defun vc--read-lines (file) 1433(defun vc--read-lines (file)
1430 "Return a list of lines of FILE." 1434 "Return a list of lines of FILE."