Function: ghostel--create
ghostel--create is a natively compiled function defined in ghostel.el.
Signature
(ghostel--create NAME &optional DISPLAY-ACTION ROWS COLS)
Documentation
Create a fresh ghostel buffer NAME and initialize its terminal.
DISPLAY-ACTION, when non-nil, is passed to pop-to-buffer before
terminal creation so size detection observes the window that will
display the terminal. Optional ROWS and COLS are passed through to
ghostel--init-buffer. If initialization is interrupted by an error
or quit, the partially created buffer is killed before re-signaling.
Source Code
;; Defined in /nix/store/1252krff0gb2kisjcpp45m50cpdskfrl-emacs-packages-deps/share/emacs/site-lisp/ghostel.el
(defun ghostel--create (name &optional display-action rows cols)
"Create a fresh ghostel buffer NAME and initialize its terminal.
DISPLAY-ACTION, when non-nil, is passed to `pop-to-buffer' before
terminal creation so size detection observes the window that will
display the terminal. Optional ROWS and COLS are passed through to
`ghostel--init-buffer'. If initialization is interrupted by an error
or quit, the partially created buffer is killed before re-signaling."
(let ((buffer (generate-new-buffer name)))
(condition-case err
(progn
;; Put the buffer in `ghostel-mode' before display so
;; `display-buffer-alist' rules can match on `derived-mode-p'.
(with-current-buffer buffer
(ghostel-mode))
(when display-action
(pop-to-buffer buffer display-action))
(ghostel--init-buffer buffer rows cols)
buffer)
((error quit)
(when (buffer-live-p buffer)
(kill-buffer buffer))
(signal (car err) (cdr err))))))