Function: eca-complete

eca-complete is an interactive and natively compiled function defined in eca-completion.el.

Signature

(eca-complete)

Documentation

Complete at the current point.

Key Bindings

This command is not in any keymaps.

Source Code

;; Defined in /nix/store/jklqzw6pzz6j4jrbv8wy0iwgi7jlrbld-emacs-packages-deps/share/emacs/site-lisp/elpa/eca-20260928.1827/eca-completion.el
;;;###autoload
(defun eca-complete ()
  "Complete at the current point."
  (interactive)
  (when (derived-mode-p 'eca-chat-mode)
    (user-error "Completion is not available in eca-chat buffers"))
  (eca-assert-session-running (eca-session))
  (setq eca-completion--last-doc-version eca-completion--doc-version)

  ;; TODO add cache
  ;; (setq eca-completion--completion-cache nil)

  (let ((called-interactively (called-interactively-p 'interactive)))
    (eca-completion--find-completion
     :on-success
     (lambda (items)
       (let ((item (if (seq-empty-p items) nil (seq-elt items 0))))
         (if item
             (eca-completion--show-completion item)
           (when called-interactively
             (eca-warn "No completion is available."))))))))