Function: ghostel--line-mode-maybe-enter-initial

ghostel--line-mode-maybe-enter-initial is a natively compiled function defined in ghostel-line-mode.el.

Signature

(ghostel--line-mode-maybe-enter-initial)

Documentation

Enter line mode once the first prompt renders, if armed at startup.

Armed by ghostel-initial-input-mode = line. Runs each redraw cycle until a prompt appears, then enters and disarms. A manual mode switch during startup wins: a non-semi-char buffer drops the flag without entering.

Source Code

;; Defined in /nix/store/1252krff0gb2kisjcpp45m50cpdskfrl-emacs-packages-deps/share/emacs/site-lisp/ghostel-line-mode.el
(defun ghostel--line-mode-maybe-enter-initial ()
  "Enter line mode once the first prompt renders, if armed at startup.
Armed by `ghostel-initial-input-mode' = `line'.  Runs each redraw cycle until a
prompt appears, then enters and disarms.  A manual mode switch during startup
wins: a non-semi-char buffer drops the flag without entering."
  (when ghostel--pending-initial-line-mode
    (cond
     ((not (eq ghostel--input-mode 'semi-char))
      (setq ghostel--pending-initial-line-mode nil))
     ((ghostel--line-mode-startup-prompt-ready-p)
      (setq ghostel--pending-initial-line-mode nil)
      (ghostel-line-mode)))))