]> code.delx.au - gnu-emacs/commitdiff
Fix xref-find-references on MS-Windows
authorEli Zaretskii <eliz@gnu.org>
Sat, 2 Jan 2016 15:24:48 +0000 (17:24 +0200)
committerEli Zaretskii <eliz@gnu.org>
Sat, 2 Jan 2016 15:24:48 +0000 (17:24 +0200)
* lisp/cedet/semantic/symref/grep.el
(semantic-symref-derive-find-filepatterns): Use
'shell-quote-argument' instead of manually quoting in a way that
only works with Posix shells.  (Bug#22289)

lisp/cedet/semantic/symref/grep.el

index 52c8d3b972c3c18f43610b46c33d7e501a04b509..54b538345ab29a82d6cfeae948f7f95e10dcc00f 100644 (file)
@@ -75,14 +75,14 @@ Optional argument MODE specifies the `major-mode' to test."
          )))
     ;; Convert the list into some find-flags.
     (cond ((= (length pat) 1)
-          (concat "-name \"" (car pat) "\""))
+          (concat "-name " (shell-quote-argument (car pat))))
          ((consp pat)
-          (concat "\\( "
+          (concat (shell-quote-argument "(") " "
                   (mapconcat (lambda (s)
-                               (concat "-name \"" s "\""))
+                               (concat "-name " (shell-quote-argument s)))
                              pat
                              " -o ")
-                  " \\)"))
+                  " " (shell-quote-argument ")")))
          (t
           (error "Customize `semantic-symref-filepattern-alist' for %s" major-mode))
          )))