]> git.eshelyaron.com Git - emacs.git/commitdiff
Handle possible classtype values in eieio-persistent-read
authorEric Abrahamsen <eric@ericabrahamsen.net>
Tue, 19 Dec 2017 22:56:13 +0000 (14:56 -0800)
committerAndrew G Cohen <cohen@andy.bu.edu>
Tue, 11 Dec 2018 06:17:57 +0000 (14:17 +0800)
* lisp/emacs-lisp/eieio-base.el (eieio-persistent-validate/fix-slot-value):
  The function `eieio-persistent-slot-type-is-class-p' could return
  either a single class, or a list of classes.

lisp/emacs-lisp/eieio-base.el

index c0ad7ac4605c77e4e4c564013725f37aebdaa8f9..adc53e360ba787ceaf4b465ea67ad245e4c7925a 100644 (file)
@@ -349,7 +349,7 @@ Second, any text properties will be stripped from strings."
                        (seq-some
                         (lambda (elt)
                           (child-of-class-p (car proposed-value) elt))
-                        classtype))
+                        (if (listp classtype) classtype (list classtype))))
                  (eieio-persistent-convert-list-to-object
                   proposed-value))
                 (t