Function: eca-chat--answer-question

eca-chat--answer-question is a natively compiled function defined in eca-chat.el.

Signature

(eca-chat--answer-question QUESTION ANSWER)

Documentation

Send ANSWER for pending QUESTION.

Clear the prompt, moving point there, once no question is left. Return non-nil when QUESTION was still pending.

Source Code

;; Defined in /nix/store/jklqzw6pzz6j4jrbv8wy0iwgi7jlrbld-emacs-packages-deps/share/emacs/site-lisp/elpa/eca-20260928.1827/eca-chat.el
(defun eca-chat--answer-question (question answer)
  "Send ANSWER for pending QUESTION.
Clear the prompt, moving point there, once no question is left.
Return non-nil when QUESTION was still pending."
  (when (eca-chat--settle-question
         question
         (propertize (concat "→ " answer)
                     'font-lock-face 'eca-chat-question-option-face)
         (list :answer answer :cancelled :json-false))
    (unless eca-chat--pending-questions
      (eca-chat--allow-write
       (eca-chat--set-prompt "")))
    t))