On Fri, Jan 15, 2010 at 4:09 PM, Alessio Stalla <alessiostalla@gmail.com> wrote:
Apparently changing output-ugly-object wasn't
necessary, but if you find out it is, let me know.

It is. Transcript below, run against current trunk.

./abcl 
Armed Bear Common Lisp 0.18.0-dev
Java 1.5.0_22 Apple Inc.
Java HotSpot(TM) Client VM
Low-level initialization completed in 1.093 seconds.
Startup completed in 2.608 seconds.
;  Loading file:/Users/alanr/repos/abcl1/dist/abcl.jar!/org/armedbear/lisp/asdf.abcl ...
;    Loading file:/Users/alanr/repos/abcl1/dist/abcl.jar!/org/armedbear/lisp/delete.abcl ...
;    Loaded file:/Users/alanr/repos/abcl1/dist/abcl.jar!/org/armedbear/lisp/delete.abcl (0.031 seconds)
;    Loading file:/Users/alanr/repos/abcl1/dist/abcl.jar!/org/armedbear/lisp/java.abcl ...
;    Loaded file:/Users/alanr/repos/abcl1/dist/abcl.jar!/org/armedbear/lisp/java.abcl (0.065 seconds)
;  Loaded file:/Users/alanr/repos/abcl1/dist/abcl.jar!/org/armedbear/lisp/asdf.abcl (1.93 seconds)
;  Loading /Users/alanr/repos/obi/trunk/src/tools/build/obi.asd ...
;  Loaded /Users/alanr/repos/obi/trunk/src/tools/build/obi.asd (1.44 seconds)
;  Loading /Users/alanr/repos/infectious-disease-ontology/trunk/src/tools/ido.asd ...
;  Loaded /Users/alanr/repos/infectious-disease-ontology/trunk/src/tools/ido.asd (0.019 seconds)
;  Loading /Users/alanr/repos/ogms/trunk/src/tools/ogms.asd ...
;  Loaded /Users/alanr/repos/ogms/trunk/src/tools/ogms.asd (0.029 seconds)
;  Loading /Users/alanr/repos/neurocommons/trunk/convert/fma/fma.asd ...
;  Loaded /Users/alanr/repos/neurocommons/trunk/convert/fma/fma.asd (0.022 seconds)
Type ":help" for a list of available commands.
CL-USER(1): (defmethod print-object ((u (jclass "java.net.URI")) s) (print "ho!"))
#<STANDARD-METHOD PRINT-OBJECT (#:|java.net.URI| T) {1AC096}>
CL-USER(2): (jnew "java.net.URI" "http://foo.com/")
#<java.net.URI http://foo.com/ {3F4CA6}>
CL-USER(3): (in-package :system)
#<PACKAGE "SYSTEM">
SYS(4):  (defun output-ugly-object (object stream)
(cond ((consp object)
      (output-list object stream))
     ((and (vectorp object)
   (not (stringp object))
   (not (bit-vector-p object)))
      (output-vector object stream))
     ((structure-object-p object)
      (cond
((and (null *print-readably*)
      *print-level*
      (>= *current-print-level* *print-level*))
 (write-char #\# stream))
(t
 (print-object object stream))))
     ((standard-object-p object)
      (print-object object stream))
     ((java::java-object-p object)
      (print-object object stream))
     ((xp::xp-structure-p stream)
      (let ((s (sys::%write-to-string object)))
(xp::write-string++ s stream 0 (length s))))
     (t
      (%output-object object stream))))
STYLE-WARNING: redefining OUTPUT-UGLY-OBJECT at top level
OUTPUT-UGLY-OBJECT
SYS(5): (in-package :cl-user)
#<PACKAGE "COMMON-LISP-USER">
CL-USER(6): (jnew "java.net.URI" "http://foo.com/")

"ho!" 
CL-USER(7):