Function: xref-pop-to-location

xref-pop-to-location is a byte-compiled function defined in xref.el.gz.

Signature

(xref-pop-to-location ITEM &optional ACTION)

Documentation

Go to the location of ITEM and display the buffer.

ACTION controls how the buffer is displayed:
  nil -- switch-to-buffer
  window -- pop-to-buffer (other window)
  frame -- pop-to-buffer (other frame)
If SELECT is non-nil, select the target window.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/xref.el.gz
(defun xref-pop-to-location (item &optional action)
  "Go to the location of ITEM and display the buffer.
ACTION controls how the buffer is displayed:
  nil      -- `switch-to-buffer'
  `window' -- `pop-to-buffer' (other window)
  `frame'  -- `pop-to-buffer' (other frame)
If SELECT is non-nil, select the target window."
  (let* ((marker (save-excursion
                   (xref-location-marker (xref-item-location item))))
         (buf (marker-buffer marker)))
    (cl-ecase action
      ((nil)  (xref--switch-to-buffer buf))
      (window (pop-to-buffer buf t))
      (frame  (let ((pop-up-frames t)) (pop-to-buffer buf t))))
    (xref--goto-char marker))
  (let ((xref-current-item item))
    (run-hooks 'xref-after-jump-hook)))