[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master e3ed3bc7551: * lisp/emacs-lisp/eieio-core.el (eieio-set-defaults)
From: |
Stefan Monnier |
Subject: |
master e3ed3bc7551: * lisp/emacs-lisp/eieio-core.el (eieio-set-defaults): Silence errors |
Date: |
Wed, 29 Nov 2023 10:45:59 -0500 (EST) |
branch: master
commit e3ed3bc755195a273078dcd577dd0902f7699a7a
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>
* lisp/emacs-lisp/eieio-core.el (eieio-set-defaults): Silence errors
See bug#66938
---
lisp/emacs-lisp/eieio-core.el | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
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 @@ not nil."
(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))))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master e3ed3bc7551: * lisp/emacs-lisp/eieio-core.el (eieio-set-defaults): Silence errors,
Stefan Monnier <=