Subject: bug#31027: 27.0.50; xref, tags-location-ring equivalent

From: Robert Pluim <[email-masked]>
Date: Tue, 03 Apr 2018 09:15:33 +0200

[email-masked] (Charles A. Roelli) writes:

> tags-location-ring seems to have no replacement in xref.el.
>
> from etags.el:
> (defvar tags-location-ring (make-ring xref-marker-ring-length)
>   "Ring of markers which are locations visited by \\[find-tag].
> Pop back to the last location with \\[negative-argument] \\[find-tag].")
>
> We should add a "xref-location-ring" (or similar) that stores the
> locations visited by "xref-find-definitions", and we can allow jumping
> to them with C-u - M-., in the same way as "find-tag" does.

xref has a marker stack. The following is bound to "M-," by default.

(defun xref-pop-marker-stack ()
  "Pop back to where \\[xref-find-definitions] was last invoked."
  (interactive)

Robert