guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] 02/02: Add --r6rs command-line option


From: Andy Wingo
Subject: [Guile-commits] 02/02: Add --r6rs command-line option
Date: Wed, 25 Sep 2019 16:09:08 -0400 (EDT)

wingo pushed a commit to branch master
in repository guile.

commit afcc22f639665ed32f447c9a9f171c6871ae18b9
Author: Andy Wingo <address@hidden>
Date:   Wed Sep 25 22:08:12 2019 +0200

    Add --r6rs command-line option
    
    * doc/ref/guile-invoke.texi (Command-line Options): Document --r6rs.
    * doc/ref/r6rs.texi (R6RS Incompatibilities): Mention that --r6rs calls
      install-r6rs!.
    * module/ice-9/command-line.scm (*usage*, compile-shell-switches):
      Implement --r6rs.
---
 doc/ref/guile-invoke.texi     | 9 +++++++--
 doc/ref/r6rs.texi             | 4 ++++
 module/ice-9/command-line.scm | 6 ++++++
 3 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/doc/ref/guile-invoke.texi b/doc/ref/guile-invoke.texi
index 171a30a..d7b3d8a 100644
--- a/doc/ref/guile-invoke.texi
+++ b/doc/ref/guile-invoke.texi
@@ -1,7 +1,7 @@
 @c -*-texinfo-*-
 @c This is part of the GNU Guile Reference Manual.
-@c Copyright (C)  1996, 1997, 2000-2005, 2010, 2011, 2013, 2014,
-@c   2016 Free Software Foundation, Inc.
+@c Copyright (C) 1996-1997,2000-2005,2010-2011,2013-2014,2016,2019
+@c   Free Software Foundation, Inc.
 @c See the file guile.texi for copying conditions.
 
 @node Invoking Guile
@@ -137,6 +137,11 @@ Here is an example that loads the modules SRFI-8 
('receive') and SRFI-13
 guile --use-srfi=8,13
 @end example
 
+@item --r6rs
+@cindex r6rs (command line)
+Adapt Guile's initial environment to better support R6RS.  @xref{R6RS
+Incompatibilities}, for some caveats.
+
 @item --debug
 @cindex debugging virtual machine (command line)
 Start with the debugging virtual machine (VM) engine.  Using the
diff --git a/doc/ref/r6rs.texi b/doc/ref/r6rs.texi
index 62328be..9d326ff 100644
--- a/doc/ref/r6rs.texi
+++ b/doc/ref/r6rs.texi
@@ -119,6 +119,10 @@ conventions.  @xref{Load Paths}.  Also, enable R6RS 
unicode escapes in
 strings; see the discussion above.
 @end deffn
 
+Finally, note that the @code{--r6rs} command-line argument will call
+@code{install-r6rs!} before calling user code.  R6RS users probably want
+to pass this argument to their Guile.
+
 @node R6RS Standard Libraries
 @subsection R6RS Standard Libraries
 
diff --git a/module/ice-9/command-line.scm b/module/ice-9/command-line.scm
index ab22dca..a74f7e7 100644
--- a/module/ice-9/command-line.scm
+++ b/module/ice-9/command-line.scm
@@ -138,6 +138,8 @@ If FILE begins with `-' the -s switch is mandatory.
   -q             inhibit loading of user init file
   --use-srfi=LS  load SRFI modules for the SRFIs in LS,
                  which is a list of numbers like \"2,13,14\"
+  --r6rs         change initial Guile environment to better support
+                 R6RS
   -h, --help     display this help and exit
   -v, --version  display version information and exit
   \\              read arguments from following script lines"))
@@ -370,6 +372,10 @@ If FILE begins with `-' the -s switch is mandatory.
               (parse args
                      (cons `(use-srfis ',srfis) out))))
 
+           ((string=? "--r6rs" arg)
+            (parse args
+                   (cons '(install-r6rs!) out)))
+
            ((string=? arg "--listen")   ; start a repl server
             (parse args
                    (cons '((@@ (system repl server) spawn-server)) out)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]