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 /lisp | |
| 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 'lisp')
| -rw-r--r-- | lisp/desktop.el | 39 | ||||
| -rw-r--r-- | lisp/replace.el | 35 |
2 files changed, 45 insertions, 29 deletions
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. |
| 1021 | Parameter DIRNAME specifies where to save the desktop file. | 1021 | Optional argument RELEASE non-nil says we're done with this |
| 1022 | Optional parameter RELEASE says whether we're done with this | 1022 | desktop, in which case this function releases the lock of the |
| 1023 | desktop. If ONLY-IF-CHANGED is non-nil, compare the current | 1023 | desktop file in DIRNAME. |
| 1024 | desktop information to that in the desktop file, and if the | 1024 | If ONLY-IF-CHANGED is non-nil, compare the current desktop |
| 1025 | desktop information has not changed since it was last saved then | 1025 | information to that in the desktop file, and if the desktop |
| 1026 | do not rewrite the file. | 1026 | information has not changed since it was last saved, then do |
| 1027 | not rewrite the file. | ||
| 1028 | |||
| 1029 | To restore the desktop, use `desktop-read'. | ||
| 1027 | 1030 | ||
| 1028 | This function can save the desktop in either format version | 1031 | This function can save the desktop in either format version |
| 1029 | 208 (which only Emacs 25.1 and later can read) or version | 1032 | 208 (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 | |||
| 1033 | file. | 1036 | file. |
| 1034 | 1037 | ||
| 1035 | To upgrade a version 206 file to version 208, call this command | 1038 | To upgrade a version 206 file to version 208, call this command |
| 1036 | explicitly with a bare prefix argument: C-u M-x desktop-save. | 1039 | explicitly with a prefix argument: \\[universal-argument] \\[desktop-save]. |
| 1037 | You are recommended to do this once you have firmly upgraded to | 1040 | If you are upgrading from Emacs 24 or older, we recommed to do |
| 1038 | Emacs 25.1 (or later). To downgrade a version 208 file to version | 1041 | this once you decide you no longer need compatibility with versions |
| 1039 | 206, use a double command prefix: C-u C-u M-x desktop-save. | 1042 | of Emacs before 25.1. |
| 1040 | Confirmation will be requested in either case. In a non-interactive | 1043 | |
| 1041 | call, VERSION can be given as an integer, either 206 or 208, which | 1044 | To downgrade a version 208 file to version 206, use a double prefix |
| 1042 | will be accepted as the format version in which to save the file | 1045 | argument: \\[universal-argument] \\[universal-argument] \\[desktop-save]. |
| 1043 | without further confirmation." | 1046 | |
| 1047 | Emacs will ask for confirmation when you upgrade or downgrade your | ||
| 1048 | desktop file. | ||
| 1049 | |||
| 1050 | In a non-interactive call, VERSION can be given as an integer, either | ||
| 1051 | 206 or 208, to specify the format version in which to save the file, | ||
| 1052 | no 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 | |||
| 340 | incremental search with a key sequence like `C-s C-s M-%' | 340 | incremental search with a key sequence like `C-s C-s M-%' |
| 341 | to use its current search string as the string to replace. | 341 | to use its current search string as the string to replace. |
| 342 | 342 | ||
| 343 | Matching is independent of case if `case-fold-search' is non-nil and | 343 | Matching is independent of case if both `case-fold-search' |
| 344 | FROM-STRING has no uppercase letters. Replacement transfers the case | 344 | and `search-upper-case' are non-nil and FROM-STRING has no |
| 345 | pattern of the old text to the new text, if `case-replace' and | 345 | uppercase letters; if `search-upper-case' is nil, then |
| 346 | `case-fold-search' are non-nil and FROM-STRING has no uppercase | 346 | whether matching ignores case depends on `case-fold-search' |
| 347 | letters. (Transferring the case pattern means that if the old text | 347 | regardless of whether there are uppercase letters in FROM-STRING. |
| 348 | matched is all caps, or capitalized, then its replacement is upcased | 348 | Replacement transfers the case pattern of the old text to the |
| 349 | or capitalized.) | 349 | new text, if both `case-fold-search' and `case-replace' are |
| 350 | non-nil and FROM-STRING has no uppercase letters. | ||
| 351 | \(Transferring the case pattern means that if the old text | ||
| 352 | matched is all caps, or capitalized, then its replacement is | ||
| 353 | respectively upcased or capitalized.) | ||
| 350 | 354 | ||
| 351 | Ignore read-only matches if `query-replace-skip-read-only' is non-nil, | 355 | Ignore read-only matches if `query-replace-skip-read-only' is non-nil, |
| 352 | ignore hidden matches if `search-invisible' is nil, and ignore more | 356 | ignore hidden matches if `search-invisible' is nil, and ignore more |
| @@ -402,13 +406,16 @@ that reads REGEXP, or invoke replacements from | |||
| 402 | incremental search with a key sequence like `C-M-s C-M-s C-M-%' | 406 | incremental search with a key sequence like `C-M-s C-M-s C-M-%' |
| 403 | to use its current search regexp as the regexp to replace. | 407 | to use its current search regexp as the regexp to replace. |
| 404 | 408 | ||
| 405 | Matching is independent of case if `case-fold-search' is non-nil and | 409 | Matching is independent of case if both `case-fold-search' |
| 406 | REGEXP has no uppercase letters. Replacement transfers the case | 410 | and `search-upper-case' are non-nil and REGEXP has no uppercase |
| 407 | pattern of the old text to the new text, if `case-replace' and | 411 | letters; if `search-upper-case' is nil, then whether matching |
| 408 | `case-fold-search' are non-nil and REGEXP has no uppercase letters. | 412 | ignores case depends on `case-fold-search' regardless of whether |
| 409 | \(Transferring the case pattern means that if the old text matched is | 413 | there are uppercase letters in REGEXP. |
| 410 | all caps, or capitalized, then its replacement is upcased or | 414 | Replacement transfers the case pattern of the old text to the new |
| 411 | capitalized.) | 415 | text, if both `case-fold-search' and `case-replace' are non-nil |
| 416 | and REGEXP has no uppercase letters. (Transferring the case pattern | ||
| 417 | means that if the old text matched is all caps, or capitalized, | ||
| 418 | then its replacement is respectively upcased or capitalized.) | ||
| 412 | 419 | ||
| 413 | Ignore read-only matches if `query-replace-skip-read-only' is non-nil, | 420 | Ignore read-only matches if `query-replace-skip-read-only' is non-nil, |
| 414 | ignore hidden matches if `search-invisible' is nil, and ignore more | 421 | ignore hidden matches if `search-invisible' is nil, and ignore more |