diff options
| author | Glenn Morris | 2020-05-03 07:50:21 -0700 |
|---|---|---|
| committer | Glenn Morris | 2020-05-03 07:50:21 -0700 |
| commit | 99a544c8076013daeff707ec7967e527ab989393 (patch) | |
| tree | 245fb0ba6e1e312961cb282b3d27323f72e78a93 /doc | |
| parent | 8b4a61d33b9b275320c1963b2d4058bd3558229e (diff) | |
| parent | 0a3731feef351f6af47bed1458aefb6cb481b5f9 (diff) | |
| download | emacs-99a544c8076013daeff707ec7967e527ab989393.tar.gz emacs-99a544c8076013daeff707ec7967e527ab989393.zip | |
Merge from origin/emacs-27
0a3731feef Make memq etc. examples more like they were
ed25282b82 Document effect of 'search-upper-case' on replacement comm...
5a5d8a8ec0 * lisp/desktop.el (desktop-save): Doc fix. (Bug#41007)
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/emacs/search.texi | 22 | ||||
| -rw-r--r-- | doc/lispref/lists.texi | 18 |
2 files changed, 24 insertions, 16 deletions
diff --git a/doc/emacs/search.texi b/doc/emacs/search.texi index 16916617a2a..2e094f3ad92 100644 --- a/doc/emacs/search.texi +++ b/doc/emacs/search.texi | |||
| @@ -1324,10 +1324,14 @@ case-sensitive. Thus, searching for @samp{Foo} does not find | |||
| 1324 | @samp{foo} or @samp{FOO}. This applies to regular expression search | 1324 | @samp{foo} or @samp{FOO}. This applies to regular expression search |
| 1325 | as well as to literal string search. The effect ceases if you delete | 1325 | as well as to literal string search. The effect ceases if you delete |
| 1326 | the upper-case letter from the search string. The variable | 1326 | the upper-case letter from the search string. The variable |
| 1327 | @code{search-upper-case} controls this: if it is non-@code{nil} (the | 1327 | @code{search-upper-case} controls this: if it is non-@code{nil}, an |
| 1328 | default), an upper-case character in the search string makes the | 1328 | upper-case character in the search string makes the search |
| 1329 | search case-sensitive; setting it to @code{nil} disables this effect | 1329 | case-sensitive; setting it to @code{nil} disables this effect of |
| 1330 | of upper-case characters. | 1330 | upper-case characters. The default value of this variable is |
| 1331 | @code{not-yanks}, which makes search case-sensitive if there are | ||
| 1332 | upper-case letters in the search string, and also causes text yanked | ||
| 1333 | into the search string (@pxref{Isearch Yank}) to be down-cased, so | ||
| 1334 | that such searches are case-insensitive by default. | ||
| 1331 | 1335 | ||
| 1332 | @vindex case-fold-search | 1336 | @vindex case-fold-search |
| 1333 | If you set the variable @code{case-fold-search} to @code{nil}, then | 1337 | If you set the variable @code{case-fold-search} to @code{nil}, then |
| @@ -1572,9 +1576,13 @@ searching for patterns. | |||
| 1572 | @cindex case folding in replace commands | 1576 | @cindex case folding in replace commands |
| 1573 | If the first argument of a replace command is all lower case, the | 1577 | If the first argument of a replace command is all lower case, the |
| 1574 | command ignores case while searching for occurrences to | 1578 | command ignores case while searching for occurrences to |
| 1575 | replace---provided @code{case-fold-search} is non-@code{nil}. If | 1579 | replace---provided @code{case-fold-search} is non-@code{nil} and |
| 1576 | @code{case-fold-search} is set to @code{nil}, case is always significant | 1580 | @code{search-upper-case} is also non-@code{nil}. If |
| 1577 | in all searches. | 1581 | @code{search-upper-case} (@pxref{Lax Search, search-upper-case}) is |
| 1582 | @code{nil}, whether searching ignores case is determined by | ||
| 1583 | @code{case-fold-search} alone, regardless of letter-case of the | ||
| 1584 | command's first argument. If @code{case-fold-search} is set to | ||
| 1585 | @code{nil}, case is always significant in all searches. | ||
| 1578 | 1586 | ||
| 1579 | @vindex case-replace | 1587 | @vindex case-replace |
| 1580 | In addition, when the @var{newstring} argument is all or partly lower | 1588 | In addition, when the @var{newstring} argument is all or partly lower |
diff --git a/doc/lispref/lists.texi b/doc/lispref/lists.texi index ea44e01f48a..fcaf4386b15 100644 --- a/doc/lispref/lists.texi +++ b/doc/lispref/lists.texi | |||
| @@ -1242,8 +1242,8 @@ compare @var{object} against the elements of the list. For example: | |||
| 1242 | @result{} (b c b a) | 1242 | @result{} (b c b a) |
| 1243 | @end group | 1243 | @end group |
| 1244 | @group | 1244 | @group |
| 1245 | (memq '(2) '((1) (2))) ; @r{@code{(2)} and @code{(2)} are not @code{eq}.} | 1245 | (memq '(2) '((1) (2))) ; @r{The two @code{(2)}s need not be @code{eq}.} |
| 1246 | @result{} nil | 1246 | @result{} @r{Unspecified; might be @code{nil} or @code{((2))}.} |
| 1247 | @end group | 1247 | @end group |
| 1248 | @end example | 1248 | @end example |
| 1249 | @end defun | 1249 | @end defun |
| @@ -1356,12 +1356,12 @@ Compare this with @code{memq}: | |||
| 1356 | 1356 | ||
| 1357 | @example | 1357 | @example |
| 1358 | @group | 1358 | @group |
| 1359 | (memql 1.2 '(1.1 1.2 1.3)) ; @r{@code{1.2} and @code{1.2} must be @code{eql}.} | 1359 | (memql 1.2 '(1.1 1.2 1.3)) ; @r{@code{1.2} and @code{1.2} are @code{eql}.} |
| 1360 | @result{} (1.2 1.3) | 1360 | @result{} (1.2 1.3) |
| 1361 | @end group | 1361 | @end group |
| 1362 | @group | 1362 | @group |
| 1363 | (memq 1.2 '(1.1 1.2 1.3)) ; @r{@code{1.2} and @code{1.2} need not be @code{eq}.} | 1363 | (memq 1.2 '(1.1 1.2 1.3)) ; @r{The two @code{1.2}s need not be @code{eq}.} |
| 1364 | @result{} nil ; @r{... or it might be @code{(1.2 1.3)}.} | 1364 | @result{} @r{Unspecified; might be @code{nil} or @code{(1.2 1.3)}.} |
| 1365 | @end group | 1365 | @end group |
| 1366 | @end example | 1366 | @end example |
| 1367 | @end defun | 1367 | @end defun |
| @@ -1380,12 +1380,12 @@ Compare this with @code{memq}: | |||
| 1380 | 1380 | ||
| 1381 | @example | 1381 | @example |
| 1382 | @group | 1382 | @group |
| 1383 | (member (list 2) '((1) (2))) ; @r{@code{(list 2)} and @code{(2)} are @code{equal}.} | 1383 | (member '(2) '((1) (2))) ; @r{@code{(2)} and @code{(2)} are @code{equal}.} |
| 1384 | @result{} ((2)) | 1384 | @result{} ((2)) |
| 1385 | @end group | 1385 | @end group |
| 1386 | @group | 1386 | @group |
| 1387 | (memq (list 2) '((1) (2))) ; @r{@code{(list 2)} and @code{(2)} are not @code{eq}.} | 1387 | (memq '(2) '((1) (2))) ; @r{The two @code{(2)}s need not be @code{eq}.} |
| 1388 | @result{} nil | 1388 | @result{} @r{Unspecified; might be @code{nil} or @code{(2)}.} |
| 1389 | @end group | 1389 | @end group |
| 1390 | @group | 1390 | @group |
| 1391 | ;; @r{Two strings with the same contents are @code{equal}.} | 1391 | ;; @r{Two strings with the same contents are @code{equal}.} |
| @@ -1626,7 +1626,7 @@ keys may not be symbols: | |||
| 1626 | ("compound leaves" . horsechestnut))) | 1626 | ("compound leaves" . horsechestnut))) |
| 1627 | 1627 | ||
| 1628 | (assq "simple leaves" leaves) | 1628 | (assq "simple leaves" leaves) |
| 1629 | @result{} @r{Unspecified; might be @code{nil} or non-@code{nil}.} | 1629 | @result{} @r{Unspecified; might be @code{nil} or @code{("simple leaves" . oak)}.} |
| 1630 | (assoc "simple leaves" leaves) | 1630 | (assoc "simple leaves" leaves) |
| 1631 | @result{} ("simple leaves" . oak) | 1631 | @result{} ("simple leaves" . oak) |
| 1632 | @end smallexample | 1632 | @end smallexample |