]> code.delx.au - gnu-emacs/blobdiff - lisp/emacs-lisp/eieio-base.el
* lisp/emacs-lisp/eieio*.el: Align a bit better with CLOS
[gnu-emacs] / lisp / emacs-lisp / eieio-base.el
index 46585ee76c653ceefb9afdd0076c956b15d5e3fe..1cc9f895f8a8e92a14dc436ceacad819d20134f3 100644 (file)
@@ -140,7 +140,7 @@ Multiple calls to `make-instance' will return this object."))
 A singleton is a class which will only ever have one instance."
   :abstract t)
 
-(cl-defmethod eieio-constructor ((class (subclass eieio-singleton)) &rest _slots)
+(cl-defmethod make-instance ((class (subclass eieio-singleton)) &rest _slots)
   "Constructor for singleton CLASS.
 NAME and SLOTS initialize the new object.
 This constructor guarantees that no matter how many you request,
@@ -290,8 +290,7 @@ constructor functions are considered valid.
 Second, any text properties will be stripped from strings."
   (cond ((consp proposed-value)
         ;; Lists with something in them need special treatment.
-        (let ((slot-idx (eieio--slot-name-index class
-                                                 nil slot))
+        (let ((slot-idx (eieio--slot-name-index class slot))
               (type nil)
               (classtype nil))
           (setq slot-idx (- slot-idx