]> git.eshelyaron.com Git - emacs.git/commitdiff
Move part of the fix from project to xref
authorDmitry Gutov <dgutov@yandex.ru>
Thu, 22 Apr 2021 00:29:09 +0000 (03:29 +0300)
committerDmitry Gutov <dgutov@yandex.ru>
Thu, 22 Apr 2021 14:40:30 +0000 (17:40 +0300)
* lisp/progmodes/project.el (project--find-regexp-in-files):
Don't unquote file names here.

* lisp/progmodes/xref.el (xref-matches-in-files): Do it here.
And only if the first element in the list is quoted (bug#47799).

lisp/progmodes/project.el
lisp/progmodes/xref.el

index 1d0d1bc58a4c24e0165aa0f89b03696d2ea084fd..1023b75e6686ff1b5139fab89e9aa06cca530159 100644 (file)
@@ -787,11 +787,7 @@ pattern to search for."
 (defun project--find-regexp-in-files (regexp files)
   (unless files
     (user-error "Empty file list"))
-  (let ((xrefs (xref-matches-in-files
-                regexp
-                ;; FIXME: `xref-matches-in-files' should work with
-                ;; quoted filenames.
-                (mapcar #'file-name-unquote files))))
+  (let ((xrefs (xref-matches-in-files regexp files)))
     (unless xrefs
       (user-error "No matches for: %s" regexp))
     xrefs))
index 3d2f21ab52fd29da2fa7fde3437e61fb20545613..5d99915347b10edb2f904aecc6307b5ecdff38b4 100644 (file)
@@ -1534,6 +1534,8 @@ FILES must be a list of absolute file names."
                        #'tramp-file-local-name
                        #'file-local-name)
                    files)))
+    (when (file-name-quoted-p (car files))
+      (setq files (mapcar #'file-name-unquote files)))
     (with-current-buffer output
       (erase-buffer)
       (with-temp-buffer