emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[nongnu] elpa/go-mode 5056b85 403/495: Use xref functions if available


From: ELPA Syncer
Subject: [nongnu] elpa/go-mode 5056b85 403/495: Use xref functions if available
Date: Sat, 7 Aug 2021 09:05:57 -0400 (EDT)

branch: elpa/go-mode
commit 5056b857a90d732d78162b3263a1dd94f7c5afe3
Author: Philipp Stephani <phst@google.com>
Commit: Dominik Honnef <dominik@honnef.co>

    Use xref functions if available
---
 go-mode.el | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/go-mode.el b/go-mode.el
index bbd9267..92564cb 100644
--- a/go-mode.el
+++ b/go-mode.el
@@ -22,6 +22,7 @@
 (require 'find-file)
 (require 'ring)
 (require 'url)
+(require 'xref nil :noerror)  ; xref is new in Emacs 25.1
 
 
 (eval-when-compile
@@ -1515,7 +1516,10 @@ description at POINT."
         (if (not (godef--successful-p file))
             (message "%s" (godef--error file))
           (push-mark)
-          (ring-insert find-tag-marker-ring (point-marker))
+          (if (eval-when-compile (fboundp 'xref-push-marker-stack))
+              ;; TODO: Integrate this facility with XRef.
+              (xref-push-marker-stack)
+            (ring-insert find-tag-marker-ring (point-marker)))
           (godef--find-file-line-column file other-window)))
     (file-error (message "Could not run godef binary"))))
 



reply via email to

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