aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorLars Ingebrigtsen2022-06-13 15:31:25 +0200
committerLars Ingebrigtsen2022-06-13 15:33:12 +0200
commit027fecb24bb0a17543efb0ef63bb7b160e2630d1 (patch)
tree08df95db41ebf094dc12fb3de6f8458e7ae6d902 /doc
parent86325f960af8eb1df712e2f26e2b708f80c14ac6 (diff)
downloademacs-027fecb24bb0a17543efb0ef63bb7b160e2630d1.tar.gz
emacs-027fecb24bb0a17543efb0ef63bb7b160e2630d1.zip
Add a `M-c' command to `read-regexp'
* doc/lispref/minibuf.texi (Text from Minibuffer): Document it. * lisp/replace.el (read-regexp): Add a `M-c' command to indicate case folding (bug#16913).
Diffstat (limited to 'doc')
-rw-r--r--doc/lispref/minibuf.texi14
1 files changed, 14 insertions, 0 deletions
diff --git a/doc/lispref/minibuf.texi b/doc/lispref/minibuf.texi
index 1451e59d05c..a59261cb9df 100644
--- a/doc/lispref/minibuf.texi
+++ b/doc/lispref/minibuf.texi
@@ -309,6 +309,20 @@ The optional argument @var{history}, if non-@code{nil}, is a symbol
309specifying a minibuffer history list to use (@pxref{Minibuffer 309specifying a minibuffer history list to use (@pxref{Minibuffer
310History}). If it is omitted or @code{nil}, the history list defaults 310History}). If it is omitted or @code{nil}, the history list defaults
311to @code{regexp-history}. 311to @code{regexp-history}.
312
313The user can use the @kbd{M-c} command to indicate whether case
314folding should be on or off. If the user has used this command, the
315returned string will have the text property @code{case-fold} set to
316either @code{fold} or @code{inhibit-fold}. It is up to the caller of
317@code{read-regexp} to actually use this value, and the convenience
318function @code{read-regexp-case-fold-search} is provided for that. A
319typical usage pattern here might look like:
320
321@lisp
322(let* ((regexp (read-regexp "Search for: "))
323 (case-fold-search (read-regexp-case-fold-search regexp)))
324 (re-search-forward regexp))
325@end lisp
312@end defun 326@end defun
313 327
314@defopt read-regexp-defaults-function 328@defopt read-regexp-defaults-function