From 215e5bf0cf10b519838cc9d658caa35d5cbc4da6 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 8 Apr 2015 17:23:50 -0400 Subject: [PATCH] (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. --- lisp/emacs-lisp/eieio-core.el | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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))) -- 2.39.2