Function: xref-pop-marker-stack

xref-pop-marker-stack is an autoloaded, interactive and byte-compiled function defined in xref.el.gz.

Signature

(xref-pop-marker-stack)

Documentation

Pop back to where M-. (xref-find-definitions) was last invoked.

Probably introduced at or before Emacs version 25.1.

Key Bindings

Aliases

cider-pop-back pop-tag-mark

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/xref.el.gz
;;;###autoload
(defun xref-pop-marker-stack ()
  "Pop back to where \\[xref-find-definitions] was last invoked."
  (interactive)
  (let ((ring xref--marker-ring))
    (when (ring-empty-p ring)
      (user-error "Marker stack is empty"))
    (let ((marker (ring-remove ring 0)))
      (switch-to-buffer (or (marker-buffer marker)
                            (user-error "The marked buffer has been deleted")))
      (goto-char (marker-position marker))
      (set-marker marker nil nil)
      (run-hooks 'xref-after-return-hook))))