From: Dmitry Gutov Date: Tue, 7 May 2024 16:09:28 +0000 (+0300) Subject: ; xref-matches-in-files: Fix the previous change (bug#70813) X-Git-Tag: archive/raspbian/1%30.1+1-3+rpi1^2~2^2~20^2~1605 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=f60e5f18745fc73fb0c71ecaeba2f3e52f323805;p=emacs.git ; xref-matches-in-files: Fix the previous change (bug#70813) --- diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index 29fc6cd560f..9fa8383ef10 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el @@ -1922,8 +1922,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.