Function: cape--wrapped-table

cape--wrapped-table is a macro defined in cape.el.

Signature

(cape--wrapped-table WRAP BODY)

Documentation

Create wrapped completion table, handle completion--unquote.

WRAP is the wrapper function. BODY is the wrapping expression.

Source Code

;; Defined in /nix/store/nxaggkd0bn9kr2xfg9hyw77q51q20r8y-emacs-packages-deps/share/emacs/site-lisp/elpa/cape-20260927.2347/cape.el
(defmacro cape--wrapped-table (wrap body)
  "Create wrapped completion table, handle `completion--unquote'.
WRAP is the wrapper function.
BODY is the wrapping expression."
  (declare (indent 1))
  `(lambda (str pred action)
     (,@body
      (let ((result (complete-with-action action table str pred)))
        (when (and (eq action 'completion--unquote) (functionp (cadr result)))
          (cl-callf ,wrap (cadr result)))
        result))))