:definition-source `((define-method-combination ,type) ,pathname)))
(when old-method
(remove-method #'find-method-combination old-method))
- (add-method #'find-method-combination new-method)))
+ (add-method #'find-method-combination new-method)
+ type))
(defun short-combine-methods (type options operator ioa method doc)
(cond ((null options) (setq options '(:most-specific-first)))
,*load-pathname*))))
(setf (gethash type *long-method-combination-functions*) function)
(when old-method (remove-method #'find-method-combination old-method))
- (add-method #'find-method-combination new-method)))
+ (add-method #'find-method-combination new-method)
+ type))
(defmethod compute-effective-method ((generic-function generic-function)
(combin long-method-combination)
k)
(dmc-test-mc :k 1)
+;;; While I'm at it, DEFINE-METHOD-COMBINATION is defined to return
+;;; the NAME argument, not some random method object. So:
+(assert (eq (define-method-combination dmc-test-return-foo)
+ 'dmc-test-return-foo))
+(assert (eq (define-method-combination dmc-test-return-bar :operator and)
+ 'dmc-test-return-bar))
+(assert (eq (define-method-combination dmc-test-return
+ (&optional (order :most-specific-first))
+ ((around (:around))
+ (primary (dmc-test-return) :order order :required t))
+ (let ((form (if (rest primary)
+ `(and ,@(mapcar #'(lambda (method)
+ `(call-method ,method))
+ primary))
+ `(call-method ,(first primary)))))
+ (if around
+ `(call-method ,(first around)
+ (,@(rest around)
+ (make-method ,form)))
+ form)))
+ 'dmc-test-return))
\f
;;;; success
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"0.7.9.17"
+"0.7.9.18"