Commit f0da3aa8 authored by Eli Zaretskii's avatar Eli Zaretskii

Merge branch 'emacs-27' of into emacs-27

parents 3b199614 e1e0a7a7
Pipeline #4414 failed with stage
in 57 minutes and 22 seconds
......@@ -485,7 +485,7 @@ pattern to search for."
(buffer-substring (point-min) (line-end-position))))
(while (re-search-forward grep-re nil t)
(push (list (string-to-number (match-string line-group))
(concat remote-id (match-string file-group))
(match-string file-group)
(buffer-substring-no-properties (point) (line-end-position)))
(setq xrefs (xref--convert-hits (nreverse hits) regexp))
......@@ -1291,8 +1291,11 @@ Such as the current syntax table and the applied syntax properties."
(defun xref--collect-matches (hit regexp tmp-buffer)
(pcase-let* ((`(,line ,file ,text) hit)
(file (and file (concat (file-remote-p default-directory) file)))
(buf (xref--find-buffer-visiting file))
(remote-id (file-remote-p default-directory))
(file (and file (concat remote-id file)))
(buf (unless remote-id
;; find-buffer-visiting is slow on remote.
(xref--find-buffer-visiting file)))
(syntax-needed (xref--regexp-syntax-dependent-p regexp)))
(if buf
(with-current-buffer buf
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment