[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#66938: 30.0.50 [PATCH]: Make EIEIO :accessor behave like :reader whe
From: |
João Távora |
Subject: |
bug#66938: 30.0.50 [PATCH]: Make EIEIO :accessor behave like :reader when reading a slot's value |
Date: |
Wed, 29 Nov 2023 16:09:23 +0000 |
On Wed, Nov 29, 2023 at 3:47 PM Stefan Monnier <monnier@iro.umontreal.ca> wrote:
> diff --git a/lisp/emacs-lisp/eieio-core.el b/lisp/emacs-lisp/eieio-core.el
> index a394156c93a..37c5ebdb6da 100644
> --- a/lisp/emacs-lisp/eieio-core.el
> +++ b/lisp/emacs-lisp/eieio-core.el
> @@ -951,7 +951,10 @@ eieio-set-defaults
> (let ((slots (eieio--class-slots (eieio--object-class obj))))
> (dotimes (i (length slots))
> (let* ((name (cl--slot-descriptor-name (aref slots i)))
> - (df (eieio-oref-default obj name)))
> + ;; If the `:initform` signals an error, just skip it,
> + ;; since the error is intended to be signal'ed from
> + ;; `initialize-instance` rather than at the time of `defclass`.
> + (df (ignore-errors (eieio-oref-default obj name))))
> (if (or df set-all)
> (eieio-oset obj name df))))))
>
So the initform is evaluated twice now, once with errors
shooshed? What about side effects? (I know, a terrible idea,
but still...) Can't we just not eval it at defclass time?
João
- bug#66938: 30.0.50 [PATCH]: Make EIEIO :accessor behave like :reader when reading a slot's value, Brandon Irizarry, 2023/11/04
- bug#66938: 30.0.50 [PATCH]: Make EIEIO :accessor behave like :reader when reading a slot's value, Eli Zaretskii, 2023/11/11
- bug#66938: 30.0.50 [PATCH]: Make EIEIO :accessor behave like :reader when reading a slot's value, Stefan Monnier, 2023/11/25
- bug#66938: 30.0.50 [PATCH]: Make EIEIO :accessor behave like :reader when reading a slot's value, Brandon Irizarry, 2023/11/25
- bug#66938: 30.0.50 [PATCH]: Make EIEIO :accessor behave like :reader when reading a slot's value, Stefan Monnier, 2023/11/26
- bug#66938: 30.0.50 [PATCH]: Make EIEIO :accessor behave like :reader when reading a slot's value, João Távora, 2023/11/28
- bug#66938: 30.0.50 [PATCH]: Make EIEIO :accessor behave like :reader when reading a slot's value, Stefan Monnier, 2023/11/29
- bug#66938: 30.0.50 [PATCH]: Make EIEIO :accessor behave like :reader when reading a slot's value, João Távora, 2023/11/29
- bug#66938: 30.0.50 [PATCH]: Make EIEIO :accessor behave like :reader when reading a slot's value, Stefan Monnier, 2023/11/29
- bug#66938: 30.0.50 [PATCH]: Make EIEIO :accessor behave like :reader when reading a slot's value,
João Távora <=
- bug#66938: 30.0.50 [PATCH]: Make EIEIO :accessor behave like :reader when reading a slot's value, Stefan Monnier, 2023/11/29
bug#66938: 30.0.50; Commit 6c47931a1ad4de ("Make EIEIO ':accessor' behave like ':reader' when reading (bug#66938)") breaks Eglot, Arsen Arsenović, 2023/11/28