Function: fido-mode

fido-mode is an autoloaded, interactive and byte-compiled function defined in icomplete.el.gz.

Signature

(fido-mode &optional ARG)

Documentation

An enhanced icomplete-mode(var)/icomplete-mode(fun) that emulates ido-mode(var)/ido-mode(fun).

This global minor mode makes minibuffer completion behave more like ido-mode(var)/ido-mode(fun) than regular icomplete-mode(var)/icomplete-mode(fun).

This is a global minor mode. If called interactively, toggle the Fido 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 \=fido-mode)'.

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

View in manual

Probably introduced at or before Emacs version 28.1.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/icomplete.el.gz
;;;###autoload
(define-minor-mode fido-mode
  "An enhanced `icomplete-mode' that emulates `ido-mode'.

This global minor mode makes minibuffer completion behave
more like `ido-mode' than regular `icomplete-mode'."
  :global t
  (remove-hook 'minibuffer-setup-hook #'icomplete-minibuffer-setup)
  (remove-hook 'minibuffer-setup-hook #'icomplete--fido-mode-setup)
  (remove-hook 'completion-in-region-mode-hook #'icomplete--in-region-setup)
  (when fido-mode
    (icomplete-mode -1)
    (setq icomplete-mode t)
    (when icomplete-in-buffer
      (add-hook 'completion-in-region-mode-hook #'icomplete--in-region-setup))
    (add-hook 'minibuffer-setup-hook #'icomplete-minibuffer-setup)
    (add-hook 'minibuffer-setup-hook #'icomplete--fido-mode-setup)))