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


View this message in rfc822 format

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: bug#47552: 27.1; cl-defstruct field names matching read-only variables -> bad code
Date: Sun, 25 Jun 2023 05:43:07 +0200
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

> Damn!  OK, should work again now.  Sorry 'bout that.

Works, thanks.

One (very small) downside of the code generated now is that it may
trigger "Lexical argument shadows the dynamic variable" warnings.
'date' for example is bad as a slot name when "diary" is loaded.

I think these warnings can safely be ignored but I don't know if there
is a way to get rid of them (and there may be a lot since the
`defstruct' call is not the only place where a warning is emitted: also
some defined functions lead to those warnings).

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.