Variable: completion-preview-mode-hook
completion-preview-mode-hook is a customizable variable defined in
completion-preview.el.gz.
Value
(completion-preview-mode-set-explicitly(var)/completion-preview-mode-set-explicitly(fun))
Documentation
Hook run after entering or leaving completion-preview-mode(var)/completion-preview-mode(fun).
No problems result if this variable is not bound.
add-hook automatically binds it. (This is true for all hook variables.)
Source Code
;; Defined in /usr/src/emacs/lisp/completion-preview.el.gz
;;;###autoload
(define-minor-mode completion-preview-mode
"Show in-buffer completion suggestions in a preview as you type.
This mode automatically shows and updates the completion preview
according to the text around point.
\\<completion-preview-active-mode-map>\
When the preview is visible, \\[completion-preview-insert] accepts the
completion suggestion, \\[completion-preview-complete] completes up to
the longest common prefix of all completion candidates,
\\[completion-preview-next-candidate] cycles forward to the next
completion suggestion, and \\[completion-preview-prev-candidate] cycles
backward."
:lighter " CP"
(if completion-preview-mode
(add-hook 'post-command-hook #'completion-preview--post-command nil t)
(remove-hook 'post-command-hook #'completion-preview--post-command t)
(when completion-preview-active-mode (completion-preview-active-mode -1))
(when (timerp completion-preview--timer)
(cancel-timer completion-preview--timer)
(setq completion-preview--timer nil))))