Function: completion--in-region
completion--in-region is a byte-compiled function defined in
minibuffer.el.gz.
Signature
(completion--in-region START END COLLECTION &optional PREDICATE)
Documentation
Default function to use for completion-in-region-function.
Its arguments and return value are as specified for completion-in-region.
Also respects the obsolete wrapper hook completion-in-region-functions.
(See with-wrapper-hook for details about wrapper hooks.)
Source Code
;; Defined in /usr/src/emacs/lisp/minibuffer.el.gz
(defun completion--in-region (start end collection &optional predicate)
"Default function to use for `completion-in-region-function'.
Its arguments and return value are as specified for `completion-in-region'.
Also respects the obsolete wrapper hook `completion-in-region-functions'.
\(See `with-wrapper-hook' for details about wrapper hooks.)"
(subr--with-wrapper-hook-no-warnings
;; FIXME: Maybe we should use this hook to provide a "display
;; completions" operation as well.
completion-in-region-functions (start end collection predicate)
(let ((minibuffer-completion-table collection)
(minibuffer-completion-predicate predicate))
;; HACK: if the text we are completing is already in a field, we
;; want the completion field to take priority (e.g. Bug#6830).
(when completion-in-region-mode-predicate
(setq completion-in-region--data
`(,(if (markerp start) start (copy-marker start))
,(copy-marker end t) ,collection ,predicate))
(completion-in-region-mode 1))
(completion--in-region-1 start end))))