Changeset 15252


Ignore:
Timestamp:
Mar 14, 2012, 6:59:28 PM (7 years ago)
Author:
gb
Message:

WRITE-NOT-PRETTY: handle circularity/dotted lists correctly.
Fixes ticket:915.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/lib/pprint.lisp

    r14830 r15252  
    20342034        ((not list-kludge))
    20352035        ((null object)(return-from write-not-pretty nil))
    2036         ((not (consp object))
     2036        ((and (not (consp object)) (not circle))
    20372037         (stream-write-entire-string stream " . "))
    20382038        ((eq circle :first)
    2039          (stream-write-char stream #\()       
     2039         (when (consp object) (stream-write-char stream #\())
    20402040         (write-a-frob object stream level list-kludge)
    2041          (stream-write-char stream #\))
     2041         (when (consp object) (stream-write-char stream #\)))
    20422042         (return-from write-not-pretty nil))                     
    20432043        (t (stream-write-char stream #\space)))
Note: See TracChangeset for help on using the changeset viewer.