guile-commits
[Top][All Lists]
Advanced

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

[Guile-commits] GNU Guile branch, master, updated. release_1-9-12-114-ge


From: Andy Wingo
Subject: [Guile-commits] GNU Guile branch, master, updated. release_1-9-12-114-ge2e2631
Date: Fri, 01 Oct 2010 11:45:23 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".

http://git.savannah.gnu.org/cgit/guile.git/commit/?id=e2e2631d7529842d3667573312c819cbeb7adc25

The branch, master has been updated
       via  e2e2631d7529842d3667573312c819cbeb7adc25 (commit)
       via  ab9c9100d21a0a1e770f71572c7f32287b50366b (commit)
       via  1f603ae28358198f2df6f8c2208053bd4777dcfa (commit)
       via  659c1e2927a8a1365b200d61a67302ad327e8d6c (commit)
       via  9866cfe48489919f4527adba94ce2b5f74895e41 (commit)
       via  1cfdb1bbcadfdba7b83677e5b25772ff0f38163e (commit)
       via  84898084c0a56dbcf1e4753ae73d4462425cf9fa (commit)
       via  1518f6494873c4bc4bced49d3e0e903f37c644c6 (commit)
       via  24259edb8b1d70dfa968d9182e835013ec1cdb9f (commit)
       via  edca9d6ef4024ba85701d55e461c16da0a0c5a76 (commit)
       via  427230476126554c5adde1e0b853c974e2caae55 (commit)
      from  542f975e608645122ff41d11f9b782009dadf9dd (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit e2e2631d7529842d3667573312c819cbeb7adc25
Author: Andy Wingo <address@hidden>
Date:   Fri Oct 1 13:17:44 2010 +0200

    deprecate turn-on-debugging, it is obsolete
    
    * libguile/script.c (scm_compile_shell_switches): Don't generate calls
      to turn-on-debugging.
    
    * module/ice-9/boot-9.scm (turn-on-debugging): Remove.
    
    * module/ice-9/deprecated.scm (turn-on-debugging): Add deprecated shim.

commit ab9c9100d21a0a1e770f71572c7f32287b50366b
Author: Andy Wingo <address@hidden>
Date:   Fri Oct 1 13:11:51 2010 +0200

    scm_debug_opts to debug.c, backtrace on by default, scm_*_opts internal 
linkage
    
    * libguile/eval.c:
    * libguile/debug.c (scm_debug_opts): Move here, from eval.c. Change
      SCM_BACKTRACE_P to 1, initially.
    
    * libguile/private-options.h: Make all options vars private.

commit 1f603ae28358198f2df6f8c2208053bd4777dcfa
Author: Andy Wingo <address@hidden>
Date:   Fri Oct 1 13:03:08 2010 +0200

    document call-with-error-handling
    
    * doc/ref/api-debug.texi (Pre-Unwind Debugging): Document
      call-with-error-handling.

commit 659c1e2927a8a1365b200d61a67302ad327e8d6c
Author: Andy Wingo <address@hidden>
Date:   Fri Oct 1 12:49:16 2010 +0200

    api-debug.texi refactors
    
    * doc/ref/api-debug.texi (Programmatic Error Handling): Rename from
      "Debug on Error". Reorganize subsections according to when the error
      is handled.
    * doc/ref/api-options.texi: Adapt xref.

commit 9866cfe48489919f4527adba94ce2b5f74895e41
Author: Andy Wingo <address@hidden>
Date:   Fri Oct 1 11:54:38 2010 +0200

    update tour.texi
    
    * doc/ref/tour.texi (Using the Guile Module System): Remove "in flux"
      language. Update examples to use #:export instead of (export ...).

commit 1cfdb1bbcadfdba7b83677e5b25772ff0f38163e
Author: Andy Wingo <address@hidden>
Date:   Fri Oct 1 11:47:53 2010 +0200

    finish cleaning out api-options.texi
    
    * doc/ref/api-debug.texi (Debug on Error): Move debug options here (for
      now). Leave debug-options-interface undocumented.
    
    * doc/ref/api-options.texi (Runtime Options): Remove debug options. Link
      to the sections where the options documentation is now. Update the
      options example transcript.

commit 84898084c0a56dbcf1e4753ae73d4462425cf9fa
Author: Andy Wingo <address@hidden>
Date:   Fri Oct 1 11:15:12 2010 +0200

    debug and readline options doc tweak
    
    * doc/ref/api-options.texi (Debugger options):
    * doc/ref/repl-modules.texi (Readline Options): Use 'help instead of
      'full (they are entirely equivalent right now). Update output to show
      options in the right order.

commit 1518f6494873c4bc4bced49d3e0e903f37c644c6
Author: Andy Wingo <address@hidden>
Date:   Fri Oct 1 11:09:28 2010 +0200

    move read and print options docs to the procedures they parameterize
    
    * doc/ref/api-evaluation.texi (Scheme Read): Fold all reader options
      docs into this section. Undocument read-options-interface.
      (Scheme Write): New section for `write' and `display', and the print
      options. print-enable/print-disable are not documented, as there are
      no boolean print options. print-options-interface is likewise
      undocumented.
    
    * doc/ref/api-options.texi: Remove discussion of options in
      general. Move read options to Scheme Read, and print options to Scheme
      Write.
    
    * doc/ref/api-io.texi (Reading): Link to Scheme Read.
      (Writing): Move write and display to Scheme Write, and link there.
    
    * doc/ref/srfi-modules.texi:
    * doc/ref/api-debug.texi:
    * doc/ref/api-data.texi: Update xrefs.

commit 24259edb8b1d70dfa968d9182e835013ec1cdb9f
Author: Andy Wingo <address@hidden>
Date:   Fri Oct 1 10:20:54 2010 +0200

    remove elisp-strings and elisp-vectors read options
    
    * libguile/private-options.h (SCM_ELISP_VECTORS_P, SCM_ESCAPED_PARENS_P):
    * libguile/read.c (scm_read_opts): Remove unused elisp-vectors option,
      and the elisp-strings option (which allowed \( and \) escapes in
      strings).
      (scm_read_string): Remove the elisp-strings case.
    
    * doc/ref/api-options.texi (Reader options): Update, and update wording
      of the case-insensitive bit.

commit edca9d6ef4024ba85701d55e461c16da0a0c5a76
Author: Andy Wingo <address@hidden>
Date:   Fri Oct 1 10:07:47 2010 +0200

    (foo-options 'full) displays options doc in correct order
    
    * libguile/options.c (get_documented_option_setting): Reverse options
      interface list before returning, so that they are in the original
      order.

commit 427230476126554c5adde1e0b853c974e2caae55
Author: Andy Wingo <address@hidden>
Date:   Fri Oct 1 09:56:15 2010 +0200

    remove unused print-options
    
    * libguile/private-options.h (SCM_PRINT_CLOSURE, SCM_PRINT_SOURCE_P):
    * libguile/print.c (scm_print_opts):
    * doc/ref/api-options.texi (Printing options): Remove source and
      closure-hook print options.

-----------------------------------------------------------------------

Summary of changes:
 doc/ref/api-data.texi       |    8 +-
 doc/ref/api-debug.texi      |  236 +++++++++++++++++++++++++++++-------
 doc/ref/api-evaluation.texi |  120 +++++++++++++++---
 doc/ref/api-io.texi         |   29 +----
 doc/ref/api-options.texi    |  285 ++++--------------------------------------
 doc/ref/repl-modules.texi   |    9 +-
 doc/ref/srfi-modules.texi   |    2 +-
 doc/ref/tour.texi           |   17 +--
 libguile/debug.c            |   33 +++++
 libguile/eval.c             |   29 -----
 libguile/options.c          |    2 +-
 libguile/print.c            |    4 -
 libguile/private-options.h  |   26 ++---
 libguile/read.c             |    9 --
 libguile/script.c           |    5 +-
 module/ice-9/boot-9.scm     |    4 -
 module/ice-9/deprecated.scm |   10 ++-
 17 files changed, 398 insertions(+), 430 deletions(-)

diff --git a/doc/ref/api-data.texi b/doc/ref/api-data.texi
index 82982e9..caa5d8e 100755
--- a/doc/ref/api-data.texi
+++ b/doc/ref/api-data.texi
@@ -2706,8 +2706,7 @@ it can be enabled with the reader option 
@code{r6rs-hex-escapes}.
 (read-enable 'r6rs-hex-escapes)
 @end lisp
 
-More on reader options in general can be found at (@pxref{Reader
-options}).
+For more on reader options, @xref{Scheme Read}.
 
 @node String Predicates
 @subsubsection String Predicates
@@ -5862,9 +5861,8 @@ recognizes the SRFI-88 read syntax @code{NAME:} 
(@pxref{SRFI-88}).
 Otherwise, tokens of this form are read as symbols.
 
 To enable and disable the alternative non-R5RS keyword syntax, you use
-the @code{read-set!} procedure documented in @ref{User level options
-interfaces} and @ref{Reader options}.  Note that the @code{prefix} and
address@hidden syntax are mutually exclusive.
+the @code{read-set!} procedure documented @ref{Scheme Read}.  Note that
+the @code{prefix} and @code{postfix} syntax are mutually exclusive.
 
 @lisp
 (read-set! keywords 'prefix)
diff --git a/doc/ref/api-debug.texi b/doc/ref/api-debug.texi
index 3f22e14..82efd74 100644
--- a/doc/ref/api-debug.texi
+++ b/doc/ref/api-debug.texi
@@ -16,7 +16,7 @@ infrastructure that builds on top of those calls.
 
 @menu
 * Evaluation Model::            Evaluation and the Scheme stack.
-* Debug on Error::              Debugging when an error occurs.
+* Programmatic Error Handling:: Debugging when an error occurs.
 * Traps::
 * Debugging Examples::
 @end menu
@@ -220,7 +220,7 @@ In the latter case, no source properties were stored, so 
the error
 doesn't have any source information.
 
 The recording of source properties is controlled by the read option
-named ``positions'' (@pxref{Reader options}).  This option is switched
+named ``positions'' (@pxref{Scheme Read}).  This option is switched
 @emph{on} by default.
 
 The following procedures can be used to access and set the source
@@ -277,8 +277,23 @@ a convenience to the user.
 @end deffn
 
 
address@hidden Debug on Error
address@hidden Debugging when an error occurs
address@hidden Programmatic Error Handling
address@hidden Programmatic Error Handling
+
+For better or for worse, all programs have bugs, and dealing with bugs
+is part of programming. This section deals with that class of bugs that
+causes an exception to be raised -- from your own code, from within a
+library, or from Guile itself.
+
address@hidden
+* Catching Exceptions::    Handling errors after the stack is unwound.
+* Capturing Stacks::       Capturing the stack at the time of error.
+* Pre-Unwind Debugging::   Debugging before the exception is thrown.
+* Debug Options::          A historical interface to debugging.
address@hidden menu
+
address@hidden Catching Exceptions
address@hidden Catching Exceptions
 
 A common requirement is to be able to show as much useful context as
 possible when a Scheme program hits an error.  The most immediate
@@ -290,8 +305,6 @@ the error is detected by C code) that signals the error, 
and is passed
 automatically to the handler procedure of the innermost applicable
 @code{catch} or @code{with-throw-handler} expression.
 
address@hidden Intercepting basic error information
-
 Therefore, to catch errors that occur within a chunk of Scheme code, and
 to intercept basic information about those errors, you need to execute
 that code inside the dynamic context of a @code{catch} or
@@ -311,12 +324,32 @@ this means you need something like this:
 @end lisp
 
 @noindent
-The @code{catch} here can also be @code{with-throw-handler}; see @ref{Throw
-Handlers} for information on the when you might want to use
address@hidden instead of @code{catch}. The @code{#t} means that the
-catch is applicable to all kinds of error; if you want to restrict your catch 
to
-just one kind of error, you can put the symbol for that kind of error instead 
of
address@hidden The equivalent to this in C would be something like this:
+The @code{catch} here can also be @code{with-throw-handler}; see
address@hidden Handlers} for information on the when you might want to use
address@hidden instead of @code{catch}.
+
+For example, to print out a message and return #f when an error occurs,
+you might use:
+
address@hidden
+(define (catch-all thunk)
+  (catch #t
+    thunk
+    (lambda (key . parameters)
+      (format (current-error-port)
+              "Uncaught throw to '~a: ~a\n" key parameters)
+      #f)))
+
+(catch-all
+ (lambda () (error "Not a vegetable: tomato")))
+=| Uncaught throw to 'misc-error: (#f ~A (Not a vegetable: tomato) #f)
address@hidden #f
address@hidden smalllisp
+
+The @code{#t} means that the catch is applicable to all kinds of error.
+If you want to restrict your catch to just one kind of error, you can
+put the symbol for that kind of error instead of @code{#t}. The
+equivalent to this in C would be something like this:
 
 @lisp
 SCM my_body_proc (void *body_data)
@@ -350,6 +383,7 @@ Again, as with the Scheme version, @code{scm_c_catch} could 
be replaced
 by @code{scm_c_with_throw_handler}, and @code{SCM_BOOL_T} could instead
 be the symbol for a particular kind of error.
 
address@hidden Capturing Stacks
 @subsubsection Capturing the full error stack
 
 The other interesting information about an error is the full Scheme
@@ -458,17 +492,6 @@ SCM my_preunwind_proc (void *handler_data,
 @}
 @end lisp
 
address@hidden
-Note that you don't have to wait until after the @code{catch} or
address@hidden has returned.  You can also do whatever you like with
-the stack immediately after it has been captured in the pre-unwind
-handler, or in the normal (post-unwind) handler.  (Except that for the
-latter case in C you will need to change @code{handler_data} in the
address@hidden(@dots{})} call to @code{&captured_stack}, so that
address@hidden has access to the captured stack.)
-
address@hidden Displaying or interrogating the captured stack
-
 Once you have a captured stack, you can interrogate and display its
 details in any way that you want, using the @address@hidden and
 @address@hidden API described in @ref{Examining the Stack} and
@@ -477,37 +500,164 @@ details in any way that you want, using the 
@address@hidden and
 If you want to print out a backtrace in the same format that the Guile
 REPL does, you can use the @code{display-backtrace} procedure to do so.
 You can also use @code{display-application} to display an individual
-application frame -- that is, a frame that satisfies the
address@hidden predicate -- in the Guile REPL format.
+frame in the Guile REPL format.
 
address@hidden What the Guile REPL does
address@hidden Pre-Unwind Debugging
address@hidden Pre-Unwind Debugging
 
-The Guile REPL code (in @file{system/repl/repl.scm} and related files)
-uses a @code{catch} with a pre-unwind handler to capture the stack when
-an error occurs in an expression that was typed into the REPL, and saves
-the captured stack in a fluid (@pxref{Fluids and Dynamic States}) called
address@hidden You can then use the @code{(backtrace)} command,
-which is basically equivalent to @code{(display-backtrace (fluid-ref
-the-last-stack))}, to print out this stack at any time until it is
-overwritten by the next error that occurs.
+Instead of saving a stack away and waiting for the @code{catch} to
+return, you can handle errors directly, from within the pre-unwind
+handler.
+
+For example, to show a backtrace when an error is thrown, you might want
+to use a procedure like this:
+
address@hidden
+(define (with-backtrace thunk)
+  (with-throw-handler #t
+                      thunk
+                      (lambda args (backtrace))))
+(with-backtrace (lambda () (error "Not a vegetable: tomato")))
address@hidden lisp
+
+Since we used @code{with-throw-handler} here, we didn't actually catch
+the error. @xref{Throw Handlers}, for more information. However, we did
+print out a context at the time of the error, using the built-in
+procedure, @code{backtrace}.
 
 @deffn {Scheme Procedure} backtrace [highlights]
 @deffnx {C Function} scm_backtrace_with_highlights (highlights)
 @deffnx {C Function} scm_backtrace ()
-Display a backtrace of the stack saved by the last error
-to the current output port.  If @var{highlights} is given
-it should be a list; the elements of this list will be
-highlighted wherever they appear in the backtrace.
+Display a backtrace of the current stack to the current output port.  If
address@hidden is given it should be a list; the elements of this list
+will be highlighted wherever they appear in the backtrace.
address@hidden deffn
+
+The Guile REPL code (in @file{system/repl/repl.scm} and related files)
+uses a @code{catch} with a pre-unwind handler to capture the stack when
+an error occurs in an expression that was typed into the REPL, and debug
+that stack interactively in the context of the error.
+
+These procedures are available for use by user programs, in the
address@hidden(system repl error-handling)} module.
+
address@hidden
+(use-modules (system repl error-handling))
address@hidden lisp
+
address@hidden {Scheme Procedure} call-with-error-handling thunk @
+       [#:on-error on-error='debug] [#:post-error post-error='catch] @
+       [#:pass-keys pass-keys='(quit)] [#:trap-handler trap-handler='debug]
+Call a thunk in a context in which errors are handled.
+
+There are four keyword arguments:
+
address@hidden @var
address@hidden on-error
+Specifies what to do before the stack is unwound.
+
+Valid options are @code{debug} (the default), which will enter a
+debugger; @code{pass}, in which case nothing is done, and the exception
+is rethrown; or a procedure, which will be the pre-unwind handler.
+
address@hidden post-error
+Specifies what to do after the stack is unwound.
+
+Valid options are @code{catch} (the default), which will silently catch
+errors, returning the unspecified value; @code{report}, which prints out
+a description of the error (via @code{display-error}), and then returns
+the unspecified value; or a procedure, which will be the catch handler.
+
address@hidden trap-handler
+Specifies a trap handler: what to do when a breakpoint is hit.
+
+Valid options are @code{debug}, which will enter the debugger;
address@hidden, which does nothing; or @code{disabled}, which disables
+traps entirely.  @xref{Traps}, for more information.
+
address@hidden pass-keys
+A set of keys to ignore, as a list.
address@hidden table
 @end deffn
 
-You can also use the @code{(debug)} command to explore the saved stack
-using an interactive command-line-driven debugger.  See @ref{Interactive
-Debugging} for more information about this.
address@hidden Debug Options
address@hidden Debug options
+
+The behavior when an error is the @code{backtrace} procedure and of the
+default error handler can be parameterized via the debug options.
+
address@hidden options - debug
address@hidden debug options
address@hidden {Scheme Procedure} debug-options [setting]
+Display the current settings of the debug options.  If @var{setting} is
+omitted, only a short form of the current read options is printed.
+Otherwise if @var{setting} is the symbol @code{help}, a complete options
+description is displayed.
address@hidden deffn
+
+The set of available options, and their default values, may be had by
+invoking @code{debug-options} at the prompt.
+
address@hidden
+scheme@@(guile-user)>
+backwards       no      Display backtrace in anti-chronological order.
+width           79      Maximal width of backtrace.
+depth           20      Maximal length of printed backtrace.
+backtrace       yes     Show backtrace on error.
+stack           1048576 Stack size limit (measured in words;
+                        0 = no check). 
+show-file-name  #t      Show file names and line numbers in backtraces
+                        when not `#f'.  A value of `base' displays only
+                        base names, while `#t' displays full names. 
+warn-deprecated no      Warn when deprecated features are used.
address@hidden smallexample
+
+The boolean options may be toggled with @code{debug-enable} and
address@hidden The non-boolean @code{keywords} option must be set
+using @code{debug-set!}.
 
address@hidden {Scheme Procedure} debug
-Invoke the Guile debugger to explore the context of the last error.
address@hidden {Scheme Procedure} debug-enable option-name
address@hidden {Scheme Procedure} debug-disable option-name
address@hidden {Scheme Procedure} debug-set! option-name value
+Modify the debug options.  @code{debug-enable} should be used with boolean
+options and switches them on, @code{debug-disable} switches them off.
address@hidden can be used to set an option to a specific value.
 @end deffn
 
address@hidden Stack overflow
+
address@hidden overflow, stack
address@hidden stack overflow
+Stack overflow errors are caused by a computation trying to use more
+stack space than has been enabled by the @code{stack} option.  They are
+reported like this:
+
address@hidden
+(non-tail-recursive-factorial 500)
address@hidden
+ERROR: Stack overflow
+ABORT: (stack-overflow)
address@hidden lisp
+
+If you get an error like this, you can either try rewriting your code to
+use less stack space, or increase the maximum stack size.  To increase
+the maximum stack size, use @code{debug-set!}, for example:
+
address@hidden
+(debug-set! stack 200000)
address@hidden
+(show-file-name #t stack 200000 debug backtrace depth 20
+   maxdepth 1000 frames 3 indent 10 width 79 procnames cheap)
+
+(non-tail-recursive-factorial 500)
address@hidden
address@hidden
address@hidden lisp
+
+If you prefer to try rewriting your code, you may be able to save stack
+space by making some of your procedures @dfn{tail recursive}
+(@pxref{Tail Calls}).
+
 
 @node Traps
 @subsection Traps
diff --git a/doc/ref/api-evaluation.texi b/doc/ref/api-evaluation.texi
index 036e92a..a050a79 100644
--- a/doc/ref/api-evaluation.texi
+++ b/doc/ref/api-evaluation.texi
@@ -13,6 +13,7 @@ loading, evaluating, and compiling Scheme code at run time.
 @menu
 * Scheme Syntax::               Standard and extended Scheme syntax.
 * Scheme Read::                 Reading Scheme code.
+* Scheme Write::                Writing Scheme values to a port.
 * Fly Evaluation::              Procedures for on the fly evaluation.
 * Compilation::                 How to compile Scheme files and procedures.
 * Loading::                     Loading Scheme code from file.
@@ -265,8 +266,8 @@ Guile-Whuzzy
 are the same in R5RS Scheme, but are different in Guile.
 
 It is possible to turn off case sensitivity in Guile by setting the
-reader option @code{case-insensitive}.  More on reader options can be
-found at (@pxref{Reader options}).
+reader option @code{case-insensitive}.  For more information on reader
+options, @xref{Scheme Read}.
 
 @lisp
 (read-enable 'case-insensitive)
@@ -307,25 +308,36 @@ Any whitespace before the next token is discarded.
 @end deffn
 
 The behaviour of Guile's Scheme reader can be modified by manipulating
-its read options.  For more information about options, @xref{User level
-options interfaces}.  If you want to know which reader options are
-available, @xref{Reader options}.
-
address@hidden FIXME::martin: This is taken from libguile/options.c.  Is there 
address@hidden actually a difference between 'help and 'full?
+its read options.
 
address@hidden options - read
address@hidden read options
 @deffn {Scheme Procedure} read-options [setting]
 Display the current settings of the read options.  If @var{setting} is
 omitted, only a short form of the current read options is printed.
-Otherwise, @var{setting} should be one of the following symbols:
address@hidden @code
address@hidden help
-Display the complete option settings.
address@hidden full
-Like @code{help}, but also print programmer options.
address@hidden table
+Otherwise if @var{setting} is the symbol @code{help}, a complete options
+description is displayed.
 @end deffn
 
+The set of available options, and their default values, may be had by
+invoking @code{read-options} at the prompt.
+
address@hidden
+scheme@@(guile-user)> (read-options)
+(square-brackets keywords #f positions)
+scheme@@(guile-user)> (read-options 'help)
+copy              no    Copy source code expressions.
+positions         yes   Record positions of source code expressions.
+case-insensitive  no    Convert symbols to lower case.
+keywords          #f    Style of keyword recognition: #f, 'prefix or 'postfix.
+r6rs-hex-escapes  no    Use R6RS variable-length character and string hex 
escapes.
+square-brackets   yes   Treat `[' and `]' as parentheses, for R6RS 
compatibility.
address@hidden smalllisp
+
+The boolean options may be toggled with @code{read-enable} and
address@hidden The non-boolean @code{keywords} option must be set
+using @code{read-set!}.
+
 @deffn {Scheme Procedure} read-enable option-name
 @deffnx {Scheme Procedure} read-disable option-name
 @deffnx {Scheme Procedure} read-set! option-name value
@@ -334,11 +346,79 @@ options and switches them on, @code{read-disable} 
switches them off.
 @code{read-set!} can be used to set an option to a specific value.
 @end deffn
 
address@hidden {Scheme Procedure} read-options-interface [setting]
address@hidden {C Function} scm_read_options (setting)
-Option interface for the read options. Instead of using
-this procedure directly, use the procedures @code{read-enable},
address@hidden, @code{read-set!} and @code{read-options}.
+For example, to make @code{read} fold all symbols to their lower case
+(perhaps for compatibility with older Scheme code), you can enter:
+
address@hidden
+(read-enable 'case-insensitive)
address@hidden lisp
+
+For more information on the effect of the @code{r6rs-hex-escapes} option, see
+(@pxref{String Syntax}).
+
+
address@hidden Scheme Write
address@hidden Writing Scheme Values
+
+Any scheme value may be written to a port. Not all values may be read
+back in (@pxref{Scheme Read}), however.
+
address@hidden write
address@hidden print
address@hidden {Scheme Procedure} write obj [port]
+Send a representation of @var{obj} to @var{port} or to the current
+output port if not given.
+
+The output is designed to be machine readable, and can be read back
+with @code{read} (@pxref{Scheme Read}).  Strings are printed in
+double quotes, with escapes if necessary, and characters are printed in
address@hidden notation.
address@hidden deffn
+
address@hidden display
address@hidden {Scheme Procedure} display obj [port]
+Send a representation of @var{obj} to @var{port} or to the current
+output port if not given.
+
+The output is designed for human readability, it differs from
address@hidden in that strings are printed without double quotes and
+escapes, and characters are printed as per @code{write-char}, not in
address@hidden form.
address@hidden deffn
+
+As was the case with the Scheme reader, there are a few options that
+affect the behavior of the Scheme printer.
+
address@hidden options - print
address@hidden print options
address@hidden {Scheme Procedure} print-options [setting]
+Display the current settings of the read options.  If @var{setting} is
+omitted, only a short form of the current read options is
+printed. Otherwise if @var{setting} is the symbol @code{help}, a
+complete options description is displayed.
address@hidden deffn
+
+The set of available options, and their default values, may be had by
+invoking @code{print-options} at the prompt.
+
address@hidden
+scheme@@(guile-user)> (print-options)
+(quote-keywordish-symbols reader highlight-suffix "@}" highlight-prefix "@{")
+scheme@@(guile-user)> (print-options 'help)
+highlight-prefix          @{       The string to print before highlighted 
values.
+highlight-suffix          @}       The string to print after highlighted 
values.
+quote-keywordish-symbols  reader  How to print symbols that have a colon
+                                  as their first or last character. The
+                                  value '#f' does not quote the colons;
+                                  '#t' quotes them; 'reader' quotes them
+                                  when the reader option 'keywords' is
+                                  not '#f'.
address@hidden smalllisp
+
+These options may be modified with the print-set! procedure.
+
address@hidden {Scheme Procedure} print-set! option-name value
+Modify the print options.
 @end deffn
 
 
diff --git a/doc/ref/api-io.texi b/doc/ref/api-io.texi
index 83474a1..e2b1b51 100644
--- a/doc/ref/api-io.texi
+++ b/doc/ref/api-io.texi
@@ -174,6 +174,9 @@ created.
 
 [Generic procedures for reading from ports.]
 
+These procedures pertain to reading characters and strings from
+ports. To read general S-expressions from ports, @xref{Scheme Read}.
+
 @rnindex eof-object?
 @cindex End of file object
 @deffn {Scheme Procedure} eof-object? x
@@ -299,34 +302,16 @@ Set the current column or line number of @var{port}.
 
 [Generic procedures for writing to ports.]
 
+These procedures are for writing characters and strings to
+ports. For more information on writing arbitrary Scheme objects to
+ports, @xref{Scheme Write}.
+
 @deffn {Scheme Procedure} get-print-state port
 @deffnx {C Function} scm_get_print_state (port)
 Return the print state of the port @var{port}.  If @var{port}
 has no associated print state, @code{#f} is returned.
 @end deffn
 
address@hidden write
address@hidden {Scheme Procedure} write obj [port]
-Send a representation of @var{obj} to @var{port} or to the current
-output port if not given.
-
-The output is designed to be machine readable, and can be read back
-with @code{read} (@pxref{Reading}).  Strings are printed in
-double quotes, with escapes if necessary, and characters are printed in
address@hidden notation.
address@hidden deffn
-
address@hidden display
address@hidden {Scheme Procedure} display obj [port]
-Send a representation of @var{obj} to @var{port} or to the current
-output port if not given.
-
-The output is designed for human readability, it differs from
address@hidden in that strings are printed without double quotes and
-escapes, and characters are printed as per @code{write-char}, not in
address@hidden form.
address@hidden deffn
-
 @rnindex newline
 @deffn {Scheme Procedure} newline [port]
 @deffnx {C Function} scm_newline (port)
diff --git a/doc/ref/api-options.texi b/doc/ref/api-options.texi
index b046633..02ea209 100644
--- a/doc/ref/api-options.texi
+++ b/doc/ref/api-options.texi
@@ -374,225 +374,17 @@ than to test for the corresponding feature using 
@code{provided?}.
 @node Runtime Options
 @subsection Runtime Options
 
-Guile's runtime behaviour can be modified by setting options.  For
-example, is the language that Guile accepts case sensitive, or should
-the debugger automatically show a backtrace on error?
+There are a number of runtime options available for paramaterizing
+built-in procedures, like @code{read}, and built-in behavior, like what
+happens on an uncaught error.
 
-Guile has two levels of interface for managing options: a low-level
-control interface, and a user-level interface which allows the enabling
-or disabling of options.
+For more information on reader options, @xref{Scheme Read}.
 
-Moreover, the options are classified in groups according to whether they
-configure @emph{reading}, @emph{printing}, @emph{debugging} or
address@hidden
+For more information on print options, @xref{Scheme Write}.
 
address@hidden
-* Low level options interfaces::
-* User level options interfaces::
-* Reader options::
-* Printing options::
-* Debugger options::
-* Examples of option use::
address@hidden menu
-
-
address@hidden Low level options interfaces
address@hidden Low Level Options Interfaces
-
address@hidden {Scheme Procedure} read-options-interface [setting]
address@hidden {Scheme Procedure} print-options-interface [setting]
address@hidden {Scheme Procedure} debug-options-interface [setting]
address@hidden {C Function} scm_read_options (setting)
address@hidden {C Function} scm_print_options (setting)
address@hidden {C Function} scm_debug_options (setting)
-If one of these procedures is called with no arguments (or with
address@hidden == SCM_UNDEFINED} in C code), it returns a list describing
-the current setting of the read, eval, print, debug or evaluator traps
-options respectively.  The setting of a boolean option is indicated
-simply by the presence or absence of the option symbol in the list.  The
-setting of a non-boolean option is indicated by the presence of the
-option symbol immediately followed by the option's current value.
-
-If called with a list argument, these procedures interpret the list as
-an option setting and modify the relevant options accordingly.  [FIXME
---- this glosses over a lot of details!]
-
-If called with any other argument, such as @code{'help}, these
-procedures return a list of entries like @code{(@var{OPTION-SYMBOL}
address@hidden @var{DOC-STRING})}, with each entry giving the
-default value and documentation for each option symbol in the relevant
-set of options.
address@hidden deffn
-
-
address@hidden User level options interfaces
address@hidden User Level Options Interfaces
-
address@hidden @deftp {Data type} scm_option
address@hidden @code{scm_option} is used to represent run time options.  It can 
be a
address@hidden @emph{boolean} type, in which case the option will be set by the 
strings
address@hidden @code{"yes"} and @code{"no"}.  It can be a
address@hidden @end deftp
-
address@hidden NJFIXME
address@hidden {Scheme Procedure} <group>-options [arg]
address@hidden {Scheme Procedure} read-options [arg]
address@hidden {Scheme Procedure} print-options [arg]
address@hidden {Scheme Procedure} debug-options [arg]
-These functions list the options in their group.  The optional argument
address@hidden is a symbol which modifies the form in which the options are
-presented.
-
-With no arguments, @code{<group>-options} returns the values of the
-options in that particular group.  If @var{arg} is @code{'help}, a
-description of each option is given.  If @var{arg} is @code{'full},
-programmers' options are also shown.
-
address@hidden can also be a list representing the state of all options.  In
-this case, the list contains single symbols (for enabled boolean
-options) and symbols followed by values.
address@hidden deffn
-[FIXME: I don't think 'full is ever any different from 'help.  What's
-up?]
-
address@hidden NJFIXME
address@hidden {Scheme Procedure} <group>-enable option-symbol
address@hidden {Scheme Procedure} read-enable option-symbol
address@hidden {Scheme Procedure} print-enable option-symbol
address@hidden {Scheme Procedure} debug-enable option-symbol
-These functions set the specified @var{option-symbol} in their options
-group.  They only work if the option is boolean, and throw an error
-otherwise.
address@hidden deffn
-
address@hidden NJFIXME
address@hidden {Scheme Procedure} <group>-disable option-symbol
address@hidden {Scheme Procedure} read-disable option-symbol
address@hidden {Scheme Procedure} print-disable option-symbol
address@hidden {Scheme Procedure} debug-disable option-symbol
-These functions turn off the specified @var{option-symbol} in their
-options group.  They only work if the option is boolean, and throw an
-error otherwise.
address@hidden deffn
-
address@hidden NJFIXME
address@hidden syntax <group>-set! option-symbol value
address@hidden syntax read-set! option-symbol value
address@hidden syntax print-set! option-symbol value
address@hidden syntax debug-set! option-symbol value
-These functions set a non-boolean @var{option-symbol} to the specified
address@hidden
address@hidden deffn
-
-
address@hidden Reader options
address@hidden Reader options
address@hidden options - read
address@hidden read options
-
-Here is the list of reader options generated by typing
address@hidden(read-options 'full)} in Guile.  You can also see the default
-values.
-
address@hidden
-keywords         #f      Style of keyword recognition: #f, 'prefix or 'postfix
-case-insensitive no      Convert symbols to lower case.
-positions        yes     Record positions of source code expressions.
-copy             no      Copy source code expressions.
-r6rs-hex-escapes no      Use R6RS-style string hex escapes
address@hidden smalllisp
-
-Notice that while Standard Scheme is case insensitive, to ease
-translation of other Lisp dialects, notably Emacs Lisp, into Guile,
-Guile is case-sensitive by default.
-
-To make Guile case insensitive, you can type
-
address@hidden
-(read-enable 'case-insensitive)
address@hidden lisp
-
-For more information on the effect of the @code{r6rs-hex-escapes} option, see
-(@pxref{String Syntax}).
+Finally, for more information on debugger options, @xref{Debug
+Options}.
 
address@hidden Printing options
address@hidden Printing options
-
-Here is the list of print options generated by typing
address@hidden(print-options 'full)} in Guile.  You can also see the default
-values.
-
address@hidden
-quote-keywordish-symbols reader How to print symbols that have a colon
-                                as their first or last character. The
-                                value '#f' does not quote the colons;
-                                '#t' quotes them; 'reader' quotes
-                                them when the reader option
-                                'keywords' is not '#f'.
-
-highlight-prefix         @{      The string to print before highlighted values.
-highlight-suffix         @}      The string to print after highlighted values.
-
-source                   no     Print closures with source.
-closure-hook             #f     Hook for printing closures.
address@hidden smallexample
-
-
address@hidden Debugger options
address@hidden Debugger options
-
-Here is the list of print options generated by typing
address@hidden(debug-options 'full)} in Guile.  You can also see the default
-values.
-
address@hidden
-warn-deprecated        no      Warn when deprecated features are used.
-show-file-name #t      Show file names and line numbers in backtraces
-                        when not `#f'.  A value of `base' displays only
-                        base names, while `#t' displays full names.
-stack          1048576 Stack size limit (measured in words; 0 = no check).
-backtrace      yes     Show backtrace on error.
-depth          20      Maximal length of printed backtrace.
-width          79      Maximal width of backtrace.
-backwards      no      Display backtrace in anti-chronological order.
address@hidden smallexample
-
address@hidden Stack overflow
-
address@hidden overflow, stack
address@hidden stack overflow
-Stack overflow errors are caused by a computation trying to use more
-stack space than has been enabled by the @code{stack} option.  They are
-reported like this:
-
address@hidden
-(non-tail-recursive-factorial 500)
address@hidden
-ERROR: Stack overflow
-ABORT: (stack-overflow)
address@hidden lisp
-
-If you get an error like this, you can either try rewriting your code to
-use less stack space, or increase the maximum stack size.  To increase
-the maximum stack size, use @code{debug-set!}, for example:
-
address@hidden
-(debug-set! stack 200000)
address@hidden
-(show-file-name #t stack 200000 debug backtrace depth 20
-   maxdepth 1000 frames 3 indent 10 width 79 procnames cheap)
-
-(non-tail-recursive-factorial 500)
address@hidden
address@hidden
address@hidden lisp
-
-If you prefer to try rewriting your code, you may be able to save stack
-space by making some of your procedures @dfn{tail recursive}
-(@pxref{Tail Calls}).
-
-
address@hidden Examples of option use
 @subsubsection Examples of option use
 
 Here is an example of a session in which some read and debug option
@@ -607,53 +399,32 @@ is set to ``no''.
 @item
 Enables @code{case-insensitive}
 @item
-Verifies that now @code{aBc} and @code{abc} are the same
address@hidden
-Disables @code{case-insensitive} and enables debugging @code{backtrace}
+Quits the recursive prompt
 @item
-Reproduces the error of displaying @code{aBc} with backtracing enabled
-[FIXME: this last example is lame because there is no depth in the
-backtrace.  Need to give a better example, possibly putting debugging
-option examples in a separate session.]
+Verifies that now @code{aBc} and @code{abc} are the same
 @end enumerate
 
 @smalllisp
-guile> (define abc "hello")
-guile> abc
-"hello"
-guile> aBc
-ERROR: In expression aBc:
-ERROR: Unbound variable: aBc
-ABORT: (misc-error)
-
-Type "(backtrace)" to get more information.
-guile> (read-options 'help)
-keywords       #f      Style of keyword recognition: #f, 'prefix or 'postfix
-case-insensitive       no      Convert symbols to lower case.
-positions      yes     Record positions of source code expressions.
-copy           no      Copy source code expressions.
-guile> (debug-options 'help)
-stack          20000   Stack size limit (0 = no check).
-backtrace      no      Show backtrace on error.
-depth          20      Maximal length of printed backtrace.
-backwards      no      Display backtrace in anti-chronological order.
-guile> (read-enable 'case-insensitive)
-(keywords #f case-insensitive positions)
-guile> aBc
-"hello"
-guile> (read-disable 'case-insensitive)
-(keywords #f positions)
-guile> (debug-enable 'backtrace)
-(stack 20000 debug backtrace depth 20 maxdepth 1000 frames 3 indent 10 
procnames cheap)
-guile> aBc
-
-Backtrace:
-0* aBc
-
-ERROR: In expression aBc:
+scheme@@(guile-user)> (define abc "hello")
+scheme@@(guile-user)> abc
+$1 = "hello"
+scheme@@(guile-user)> aBc
+<unknown-location>: warning: possibly unbound variable `aBc'
+ERROR: In procedure module-lookup:
 ERROR: Unbound variable: aBc
-ABORT: (misc-error)
-guile>
+Entering a new prompt.  Type `,bt' for a backtrace or `,q' to continue.
+scheme@@(guile-user) [1]> (read-options 'help)
+copy              no    Copy source code expressions.
+positions         yes   Record positions of source code expressions.
+case-insensitive  no    Convert symbols to lower case.
+keywords          #f    Style of keyword recognition: #f, 'prefix or 'postfix.
+r6rs-hex-escapes  no    Use R6RS variable-length character and string hex 
escapes.
+square-brackets   yes   Treat `[' and `]' as parentheses, for R6RS 
compatibility.
+scheme@@(guile-user) [1]> (read-enable 'case-insensitive)
+$2 = (square-brackets keywords #f case-insensitive positions)
+scheme@@(guile-user) [1]> ,q
+scheme@@(guile-user)> aBc
+$3 = "hello"
 @end smalllisp
 
 
diff --git a/doc/ref/repl-modules.texi b/doc/ref/repl-modules.texi
index 21f6520..78c7eee 100644
--- a/doc/ref/repl-modules.texi
+++ b/doc/ref/repl-modules.texi
@@ -97,13 +97,14 @@ debugging options (@pxref{Runtime Options}).
 @findex readline-disable
 @findex readline-set!
 Here is the list of readline options generated by typing
address@hidden(readline-options 'full)} in Guile.  You can also see the
address@hidden(readline-options 'help)} in Guile.  You can also see the
 default values.
 
 @smalllisp
-bounce-parens   500   Time (ms) to show matching opening parenthesis (0 = off).
-history-length  200   History length.
-history-file    yes   Use history file.
+history-file    yes     Use history file.
+history-length  200     History length.
+bounce-parens   500     Time (ms) to show matching opening parenthesis
+                        (0 = off).
 @end smalllisp
 
 The history length specifies how many input lines will be remembered.
diff --git a/doc/ref/srfi-modules.texi b/doc/ref/srfi-modules.texi
index 188a71c..a277c4b 100644
--- a/doc/ref/srfi-modules.texi
+++ b/doc/ref/srfi-modules.texi
@@ -4244,7 +4244,7 @@ Answer a hash value appropriate for equality predicate 
@code{equal?},
 @dfn{keyword objects}, which are equivalent to Guile's keywords
 (@pxref{Keywords}).  SRFI-88 keywords can be entered using the
 @dfn{postfix keyword syntax}, which consists of an identifier followed
-by @code{:} (@pxref{Reader options, @code{postfix} keyword syntax}).
+by @code{:} (@pxref{Scheme Read, @code{postfix} keyword syntax}).
 SRFI-88 can be made available with:
 
 @example
diff --git a/doc/ref/tour.texi b/doc/ref/tour.texi
index 0c8b7e4..9d378da 100644
--- a/doc/ref/tour.texi
+++ b/doc/ref/tour.texi
@@ -188,10 +188,7 @@ Guile has support for dividing a program into 
@dfn{modules}.  By using
 modules, you can group related code together and manage the
 composition of complete programs from largely independent parts.
 
-(Although the module system implementation is in flux, feel free to use it
-anyway.  Guile will provide reasonable backwards compatibility.)
-
-Details on the module system beyond this introductory material can be found in
+For more details on the module system beyond this introductory material,
 @xref{Modules}.
 
 @menu
@@ -239,8 +236,8 @@ session shows a simple example.
 @smallexample
 $ cat /usr/local/share/guile/foo/bar.scm
 
-(define-module (foo bar))
-(export frob)
+(define-module (foo bar)
+  #:export (frob))
 
 (define (frob x) (* 2 x))
 
@@ -262,8 +259,8 @@ call @code{load-extension} directly in the body of the 
module.
 @smallexample
 $ cat /usr/local/share/guile/math/bessel.scm
 
-(define-module (math bessel))
-(export j0)
+(define-module (math bessel)
+  #:export (j0))
 
 (load-extension "libguile-bessel" "init_bessel")
 
@@ -275,9 +272,7 @@ scheme@@(guile-user)> (j0 2)
 $1 = 0.223890779141236
 @end smallexample
 
-There is also a way to manipulate the module system from C but only
-Scheme files can be autoloaded.  Thus, we recommend that you define
-your modules in Scheme.
address@hidden and Extensions}, for more information.
 
 @lowersections
 
diff --git a/libguile/debug.c b/libguile/debug.c
index ab085f4..dd65de4 100644
--- a/libguile/debug.c
+++ b/libguile/debug.c
@@ -59,6 +59,39 @@
 
 
 
+/*
+ * Debugging options.
+ */
+
+scm_t_option scm_debug_opts[] = {
+  { SCM_OPTION_BOOLEAN, "backwards", 0,
+    "Display backtrace in anti-chronological order." },
+  { SCM_OPTION_INTEGER, "width", 79, "Maximal width of backtrace." },
+  { SCM_OPTION_INTEGER, "depth", 20, "Maximal length of printed backtrace." },
+  { SCM_OPTION_BOOLEAN, "backtrace", 1, "Show backtrace on error." },
+  /* This default stack limit will be overridden by init_stack_limit(),
+     if we have getrlimit() and the stack limit is not INFINITY. But it is 
still
+     important, as some systems have both the soft and the hard limits set to
+     INFINITY; in that case we fall back to this value.
+
+     The situation is aggravated by certain compilers, which can consume
+     "beaucoup de stack", as they say in France.
+
+     See http://thread.gmane.org/gmane.lisp.guile.devel/8599/focus=8662 for
+     more discussion. This setting is 640 KB on 32-bit arches (should be enough
+     for anyone!) or a whoppin' 1280 KB on 64-bit arches.
+  */
+  { SCM_OPTION_INTEGER, "stack", 160000, "Stack size limit (measured in words; 
0 = no check)." },
+  { SCM_OPTION_SCM, "show-file-name", (unsigned long)SCM_BOOL_T,
+    "Show file names and line numbers "
+    "in backtraces when not `#f'.  A value of `base' "
+    "displays only base names, while `#t' displays full names."},
+  { SCM_OPTION_BOOLEAN, "warn-deprecated", 0,
+    "Warn when deprecated features are used." },
+  { 0 }, 
+};
+
+
 /* {Run time control of the debugging evaluator}
  */
 
diff --git a/libguile/eval.c b/libguile/eval.c
index 21cb550..293612e 100644
--- a/libguile/eval.c
+++ b/libguile/eval.c
@@ -435,35 +435,6 @@ eval (SCM x, SCM env)
     }
 }
 
-scm_t_option scm_debug_opts[] = {
-  { SCM_OPTION_BOOLEAN, "backwards", 0,
-    "Display backtrace in anti-chronological order." },
-  { SCM_OPTION_INTEGER, "width", 79, "Maximal width of backtrace." },
-  { SCM_OPTION_INTEGER, "depth", 20, "Maximal length of printed backtrace." },
-  { SCM_OPTION_BOOLEAN, "backtrace", 0, "Show backtrace on error." },
-  /* This default stack limit will be overridden by debug.c:init_stack_limit(),
-     if we have getrlimit() and the stack limit is not INFINITY. But it is 
still
-     important, as some systems have both the soft and the hard limits set to
-     INFINITY; in that case we fall back to this value.
-
-     The situation is aggravated by certain compilers, which can consume
-     "beaucoup de stack", as they say in France.
-
-     See http://thread.gmane.org/gmane.lisp.guile.devel/8599/focus=8662 for
-     more discussion. This setting is 640 KB on 32-bit arches (should be enough
-     for anyone!) or a whoppin' 1280 KB on 64-bit arches.
-  */
-  { SCM_OPTION_INTEGER, "stack", 160000, "Stack size limit (measured in words; 
0 = no check)." },
-  { SCM_OPTION_SCM, "show-file-name", (unsigned long)SCM_BOOL_T,
-    "Show file names and line numbers "
-    "in backtraces when not `#f'.  A value of `base' "
-    "displays only base names, while `#t' displays full names."},
-  { SCM_OPTION_BOOLEAN, "warn-deprecated", 0,
-    "Warn when deprecated features are used." },
-  { 0 }, 
-};
-
-
 
 
 /* Simple procedure calls
diff --git a/libguile/options.c b/libguile/options.c
index 6e4c187..0e08314 100644
--- a/libguile/options.c
+++ b/libguile/options.c
@@ -148,7 +148,7 @@ get_documented_option_setting (const scm_t_option options[])
       ls = scm_cons (SCM_PACK (options[i].name), ls);
       ans = scm_cons (ls, ans);
     }
-  return ans;
+  return scm_reverse_x (ans, SCM_UNDEFINED);
 }
 
 
diff --git a/libguile/print.c b/libguile/print.c
index ad3e8c0..8c807bb 100644
--- a/libguile/print.c
+++ b/libguile/print.c
@@ -89,10 +89,6 @@ static const char *iflagnames[] =
 SCM_SYMBOL (sym_reader, "reader");
 
 scm_t_option scm_print_opts[] = {
-  { SCM_OPTION_SCM, "closure-hook", (unsigned long) SCM_BOOL_F,
-    "Hook for printing closures (should handle macros as well)." },
-  { SCM_OPTION_BOOLEAN, "source", 0,
-    "Print closures with source." },
   { SCM_OPTION_SCM, "highlight-prefix", (unsigned long)SCM_BOOL_F,
     "The string to print before highlighted values." },
   { SCM_OPTION_SCM, "highlight-suffix", (unsigned long)SCM_BOOL_F,
diff --git a/libguile/private-options.h b/libguile/private-options.h
index 88f63f8..2c27214 100644
--- a/libguile/private-options.h
+++ b/libguile/private-options.h
@@ -28,7 +28,7 @@
 /*
   debugging.
  */
-SCM_API scm_t_option scm_debug_opts[];
+SCM_INTERNAL scm_t_option scm_debug_opts[];
 
 #define SCM_BACKWARDS_P                scm_debug_opts[0].val
 #define SCM_BACKTRACE_WIDTH    scm_debug_opts[1].val
@@ -43,31 +43,27 @@ SCM_API scm_t_option scm_debug_opts[];
 /*
   printing
 */
-SCM_API scm_t_option scm_print_opts[];
+SCM_INTERNAL scm_t_option scm_print_opts[];
 
-#define SCM_PRINT_CLOSURE          (SCM_PACK (scm_print_opts[0].val))
-#define SCM_PRINT_SOURCE_P         ((int) scm_print_opts[1].val)
-#define SCM_PRINT_HIGHLIGHT_PREFIX  (SCM_PACK (scm_print_opts[2].val))
-#define SCM_PRINT_HIGHLIGHT_SUFFIX  (SCM_PACK (scm_print_opts[3].val))
-#define SCM_PRINT_KEYWORD_STYLE_I   4
-#define SCM_PRINT_KEYWORD_STYLE     (SCM_PACK (scm_print_opts[4].val))
-#define SCM_N_PRINT_OPTIONS 5
+#define SCM_PRINT_HIGHLIGHT_PREFIX  (SCM_PACK (scm_print_opts[0].val))
+#define SCM_PRINT_HIGHLIGHT_SUFFIX  (SCM_PACK (scm_print_opts[1].val))
+#define SCM_PRINT_KEYWORD_STYLE_I   2
+#define SCM_PRINT_KEYWORD_STYLE     (SCM_PACK (scm_print_opts[2].val))
+#define SCM_N_PRINT_OPTIONS 3
 
 
 /*
   read
  */
-SCM_API scm_t_option scm_read_opts[];
+SCM_INTERNAL scm_t_option scm_read_opts[];
 
 #define SCM_COPY_SOURCE_P      scm_read_opts[0].val
 #define SCM_RECORD_POSITIONS_P scm_read_opts[1].val
 #define SCM_CASE_INSENSITIVE_P scm_read_opts[2].val
 #define SCM_KEYWORD_STYLE      scm_read_opts[3].val
-#define SCM_ELISP_VECTORS_P    scm_read_opts[4].val
-#define SCM_ESCAPED_PARENS_P   scm_read_opts[5].val
-#define SCM_R6RS_ESCAPES_P     scm_read_opts[6].val
-#define SCM_SQUARE_BRACKETS_P  scm_read_opts[7].val
+#define SCM_R6RS_ESCAPES_P     scm_read_opts[4].val
+#define SCM_SQUARE_BRACKETS_P  scm_read_opts[5].val
 
-#define SCM_N_READ_OPTIONS 8
+#define SCM_N_READ_OPTIONS 6
 
 #endif  /* PRIVATE_OPTIONS */ 
diff --git a/libguile/read.c b/libguile/read.c
index 49df1e3..118b9cc 100644
--- a/libguile/read.c
+++ b/libguile/read.c
@@ -71,10 +71,6 @@ scm_t_option scm_read_opts[] = {
     "Convert symbols to lower case."},
   { SCM_OPTION_SCM, "keywords", (unsigned long) SCM_BOOL_F,
     "Style of keyword recognition: #f, 'prefix or 'postfix."},
-  { SCM_OPTION_BOOLEAN, "elisp-vectors", 0,
-    "Support Elisp vector syntax, namely `[...]'."},
-  { SCM_OPTION_BOOLEAN, "elisp-strings", 0,
-    "Support `\\(' and `\\)' in strings."},
   { SCM_OPTION_BOOLEAN, "r6rs-hex-escapes", 0,
     "Use R6RS variable-length character and string hex escapes."},
   { SCM_OPTION_BOOLEAN, "square-brackets", 1,
@@ -515,11 +511,6 @@ scm_read_string (int chr, SCM port)
             case '"':
             case '\\':
               break;
-            case '(':
-            case ')':
-              if (SCM_ESCAPED_PARENS_P)
-                break;
-              goto bad_escaped;
             case '\n':
               continue;
             case '0':
diff --git a/libguile/script.c b/libguile/script.c
index 088c06b..318e5aa 100644
--- a/libguile/script.c
+++ b/libguile/script.c
@@ -406,7 +406,6 @@ SCM_SYMBOL (sym_load, "load");
 SCM_SYMBOL (sym_eval_string, "eval-string");
 SCM_SYMBOL (sym_command_line, "command-line");
 SCM_SYMBOL (sym_begin, "begin");
-SCM_SYMBOL (sym_turn_on_debugging, "turn-on-debugging");
 SCM_SYMBOL (sym_load_user_init, "load-user-init");
 SCM_SYMBOL (sym_ice_9, "ice-9");
 SCM_SYMBOL (sym_top_repl, "top-repl");
@@ -716,11 +715,9 @@ scm_compile_shell_switches (int argc, char **argv)
     }
 
   /* If debugging was requested, or we are interactive and debugging
-     was not explicitly turned off, turn on debugging. */
+     was not explicitly turned off, use the debug engine. */
   if (turn_on_debugging || (interactive && !dont_turn_on_debugging))
     {
-      /* FIXME: backtraces and positions should always be on (?) */
-      tail = scm_cons (scm_cons (sym_turn_on_debugging, SCM_EOL), tail);
       scm_c_set_default_vm_engine_x (SCM_VM_DEBUG_ENGINE);
       scm_c_set_vm_engine_x (scm_the_vm (), SCM_VM_DEBUG_ENGINE);
     }
diff --git a/module/ice-9/boot-9.scm b/module/ice-9/boot-9.scm
index b8f5a31..f945ffd 100644
--- a/module/ice-9/boot-9.scm
+++ b/module/ice-9/boot-9.scm
@@ -1028,10 +1028,6 @@ If there is no handler at all, Guile prints an error and 
then exits."
 ;; This is mostly for the internal use of the code generated by
 ;; scm_compile_shell_switches.
 
-(define (turn-on-debugging)
-  (debug-enable 'backtrace)
-  (read-enable 'positions))
-
 (define (load-user-init)
   (let* ((home (or (getenv "HOME")
                    (false-if-exception (passwd:dir (getpwuid (getuid))))
diff --git a/module/ice-9/deprecated.scm b/module/ice-9/deprecated.scm
index 17030bc..faff234 100644
--- a/module/ice-9/deprecated.scm
+++ b/module/ice-9/deprecated.scm
@@ -64,7 +64,8 @@
             the-last-stack
             save-stack
             named-module-use!
-            top-repl))
+            top-repl
+            turn-on-debugging))
 
 
 ;;;; Deprecated definitions.
@@ -674,3 +675,10 @@ it.")
                  "Remove it from your code.")
                 (apply debug-enable (delq 'debug opts)))
               (apply debug-enable opts)))))
+
+(define (turn-on-debugging)
+  (issue-deprecation-warning
+   "`(turn-on-debugging)' is obsolete and usually has no effect."
+   "Debugging capabilities are present by default.")
+  (debug-enable 'backtrace)
+  (read-enable 'positions))


hooks/post-receive
-- 
GNU Guile



reply via email to

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