diff options
author | Eli Zaretskii <eliz@gnu.org> | 2020-05-02 10:54:01 +0300 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2020-05-02 10:54:01 +0300 |
commit | ed25282b82732a7370a4a55633c5830fd473a9b7 (patch) | |
tree | ba4f26cb99619f18bac669a81deb0eefb0ef81bf /lisp/replace.el | |
parent | 5a5d8a8ec0610aa4b26011ebae434bcf3e11c993 (diff) | |
download | emacs-ed25282b82732a7370a4a55633c5830fd473a9b7.tar.gz |
Document effect of 'search-upper-case' on replacement commands
* doc/emacs/search.texi (Replacement and Lax Matches): Document
the role of 'search-upper-case' in replacement commands.
(Lax Search): Document the value 'not-yanks' of
'search-upper-case' where the variable itself is documented.
* lisp/replace.el (query-replace-regexp, query-replace): Mention
'search-upper-case' and its effect in doc strings. (Bug#40940)
Diffstat (limited to 'lisp/replace.el')
-rw-r--r-- | lisp/replace.el | 35 |
1 files changed, 21 insertions, 14 deletions
diff --git a/lisp/replace.el b/lisp/replace.el index 491bf33ea4a..0880cbdb1ea 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -340,13 +340,17 @@ that reads FROM-STRING, or invoke replacements from incremental search with a key sequence like `C-s C-s M-%' to use its current search string as the string to replace. -Matching is independent of case if `case-fold-search' is non-nil and -FROM-STRING has no uppercase letters. Replacement transfers the case -pattern of the old text to the new text, if `case-replace' and -`case-fold-search' are non-nil and FROM-STRING has no uppercase -letters. (Transferring the case pattern means that if the old text -matched is all caps, or capitalized, then its replacement is upcased -or capitalized.) +Matching is independent of case if both `case-fold-search' +and `search-upper-case' are non-nil and FROM-STRING has no +uppercase letters; if `search-upper-case' is nil, then +whether matching ignores case depends on `case-fold-search' +regardless of whether there are uppercase letters in FROM-STRING. +Replacement transfers the case pattern of the old text to the +new text, if both `case-fold-search' and `case-replace' are +non-nil and FROM-STRING has no uppercase letters. +\(Transferring the case pattern means that if the old text +matched is all caps, or capitalized, then its replacement is +respectively upcased or capitalized.) Ignore read-only matches if `query-replace-skip-read-only' is non-nil, ignore hidden matches if `search-invisible' is nil, and ignore more @@ -402,13 +406,16 @@ that reads REGEXP, or invoke replacements from incremental search with a key sequence like `C-M-s C-M-s C-M-%' to use its current search regexp as the regexp to replace. -Matching is independent of case if `case-fold-search' is non-nil and -REGEXP has no uppercase letters. Replacement transfers the case -pattern of the old text to the new text, if `case-replace' and -`case-fold-search' are non-nil and REGEXP has no uppercase letters. -\(Transferring the case pattern means that if the old text matched is -all caps, or capitalized, then its replacement is upcased or -capitalized.) +Matching is independent of case if both `case-fold-search' +and `search-upper-case' are non-nil and REGEXP has no uppercase +letters; if `search-upper-case' is nil, then whether matching +ignores case depends on `case-fold-search' regardless of whether +there are uppercase letters in REGEXP. +Replacement transfers the case pattern of the old text to the new +text, if both `case-fold-search' and `case-replace' are non-nil +and REGEXP has no uppercase letters. (Transferring the case pattern +means that if the old text matched is all caps, or capitalized, +then its replacement is respectively upcased or capitalized.) Ignore read-only matches if `query-replace-skip-read-only' is non-nil, ignore hidden matches if `search-invisible' is nil, and ignore more |