unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Kevin Ryde <user42@zip.com.au>
Subject: doc pretty-print new options
Date: Fri, 07 Nov 2003 09:52:17 +1000	[thread overview]
Message-ID: <87sml1qclq.fsf@zip.com.au> (raw)

[-- Attachment #1: Type: text/plain, Size: 608 bytes --]

More recent stuff not yet in the manual,

        * misc-modules.texi (Pretty Printing): Add new keyword options, break
        example to avoid long line.

New text:

     The further KEYWORD-OPTIONS are keywords and parameters as follows,

    #:display? FLAG
          If FLAG is true then print using `display'.  The default is
          `#f' which means use `write' style.  (*note Writing::)

    #:per-line-prefix STRING
          Print the given STRING as a prefix on each line.  The default
          is no prefix.

    #:width COLUMNS
          Print within the given COLUMNS.  The default is 79.



[-- Attachment #2: NEWS.pretty.diff --]
[-- Type: text/plain, Size: 430 bytes --]

--- NEWS.~1.408.~	1970-01-01 10:00:01.000000000 +1000
+++ NEWS	2003-11-04 09:57:11.000000000 +1000
@@ -432,7 +432,7 @@
 
 The function pretty-print from the (ice-9 pretty-print) module can now
 also be invoked with keyword arguments that control things like
-maximum output width.  See its online documentation.
+maximum output width.  See the manual for details.
 
 ** Variables have no longer a special behavior for `equal?'.
 

[-- Attachment #3: misc-modules.texi.pretty.diff --]
[-- Type: text/plain, Size: 1330 bytes --]

--- misc-modules.texi.~1.6.~	1970-01-01 10:00:01.000000000 +1000
+++ misc-modules.texi	2003-11-04 09:55:41.000000000 +1000
@@ -21,7 +21,8 @@
 
 @lisp
 (pretty-print '(define (foo) (lambda (x)
-(cond ((zero? x) #t) ((negative? x) -x) (else (if (= x 1) 2 (* x x x)))))))
+(cond ((zero? x) #t) ((negative? x) -x) (else
+(if (= x 1) 2 (* x x x)))))))
 @print{}
 (define (foo)
   (lambda (x)
@@ -30,10 +31,26 @@
           (else (if (= x 1) 2 (* x x x))))))
 @end lisp
 
-@deffn {Scheme Procedure} pretty-print obj [port]
+@deffn {Scheme Procedure} pretty-print obj [port] [keyword-options]
 Print the textual representation of the Scheme object @var{obj} to
 @var{port}.  @var{port} defaults to the current output port, if not
 given.
+
+The further @var{keyword-options} are keywords and parameters as
+follows,
+
+@table @asis
+@item @nicode{#:display?} @var{flag}
+If @var{flag} is true then print using @code{display}.  The default is
+@code{#f} which means use @code{write} style.  (@pxref{Writing})
+
+@item @nicode{#:per-line-prefix} @var{string}
+Print the given @var{string} as a prefix on each line.  The default is
+no prefix.
+
+@item @nicode{#:width} @var{columns}
+Print within the given @var{columns}.  The default is 79.
+@end table
 @end deffn
 
 Beware: Since @code{pretty-print} uses it's own write procedure, it's

[-- Attachment #4: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel

                 reply	other threads:[~2003-11-06 23:52 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87sml1qclq.fsf@zip.com.au \
    --to=user42@zip.com.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).