diff options
author | Chong Yidong <cyd@gnu.org> | 2012-09-22 23:24:26 +0800 |
---|---|---|
committer | Chong Yidong <cyd@gnu.org> | 2012-09-22 23:24:26 +0800 |
commit | c88b867fecbd50140b0b41f05599811a8f0e3dfe (patch) | |
tree | 945c6c88a7ce2029d13af7007239e8253e1e6a44 /src/search.c | |
parent | bb4d86b40c61443608280df3d0668d44845177a5 (diff) | |
download | emacs-c88b867fecbd50140b0b41f05599811a8f0e3dfe.tar.gz |
Misc doc fixes.
* searching.texi (Replacing Match): Minor clarification.
* lisp/repeat.el (repeat): Doc fix.
* lisp/simple.el (shell-command-on-region): Doc fix.
* lisp/emacs-lisp/easy-mmode.el (define-minor-mode): Doc fix.
* cmds.c (Fforward_char, Fbackward_char): Doc fix.
* editfns.c (Fline_beginning_position): Doc fix.
(Fline_end_position): Doc fix.
* minibuf.c (Finternal_complete_buffer): Doc fix.
* search.c (Freplace_match): Doc fix.
Fixes: debbugs:12325 debbugs:12391 debbugs:12416 debbugs:12414 debbugs:10909 debbugs:12348
Diffstat (limited to 'src/search.c')
-rw-r--r-- | src/search.c | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/src/search.c b/src/search.c index 1735ade5d8a..5224556fa17 100644 --- a/src/search.c +++ b/src/search.c @@ -2220,15 +2220,14 @@ DEFUN ("replace-match", Freplace_match, Sreplace_match, 1, 5, 0, doc: /* Replace text matched by last search with NEWTEXT. Leave point at the end of the replacement text. -If second arg FIXEDCASE is non-nil, do not alter case of 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. - -If third arg LITERAL is non-nil, insert NEWTEXT literally. +If optional second arg FIXEDCASE is non-nil, do not alter the case of +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. + +If optional third arg LITERAL is non-nil, insert NEWTEXT literally. Otherwise treat `\\' as special: `\\&' in NEWTEXT means substitute original matched text. `\\N' means substitute what matched the Nth `\\(...\\)'. @@ -2239,13 +2238,11 @@ Otherwise treat `\\' as special: Any other character following `\\' signals an error. Case conversion does not apply to these substitutions. -FIXEDCASE and LITERAL are optional arguments. - -The optional fourth argument STRING can be a string to modify. -This is meaningful when the previous match was done against STRING, -using `string-match'. When used this way, `replace-match' -creates and returns a new string made by copying STRING and replacing -the part of STRING that was matched. +If optional fourth argument STRING is non-nil, it should be a string +to act on; this should be the string on which the previous match was +done via `string-match'. In this case, `replace-match' creates and +returns a new string, made by copying STRING and replacing the part of +STRING that was matched (the original STRING itself is not altered). The optional fifth argument SUBEXP specifies a subexpression; it says to replace just that subexpression with NEWTEXT, |