diff options
| author | Eli Zaretskii | 2016-06-23 18:09:14 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2016-06-23 18:09:14 +0300 |
| commit | 4395aaacd4195d3a5cca9df66cfea13380414a37 (patch) | |
| tree | 16a3f2a305277c4fd05d9c076e4218ed6fada0bc /src | |
| parent | ab0ebb93a9c69f4a0cc475ed899f8cabb64852c0 (diff) | |
| download | emacs-4395aaacd4195d3a5cca9df66cfea13380414a37.tar.gz emacs-4395aaacd4195d3a5cca9df66cfea13380414a37.zip | |
Fix documentation of 'assoc-string' and 'compare-strings'
* src/minibuf.c (Fassoc_string): Clarify how CASE-FOLD affects the
string comparison. (Bug#23833)
* src/fns.c (Fcompare_strings): Fix the description of how
IGNORE-CASE affects the comparison.
* doc/lispref/strings.texi (Text Comparison): Clarify how
CASE-FOLD affects the string comparison in 'assoc-string'. Fix
the description of how IGNORE-CASE affects the comparison in
'compare-strings'.
Diffstat (limited to 'src')
| -rw-r--r-- | src/fns.c | 2 | ||||
| -rw-r--r-- | src/minibuf.c | 4 |
2 files changed, 3 insertions, 3 deletions
| @@ -224,7 +224,7 @@ Like in `substring', negative values are counted from the end. | |||
| 224 | The strings are compared by the numeric values of their characters. | 224 | The strings are compared by the numeric values of their characters. |
| 225 | For instance, STR1 is "less than" STR2 if its first differing | 225 | For instance, STR1 is "less than" STR2 if its first differing |
| 226 | character has a smaller numeric value. If IGNORE-CASE is non-nil, | 226 | character has a smaller numeric value. If IGNORE-CASE is non-nil, |
| 227 | characters are converted to lower-case before comparing them. Unibyte | 227 | characters are converted to upper-case before comparing them. Unibyte |
| 228 | strings are converted to multibyte for comparison. | 228 | strings are converted to multibyte for comparison. |
| 229 | 229 | ||
| 230 | The value is t if the strings (or specified portions) match. | 230 | The value is t if the strings (or specified portions) match. |
diff --git a/src/minibuf.c b/src/minibuf.c index d85a7a9b103..3d34635c6c0 100644 --- a/src/minibuf.c +++ b/src/minibuf.c | |||
| @@ -1817,8 +1817,8 @@ DEFUN ("assoc-string", Fassoc_string, Sassoc_string, 2, 3, 0, | |||
| 1817 | This returns the first element of LIST whose car matches the string or | 1817 | This returns the first element of LIST whose car matches the string or |
| 1818 | symbol KEY, or nil if no match exists. When performing the | 1818 | symbol KEY, or nil if no match exists. When performing the |
| 1819 | comparison, symbols are first converted to strings, and unibyte | 1819 | comparison, symbols are first converted to strings, and unibyte |
| 1820 | strings to multibyte. If the optional arg CASE-FOLD is non-nil, case | 1820 | strings to multibyte. If the optional arg CASE-FOLD is non-nil, both |
| 1821 | is ignored. | 1821 | KEY and the elements of LIST are upcased for comparison. |
| 1822 | 1822 | ||
| 1823 | Unlike `assoc', KEY can also match an entry in LIST consisting of a | 1823 | Unlike `assoc', KEY can also match an entry in LIST consisting of a |
| 1824 | single string, rather than a cons cell whose car is a string. */) | 1824 | single string, rather than a cons cell whose car is a string. */) |