0.9.2.8
authorRudi Schlatte <rudi@constantly.at>
Fri, 1 Jul 2005 05:59:39 +0000 (05:59 +0000)
committerRudi Schlatte <rudi@constantly.at>
Fri, 1 Jul 2005 05:59:39 +0000 (05:59 +0000)
Make interactive-stream-p a generic function so Gray streams can
specialize on it.

src/pcl/gray-streams.lisp
version.lisp-expr

index 2b0cc85..a293e9d 100644 (file)
     (error 'type-error :datum non-stream :expected-type 'stream)))
 \f
 (let ()
+  (fmakunbound 'interactive-stream-p)
+
+  (defgeneric interactive-stream-p (stream)
+    #+sb-doc
+    (:documentation "Is STREAM an interactive stream?"))
+  
+  (defmethod interactive-stream-p ((stream ansi-stream))
+    (funcall (ansi-stream-misc stream) stream :interactive-p))
+
+  (defmethod interactive-stream-p ((stream fundamental-stream))
+    nil)
+
+  (defmethod interactive-stream-p ((stream stream))
+    (bug-or-error stream 'interactive-stream-p))
+  
+  (defmethod interactive-stream-p ((non-stream t))
+    (error 'type-error :datum non-stream :expected-type 'stream)))
+\f
+(let ()
   (fmakunbound 'output-stream-p)
 
   (defgeneric output-stream-p (stream)
index 0f1b631..c536493 100644 (file)
@@ -17,4 +17,4 @@
 ;;; checkins which aren't released. (And occasionally for internal
 ;;; versions, especially for internal versions off the main CVS
 ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"0.9.2.7"
+"0.9.2.8"