aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2020-05-03 07:50:21 -0700
committerGlenn Morris2020-05-03 07:50:21 -0700
commit99a544c8076013daeff707ec7967e527ab989393 (patch)
tree245fb0ba6e1e312961cb282b3d27323f72e78a93
parent8b4a61d33b9b275320c1963b2d4058bd3558229e (diff)
parent0a3731feef351f6af47bed1458aefb6cb481b5f9 (diff)
downloademacs-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)
-rw-r--r--doc/emacs/search.texi22
-rw-r--r--doc/lispref/lists.texi18
-rw-r--r--lisp/desktop.el39
-rw-r--r--lisp/replace.el35
4 files changed, 69 insertions, 45 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
1325as well as to literal string search. The effect ceases if you delete 1325as well as to literal string search. The effect ceases if you delete
1326the upper-case letter from the search string. The variable 1326the 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
1328default), an upper-case character in the search string makes the 1328upper-case character in the search string makes the search
1329search case-sensitive; setting it to @code{nil} disables this effect 1329case-sensitive; setting it to @code{nil} disables this effect of
1330of upper-case characters. 1330upper-case characters. The default value of this variable is
1331@code{not-yanks}, which makes search case-sensitive if there are
1332upper-case letters in the search string, and also causes text yanked
1333into the search string (@pxref{Isearch Yank}) to be down-cased, so
1334that 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
1574command ignores case while searching for occurrences to 1578command ignores case while searching for occurrences to
1575replace---provided @code{case-fold-search} is non-@code{nil}. If 1579replace---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
1577in 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
1584command'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
diff --git a/lisp/desktop.el b/lisp/desktop.el
index 9d117c6f0d6..7fe5f73b879 100644
--- a/lisp/desktop.el
+++ b/lisp/desktop.el
@@ -1017,13 +1017,16 @@ Frames with a non-nil `desktop-dont-save' parameter are not saved."
1017 1017
1018;;;###autoload 1018;;;###autoload
1019(defun desktop-save (dirname &optional release only-if-changed version) 1019(defun desktop-save (dirname &optional release only-if-changed version)
1020 "Save the desktop in a desktop file. 1020 "Save the state of Emacs in a desktop file in directory DIRNAME.
1021Parameter DIRNAME specifies where to save the desktop file. 1021Optional argument RELEASE non-nil says we're done with this
1022Optional parameter RELEASE says whether we're done with this 1022desktop, in which case this function releases the lock of the
1023desktop. If ONLY-IF-CHANGED is non-nil, compare the current 1023desktop file in DIRNAME.
1024desktop information to that in the desktop file, and if the 1024If ONLY-IF-CHANGED is non-nil, compare the current desktop
1025desktop information has not changed since it was last saved then 1025information to that in the desktop file, and if the desktop
1026do not rewrite the file. 1026information has not changed since it was last saved, then do
1027not rewrite the file.
1028
1029To restore the desktop, use `desktop-read'.
1027 1030
1028This function can save the desktop in either format version 1031This function can save the desktop in either format version
1029208 (which only Emacs 25.1 and later can read) or version 1032208 (which only Emacs 25.1 and later can read) or version
@@ -1033,14 +1036,20 @@ it was last saved, or version 208 when writing a fresh desktop
1033file. 1036file.
1034 1037
1035To upgrade a version 206 file to version 208, call this command 1038To upgrade a version 206 file to version 208, call this command
1036explicitly with a bare prefix argument: C-u M-x desktop-save. 1039explicitly with a prefix argument: \\[universal-argument] \\[desktop-save].
1037You are recommended to do this once you have firmly upgraded to 1040If you are upgrading from Emacs 24 or older, we recommed to do
1038Emacs 25.1 (or later). To downgrade a version 208 file to version 1041this once you decide you no longer need compatibility with versions
1039206, use a double command prefix: C-u C-u M-x desktop-save. 1042of Emacs before 25.1.
1040Confirmation will be requested in either case. In a non-interactive 1043
1041call, VERSION can be given as an integer, either 206 or 208, which 1044To downgrade a version 208 file to version 206, use a double prefix
1042will be accepted as the format version in which to save the file 1045argument: \\[universal-argument] \\[universal-argument] \\[desktop-save].
1043without further confirmation." 1046
1047Emacs will ask for confirmation when you upgrade or downgrade your
1048desktop file.
1049
1050In a non-interactive call, VERSION can be given as an integer, either
1051206 or 208, to specify the format version in which to save the file,
1052no questions asked."
1044 (interactive (list 1053 (interactive (list
1045 ;; Or should we just use (car desktop-path)? 1054 ;; Or should we just use (car desktop-path)?
1046 (let ((default (if (member "." desktop-path) 1055 (let ((default (if (member "." desktop-path)
diff --git a/lisp/replace.el b/lisp/replace.el
index 168ccf2f72a..f3a71f87fec 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -340,13 +340,17 @@ that reads FROM-STRING, or invoke replacements from
340incremental search with a key sequence like `C-s C-s M-%' 340incremental search with a key sequence like `C-s C-s M-%'
341to use its current search string as the string to replace. 341to use its current search string as the string to replace.
342 342
343Matching is independent of case if `case-fold-search' is non-nil and 343Matching is independent of case if both `case-fold-search'
344FROM-STRING has no uppercase letters. Replacement transfers the case 344and `search-upper-case' are non-nil and FROM-STRING has no
345pattern of the old text to the new text, if `case-replace' and 345uppercase letters; if `search-upper-case' is nil, then
346`case-fold-search' are non-nil and FROM-STRING has no uppercase 346whether matching ignores case depends on `case-fold-search'
347letters. (Transferring the case pattern means that if the old text 347regardless of whether there are uppercase letters in FROM-STRING.
348matched is all caps, or capitalized, then its replacement is upcased 348Replacement transfers the case pattern of the old text to the
349or capitalized.) 349new text, if both `case-fold-search' and `case-replace' are
350non-nil and FROM-STRING has no uppercase letters.
351\(Transferring the case pattern means that if the old text
352matched is all caps, or capitalized, then its replacement is
353respectively upcased or capitalized.)
350 354
351Ignore read-only matches if `query-replace-skip-read-only' is non-nil, 355Ignore read-only matches if `query-replace-skip-read-only' is non-nil,
352ignore hidden matches if `search-invisible' is nil, and ignore more 356ignore hidden matches if `search-invisible' is nil, and ignore more
@@ -402,13 +406,16 @@ that reads REGEXP, or invoke replacements from
402incremental search with a key sequence like `C-M-s C-M-s C-M-%' 406incremental search with a key sequence like `C-M-s C-M-s C-M-%'
403to use its current search regexp as the regexp to replace. 407to use its current search regexp as the regexp to replace.
404 408
405Matching is independent of case if `case-fold-search' is non-nil and 409Matching is independent of case if both `case-fold-search'
406REGEXP has no uppercase letters. Replacement transfers the case 410and `search-upper-case' are non-nil and REGEXP has no uppercase
407pattern of the old text to the new text, if `case-replace' and 411letters; if `search-upper-case' is nil, then whether matching
408`case-fold-search' are non-nil and REGEXP has no uppercase letters. 412ignores case depends on `case-fold-search' regardless of whether
409\(Transferring the case pattern means that if the old text matched is 413there are uppercase letters in REGEXP.
410all caps, or capitalized, then its replacement is upcased or 414Replacement transfers the case pattern of the old text to the new
411capitalized.) 415text, if both `case-fold-search' and `case-replace' are non-nil
416and REGEXP has no uppercase letters. (Transferring the case pattern
417means that if the old text matched is all caps, or capitalized,
418then its replacement is respectively upcased or capitalized.)
412 419
413Ignore read-only matches if `query-replace-skip-read-only' is non-nil, 420Ignore read-only matches if `query-replace-skip-read-only' is non-nil,
414ignore hidden matches if `search-invisible' is nil, and ignore more 421ignore hidden matches if `search-invisible' is nil, and ignore more