Function: xref--push-markers

xref--push-markers is a byte-compiled function defined in xref.el.gz.

Signature

(xref--push-markers BUF PT WIN)

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/xref.el.gz
(defun xref--push-markers (buf pt win)
  (when (buffer-live-p buf)
    ;; This was we support the `xref-history-storage' getter which
    ;; depends on the selected window.  This is getting pretty complex,
    ;; though. The alternative approach to try would be to push early
    ;; but undo the stack insertion and mark-pushing in error handler.
    (save-window-excursion
      (when (window-live-p win)
        (select-window win))
      (save-excursion
        (with-no-warnings (set-buffer buf))
        (goto-char pt)
        (unless (region-active-p) (push-mark nil t))
        (xref-push-marker-stack)))))