0.9.7.22:
[sbcl.git] / src / pcl / methods.lisp
index f333085..1268040 100644 (file)
                  (error 'metaobject-initialization-violation
                   :format-control ,(format nil "~@<~A~@:>" control)
                   :format-arguments (list ',name)
-                  :references (list '(:amop :initialization "Method"))))))
+                  :references (list '(:amop :initialization method))))))
   (def reinitialize-instance ((method method) &rest initargs)
     "Method objects cannot be redefined by ~S.")
   (def change-class ((method method) new &rest initargs)
     "Method objects cannot be redefined by ~S.")
-  ;; FIXME: NEW being a subclass of METHOD.
+  ;; NEW being a subclass of method is dealt with in the general
+  ;; method of CHANGE-CLASS
   (def update-instance-for-redefined-class ((method method) added discarded
                                             plist &rest initargs)
     "No behaviour specified for ~S on method objects.")
              (set-dfun gf dfun cache info) ; lest the cache be freed twice
              (update-dfun gf dfun cache info))))))
 \f
-(defun (setf class-name) (new-value class)
+(defmethod (setf class-name) (new-value class)
   (let ((classoid (%wrapper-classoid (class-wrapper class))))
     (setf (classoid-name classoid) new-value))
-  (reinitialize-instance class :name new-value))
+  (reinitialize-instance class :name new-value)
+  new-value)
 
-(defun (setf generic-function-name) (new-value generic-function)
-  (reinitialize-instance generic-function :name new-value))
+(defmethod (setf generic-function-name) (new-value generic-function)
+  (reinitialize-instance generic-function :name new-value)
+  new-value)
 \f
 (defmethod function-keywords ((method standard-method))
   (multiple-value-bind (nreq nopt keysp restp allow-other-keys-p keywords)