diff options
| author | Lars Ingebrigtsen | 2022-06-13 15:31:25 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2022-06-13 15:33:12 +0200 |
| commit | 027fecb24bb0a17543efb0ef63bb7b160e2630d1 (patch) | |
| tree | 08df95db41ebf094dc12fb3de6f8458e7ae6d902 /doc | |
| parent | 86325f960af8eb1df712e2f26e2b708f80c14ac6 (diff) | |
| download | emacs-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.texi | 14 |
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 | |||
| 309 | specifying a minibuffer history list to use (@pxref{Minibuffer | 309 | specifying a minibuffer history list to use (@pxref{Minibuffer |
| 310 | History}). If it is omitted or @code{nil}, the history list defaults | 310 | History}). If it is omitted or @code{nil}, the history list defaults |
| 311 | to @code{regexp-history}. | 311 | to @code{regexp-history}. |
| 312 | |||
| 313 | The user can use the @kbd{M-c} command to indicate whether case | ||
| 314 | folding should be on or off. If the user has used this command, the | ||
| 315 | returned string will have the text property @code{case-fold} set to | ||
| 316 | either @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 | ||
| 318 | function @code{read-regexp-case-fold-search} is provided for that. A | ||
| 319 | typical 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 |