From: Stefan Monnier Date: Wed, 8 Apr 2015 21:23:50 +0000 (-0400) Subject: (eieio-copy-parents-into-subclass): Fix inheritance of initargs X-Git-Tag: emacs-25.0.90~2532 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=215e5bf0cf10b519838cc9d658caa35d5cbc4da6;p=emacs.git (eieio-copy-parents-into-subclass): Fix inheritance of initargs Fixes: debbugs:20270 * lisp/emacs-lisp/eieio-core.el (eieio-copy-parents-into-subclass): Fix inheritance of initargs. --- diff --git a/lisp/emacs-lisp/eieio-core.el b/lisp/emacs-lisp/eieio-core.el index 6fd9c14088e..b0aa363679e 100644 --- a/lisp/emacs-lisp/eieio-core.el +++ b/lisp/emacs-lisp/eieio-core.el @@ -673,10 +673,9 @@ the new child class." (let ((pslots (eieio--class-slots pcv)) (pinit (eieio--class-initarg-tuples pcv))) (dotimes (i (length pslots)) - (eieio--add-new-slot newc (cl--copy-slot-descriptor (aref pslots i)) - (car-safe (car pinit)) nil nil sn) - ;; Increment each value. - (setq pinit (cdr pinit)) + (let* ((sd (cl--copy-slot-descriptor (aref pslots i))) + (init (car (rassq (cl--slot-descriptor-name sd) pinit)))) + (eieio--add-new-slot newc sd init nil nil sn)) )) ;; while/let ;; Now duplicate all the class alloc slots. (let ((pcslots (eieio--class-class-slots pcv)))