Skip to content

Commit

Permalink
Use xref functions if available
Browse files Browse the repository at this point in the history
  • Loading branch information
phst authored and dominikh committed Feb 28, 2017
1 parent d511e35 commit 5056b85
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion go-mode.el
Expand Up @@ -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
Expand Down Expand Up @@ -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"))))

Expand Down

0 comments on commit 5056b85

Please sign in to comment.