diff options
| author | Chong Yidong | 2012-12-15 21:44:41 +0800 |
|---|---|---|
| committer | Chong Yidong | 2012-12-15 21:44:41 +0800 |
| commit | 5bec25eb1e1c91a2fe0aee9c332ff1506b021aa9 (patch) | |
| tree | 245a212c400b5c0d37448f462f09eed8980471b4 /src | |
| parent | 68abf86780a1b263640e287754dc43526d276aa3 (diff) | |
| download | emacs-5bec25eb1e1c91a2fe0aee9c332ff1506b021aa9.tar.gz emacs-5bec25eb1e1c91a2fe0aee9c332ff1506b021aa9.zip | |
* fns.c (Fcompare_strings): Doc fix.
* strings.texi (Text Comparison): Doc fix for compare-strings.
Fixes: debbugs:13081
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 4 | ||||
| -rw-r--r-- | src/fns.c | 18 |
2 files changed, 16 insertions, 6 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index fe30528da91..c123606efda 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2012-12-15 Chong Yidong <cyd@gnu.org> | ||
| 2 | |||
| 3 | * fns.c (Fcompare_strings): Doc fix (Bug#13081). | ||
| 4 | |||
| 1 | 2012-12-14 Eli Zaretskii <eliz@gnu.org> | 5 | 2012-12-14 Eli Zaretskii <eliz@gnu.org> |
| 2 | 6 | ||
| 3 | * w32.c (get_name_and_id): Always pass NULL as the first argument | 7 | * w32.c (get_name_and_id): Always pass NULL as the first argument |
| @@ -211,12 +211,18 @@ Symbols are also allowed; their print names are used instead. */) | |||
| 211 | 211 | ||
| 212 | DEFUN ("compare-strings", Fcompare_strings, Scompare_strings, 6, 7, 0, | 212 | DEFUN ("compare-strings", Fcompare_strings, Scompare_strings, 6, 7, 0, |
| 213 | doc: /* Compare the contents of two strings, converting to multibyte if needed. | 213 | doc: /* Compare the contents of two strings, converting to multibyte if needed. |
| 214 | In string STR1, skip the first START1 characters and stop at END1. | 214 | The arguments START1, END1, START2, and END2, if non-nil, are |
| 215 | In string STR2, skip the first START2 characters and stop at END2. | 215 | positions specifying which parts of STR1 or STR2 to compare. In |
| 216 | END1 and END2 default to the full lengths of the respective strings. | 216 | string STR1, compare the part between START1 (inclusive) and END1 |
| 217 | 217 | \(exclusive). If START1 is nil, it defaults to 0, the beginning of | |
| 218 | Case is significant in this comparison if IGNORE-CASE is nil. | 218 | the string; if END1 is nil, it defaults to the length of the string. |
| 219 | Unibyte strings are converted to multibyte for comparison. | 219 | Likewise, in string STR2, compare the part between START2 and END2. |
| 220 | |||
| 221 | The strings are compared by the numeric values of their characters. | ||
| 222 | For instance, STR1 is "less than" STR2 if its first differing | ||
| 223 | character has a smaller numeric value. If IGNORE-CASE is non-nil, | ||
| 224 | characters are converted to lower-case before comparing them. Unibyte | ||
| 225 | strings are converted to multibyte for comparison. | ||
| 220 | 226 | ||
| 221 | The value is t if the strings (or specified portions) match. | 227 | The value is t if the strings (or specified portions) match. |
| 222 | If string STR1 is less, the value is a negative number N; | 228 | If string STR1 is less, the value is a negative number N; |