mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-23 07:19:15 +00:00
Improve quoting of directory names in project/xref
* lisp/progmodes/project.el (project--files-in-directory): Quote LOCALDIR a bit earlier, to affect xref--find-ignores-arguments as well (bug#47799). * lisp/progmodes/xref.el (xref-matches-in-directory): Quote the dir passed to xref--rgrep-command.
This commit is contained in:
parent
4180429d5d
commit
f955df1788
@ -296,12 +296,11 @@ to find the list of ignores for each directory."
|
||||
;; Make sure ~/ etc. in local directory name is
|
||||
;; expanded and not left for the shell command
|
||||
;; to interpret.
|
||||
(localdir (file-local-name (expand-file-name dir)))
|
||||
(localdir (file-name-unquote (file-local-name (expand-file-name dir))))
|
||||
(command (format "%s %s %s -type f %s -print0"
|
||||
find-program
|
||||
;; In case DIR is a symlink.
|
||||
(file-name-unquote
|
||||
(file-name-as-directory localdir))
|
||||
(file-name-as-directory localdir)
|
||||
(xref--find-ignores-arguments ignores localdir)
|
||||
(if files
|
||||
(concat (shell-quote-argument "(")
|
||||
|
@ -1416,7 +1416,8 @@ IGNORES is a list of glob patterns for files to ignore."
|
||||
(command (xref--rgrep-command (xref--regexp-to-extended regexp)
|
||||
files
|
||||
(file-name-as-directory
|
||||
(file-local-name (expand-file-name dir)))
|
||||
(file-name-unquote
|
||||
(file-local-name (expand-file-name dir))))
|
||||
ignores))
|
||||
(def default-directory)
|
||||
(buf (get-buffer-create " *xref-grep*"))
|
||||
|
Loading…
Reference in New Issue
Block a user