Function: complete-with-action

complete-with-action is a byte-compiled function defined in minibuffer.el.gz.

Signature

(complete-with-action ACTION COLLECTION STRING PREDICATE)

Documentation

Perform completion according to ACTION.

STRING, COLLECTION and PREDICATE are used as in try-completion.

If COLLECTION is a function, it will be called directly to perform completion, no matter what ACTION is.

If ACTION is metadata or a list where the first element is boundaries, return nil. If ACTION is nil, this function works like try-completion; if it is t, this function works like all-completion; and any other value makes it work like test-completion.

Aliases

verilog--complete-with-action

Source Code

;; Defined in /usr/src/emacs/lisp/minibuffer.el.gz
(defun complete-with-action (action collection string predicate)
  "Perform completion according to ACTION.
STRING, COLLECTION and PREDICATE are used as in `try-completion'.

If COLLECTION is a function, it will be called directly to
perform completion, no matter what ACTION is.

If ACTION is `metadata' or a list where the first element is
`boundaries', return nil.  If ACTION is nil, this function works
like `try-completion'; if it is t, this function works like
`all-completion'; and any other value makes it work like
`test-completion'."
  (cond
   ((functionp collection) (funcall collection string predicate action))
   ((eq (car-safe action) 'boundaries) nil)
   ((eq action 'metadata) nil)
   (t
    (funcall
     (cond
      ((null action) 'try-completion)
      ((eq action t) 'all-completions)
      (t 'test-completion))
     string collection predicate))))