From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lawrence Mitchell Newsgroups: gmane.emacs.devel,gmane.emacs.pretest.bugs Subject: 23.0.60; equal-including-properties not mentioned in Elisp manual Date: Fri, 08 Feb 2008 15:47:58 +0000 Organization: me Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1202491937 14073 80.91.229.12 (8 Feb 2008 17:32:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 8 Feb 2008 17:32:17 +0000 (UTC) To: emacs-pretest-bug@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Feb 08 18:32:40 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JNX5b-0000Ub-LL for ged-emacs-devel@m.gmane.org; Fri, 08 Feb 2008 18:32:39 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JNX58-00065L-NL for ged-emacs-devel@m.gmane.org; Fri, 08 Feb 2008 12:32:10 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JNVSa-0003fu-7y for emacs-devel@gnu.org; Fri, 08 Feb 2008 10:48:16 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JNVSU-0003er-5C for emacs-devel@gnu.org; Fri, 08 Feb 2008 10:48:15 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JNVSU-0003em-15 for emacs-devel@gnu.org; Fri, 08 Feb 2008 10:48:10 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JNVST-0004Hk-NC for emacs-devel@gnu.org; Fri, 08 Feb 2008 10:48:09 -0500 Original-Received: from mx10.gnu.org ([199.232.76.166]) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1JNVST-0003J2-Dg for emacs-pretest-bug@gnu.org; Fri, 08 Feb 2008 10:48:09 -0500 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1JNVSQ-0004H8-9Y for emacs-pretest-bug@gnu.org; Fri, 08 Feb 2008 10:48:09 -0500 Original-Received: from anger.ph.ed.ac.uk ([129.215.74.175]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JNVSP-0004Ft-Sg for emacs-pretest-bug@gnu.org; Fri, 08 Feb 2008 10:48:06 -0500 Original-Received: from lamacq.ph.ed.ac.uk (lamacq.ph.ed.ac.uk [129.215.72.156]) by anger.ph.ed.ac.uk (8.12.11.20060308/8.12.10) with ESMTP id m18Flwin024906 for ; Fri, 8 Feb 2008 15:47:58 GMT Original-Received: from lamacq.ph.ed.ac.uk (localhost.localdomain [127.0.0.1]) by lamacq.ph.ed.ac.uk (8.13.1/8.12.10) with ESMTP id m18FlwNp020276 for ; Fri, 8 Feb 2008 15:47:58 GMT Original-Received: (from s0198183@localhost) by lamacq.ph.ed.ac.uk (8.13.1/8.13.1/Submit) id m18FlwlY020271; Fri, 8 Feb 2008 15:47:58 GMT X-Authentication-Warning: lamacq.ph.ed.ac.uk: s0198183 set sender to lawrence.mitchell@ed.ac.uk using -f User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-Mailman-Approved-At: Fri, 08 Feb 2008 12:32:05 -0500 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:88533 gmane.emacs.pretest.bugs:20953 Archived-At: 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 * objects.texi (Equality Predicates): Mention equal-including-properties. Cheers, Lawrence -- Lawrence Mitchell