GNU bug report logs - #66938
30.0.50 [PATCH]: Make EIEIO :accessor behave like :reader when reading a slot's value

Previous Next

Package: emacs;

Reported by: Brandon Irizarry <brandon.irizarry <at> gmail.com>

Date: Sat, 4 Nov 2023 22:04:01 UTC

Severity: normal

Tags: patch

Found in version 30.0.50

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: Brandon Irizarry <brandon.irizarry <at> gmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 66938 <at> debbugs.gnu.org
Subject: bug#66938: 30.0.50 [PATCH]: Make EIEIO :accessor behave like :reader when reading a slot's value
Date: Sat, 25 Nov 2023 22:21:21 -0500
[Message part 1 (text/plain, inline)]
Done. The patch is included with this email.

- Brandon

On Sat, Nov 25, 2023 at 9:57 AM Stefan Monnier <monnier <at> iro.umontreal.ca>
wrote:

> [ Sorry for the delay, and thanks Eli for re-pinging me.  ]
>
> > I've included a suggested patch for 'eieio.el', which slightly
> > modifies the behavior of EIEIO's 'defclass'. When playing around with
> > 'eieio-instance-inheritor' as a base class, I noticed that calls to
> > the accessor (when used as a getter) weren't delegating to the parent
> > instance (as defined when calling 'clone'). That is, an object clone that
> > doesn't set
> > its fields directly will report 'nil' when the accessor method is used
> as a
> > getter for some slot.
>
> The patch looks great and confirms my FIXME.
>
> Could you turn the example in the commit message into a test in
> test/lisp/emacs-lisp/eieio-tests/eieio-tests.el?
>
>
>         Stefan
>
>
[Message part 2 (text/html, inline)]
[0001-Bug-66938-add-example-used-in-patch-commit-message-t.patch (text/x-patch, attachment)]

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

Previous Next


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