aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2012-09-22 23:24:26 +0800
committerChong Yidong2012-09-22 23:24:26 +0800
commitc88b867fecbd50140b0b41f05599811a8f0e3dfe (patch)
tree945c6c88a7ce2029d13af7007239e8253e1e6a44
parentbb4d86b40c61443608280df3d0668d44845177a5 (diff)
downloademacs-c88b867fecbd50140b0b41f05599811a8f0e3dfe.tar.gz
emacs-c88b867fecbd50140b0b41f05599811a8f0e3dfe.zip
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
-rw-r--r--doc/lispref/ChangeLog4
-rw-r--r--doc/lispref/searching.texi26
-rw-r--r--lisp/ChangeLog9
-rw-r--r--lisp/emacs-lisp/easy-mmode.el17
-rw-r--r--lisp/repeat.el6
-rw-r--r--lisp/simple.el50
-rw-r--r--src/ChangeLog11
-rw-r--r--src/cmds.c2
-rw-r--r--src/editfns.c18
-rw-r--r--src/minibuf.c8
-rw-r--r--src/search.c29
11 files changed, 103 insertions, 77 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index db545f8ec91..b813ac6bb1c 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,7 @@
12012-09-22 Chong Yidong <cyd@gnu.org>
2
3 * searching.texi (Replacing Match): Minor clarification.
4
12012-09-22 Eli Zaretskii <eliz@gnu.org> 52012-09-22 Eli Zaretskii <eliz@gnu.org>
2 6
3 * edebug.texi (Instrumenting): Improve indexing. 7 * edebug.texi (Instrumenting): Improve indexing.
diff --git a/doc/lispref/searching.texi b/doc/lispref/searching.texi
index edd1d30e28d..56c96363e81 100644
--- a/doc/lispref/searching.texi
+++ b/doc/lispref/searching.texi
@@ -1278,20 +1278,18 @@ search. It works by means of the match data.
1278 1278
1279@cindex case in replacements 1279@cindex case in replacements
1280@defun replace-match replacement &optional fixedcase literal string subexp 1280@defun replace-match replacement &optional fixedcase literal string subexp
1281This function replaces the text in the buffer (or in @var{string}) that 1281This function performs a replacement operation on a buffer or string.
1282was matched by the last search. It replaces that text with 1282
1283@var{replacement}. 1283If you did the last search in a buffer, you should omit the
1284 1284@var{string} argument or specify @code{nil} for it, and make sure that
1285If you did the last search in a buffer, you should specify @code{nil} 1285the current buffer is the one in which you performed the last search.
1286for @var{string} and make sure that the current buffer when you call 1286Then this function edits the buffer, replacing the matched text with
1287@code{replace-match} is the one in which you did the searching or 1287@var{replacement}. It leaves point at the end of the replacement
1288matching. Then @code{replace-match} does the replacement by editing 1288text, and returns @code{t}.
1289the buffer; it leaves point at the end of the replacement text, and 1289
1290returns @code{t}. 1290If you performed the last search on a string, pass the same string as
1291 1291@var{string}. Then this function returns a new string, in which the
1292If you did the search in a string, pass the same string as @var{string}. 1292matched text is replaced by @var{replacement}.
1293Then @code{replace-match} does the replacement by constructing and
1294returning a new string.
1295 1293
1296If @var{fixedcase} is non-@code{nil}, then @code{replace-match} uses 1294If @var{fixedcase} is non-@code{nil}, then @code{replace-match} uses
1297the replacement text without case conversion; otherwise, it converts 1295the replacement text without case conversion; otherwise, it converts
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index b0e91b675a3..813abd506d4 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,12 @@
12012-09-22 Chong Yidong <cyd@gnu.org>
2
3 * repeat.el (repeat): Doc fix (Bug#12348).
4
5 * emacs-lisp/easy-mmode.el (define-minor-mode): Doc fix
6 (Bug#10909).
7
8 * simple.el (shell-command-on-region): Doc fix.
9
12012-09-22 Eli Zaretskii <eliz@gnu.org> 102012-09-22 Eli Zaretskii <eliz@gnu.org>
2 11
3 * emacs-lisp/timer.el (run-with-idle-timer) 12 * emacs-lisp/timer.el (run-with-idle-timer)
diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el
index ee4e36a9eba..4951368aebe 100644
--- a/lisp/emacs-lisp/easy-mmode.el
+++ b/lisp/emacs-lisp/easy-mmode.el
@@ -90,12 +90,17 @@ MODE (you can override this with the :variable keyword, see below).
90DOC is the documentation for the mode toggle command. 90DOC is the documentation for the mode toggle command.
91 91
92The defined mode command takes one optional (prefix) argument. 92The defined mode command takes one optional (prefix) argument.
93Interactively with no prefix argument it toggles the mode. 93Interactively with no prefix argument, it toggles the mode.
94With a prefix argument, it enables the mode if the argument is 94A prefix argument enables the mode if the argument is positive,
95positive and otherwise disables it. When called from Lisp, it 95and disables it otherwise.
96enables the mode if the argument is omitted or nil, and toggles 96
97the mode if the argument is `toggle'. If DOC is nil this 97When called from Lisp, the mode command toggles the mode if the
98function adds a basic doc-string stating these facts. 98argument is `toggle', disables the mode if the argument is a
99non-positive integer, and enables the mode otherwise (including
100if the argument is omitted or nil or a positive integer).
101
102If DOC is nil, give the mode command a basic doc-string
103documenting what its argument does.
99 104
100Optional INIT-VALUE is the initial value of the mode's variable. 105Optional INIT-VALUE is the initial value of the mode's variable.
101Optional LIGHTER is displayed in the mode line when the mode is on. 106Optional LIGHTER is displayed in the mode line when the mode is on.
diff --git a/lisp/repeat.el b/lisp/repeat.el
index e577c461bc5..e38442a434b 100644
--- a/lisp/repeat.el
+++ b/lisp/repeat.el
@@ -193,9 +193,9 @@ this function is always whether the value of `this-command' would've been
193;;;###autoload 193;;;###autoload
194(defun repeat (repeat-arg) 194(defun repeat (repeat-arg)
195 "Repeat most recently executed command. 195 "Repeat most recently executed command.
196With prefix arg, apply new prefix arg to that command; otherwise, 196If REPEAT-ARG is non-nil (interactively, with a prefix argument),
197use the prefix arg that was used before (if any). 197supply a prefix argument to that command. Otherwise, give the
198This command is like the `.' command in the vi editor. 198command the same prefix argument it was given before, if any.
199 199
200If this command is invoked by a multi-character key sequence, it 200If this command is invoked by a multi-character key sequence, it
201can then be repeated by repeating the final character of that 201can then be repeated by repeating the final character of that
diff --git a/lisp/simple.el b/lisp/simple.el
index 3e11e6838c7..8ddbac33d00 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -2604,8 +2604,6 @@ is encoded using coding-system specified by `process-coding-system-alist',
2604falling back to `default-process-coding-system' if no match for COMMAND 2604falling back to `default-process-coding-system' if no match for COMMAND
2605is found in `process-coding-system-alist'. 2605is found in `process-coding-system-alist'.
2606 2606
2607The noninteractive arguments are START, END, COMMAND,
2608OUTPUT-BUFFER, REPLACE, ERROR-BUFFER, and DISPLAY-ERROR-BUFFER.
2609Noninteractive callers can specify coding systems by binding 2607Noninteractive callers can specify coding systems by binding
2610`coding-system-for-read' and `coding-system-for-write'. 2608`coding-system-for-read' and `coding-system-for-write'.
2611 2609
@@ -2613,34 +2611,34 @@ If the command generates output, the output may be displayed
2613in the echo area or in a buffer. 2611in the echo area or in a buffer.
2614If the output is short enough to display in the echo area 2612If the output is short enough to display in the echo area
2615\(determined by the variable `max-mini-window-height' if 2613\(determined by the variable `max-mini-window-height' if
2616`resize-mini-windows' is non-nil), it is shown there. Otherwise 2614`resize-mini-windows' is non-nil), it is shown there.
2617it is displayed in the buffer `*Shell Command Output*'. The output 2615Otherwise it is displayed in the buffer `*Shell Command Output*'.
2618is available in that buffer in both cases. 2616The output is available in that buffer in both cases.
2619 2617
2620If there is output and an error, a message about the error 2618If there is output and an error, a message about the error
2621appears at the end of the output. 2619appears at the end of the output. If there is no output, or if
2622 2620output is inserted in the current buffer, the buffer `*Shell
2623If there is no output, or if output is inserted in the current buffer, 2621Command Output*' is deleted.
2624then `*Shell Command Output*' is deleted. 2622
2625 2623Optional fourth arg OUTPUT-BUFFER specifies where to put the
2626If the optional fourth argument OUTPUT-BUFFER is non-nil, 2624command's output. If the value is a buffer or buffer name, put
2627that says to put the output in some other buffer. 2625the output there. Any other value, including nil, means to
2628If OUTPUT-BUFFER is a buffer or buffer name, put the output there. 2626insert the output in the current buffer. In either case, the
2629If OUTPUT-BUFFER is not a buffer and not nil, 2627output is inserted after point (leaving mark after it).
2630insert output in the current buffer. 2628
2631In either case, the output is inserted after point (leaving mark after it). 2629Optional fifth arg REPLACE, if non-nil, means to insert the
2632 2630output in place of text from START to END, putting point and mark
2633If REPLACE, the optional fifth argument, is non-nil, that means insert
2634the output in place of text from START to END, putting point and mark
2635around it. 2631around it.
2636 2632
2637If optional sixth argument ERROR-BUFFER is non-nil, it is a buffer 2633Optional sixth arg ERROR-BUFFER, if non-nil, specifies a buffer
2638or buffer name to which to direct the command's standard error output. 2634or buffer name to which to direct the command's standard error
2639If it is nil, error output is mingled with regular output. 2635output. If nil, error output is mingled with regular output.
2640If DISPLAY-ERROR-BUFFER is non-nil, display the error buffer if there 2636When called interactively, `shell-command-default-error-buffer'
2641were any errors. (This is always t, interactively.) 2637is used for ERROR-BUFFER.
2642In an interactive call, the variable `shell-command-default-error-buffer' 2638
2643specifies the value of ERROR-BUFFER." 2639Optional seventh arg DISPLAY-ERROR-BUFFER, if non-nil, means to
2640display the error buffer if there were any errors. When called
2641interactively, this is t."
2644 (interactive (let (string) 2642 (interactive (let (string)
2645 (unless (mark) 2643 (unless (mark)
2646 (error "The mark is not set now, so there is no region")) 2644 (error "The mark is not set now, so there is no region"))
diff --git a/src/ChangeLog b/src/ChangeLog
index b2f33494b7c..9d8bc3a7c00 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,16 @@
12012-09-22 Chong Yidong <cyd@gnu.org> 12012-09-22 Chong Yidong <cyd@gnu.org>
2 2
3 * search.c (Freplace_match): Doc fix (Bug#12325).
4
5 * minibuf.c (Finternal_complete_buffer): Doc fix (Bug#12391).
6
7 * editfns.c (Fline_beginning_position): Doc fix (Bug#12416).
8 (Fline_end_position): Doc fix.
9
10 * cmds.c (Fforward_char, Fbackward_char): Doc fix (Bug#12414).
11
122012-09-22 Chong Yidong <cyd@gnu.org>
13
3 * dispextern.h (struct image_type): Add new slot, storing a type 14 * dispextern.h (struct image_type): Add new slot, storing a type
4 initialization function. 15 initialization function.
5 16
diff --git a/src/cmds.c b/src/cmds.c
index 45f7df948ae..453a4b67e57 100644
--- a/src/cmds.c
+++ b/src/cmds.c
@@ -85,6 +85,7 @@ move_point (Lisp_Object n, bool forward)
85DEFUN ("forward-char", Fforward_char, Sforward_char, 0, 1, "^p", 85DEFUN ("forward-char", Fforward_char, Sforward_char, 0, 1, "^p",
86 doc: /* Move point N characters forward (backward if N is negative). 86 doc: /* Move point N characters forward (backward if N is negative).
87On reaching end or beginning of buffer, stop and signal error. 87On reaching end or beginning of buffer, stop and signal error.
88Interactively, N is the numeric prefix argument.
88 89
89Depending on the bidirectional context, the movement may be to the 90Depending on the bidirectional context, the movement may be to the
90right or to the left on the screen. This is in contrast with 91right or to the left on the screen. This is in contrast with
@@ -97,6 +98,7 @@ right or to the left on the screen. This is in contrast with
97DEFUN ("backward-char", Fbackward_char, Sbackward_char, 0, 1, "^p", 98DEFUN ("backward-char", Fbackward_char, Sbackward_char, 0, 1, "^p",
98 doc: /* Move point N characters backward (forward if N is negative). 99 doc: /* Move point N characters backward (forward if N is negative).
99On attempt to pass beginning or end of buffer, stop and signal error. 100On attempt to pass beginning or end of buffer, stop and signal error.
101Interactively, N is the numeric prefix argument.
100 102
101Depending on the bidirectional context, the movement may be to the 103Depending on the bidirectional context, the movement may be to the
102right or to the left on the screen. This is in contrast with 104right or to the left on the screen. This is in contrast with
diff --git a/src/editfns.c b/src/editfns.c
index c6744648bc5..acf9c48e7a0 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -738,17 +738,18 @@ Field boundaries are not noticed if `inhibit-field-text-motion' is non-nil. */)
738DEFUN ("line-beginning-position", 738DEFUN ("line-beginning-position",
739 Fline_beginning_position, Sline_beginning_position, 0, 1, 0, 739 Fline_beginning_position, Sline_beginning_position, 0, 1, 0,
740 doc: /* Return the character position of the first character on the current line. 740 doc: /* Return the character position of the first character on the current line.
741With argument N not nil or 1, move forward N - 1 lines first. 741With optional argument N, scan forward N - 1 lines first.
742If scan reaches end of buffer, return that position. 742If the scan reaches the end of the buffer, return that position.
743 743
744The returned position is of the first character in the logical order, 744This function ignores text display directionality; it returns the
745i.e. the one that has the smallest character position. 745position of the first character in logical order, i.e. the smallest
746character position on the line.
746 747
747This function constrains the returned position to the current field 748This function constrains the returned position to the current field
748unless that would be on a different line than the original, 749unless that position would be on a different line than the original,
749unconstrained result. If N is nil or 1, and a front-sticky field 750unconstrained result. If N is nil or 1, and a front-sticky field
750starts at point, the scan stops as soon as it starts. To ignore field 751starts at point, the scan stops as soon as it starts. To ignore field
751boundaries bind `inhibit-field-text-motion' to t. 752boundaries, bind `inhibit-field-text-motion' to t.
752 753
753This function does not move point. */) 754This function does not move point. */)
754 (Lisp_Object n) 755 (Lisp_Object n)
@@ -782,8 +783,9 @@ DEFUN ("line-end-position", Fline_end_position, Sline_end_position, 0, 1, 0,
782With argument N not nil or 1, move forward N - 1 lines first. 783With argument N not nil or 1, move forward N - 1 lines first.
783If scan reaches end of buffer, return that position. 784If scan reaches end of buffer, return that position.
784 785
785The returned position is of the last character in the logical order, 786This function ignores text display directionality; it returns the
786i.e. the character whose buffer position is the largest one. 787position of the last character in logical order, i.e. the largest
788character position on the line.
787 789
788This function constrains the returned position to the current field 790This function constrains the returned position to the current field
789unless that would be on a different line than the original, 791unless that would be on a different line than the original,
diff --git a/src/minibuf.c b/src/minibuf.c
index 8a1e0ddde86..6f9c61dcfb1 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -1862,11 +1862,11 @@ static Lisp_Object Qmetadata;
1862 1862
1863DEFUN ("internal-complete-buffer", Finternal_complete_buffer, Sinternal_complete_buffer, 3, 3, 0, 1863DEFUN ("internal-complete-buffer", Finternal_complete_buffer, Sinternal_complete_buffer, 3, 3, 0,
1864 doc: /* Perform completion on buffer names. 1864 doc: /* Perform completion on buffer names.
1865If the argument FLAG is nil, invoke `try-completion', if it's t, invoke 1865STRING and PREDICATE have the same meanings as in `try-completion',
1866`all-completions', otherwise invoke `test-completion'. 1866`all-completions', and `test-completion'.
1867 1867
1868The arguments STRING and PREDICATE are as in `try-completion', 1868If FLAG is nil, invoke `try-completion'; if it is t, invoke
1869`all-completions', and `test-completion'. */) 1869`all-completions'; otherwise invoke `test-completion'. */)
1870 (Lisp_Object string, Lisp_Object predicate, Lisp_Object flag) 1870 (Lisp_Object string, Lisp_Object predicate, Lisp_Object flag)
1871{ 1871{
1872 if (NILP (flag)) 1872 if (NILP (flag))
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,
2220 doc: /* Replace text matched by last search with NEWTEXT. 2220 doc: /* Replace text matched by last search with NEWTEXT.
2221Leave point at the end of the replacement text. 2221Leave point at the end of the replacement text.
2222 2222
2223If second arg FIXEDCASE is non-nil, do not alter case of replacement text. 2223If optional second arg FIXEDCASE is non-nil, do not alter the case of
2224Otherwise maybe capitalize the whole text, or maybe just word initials, 2224the replacement text. Otherwise, maybe capitalize the whole text, or
2225based on the replaced text. 2225maybe just word initials, based on the replaced text. If the replaced
2226If the replaced text has only capital letters 2226text has only capital letters and has at least one multiletter word,
2227and has at least one multiletter word, convert NEWTEXT to all caps. 2227convert NEWTEXT to all caps. Otherwise if all words are capitalized
2228Otherwise if all words are capitalized in the replaced text, 2228in the replaced text, capitalize each word in NEWTEXT.
2229capitalize each word in NEWTEXT. 2229
2230 2230If optional third arg LITERAL is non-nil, insert NEWTEXT literally.
2231If third arg LITERAL is non-nil, insert NEWTEXT literally.
2232Otherwise treat `\\' as special: 2231Otherwise treat `\\' as special:
2233 `\\&' in NEWTEXT means substitute original matched text. 2232 `\\&' in NEWTEXT means substitute original matched text.
2234 `\\N' means substitute what matched the Nth `\\(...\\)'. 2233 `\\N' means substitute what matched the Nth `\\(...\\)'.
@@ -2239,13 +2238,11 @@ Otherwise treat `\\' as special:
2239 Any other character following `\\' signals an error. 2238 Any other character following `\\' signals an error.
2240Case conversion does not apply to these substitutions. 2239Case conversion does not apply to these substitutions.
2241 2240
2242FIXEDCASE and LITERAL are optional arguments. 2241If optional fourth argument STRING is non-nil, it should be a string
2243 2242to act on; this should be the string on which the previous match was
2244The optional fourth argument STRING can be a string to modify. 2243done via `string-match'. In this case, `replace-match' creates and
2245This is meaningful when the previous match was done against STRING, 2244returns a new string, made by copying STRING and replacing the part of
2246using `string-match'. When used this way, `replace-match' 2245STRING that was matched (the original STRING itself is not altered).
2247creates and returns a new string made by copying STRING and replacing
2248the part of STRING that was matched.
2249 2246
2250The optional fifth argument SUBEXP specifies a subexpression; 2247The optional fifth argument SUBEXP specifies a subexpression;
2251it says to replace just that subexpression with NEWTEXT, 2248it says to replace just that subexpression with NEWTEXT,