GNU bug report logs - #62959
[PATCH] Recognize defstruct slot names in various eieio functions

Previous Next

Package: emacs;

Reported by: Thuna <thuna.cing <at> gmail.com>

Date: Wed, 19 Apr 2023 22:17:02 UTC

Severity: normal

Tags: patch

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


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

From: Thuna <thuna.cing <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] Recognize defstruct slot names in various eieio functions
Date: Thu, 20 Apr 2023 00:15:50 +0200
[Message part 1 (text/plain, inline)]
The function `eieio--known-slot-name-p' is used by some eieio functions
(specifically eieio-oref, eieio-oref-default, and eieio-oset-default) to
check whether a slot name is known or not, and if not signals an
"Unknown slot" warning.

Structs do not make their slots known to `eieio--known-slot-name-p', so
the warning is signaled even for valid slot names.  Since eieio aims for
compatibility with defstruct, this should probably be considered a bug.

The function `eieio--known-slot-name-p' checks the variable
`eieio--known-slot-names' but also has a fallback for the name's
`slot-name' property.  In the patch I opted to use the latter.

[0001-Recognize-defstruct-slot-names-in-various-eieio-func.patch (text/x-patch, attachment)]

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

Previous Next


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