Function: completion-in-region-mode
completion-in-region-mode is an interactive and byte-compiled function
defined in minibuffer.el.gz.
Signature
(completion-in-region-mode &optional ARG)
Documentation
Transient minor mode used during completion-in-region.
This is a global minor mode. If called interactively, toggle the
Completion-In-Region mode mode. If the prefix argument is positive,
enable the mode, and if it is zero or negative, disable the mode.
If called from Lisp, toggle the mode if ARG is toggle. Enable the
mode if ARG is nil, omitted, or is a positive number. Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
evaluate the variable completion-in-region-mode(var)/completion-in-region-mode(fun).
The mode's hook is called both when the mode is enabled and when it is disabled.
M-<down> minibuffer-next-completion
M-<up> minibuffer-previous-completion
M-? completion-help-at-point
M-RET minibuffer-choose-completion
TAB completion-at-point
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/minibuffer.el.gz
(defvar completion-in-region-mode nil) ;Explicit defvar, i.s.o defcustom.
(define-minor-mode completion-in-region-mode
"Transient minor mode used during `completion-in-region'."
:global t
:group 'minibuffer
;; Prevent definition of a custom-variable since it makes no sense to
;; customize this variable.
:variable completion-in-region-mode
;; (remove-hook 'pre-command-hook #'completion-in-region--prech)
(remove-hook 'post-command-hook #'completion-in-region--postch)
(setq minor-mode-overriding-map-alist
(delq (assq 'completion-in-region-mode minor-mode-overriding-map-alist)
minor-mode-overriding-map-alist))
(if (null completion-in-region-mode)
(progn
(setq completion-in-region--data nil)
(unless (equal "*Completions*" (buffer-name (window-buffer)))
(minibuffer-hide-completions)))
;; (add-hook 'pre-command-hook #'completion-in-region--prech)
(cl-assert completion-in-region-mode-predicate)
(setq completion-in-region-mode--predicate
completion-in-region-mode-predicate)
(setq-local minibuffer-completion-auto-choose nil)
(add-hook 'post-command-hook #'completion-in-region--postch)
(let* ((keymap completion-in-region-mode-map)
(keymap (if minibuffer-visible-completions
(make-composed-keymap
(list minibuffer-visible-completions-map
keymap))
keymap)))
(push `(completion-in-region-mode . ,keymap)
minor-mode-overriding-map-alist))))