summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2023-08-17 10:07:48 +0300
committerEli Zaretskii <eliz@gnu.org>2023-08-17 10:07:48 +0300
commit636fb267c46f62c89bc34b7de1c78a25c0b20f37 (patch)
treeb3a91d9dc4185530000a22b918afc8f312623656 /src
parent7856d51436b759aa03ac2b32126d177cebbbca8c (diff)
downloademacs-636fb267c46f62c89bc34b7de1c78a25c0b20f37.tar.gz
Improve documentation of case transfer in replacement commands
* doc/emacs/search.texi (Replacement and Lax Matches): * src/search.c (Freplace_match): * lisp/replace.el (query-replace, query-replace-regexp): Clarify in the doc string and the manual how letter-case is transferred from the replaced text to the replacement text. (Bug#65347)
Diffstat (limited to 'src')
-rw-r--r--src/search.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/search.c b/src/search.c
index 0bb52c03eef..25c68f0788c 100644
--- a/src/search.c
+++ b/src/search.c
@@ -2359,7 +2359,9 @@ the replacement text. Otherwise, maybe capitalize the whole text, or
maybe just word initials, based on the replaced text. If the replaced
text has only capital letters and has at least one multiletter word,
convert NEWTEXT to all caps. Otherwise if all words are capitalized
-in the replaced text, capitalize each word in NEWTEXT.
+in the replaced text, capitalize each word in NEWTEXT. Note that
+what exactly is a word is determined by the syntax tables in effect
+in the current buffer.
If optional third arg LITERAL is non-nil, insert NEWTEXT literally.
Otherwise treat `\\' as special: