Opened 9 years ago

Closed 9 years ago

#158 closed defect (fixed)

Printing "#<abc>" fails when *PRINT-READABLY* non-NIL

Reported by: ehuelsmann Owned by: nobody
Priority: major Milestone: 0.27
Component: libraries Version:
Keywords: patch Cc:
Parent Tickets:

Description

(let ((*print-readably* t))

(print "#<abc>"))

--> Error: #<abc> cannot be printed readably

However, I'm printing a string containing something which looks like an unreadable object. Not an unreadable object itself!

Change History (3)

comment:1 Changed 9 years ago by ehuelsmann

Keywords: patch added

The patch below fixes this and doesn't create any new regressions in the ansi test suite. However, why was this bit of code there? Am I missing something???

Index: print.lisp
===================================================================
--- print.lisp (revision 13405)
+++ print.lisp (working copy)
@@ -280,10 +280,11 @@

(symbol-package x))))


(defun %print-object (object stream)

  • (when (and *print-readably*
  • (typep object 'string)
  • (search "#<" object))
  • (error 'print-not-readable :object object))

+ ;; ### Why was this section here??? EH20110715
+ ;; (when (and *print-readably*
+ ;; (typep object 'string)
+ ;; (search "#<" object))
+ ;; (error 'print-not-readable :object object))

(if *print-pretty*

(xp::output-pretty-object object stream)
(output-ugly-object object stream)))

comment:2 Changed 9 years ago by Mark Evenson

Milestone: 0.27

comment:3 Changed 9 years ago by ehuelsmann

Resolution: fixed
Status: newclosed

(In [13446]) Fix #158: Print "#<abc>" fails with *PRINT-READABLY* non-NIL.

Note: This commit also fixes some failures in the random testing

ANSI tests, notably PRINT.RANDOM.SYMBOL.*.

Note: See TracTickets for help on using tickets.