From b92dd386cd75542695ba47272238cfc9ba0ef0b7 Mon Sep 17 00:00:00 2001
From: ram <ram>
Date: Tue, 27 Nov 1990 15:45:03 +0000
Subject: [PATCH] Removed "encapsulation" of DESCRIBE, since our describe now
 calls DESCRIBE-OBJECT. Added a DESCRIBE-OBJECT method for
 STANDARD-GENERIC-FUNCTION which prints out the methods.

---
 pcl/env.lisp | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)

diff --git a/pcl/env.lisp b/pcl/env.lisp
index 8538ff9e7..861d72c25 100644
--- a/pcl/env.lisp
+++ b/pcl/env.lisp
@@ -100,8 +100,10 @@
 
 (defgeneric describe-object (object stream))
 
+#-cmu
 (defvar *old-describe* ())
 
+#-cmu
 (eval-when (load)
   (unless *old-describe* (setq *old-describe* (symbol-function 'describe)))
   (setf (symbol-function 'describe)
@@ -117,8 +119,11 @@
 	    (values))))
 
 (defmethod describe-object (object stream)
+  #-cmu
   (let ((*standard-output* stream))
-    (funcall *old-describe* object)))
+    (funcall *old-describe* object))
+  #+cmu
+  (describe object stream))
 
 (defmethod describe-object ((object standard-object) stream)
   (let* ((class (class-of object))
@@ -169,6 +174,19 @@
 			 (slotd-allocation slotd))))
       (values))))
 
+#+cmu
+(defmethod describe-object ((fun standard-generic-function) stream)
+  (format stream "~A is a generic function.~%" fun)
+  (format stream "Its arguments are:~%  ~S~%"
+	  (generic-function-pretty-arglist fun))
+  (format stream "Its methods are:")
+  (dolist (meth (generic-function-methods fun))
+    (format stream "~2%**** ~{~S ~}~:S =>~%"
+	    (method-qualifiers meth)
+	    (unparse-specializers meth))
+    (describe-object (method-function meth) stream)))
+
+
 (defmethod slots-to-inspect ((class std-class) (object standard-object))
   (class-slots class))
 
-- 
GitLab