]> code.delx.au - gnu-emacs/blobdiff - lisp/emacs-lisp/eieio-base.el
* eieio-base.el (make-instance) <eieio-named>: New instance.
[gnu-emacs] / lisp / emacs-lisp / eieio-base.el
index 5b3d9029c53b003eeefa51c4fa4cef5da9b7c6c5..c2eab202881e1035bd0624c994dd911882bddf1d 100644 (file)
@@ -498,6 +498,15 @@ All slots are unbound, except those initialized with PARAMS."
                         (concat nm "-1")))))
     nobj))
 
+(cl-defmethod make-instance ((class (subclass eieio-named)) &rest args)
+  (if (not (stringp (car args)))
+      (cl-call-next-method)
+    (funcall (if eieio-backward-compatibility #'ignore #'message)
+             "Obsolete: name passed without :object-name to %S constructor"
+             class)
+    (apply #'cl-call-next-method class :object-name args)))
+
+
 (provide 'eieio-base)
 
 ;;; eieio-base.el ends here