Variable: search-default-mode

search-default-mode is a customizable variable defined in isearch.el.gz.

Value

nil

Documentation

Default mode to use when starting isearch.

Value is nil, t, or a function.

If nil, default to literal searches (note that case-fold-search and isearch-lax-whitespace may still be applied).If t, default to regexp searches (as if typing M-s r (isearch-toggle-regexp) during isearch).

If a function, use that function as an isearch-regexp-function. Example functions (and the keys to toggle them during isearch) are word-search-regexp (M-s w (isearch-toggle-word)), isearch-symbol-regexp
(M-s _ (isearch-toggle-symbol)), and char-fold-to-regexp (M-s ' (isearch-toggle-char-fold)).

This variable was added, or its default value changed, in Emacs 25.1.

Probably introduced at or before Emacs version 25.1.

Source Code

;; Defined in /usr/src/emacs/lisp/isearch.el.gz
(defcustom search-default-mode nil
  "Default mode to use when starting isearch.
Value is nil, t, or a function.

If nil, default to literal searches (note that `case-fold-search'
and `isearch-lax-whitespace' may still be applied).\\<isearch-mode-map>
If t, default to regexp searches (as if typing \\[isearch-toggle-regexp] during
isearch).

If a function, use that function as an `isearch-regexp-function'.
Example functions (and the keys to toggle them during isearch)
are `word-search-regexp' \(\\[isearch-toggle-word]), `isearch-symbol-regexp'
\(\\[isearch-toggle-symbol]), and `char-fold-to-regexp' \(\\[isearch-toggle-char-fold])."
  ;; :type is set below by `isearch-define-mode-toggle'.
  :type '(choice (const :tag "Literal search" nil)
                 (const :tag "Regexp search" t)
                 (function :tag "Other"))
  :version "25.1")