From: Lawrence Mitchell <wence@gmx.li>
To: emacs-pretest-bug@gnu.org
Subject: 23.0.60; equal-including-properties not mentioned in Elisp manual
Date: Fri, 08 Feb 2008 15:47:58 +0000 [thread overview]
Message-ID: <?fnord?y3h6k5lfmoup.fsf@ID-97657.user.individual.net> (raw)
In GNU Emacs 23.0.60.2 (i686-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
of 2008-01-11 on lamacq.ph.ed.ac.uk
The function equal-including-properties is not mentioned in the
Elisp manual. How about the following text?
diff --git a/doc/lispref/objects.texi b/doc/lispref/objects.texi
index b68e2d6..da954b7 100644
--- a/doc/lispref/objects.texi
+++ b/doc/lispref/objects.texi
@@ -2007,7 +2007,9 @@ always true.
@end example
Comparison of strings is case-sensitive, but does not take account of
-text properties---it compares only the characters in the strings. For
+text properties---it compares only the characters in the strings---use
+@code{equal-including-properties} if you need to differentiate between
+@code{equal} strings with differing text properties. For
technical reasons, a unibyte string and a multibyte string are
@code{equal} if and only if they contain the same sequence of
character codes and all these codes are either in the range 0 through
@@ -2038,6 +2040,22 @@ returns @code{t} if and only if both the expressions below return
Because of this recursive method, circular lists may therefore cause
infinite recursion (leading to an error).
+@defun equal-including-properties object1 object2
+This function behaves like @code{equal} in all cases but also requires
+that for two strings to be equal, they have the same text properties.
+
+@example
+@group
+(equal "asdf" (propertize "asdf" '(asdf t)))
+ @result{} t
+@end group
+@group
+(equal-including-properties "asdf"
+ (propertize "asdf" '(asdf t)))
+ @result{} nil
+@end group
+@end example
+@end defun
@ignore
arch-tag: 9711a66e-4749-4265-9e8c-972d55b67096
@end ignore
ChangeLog entry:
2008-02-08 Lawrence Mitchell <wence@gmx.li>
* objects.texi (Equality Predicates): Mention
equal-including-properties.
Cheers,
Lawrence
--
Lawrence Mitchell <wence@gmx.li>
next reply other threads:[~2008-02-08 15:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-08 15:47 Lawrence Mitchell [this message]
2008-02-10 2:22 ` 23.0.60; equal-including-properties not mentioned in Elisp manual Glenn Morris
2008-02-11 0:53 ` Glenn Morris
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='?fnord?y3h6k5lfmoup.fsf@ID-97657.user.individual.net' \
--to=wence@gmx.li \
--cc=emacs-pretest-bug@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).