emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-25 4395aaa: Fix documentation of 'assoc-string' and


From: Eli Zaretskii
Subject: [Emacs-diffs] emacs-25 4395aaa: Fix documentation of 'assoc-string' and 'compare-strings'
Date: Thu, 23 Jun 2016 15:10:47 +0000 (UTC)

branch: emacs-25
commit 4395aaacd4195d3a5cca9df66cfea13380414a37
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>

    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'.
---
 doc/lispref/strings.texi |    5 +++--
 src/fns.c                |    2 +-
 src/minibuf.c            |    4 ++--
 3 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/doc/lispref/strings.texi b/doc/lispref/strings.texi
index c6563f7..ca700a2 100644
--- a/doc/lispref/strings.texi
+++ b/doc/lispref/strings.texi
@@ -660,7 +660,7 @@ The strings are compared by the numeric values of their 
characters.
 For instance, @var{str1} is considered less than @var{str2} if
 its first differing character has a smaller numeric value.  If
 @var{ignore-case} is address@hidden, characters are converted to
-lower-case before comparing them.  Unibyte strings are converted to
+upper-case before comparing them.  Unibyte strings are converted to
 multibyte for comparison (@pxref{Text Representations}), so that a
 unibyte string and its conversion to multibyte are always regarded as
 equal.
@@ -677,7 +677,8 @@ specified portion) is less.
 This function works like @code{assoc}, except that @var{key} must be a
 string or symbol, and comparison is done using @code{compare-strings}.
 Symbols are converted to strings before testing.
-If @var{case-fold} is address@hidden, it ignores case differences.
+If @var{case-fold} is address@hidden, @var{key} and the elements of
address@hidden are converted to upper-case before comparison.
 Unlike @code{assoc}, this function can also match elements of the alist
 that are strings or symbols rather than conses.  In particular, @var{alist} can
 be a list of strings or symbols rather than an actual alist.
diff --git a/src/fns.c b/src/fns.c
index ef6055c..1f16193 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -224,7 +224,7 @@ Like in `substring', negative values are counted from the 
end.
 The strings are compared by the numeric values of their characters.
 For instance, STR1 is "less than" STR2 if its first differing
 character has a smaller numeric value.  If IGNORE-CASE is non-nil,
-characters are converted to lower-case before comparing them.  Unibyte
+characters are converted to upper-case before comparing them.  Unibyte
 strings are converted to multibyte for comparison.
 
 The value is t if the strings (or specified portions) match.
diff --git a/src/minibuf.c b/src/minibuf.c
index d85a7a9..3d34635 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -1817,8 +1817,8 @@ DEFUN ("assoc-string", Fassoc_string, Sassoc_string, 2, 
3, 0,
 This returns the first element of LIST whose car matches the string or
 symbol KEY, or nil if no match exists.  When performing the
 comparison, symbols are first converted to strings, and unibyte
-strings to multibyte.  If the optional arg CASE-FOLD is non-nil, case
-is ignored.
+strings to multibyte.  If the optional arg CASE-FOLD is non-nil, both
+KEY and the elements of LIST are upcased for comparison.
 
 Unlike `assoc', KEY can also match an entry in LIST consisting of a
 single string, rather than a cons cell whose car is a string.  */)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]