Function: corfu-mode

corfu-mode is an autoloaded, interactive and byte-compiled function defined in corfu.el.

Signature

(corfu-mode &optional ARG)

Documentation

COmpletion in Region FUnction.

This is a minor mode. If called interactively, toggle the Corfu 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 corfu-mode(var)/corfu-mode(fun).

The mode's hook is called both when the mode is enabled and when it is disabled.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/corfu-20260813.950/corfu.el
;;;###autoload
(define-minor-mode corfu-mode
  "COmpletion in Region FUnction."
  :group 'corfu :keymap corfu-mode-map
  (cond
   (corfu-mode
    (when corfu-auto
      (require 'corfu-auto)
      (add-hook 'post-command-hook 'corfu-auto--post-command 10 'local))
    (setq-local completion-in-region-function #'corfu--in-region))
   (t
    (remove-hook 'post-command-hook 'corfu-auto--post-command 'local)
    (kill-local-variable 'completion-in-region-function))))