Merge branch 'emacs-30' of git.savannah.gnu.org:/srv/git/emacs into emacs-30

This commit is contained in:
Eli Zaretskii 2024-08-06 21:20:52 +03:00
commit fb642d9cf5
2 changed files with 27 additions and 23 deletions

View file

@ -468,8 +468,9 @@ Specifically:
@item @item
Numbers are compared using @code{<} (@pxref{definition of <}). Numbers are compared using @code{<} (@pxref{definition of <}).
@item @item
Strings are compared using @code{string<} (@pxref{definition of Strings are compared using @code{string-lessp} (@pxref{definition of
string<}) and symbols are compared by comparing their names as strings. string-lessp}) and symbols are compared by comparing their names as
strings.
@item @item
Conses, lists, vectors and records are compared lexicographically. This Conses, lists, vectors and records are compared lexicographically. This
means that the two sequences are compared element-wise from left to means that the two sequences are compared element-wise from left to

View file

@ -502,7 +502,7 @@ in case if @code{case-fold-search} is non-@code{nil}.
@end example @end example
@end defun @end defun
@defun string= string1 string2 @defun string-equal string1 string2
This function returns @code{t} if the characters of the two strings This function returns @code{t} if the characters of the two strings
match exactly. Symbols are also allowed as arguments, in which case match exactly. Symbols are also allowed as arguments, in which case
the symbol names are used. Case is always significant, regardless of the symbol names are used. Case is always significant, regardless of
@ -513,25 +513,25 @@ This function is equivalent to @code{equal} for comparing two strings
the two strings are ignored; use @code{equal-including-properties} if the two strings are ignored; use @code{equal-including-properties} if
you need to distinguish between strings that differ only in their text you need to distinguish between strings that differ only in their text
properties. However, unlike @code{equal}, if either argument is not a properties. However, unlike @code{equal}, if either argument is not a
string or symbol, @code{string=} signals an error. string or symbol, @code{string-equal} signals an error.
@example @example
(string= "abc" "abc") (string-equal "abc" "abc")
@result{} t @result{} t
(string= "abc" "ABC") (string-equal "abc" "ABC")
@result{} nil @result{} nil
(string= "ab" "ABC") (string-equal "ab" "ABC")
@result{} nil @result{} nil
@end example @end example
A unibyte and a multibyte string are equal in the sense of A unibyte and a multibyte string are equal in the sense of
@code{string=} if and only if they contain the same sequence of @code{string-equal} if and only if they contain the same sequence of
character codes all being in the range 0--127 (@acronym{ASCII}). character codes all being in the range 0--127 (@acronym{ASCII}).
@xref{Text Representations}. @xref{Text Representations}.
@end defun @end defun
@defun string-equal string1 string2 @defun string= string1 string2
@code{string-equal} is another name for @code{string=}. @code{string=} is another name for @code{string-equal}.
@end defun @end defun
@defun string-equal-ignore-case string1 string2 @defun string-equal-ignore-case string1 string2
@ -597,9 +597,8 @@ that collation implements.
@end defun @end defun
@cindex lexical comparison of strings @cindex lexical comparison of strings
@anchor{definition of string<} @anchor{definition of string-lessp}
@defun string< string1 string2 @defun string-lessp string1 string2
@c (findex string< causes problems for permuted index!!)
This function compares two strings a character at a time. It This function compares two strings a character at a time. It
scans both the strings at the same time to find the first pair of corresponding scans both the strings at the same time to find the first pair of corresponding
characters that do not match. If the lesser character of these two is characters that do not match. If the lesser character of these two is
@ -618,11 +617,11 @@ multibyte non-@acronym{ASCII} character (@pxref{Text Representations}).
@example @example
@group @group
(string< "abc" "abd") (string-lessp "abc" "abd")
@result{} t @result{} t
(string< "abd" "abc") (string-lessp "abd" "abc")
@result{} nil @result{} nil
(string< "123" "abc") (string-lessp "123" "abc")
@result{} t @result{} t
@end group @end group
@end example @end example
@ -634,15 +633,15 @@ no characters is less than any other string.
@example @example
@group @group
(string< "" "abc") (string-lessp "" "abc")
@result{} t @result{} t
(string< "ab" "abc") (string-lessp "ab" "abc")
@result{} t @result{} t
(string< "abc" "") (string-lessp "abc" "")
@result{} nil @result{} nil
(string< "abc" "ab") (string-lessp "abc" "ab")
@result{} nil @result{} nil
(string< "" "") (string-lessp "" "")
@result{} nil @result{} nil
@end group @end group
@end example @end example
@ -651,8 +650,8 @@ Symbols are also allowed as arguments, in which case their print names
are compared. are compared.
@end defun @end defun
@defun string-lessp string1 string2 @defun string< string1 string2
@code{string-lessp} is another name for @code{string<}. @code{string<} is another name for @code{string-lessp}.
@end defun @end defun
@defun string-greaterp string1 string2 @defun string-greaterp string1 string2
@ -661,6 +660,10 @@ This function returns the result of comparing @var{string1} and
@code{(string-lessp @var{string2} @var{string1})}. @code{(string-lessp @var{string2} @var{string1})}.
@end defun @end defun
@defun string> string1 string2
@code{string>} is another name for @code{string-greaterp}.
@end defun
@cindex locale-dependent string comparison @cindex locale-dependent string comparison
@defun string-collate-lessp string1 string2 &optional locale ignore-case @defun string-collate-lessp string1 string2 &optional locale ignore-case
This function returns @code{t} if @var{string1} is less than This function returns @code{t} if @var{string1} is less than