aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Gutov2024-10-03 22:03:09 +0300
committerDmitry Gutov2024-10-03 22:03:34 +0300
commita9e36fc3bf811853e152e7ff427a39272cff1a80 (patch)
tree92899b3cf67feb46a3ad475ae8b5579035ce1435
parentef587bf6b46b2ea3ef91b260ac2542666081260d (diff)
downloademacs-a9e36fc3bf811853e152e7ff427a39272cff1a80.tar.gz
emacs-a9e36fc3bf811853e152e7ff427a39272cff1a80.zip
xref-location-marker: Use find-file-noselect to ensure uptodateness
* lisp/progmodes/xref.el (xref-location-marker): Always call 'find-file-noselect' rather than 'get-file-buffer' to go through the visited-file-modtime verification every time.
-rw-r--r--lisp/progmodes/xref.el5
1 files changed, 2 insertions, 3 deletions
diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el
index 5ecb8664da0..ff80040382c 100644
--- a/lisp/progmodes/xref.el
+++ b/lisp/progmodes/xref.el
@@ -150,9 +150,8 @@ Line numbers start from 1 and columns from 0."
150(cl-defmethod xref-location-marker ((l xref-file-location)) 150(cl-defmethod xref-location-marker ((l xref-file-location))
151 (pcase-let (((cl-struct xref-file-location file line column) l)) 151 (pcase-let (((cl-struct xref-file-location file line column) l))
152 (with-current-buffer 152 (with-current-buffer
153 (or (get-file-buffer file) 153 (let ((find-file-suppress-same-file-warnings t))
154 (let ((find-file-suppress-same-file-warnings t)) 154 (find-file-noselect file))
155 (find-file-noselect file)))
156 (save-restriction 155 (save-restriction
157 (widen) 156 (widen)
158 (save-excursion 157 (save-excursion