Function: dired-isearch-filenames-mode
dired-isearch-filenames-mode is an interactive and byte-compiled
function defined in dired-aux.el.gz.
Signature
(dired-isearch-filenames-mode &optional ARG)
Documentation
Toggle file names searching on or off.
When on, Isearch skips matches outside file names using the predicate
dired-isearch-filter-filenames that matches only at file names.
When off, it uses the original predicate.
This is a minor mode. If called interactively, toggle the
Dired-Isearch-Filenames 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 dired-isearch-filenames-mode(var)/dired-isearch-filenames-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 /usr/src/emacs/lisp/dired-aux.el.gz
(define-minor-mode dired-isearch-filenames-mode
"Toggle file names searching on or off.
When on, Isearch skips matches outside file names using the predicate
`dired-isearch-filter-filenames' that matches only at file names.
When off, it uses the original predicate."
:lighter nil
(if dired-isearch-filenames-mode
(add-function :before-while (local 'isearch-filter-predicate)
#'dired-isearch-filter-filenames
'((isearch-message-prefix . "filename ")))
(remove-function (local 'isearch-filter-predicate)
#'dired-isearch-filter-filenames))
(when isearch-mode
(setq isearch-success t isearch-adjusted t)
(isearch-update)))