Function: corfu-history-mode

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

Signature

(corfu-history-mode &optional ARG)

Documentation

Save completion history and sort candidates by history.

This is a global minor mode. If called interactively, toggle the Corfu-History 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 (default-value \=corfu-history-mode)'.

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-history.el
;;;###autoload
(define-minor-mode corfu-history-mode
  "Save completion history and sort candidates by history."
  :global t :group 'corfu
  (if corfu-history-mode
      (add-function :override corfu-sort-function #'corfu-history--sort)
    (remove-function corfu-sort-function #'corfu-history--sort)))