From ... From: Erik Naggum Subject: Re: format directive "~{...~}" Date: 2000/01/10 Message-ID: <3156500787965612@naggum.no>#1/1 X-Deja-AN: 570725591 References: <3877F57B.664C1BF8@genworks.com> mail-copies-to: never Content-Type: text/plain; charset=us-ascii X-Complaints-To: newsmaster@eunet.no X-Trace: oslo-nntp.eunet.no 947515508 3971 195.0.192.66 (10 Jan 2000 14:45:08 GMT) Organization: Naggum Software; +47 8800 8879 or +1 510 435 8604; fax: +47 2210 9077; http://www.naggum.no User-Agent: Gnus/5.0802 (Gnus v5.8.2) Emacs/20.5 Mime-Version: 1.0 NNTP-Posting-Date: 10 Jan 2000 14:45:08 GMT Newsgroups: comp.lang.lisp * "David J. Cooper" | Now I am wondering if there is a way to use this or a similar directive | to put something before all but the first element in the list, as in: : | that is, I want an extra space *before* all but the *first* element in | the argument list, so that the rest of the elements line up under the | first one which has a parenthesis to the left of it. PPRINT-LOGICAL-BLOCK can handle this requirement easily. its FORMAT interface is documented in section 22.3.5.2 of the standard. for a list like (one two three) to be formatted nicely, this suffices: (format nil "~:<~@{~S~^~:@_~}~:>" '(one two three)) untangling this example is left as an exercise for the reader... #:Erik