diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2015-03-30 17:51:50 -0400 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2015-03-30 17:51:50 -0400 |
commit | ef37e79aae7a64f3c30f7ff4350c8f3a3c6c7b20 (patch) | |
tree | 7320acdd4f34fe20ac7ed82d6cc2c05b14586037 /lisp/emacs-lisp | |
parent | 05a5a94000b82c81dc86cb7e2f3b4010bb2a4f0b (diff) | |
download | emacs-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.el | 9 |
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 |