]> git.eshelyaron.com Git - emacs.git/commitdiff
xref-location-marker: Use find-file-noselect to ensure uptodateness
authorDmitry Gutov <dmitry@gutov.dev>
Thu, 3 Oct 2024 19:03:09 +0000 (22:03 +0300)
committerEshel Yaron <me@eshelyaron.com>
Fri, 4 Oct 2024 10:11:30 +0000 (12:11 +0200)
* 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.

(cherry picked from commit a9e36fc3bf811853e152e7ff427a39272cff1a80)

lisp/progmodes/xref.el

index a049c98e5ce8db73ff9b527b218c9b21eb832b3f..c08915986059a1acfe9aa896561572195be30031 100644 (file)
@@ -150,9 +150,8 @@ Line numbers start from 1 and columns from 0."
 (cl-defmethod xref-location-marker ((l xref-file-location))
   (pcase-let (((cl-struct xref-file-location file line column) l))
     (with-current-buffer
-        (or (get-file-buffer file)
-            (let ((find-file-suppress-same-file-warnings t))
-              (find-file-noselect file)))
+        (let ((find-file-suppress-same-file-warnings t))
+          (find-file-noselect file))
       (save-restriction
         (widen)
         (save-excursion