]> git.eshelyaron.com Git - emacs.git/commitdiff
; xref-matches-in-files: Fix the previous change (bug#70813)
authorDmitry Gutov <dmitry@gutov.dev>
Tue, 7 May 2024 16:09:28 +0000 (19:09 +0300)
committerEshel Yaron <me@eshelyaron.com>
Wed, 8 May 2024 16:52:56 +0000 (18:52 +0200)
(cherry picked from commit f60e5f18745fc73fb0c71ecaeba2f3e52f323805)

lisp/progmodes/xref.el

index f1446954c023b90b03c81cc26e8ac40b8c20afeb..a9c42313f1213248126510e16d84f684e1300a2e 100644 (file)
@@ -2063,8 +2063,9 @@ to control which program to use when looking for matches."
        (hits nil)
        ;; Support for remote files.  The assumption is that, if the
        ;; first file is remote, they all are, and on the same host.
-       (dir (or (file-name-directory (car files))
-                default-directory))
+       (dir (if (file-name-absolute-p (car files))
+                (file-name-directory (car files))
+              default-directory))
        (remote-id (file-remote-p dir))
        ;; The 'auto' default would be fine too, but ripgrep can't handle
        ;; the options we pass in that case.