Variable: read-regexp-defaults-function
read-regexp-defaults-function is a customizable variable defined in
replace.el.gz.
Value
nil
Documentation
Function that provides default regexp(s) for read-regexp.
This function should take no arguments and return one of: nil, a
regexp, or a list of regexps. Interactively, read-regexp uses
the return value of this function for its DEFAULT argument.
As an example, set this variable to find-tag-default-as-regexp
to default to the symbol at point.
To provide different default regexps for different commands,
the function that you set this to can check this-command.
This variable was added, or its default value changed, in Emacs 24.4.
Probably introduced at or before Emacs version 24.4.
Source Code
;; Defined in /usr/src/emacs/lisp/replace.el.gz
(defcustom read-regexp-defaults-function nil
"Function that provides default regexp(s) for `read-regexp'.
This function should take no arguments and return one of: nil, a
regexp, or a list of regexps. Interactively, `read-regexp' uses
the return value of this function for its DEFAULT argument.
As an example, set this variable to `find-tag-default-as-regexp'
to default to the symbol at point.
To provide different default regexps for different commands,
the function that you set this to can check `this-command'."
:type '(choice
(const :tag "No default regexp reading function" nil)
(const :tag "Latest regexp history" regexp-history-last)
(function-item :tag "Tag at point"
find-tag-default)
(function-item :tag "Tag at point as regexp"
find-tag-default-as-regexp)
(function-item :tag "Tag at point as symbol regexp"
find-tag-default-as-symbol-regexp)
(function :tag "Your choice of function"))
:group 'matching
:version "24.4")