Subject: [clisp-list] Strange princ behavior

From: [email-masked]
Date: Thu Aug 29 11:11:02 2002

I'm hoping someone can point in the right direction.  I have some macros
that are generating groups of calls to princ, which look something like
this:

(progn (princ "hello ") (princ "world."))

This generates output to the stream
hello world.

As I would expect.  But when the second princ string has a newline in it,
such as
(progn (princ "hello ") (princ "world,
  how are you"))

I don't get
hello world,
  how are you

I get
hello
world,
  how are you.

In short, the second princ is always preceded by a newline, but only when
the string itself contains a newline.

Is this standard print behavior for strings?  Is this a bug in CLISP?  Am I
doing something pathologically stupid?

incidently, I am using CLISP 2.82 on Windows XP.

Thanks for any help,
    Glenn Burnside

Thanks,
Glenn G. Burnside III
National Instruments

---

From: Sam Steingold <[email-masked]>
Date: Thu Aug 29 11:43:01 2002

> * In message <[email-masked]>
> * On the subject of "[clisp-list] Strange princ behavior"
> * Sent on Thu, 29 Aug 2002 13:09:55 -0500
> * Honorable [email-masked] writes:
>

Indeed, this is the case.  When *PRINT-PRETTY* is non-NIL, CLISP printer
will print multi-line object starting with a FRESH-LINE.

> Is this standard print behavior for strings? 
> Is this a bug in CLISP? 

no: pretty printing is largely left to the implementation.

> Am I doing something pathologically stupid?

just (setq *print-pretty* nil)

> incidently, I am using CLISP 2.82 on Windows XP.

I am using what will eventually become 2.30 -
you are 52+ versions ahead of me! :-)

-- 
Sam Steingold (http://www.podval.org/~sds) running RedHat7.3 GNU/Linux
<http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/>
<http://www.mideasttruth.com/> <http://www.palestine-central.com/links.html>
We're too busy mopping the floor to turn off the faucet.