aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/progmodes')
-rw-r--r--lisp/progmodes/project.el36
1 files changed, 19 insertions, 17 deletions
diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
index 1f4cbe96ad8..f5f4092babf 100644
--- a/lisp/progmodes/project.el
+++ b/lisp/progmodes/project.el
@@ -185,23 +185,25 @@ to find the list of ignores for each directory."
185 (require 'find-dired) 185 (require 'find-dired)
186 (require 'xref) 186 (require 'xref)
187 (defvar find-name-arg) 187 (defvar find-name-arg)
188 (let ((default-directory dir) 188 (let* ((default-directory dir)
189 (command (format "%s %s %s -type f %s -print0" 189 ;; Make sure ~/ etc. in local directory name is
190 find-program 190 ;; expanded and not left for the shell command
191 (file-local-name dir) 191 ;; to interpret.
192 (xref--find-ignores-arguments 192 (localdir (file-local-name (expand-file-name dir)))
193 ignores 193 (command (format "%s %s %s -type f %s -print0"
194 (expand-file-name dir)) 194 find-program
195 (if files 195 localdir
196 (concat (shell-quote-argument "(") 196 (xref--find-ignores-arguments ignores localdir)
197 " " find-name-arg " " 197 (if files
198 (mapconcat 198 (concat (shell-quote-argument "(")
199 #'shell-quote-argument 199 " " find-name-arg " "
200 (split-string files) 200 (mapconcat
201 (concat " -o " find-name-arg " ")) 201 #'shell-quote-argument
202 " " 202 (split-string files)
203 (shell-quote-argument ")"))"") 203 (concat " -o " find-name-arg " "))
204 ))) 204 " "
205 (shell-quote-argument ")"))"")
206 )))
205 (project--remote-file-names 207 (project--remote-file-names
206 (sort (split-string (shell-command-to-string command) "\0" t) 208 (sort (split-string (shell-command-to-string command) "\0" t)
207 #'string<)))) 209 #'string<))))