diff options
| author | Stefan Monnier | 2023-11-29 10:45:33 -0500 |
|---|---|---|
| committer | Stefan Monnier | 2023-11-29 10:45:33 -0500 |
| commit | e3ed3bc755195a273078dcd577dd0902f7699a7a (patch) | |
| tree | a58c71392bce317319fde971d2c12be396a656a2 | |
| parent | 914e9bd4fe5ab9360d98a79e0bf9beb22f6973e2 (diff) | |
| download | emacs-e3ed3bc755195a273078dcd577dd0902f7699a7a.tar.gz emacs-e3ed3bc755195a273078dcd577dd0902f7699a7a.zip | |
* lisp/emacs-lisp/eieio-core.el (eieio-set-defaults): Silence errors
See bug#66938
| -rw-r--r-- | lisp/emacs-lisp/eieio-core.el | 5 |
1 files changed, 4 insertions, 1 deletions
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." | |||
| 951 | (let ((slots (eieio--class-slots (eieio--object-class obj)))) | 951 | (let ((slots (eieio--class-slots (eieio--object-class obj)))) |
| 952 | (dotimes (i (length slots)) | 952 | (dotimes (i (length slots)) |
| 953 | (let* ((name (cl--slot-descriptor-name (aref slots i))) | 953 | (let* ((name (cl--slot-descriptor-name (aref slots i))) |
| 954 | (df (eieio-oref-default obj name))) | 954 | ;; If the `:initform` signals an error, just skip it, |
| 955 | ;; since the error is intended to be signal'ed from | ||
| 956 | ;; `initialize-instance` rather than at the time of `defclass`. | ||
| 957 | (df (ignore-errors (eieio-oref-default obj name)))) | ||
| 955 | (if (or df set-all) | 958 | (if (or df set-all) |
| 956 | (eieio-oset obj name df)))))) | 959 | (eieio-oset obj name df)))))) |
| 957 | 960 | ||