summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2015-03-30 17:51:50 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2015-03-30 17:51:50 -0400
commitef37e79aae7a64f3c30f7ff4350c8f3a3c6c7b20 (patch)
tree7320acdd4f34fe20ac7ed82d6cc2c05b14586037 /lisp/emacs-lisp
parent05a5a94000b82c81dc86cb7e2f3b4010bb2a4f0b (diff)
downloademacs-ef37e79aae7a64f3c30f7ff4350c8f3a3c6c7b20.tar.gz
emacs-ef37e79aae7a64f3c30f7ff4350c8f3a3c6c7b20.tar.bz2
emacs-ef37e79aae7a64f3c30f7ff4350c8f3a3c6c7b20.zip
* eieio-base.el (make-instance) <eieio-named>: New instance.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/eieio-base.el9
1 files changed, 9 insertions, 0 deletions
diff --git a/lisp/emacs-lisp/eieio-base.el b/lisp/emacs-lisp/eieio-base.el
index 5b3d9029c53..c2eab202881 100644
--- a/lisp/emacs-lisp/eieio-base.el
+++ b/lisp/emacs-lisp/eieio-base.el
@@ -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