Function: crm--collection-fn

crm--collection-fn is a byte-compiled function defined in crm.el.gz.

Signature

(crm--collection-fn STRING PREDICATE FLAG)

Documentation

Function used by completing-read-multiple to compute completion values.

The value of STRING is the string to be completed.

The value of PREDICATE is a function to filter possible matches, or nil if none.

The value of FLAG is used to specify the type of completion operation. A value of nil specifies try-completion. A value of t specifies all-completions. A value of lambda specifies a test for an exact match.

For more information on STRING, PREDICATE, and FLAG, see the Elisp Reference sections on “Programmed Completion” and “Basic Completion Functions”.

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/crm.el.gz
;; this function evolved from a posting by Stefan Monnier
(defun crm--collection-fn (string predicate flag)
  "Function used by `completing-read-multiple' to compute completion values.
The value of STRING is the string to be completed.

The value of PREDICATE is a function to filter possible matches, or
nil if none.

The value of FLAG is used to specify the type of completion operation.
A value of nil specifies `try-completion'.  A value of t specifies
`all-completions'.  A value of lambda specifies a test for an exact match.

For more information on STRING, PREDICATE, and FLAG, see the Elisp
Reference sections on “Programmed Completion” and “Basic Completion
Functions”."
  (let ((beg 0))
    (while (string-match crm-separator string beg)
      (setq beg (match-end 0)))
    (completion-table-with-context (substring string 0 beg)
                                   crm-completion-table
                                   (substring string beg)
                                   predicate
                                   flag)))