unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* 23.0.60; equal-including-properties not mentioned in Elisp manual
@ 2008-02-08 15:47 Lawrence Mitchell
  2008-02-10  2:22 ` Glenn Morris
  0 siblings, 1 reply; 3+ messages in thread
From: Lawrence Mitchell @ 2008-02-08 15:47 UTC (permalink / raw)
  To: emacs-pretest-bug

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>




^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: 23.0.60; equal-including-properties not mentioned in Elisp manual
  2008-02-08 15:47 23.0.60; equal-including-properties not mentioned in Elisp manual Lawrence Mitchell
@ 2008-02-10  2:22 ` Glenn Morris
  2008-02-11  0:53   ` Glenn Morris
  0 siblings, 1 reply; 3+ messages in thread
From: Glenn Morris @ 2008-02-10  2:22 UTC (permalink / raw)
  To: Lawrence Mitchell; +Cc: emacs-pretest-bug

Lawrence Mitchell wrote:

> The function equal-including-properties is not mentioned in the
> Elisp manual.  How about the following text?

I've added a mention of the function; I don't think an example is needed.




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: 23.0.60; equal-including-properties not mentioned in Elisp manual
  2008-02-10  2:22 ` Glenn Morris
@ 2008-02-11  0:53   ` Glenn Morris
  0 siblings, 0 replies; 3+ messages in thread
From: Glenn Morris @ 2008-02-11  0:53 UTC (permalink / raw)
  To: Lawrence Mitchell; +Cc: emacs-pretest-bug

Glenn Morris wrote:

> I've added a mention of the function; I don't think an example is needed.

But rms wanted the whole thing.




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-02-11  0:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-08 15:47 23.0.60; equal-including-properties not mentioned in Elisp manual Lawrence Mitchell
2008-02-10  2:22 ` Glenn Morris
2008-02-11  0:53   ` Glenn Morris

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).