GNU bug report logs - #47552
27.1; cl-defstruct field names matching read-only variables -> bad code

Previous Next

Package: emacs;

Reported by: Matt Armstrong <matt <at> rfc20.org>

Date: Thu, 1 Apr 2021 18:39:01 UTC

Severity: normal

Found in versions 27.1, 28.2

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


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

From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: matt <at> rfc20.org, 47552 <at> debbugs.gnu.org
Subject: Re: bug#47552: 27.1; cl-defstruct field names matching read-only
 variables -> bad code
Date: Sun, 25 Jun 2023 06:45:25 +0200
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

> AFAIK, `date` is not globally defined as dynbound by diary, so it should
> not be a problem.  More specifically, the `date` variable is treated as
> dynbound only inside calendar's own files, but not in code found in
> other files.

Hmm, indeed.

> If you found it to be otherwise, please report it as a bug.

It turned out I had created an alias for the variable (using
`defvaralias') long ago, more or less only to get rid of warnings at
that moment, AFAIR.  Seems that this makes the variable special
globally.

Michael.




This bug report was last modified 2 years and 26 days ago.

Previous Next


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