diff options
Diffstat (limited to 'lisp/emacs-lisp/eieio-base.el')
-rw-r--r-- | lisp/emacs-lisp/eieio-base.el | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lisp/emacs-lisp/eieio-base.el b/lisp/emacs-lisp/eieio-base.el index e3501be6c1d..58dcd09d7ea 100644 --- a/lisp/emacs-lisp/eieio-base.el +++ b/lisp/emacs-lisp/eieio-base.el @@ -256,8 +256,11 @@ malicious code. Note: This function recurses when a slot of :type of some object is identified, and needing more object creation." (let* ((objclass (nth 0 inputlist)) - ;; (objname (nth 1 inputlist)) - (slots (nthcdr 2 inputlist)) + ;; Earlier versions of `object-write' added a string name for + ;; the object, now obsolete. + (slots (nthcdr + (if (stringp (nth 1 inputlist)) 2 1) + inputlist)) (createslots nil) (class (progn @@ -464,7 +467,7 @@ instance." (cl-defmethod eieio-object-name-string ((obj eieio-named)) "Return a string which is OBJ's name." (or (slot-value obj 'object-name) - (symbol-name (eieio-object-class obj)))) + (cl-call-next-method))) (cl-defmethod eieio-object-set-name-string ((obj eieio-named) name) "Set the string which is OBJ's NAME." |