emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master a263dde 1/5: Merge from origin/emacs-27


From: Glenn Morris
Subject: master a263dde 1/5: Merge from origin/emacs-27
Date: Mon, 30 Dec 2019 12:12:38 -0500 (EST)

branch: master
commit a263ddea388ea40f59867f59b1ed6b522a78d54c
Merge: e1fd6b1 8224ed7
Author: Glenn Morris <address@hidden>
Commit: Glenn Morris <address@hidden>

    Merge from origin/emacs-27
    
    8224ed7d40 (xref--find-buffer-visiting): Speed up by using get-file-b...
---
 lisp/progmodes/xref.el | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el
index bbd3940..12f32b1 100644
--- a/lisp/progmodes/xref.el
+++ b/lisp/progmodes/xref.el
@@ -1293,9 +1293,7 @@ Such as the current syntax table and the applied syntax 
properties."
   (pcase-let* ((`(,line ,file ,text) hit)
                (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)))
+               (buf (xref--find-buffer-visiting file))
                (syntax-needed (xref--regexp-syntax-dependent-p regexp)))
     (if buf
         (with-current-buffer buf
@@ -1354,7 +1352,7 @@ Such as the current syntax table and the applied syntax 
properties."
 (defun xref--find-buffer-visiting (file)
   (unless (equal (car xref--last-visiting-buffer) file)
     (setq xref--last-visiting-buffer
-          (cons file (find-buffer-visiting file))))
+          (cons file (get-file-buffer file))))
   (cdr xref--last-visiting-buffer))
 
 (provide 'xref)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]