* lisp/emacs-lisp/eieio-core.el (eieio-oset-default): Catch the unexpected
case where the default value would be re-interpreted as a form!
This commit is contained in:
parent
af560cd6f1
commit
699ece2757
2 changed files with 7 additions and 0 deletions
|
@ -1010,6 +1010,8 @@ Fills in the default value in CLASS' in SLOT with VALUE."
|
|||
(signal 'invalid-slot-name (list (eieio--class-symbol class) slot)))
|
||||
(eieio--validate-slot-value class c value slot)
|
||||
;; Set this into the storage for defaults.
|
||||
(if (eieio-eval-default-p value)
|
||||
(error "Can't set default to a sexp that gets evaluated again"))
|
||||
(setcar (nthcdr (- c (eval-when-compile eieio--object-num-slots))
|
||||
(eieio--class-public-d class))
|
||||
value)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue