diff options
| author | Eli Zaretskii | 2019-12-27 16:20:27 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2019-12-27 16:20:27 +0200 |
| commit | f0da3aa83e010d3b5570ecbf2e0b396dd1aab91d (patch) | |
| tree | 7885f646e1968c33d74f65698e2d3b98dc4678eb | |
| parent | 3b199614ccc81ae35218a93c7c09aee49ceed3fd (diff) | |
| parent | e1e0a7a7519d4d453bc1eaa355db41b321c8b5bb (diff) | |
| download | emacs-f0da3aa83e010d3b5570ecbf2e0b396dd1aab91d.tar.gz emacs-f0da3aa83e010d3b5570ecbf2e0b396dd1aab91d.zip | |
Merge branch 'emacs-27' of git.savannah.gnu.org:/srv/git/emacs into emacs-27
| -rw-r--r-- | lisp/progmodes/project.el | 2 | ||||
| -rw-r--r-- | lisp/progmodes/xref.el | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index e21600ffe09..d8909aca740 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el | |||
| @@ -485,7 +485,7 @@ pattern to search for." | |||
| 485 | (buffer-substring (point-min) (line-end-position)))) | 485 | (buffer-substring (point-min) (line-end-position)))) |
| 486 | (while (re-search-forward grep-re nil t) | 486 | (while (re-search-forward grep-re nil t) |
| 487 | (push (list (string-to-number (match-string line-group)) | 487 | (push (list (string-to-number (match-string line-group)) |
| 488 | (concat remote-id (match-string file-group)) | 488 | (match-string file-group) |
| 489 | (buffer-substring-no-properties (point) (line-end-position))) | 489 | (buffer-substring-no-properties (point) (line-end-position))) |
| 490 | hits))) | 490 | hits))) |
| 491 | (setq xrefs (xref--convert-hits (nreverse hits) regexp)) | 491 | (setq xrefs (xref--convert-hits (nreverse hits) regexp)) |
diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index 13a1600594f..bbd3940be4f 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el | |||
| @@ -1291,8 +1291,11 @@ Such as the current syntax table and the applied syntax properties." | |||
| 1291 | 1291 | ||
| 1292 | (defun xref--collect-matches (hit regexp tmp-buffer) | 1292 | (defun xref--collect-matches (hit regexp tmp-buffer) |
| 1293 | (pcase-let* ((`(,line ,file ,text) hit) | 1293 | (pcase-let* ((`(,line ,file ,text) hit) |
| 1294 | (file (and file (concat (file-remote-p default-directory) file))) | 1294 | (remote-id (file-remote-p default-directory)) |
| 1295 | (buf (xref--find-buffer-visiting file)) | 1295 | (file (and file (concat remote-id file))) |
| 1296 | (buf (unless remote-id | ||
| 1297 | ;; find-buffer-visiting is slow on remote. | ||
| 1298 | (xref--find-buffer-visiting file))) | ||
| 1296 | (syntax-needed (xref--regexp-syntax-dependent-p regexp))) | 1299 | (syntax-needed (xref--regexp-syntax-dependent-p regexp))) |
| 1297 | (if buf | 1300 | (if buf |
| 1298 | (with-current-buffer buf | 1301 | (with-current-buffer buf |