Function: eca-chat--build-question-options-content

eca-chat--build-question-options-content is a natively compiled function defined in eca-chat.el.

Signature

(eca-chat--build-question-options-content QUESTION)

Documentation

Build expandable block content with QUESTION options and a cancel button.

Source Code

;; Defined in /nix/store/jklqzw6pzz6j4jrbv8wy0iwgi7jlrbld-emacs-packages-deps/share/emacs/site-lisp/elpa/eca-20260928.1827/eca-chat.el
(defun eca-chat--build-question-options-content (question)
  "Build expandable block content with QUESTION options and a cancel button."
  (concat
   (mapconcat
    (lambda (opt)
      (let* ((ld (eca-chat--normalize-question-option opt))
             (label (car ld))
             (desc (cdr ld))
             (btn (eca-chat--question-button
                   (propertize label 'font-lock-face 'eca-chat-question-option-face)
                   (lambda ()
                     (eca-chat--answer-question question label)))))
        (concat btn
                (when desc
                  (concat "  " (propertize desc 'font-lock-face 'eca-chat-question-description-face)))
                "\n")))
    (plist-get question :options)
    "")
   (eca-chat--question-button
    (propertize "Cancel" 'font-lock-face '(error :underline t))
    (lambda () (eca-chat--cancel-question question)))
   "\n"))