summaryrefslogtreecommitdiff
path: root/lisp/progmodes/xref.el
diff options
context:
space:
mode:
authorDmitry Gutov <dgutov@yandex.ru>2015-08-10 04:04:57 +0300
committerDmitry Gutov <dgutov@yandex.ru>2015-08-10 04:05:24 +0300
commit6f9b233448448adaf894b1586d4508c3d8573aba (patch)
treeb49c4d4acd6c8788d978209d6e8ecfa0e63f0761 /lisp/progmodes/xref.el
parent6a45e72052498e082f7f67345daaff5596cbd812 (diff)
downloademacs-6f9b233448448adaf894b1586d4508c3d8573aba.tar.gz
emacs-6f9b233448448adaf894b1586d4508c3d8573aba.tar.bz2
emacs-6f9b233448448adaf894b1586d4508c3d8573aba.zip
Add project-vc-search-path and project-vc-ignores
* lisp/progmodes/project.el (project-vc): New group. (project-vc-search-path, project-vc-ignores): New variables. (project--value-in-dir): Utility function. (project-search-path, project-ignores): Use them. * lisp/progmodes/xref.el (xref--rgrep-command): Only replace `./' at bos. Don't add extra `/'. Don't prepend with `*' if replaced.
Diffstat (limited to 'lisp/progmodes/xref.el')
-rw-r--r--lisp/progmodes/xref.el8
1 files changed, 4 insertions, 4 deletions
diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el
index c37a4aafe97..418997796d6 100644
--- a/lisp/progmodes/xref.el
+++ b/lisp/progmodes/xref.el
@@ -934,12 +934,12 @@ IGNORES is a list of glob patterns."
" -path "
(mapconcat
(lambda (ignore)
- (when (string-match "\\(\\.\\)/" ignore)
- (setq ignore (replace-match dir t t ignore 1)))
(when (string-match-p "/\\'" ignore)
(setq ignore (concat ignore "*")))
- (unless (string-prefix-p "*" ignore)
- (setq ignore (concat "*/" ignore)))
+ (if (string-match "\\`\\./" ignore)
+ (setq ignore (replace-match dir t t ignore))
+ (unless (string-prefix-p "*" ignore)
+ (setq ignore (concat "*/" ignore))))
(shell-quote-argument ignore))
ignores
" -o -path ")