Function: cape-interactive

cape-interactive is an autoloaded and byte-compiled function defined in cape.el.

Signature

(cape-interactive &rest CAPFS)

Documentation

Complete interactively with the given CAPFS.

Source Code

;; Defined in ~/.emacs.d/elpa/cape-20260804.2303/cape.el
;;;###autoload
(defun cape-interactive (&rest capfs)
  "Complete interactively with the given CAPFS."
  (let* ((ctx (and (consp (car capfs)) (car capfs)))
         (capfs (if ctx (cdr capfs) capfs))
         (completion-at-point-functions
          (if ctx
              (mapcar (lambda (f) `(lambda () (let ,ctx (funcall ',f)))) capfs)
            capfs)))
    (unless (completion-at-point)
      (user-error "%s: No completions"
                  (mapconcat (lambda (fun)
                               (if (symbolp fun)
                                   (symbol-name fun)
                                 "anonymous-capf"))
                             capfs ", ")))))