GNU bug report logs - #6581
24.0.50; `equal-including-properties' uses `eq' to compare property values

Previous Next

Package: emacs;

Reported by: Christian Ohler <ohler+emacs <at> fastmail.net>

Date: Wed, 7 Jul 2010 15:15:02 UTC

Severity: normal

Tags: confirmed, patch

Merged with 35921

Found in versions 26.2, 24.0.50, 25.0.94, 29.0.50, 24.5

Fixed in version 29.1

Done: Stefan Kangas <stefan <at> marxist.se>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Christian Ohler <ohler+emacs <at> fastmail.net>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.0.50; `equal-including-properties' uses `eq' to compare property
	values
Date: Thu, 08 Jul 2010 00:19:49 +1000
I just noticed that, in my current Emacs (24.0.50.1, built from trunk a 
few weeks ago):

(equal-including-properties #("a" 0 1 (k "v")) #("a" 0 1 (k "v")))
=> nil

This is because these two strings both have a property with key `k', but 
the values are two different strings "v", and 
`equal-including-properties' appears to use `eq' to compare property 
values (I didn't verify this in the code).  Is this a bug, or is it 
intentional?

For comparison,

(equal-including-properties #("a" 0 1 (k v)) #("a" 0 1 (k v)))
=> t

since `v' is an interned symbol.

My expectation was that, since `equal' is recursively defined in terms 
of itself, `equal-including-properties' should also call itself 
recursively on property values.

Christian.




This bug report was last modified 3 years and 199 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.