From: Richard M Kreuter
Subject: Abnormal exits from PPRINT-LOGICAL-BLOCK
Date: 
Message-ID: <873ajtcyan.fsf@progn.net>
Does anybody have an intuition whether the consequences of the
following are defined in the CLHS, and if so, what the output should
be?

(pprint-logical-block (nil nil :suffix "1")
  (flet ((lose ()
           (pprint-exit-if-list-exhausted)))
    (pprint-logical-block (nil nil :suffix "2")
      (princ "foo")
      (lose))))

--
RmK

From: Joshua Taylor
Subject: Re: Abnormal exits from PPRINT-LOGICAL-BLOCK
Date: 
Message-ID: <64016d47-bd28-449c-92e6-5331fc0e4811@j22g2000hsf.googlegroups.com>
On Sep 21, 11:29 am, Richard M Kreuter <·······@progn.net> wrote:
> Does anybody have an intuition whether the consequences of the
> following are defined in the CLHS, and if so, what the output should
> be?
>
> (pprint-logical-block (nil nil :suffix "1")
>   (flet ((lose ()
>            (pprint-exit-if-list-exhausted)))
>     (pprint-logical-block (nil nil :suffix "2")
>       (princ "foo")
>       (lose))))
>
> --
> RmK

Says the hyperspec: "Whether or not pprint-exit-if-list-exhausted is
fbound in the global environment is implementation-dependent; however,
the restrictions on redefinition and shadowing of pprint-exit-if-list-
exhausted are the same as for symbols in the COMMON-LISP package which
are fbound in the global environment. The consequences of attempting
to use pprint-exit-if-list-exhausted outside of pprint-logical-block
are undefined."
http://www.lispworks.com/documentation/HyperSpec/Body/m_ppr_ex.htm
From: John Thingstad
Subject: Re: Abnormal exits from PPRINT-LOGICAL-BLOCK
Date: 
Message-ID: <op.uhukb5kcut4oq5@pandora.alfanett.no>
P� Sun, 21 Sep 2008 17:29:34 +0200, skrev Richard M Kreuter  
<·······@progn.net>:

> Does anybody have an intuition whether the consequences of the
> following are defined in the CLHS, and if so, what the output should
> be?
>
> (pprint-logical-block (nil nil :suffix "1")
>   (flet ((lose ()
>            (pprint-exit-if-list-exhausted)))
>     (pprint-logical-block (nil nil :suffix "2")
>       (princ "foo")
>       (lose))))
>
> --
> RmK

Not really, but most of the code for pprint has been faithfully copied  
 from Richard Waters implementation.
So read the source code (SBCL, Corman, CMUCL or CLisp perhaps) and the  
following paper "XP A Common Lisp Pretty Printing System" by Richard C.  
Waters
Get the A.I Memo No.1102a version since the a has the updates from the  
ANSI committee. (If you haven't already.)

--------------
John Thingstad