GNU bug report logs - #65051
internal_equal manipulates symbols with position without checking symbols-with-pos-enabled.

Previous Next

Package: emacs;

Reported by: Alan Mackenzie <acm <at> muc.de>

Date: Fri, 4 Aug 2023 14:01:02 UTC

Severity: normal

Done: Alan Mackenzie <acm <at> muc.de>

Bug is archived. No further changes may be made.

Full log


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

From: Alan Mackenzie <acm <at> muc.de>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 65051 <at> debbugs.gnu.org
Subject: Re: bug#65051: internal_equal manipulates symbols with position
 without checking symbols-with-pos-enabled.
Date: Mon, 7 Aug 2023 09:20:25 +0000
Hello, Stefan.

On Sun, Aug 06, 2023 at 23:30:15 -0400, Stefan Monnier wrote:
> > at the top level of the function.  Thus

> >     (equal 'foo #<symbol foo at 42>)

> > will return non-nil, regardless of the setting of
> > `symbols-with-pos-enabled`.  It should return non-nil only when that
> > flag variable is non-nil.  This is a bug.

> Could you explain why you think it's a bug?

When symbols-with-pos-enabled is non-nil, the two arguments to that
equal call are equal.  That is the point of s-w-p-e.

When s-w-p-e is nil, and the "magic" is thus switched off, the two lisp
objects have different type (the first is a symbol, the second is a
pseudovector), thus cannot be equal.

I think the amendments I've proposed for the elisp manual page "Symbols
with Position" are now clearer about this sort of thing.

>         Stefan

-- 
Alan Mackenzie (Nuremberg, Germany).




This bug report was last modified 1 year and 314 days ago.

Previous Next


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