Function: corfu-info--display-buffer

corfu-info--display-buffer is a byte-compiled function defined in corfu-info.el.

Signature

(corfu-info--display-buffer BUFFER NAME)

Documentation

Display BUFFER and return window displaying the buffer.

Make the buffer persistent with NAME if non-nil.

Source Code

;; Defined in ~/.emacs.d/elpa/corfu-20260813.950/corfu-info.el
(defun corfu-info--display-buffer (buffer name)
  "Display BUFFER and return window displaying the buffer.
Make the buffer persistent with NAME if non-nil."
  (if name
      (unless (buffer-local-value 'buffer-file-name buffer)
        (if-let* ((old (get-buffer name)))
            (setq buffer (prog1 old (kill-buffer buffer)))
          (with-current-buffer buffer
            (rename-buffer name))))
    (corfu-info--restore-on-next-command))
  (setq other-window-scroll-buffer buffer)
  (display-buffer buffer t))