Function: completion-preview-active-mode
completion-preview-active-mode is a byte-compiled function defined in
completion-preview.el.gz.
Signature
(completion-preview-active-mode &optional ARG)
Documentation
Mode for when the completion preview is shown.
This is a minor mode. If called interactively, toggle the
Completion-Preview-Active 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-preview-active-mode(var)/completion-preview-active-mode(fun).
The mode's hook is called both when the mode is enabled and when it is disabled.
Source Code
;; Defined in /usr/src/emacs/lisp/completion-preview.el.gz
(define-minor-mode completion-preview-active-mode
"Mode for when the completion preview is shown."
:interactive nil
(if completion-preview-active-mode
(progn
(add-hook 'window-selection-change-functions
#'completion-preview--window-selection-change nil t)
;; Give keymap precedence over other minor mode maps.
;; TODO: Use explicit minor mode precedence instead when
;; implemented (bug#74492).
(setf (alist-get 'completion-preview-active-mode
minor-mode-overriding-map-alist)
completion-preview-active-mode-map))
(remove-hook 'window-selection-change-functions
#'completion-preview--window-selection-change t)
(completion-preview-hide)))