/[mcclim]/mcclim/describe.lisp
ViewVC logotype

Diff of /mcclim/describe.lisp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by mikemac, Sun Aug 11 16:23:08 2002 UTC revision 1.2 by moore, Fri Sep 6 02:47:15 2002 UTC
# Line 23  Line 23 
23  (eval-when (:compile-toplevel :load-toplevel :execute)  (eval-when (:compile-toplevel :load-toplevel :execute)
24    (setf (excl:package-definition-lock (find-package :common-lisp)) nil))    (setf (excl:package-definition-lock (find-package :common-lisp)) nil))
25    
26  (defun describe (thing &optional stream)  #+openmcl
27    (if (null stream)  (defmacro with-system-redefinition-allowed (&body body)
28        (setq stream *standard-output*)    `(let ((ccl::*warn-if-redefine-kernel* nil))
29      (if  (eq stream t)       ,@body))
30          (setq stream *terminal-io*)))  
31    (describe-object thing stream)  #-openmcl
32    (values))  (defmacro with-system-redefinition-allowed (&body body)
33      `(progn
34         ,@body))
35    
36    (with-system-redefinition-allowed
37      (defun describe (thing &optional stream)
38        (if (null stream)
39            (setq stream *standard-output*)
40            (if  (eq stream t)
41                 (setq stream *terminal-io*)))
42        (describe-object thing stream)
43        (values))
44    )
45    
46  (defgeneric describe-object (thing stream))  (defgeneric describe-object (thing stream))
47    
# Line 37  Line 49 
49  ;;; (or EXTENDED-OUTPUT-STREAM OUTPUT-RECORDING-STREAM)  ;;; (or EXTENDED-OUTPUT-STREAM OUTPUT-RECORDING-STREAM)
50  ;;; but CLIM-STREAM-PANE is used instead.  ;;; but CLIM-STREAM-PANE is used instead.
51    
52  (defmethod describe-object ((thing t) stream)  (with-system-redefinition-allowed
53    (let ((*print-array* nil))    (defmethod describe-object ((thing t) stream)
54      (clim:present thing (clim:presentation-type-of thing)      (let ((*print-array* nil))
55                    :acceptably t :stream stream)        (clim:present thing (clim:presentation-type-of thing)
56      (format stream " is of type ")                      :acceptably t :stream stream)
57      (clim:present (type-of thing) (clim:presentation-type-of (type-of thing))        (format stream " is of type ")
58                    :stream stream)        (clim:present (type-of thing) (clim:presentation-type-of (type-of thing))
59      (terpri stream)))                      :stream stream)
60          (terpri stream)))
61    )
62    
63  (defmethod describe-object ((thing symbol) stream)  (defmethod describe-object ((thing symbol) stream)
64    (clim:present thing (clim:presentation-type-of thing)    (clim:present thing (clim:presentation-type-of thing)

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.5