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-201-g5


From: Andy Wingo
Subject: [Guile-commits] GNU Guile branch, master, updated. release_1-9-12-201-g51cb0cc
Date: Tue, 12 Oct 2010 12:28:46 +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=51cb0cca66498646c7f92616e9902901d2c32000

The branch, master has been updated
       via  51cb0cca66498646c7f92616e9902901d2c32000 (commit)
       via  5aa12c699c126e5880649223dba94e6b0ef730b9 (commit)
       via  5414d33376e7759dfc5e4e35d32b5c8cf2452930 (commit)
       via  a36c3a458ef7d11b40b95394c0ab7bb6f54a0d51 (commit)
       via  767dbb1af30500cc0ad44d6bd0e0e179a1191ec6 (commit)
       via  ced9917e127456a63c6c09d28424d886b8f14634 (commit)
      from  f88dae81fe9dce0fd4af531899631ec070d10ea6 (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 51cb0cca66498646c7f92616e9902901d2c32000
Author: Andy Wingo <address@hidden>
Date:   Tue Oct 12 13:58:39 2010 +0200

    fold old news items into main news body
    
    * NEWS: Fold 1.9.12 items into the main body.

commit 5aa12c699c126e5880649223dba94e6b0ef730b9
Author: Andy Wingo <address@hidden>
Date:   Tue Oct 12 13:24:46 2010 +0200

    ,frame and related commands handle for-trap? appropriately
    
    * module/system/repl/debug.scm (print-frame): Add #:next-source? arg,
      for when print-frame should use frame-next-source instead of
      frame-source.
      (print-frames): Add #:for-trap? arg. If true, the 0th frame should be
      printed with frame-next-source.
    
    * module/system/repl/command.scm (define-stack-command): Introduce
      for-trap? into the lexical env.
      (backtrace, up, down, frame): Update to do the right thing regarding
      #:for-trap?.

commit 5414d33376e7759dfc5e4e35d32b5c8cf2452930
Author: Andy Wingo <address@hidden>
Date:   Tue Oct 12 13:11:40 2010 +0200

    don't warn for (format #t fmt) -- format string actually named fmt
    
    * module/language/tree-il/analyze.scm (format-analysis): Don't warn on
      non-literal format string if the format string is a lexical ref to a
      variable named "fmt". A slight hack, but effective :)
    * module/system/repl/command.scm (display-stat): Rename the format
      string to "fmt".

commit a36c3a458ef7d11b40b95394c0ab7bb6f54a0d51
Author: Andy Wingo <address@hidden>
Date:   Tue Oct 12 13:09:48 2010 +0200

    debug has for-trap? field
    
    * module/system/repl/debug.scm (<debug>): New field, `for-trap?'. True
      if the stack is for a trap, and thus the top frame should use
      frame-next-source instead of frame-source.
    
    * module/system/repl/command.scm (repl-pop-continuation-resumer)
      (repl-next-resumer):
    * module/system/repl/error-handling.scm (call-with-error-handling):
      Update callers.

commit 767dbb1af30500cc0ad44d6bd0e0e179a1191ec6
Author: Andy Wingo <address@hidden>
Date:   Tue Oct 12 13:01:10 2010 +0200

    remove gds docs, telling users instead to use geiser and paredit
    
    * doc/ref/scheme-using.texi (Using Guile in Emacs): Remove GDS docs, as
      we don't have GDS any more. Instead of surveying the field, be
      opinionated and tell users what to use: Geiser and Paredit.

commit ced9917e127456a63c6c09d28424d886b8f14634
Author: Andy Wingo <address@hidden>
Date:   Tue Oct 12 12:58:36 2010 +0200

    minor doc fixups
    
    * doc/ref/scheme-scripts.texi (Invoking Guile): Some typos.
    * doc/ref/tour.texi (Running Guile Scripts): More typos and PDF
      improvements.
    * doc/ref/scheme-using.texi (Readline, Value History): Minor rewording.
      (Help Commands): Minor fixup.

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

Summary of changes:
 NEWS                                  |  600 ++++++++++----------------
 doc/ref/scheme-scripts.texi           |    6 +-
 doc/ref/scheme-using.texi             |  778 +++------------------------------
 doc/ref/tour.texi                     |    8 +-
 module/language/tree-il/analyze.scm   |    8 +-
 module/system/repl/command.scm        |   30 +-
 module/system/repl/debug.scm          |   21 +-
 module/system/repl/error-handling.scm |    4 +-
 8 files changed, 325 insertions(+), 1130 deletions(-)

diff --git a/NEWS b/NEWS
index d05d39c..4cf0cc8 100644
--- a/NEWS
+++ b/NEWS
@@ -9,7 +9,7 @@ Note: During the 1.9 series, we will keep an incremental NEWS 
for the
 latest prerelease, and a full NEWS corresponding to 1.8 -> 2.0.
 
 
-Changes in 1.9.12 (since the 1.9.11 prerelease):
+Changes in 1.9.13 (since the 1.9.12 prerelease):
 
 ** SRFI support
 
@@ -19,357 +19,6 @@ The following SRFIs have been added:
 - SRFI-42 "Eager Comprehensions"
 - SRFI-45 "Primitives for Expressing Iterative Lazy Algorithms"
 
-** Many R6RS bugfixes
-
-`(rnrs bytevectors)' and `(rnrs io ports)' now have version information,
-like the rest of the modules. The `(rnrs unicode)' module is now
-re-exported by `(rnrs)'. Top-level `import' forms may have more than one
-clause. Warnings about duplicate bindings have been fixed, along with
-some typos in the modules. There were a number of other bugfixes as well.
-    
-For the current list of known R6RS incompatibilities, see "R6RS
-Incompatibilities" in the manual.
-
-** Documentation for standard R6RS libraries
-
-See "R6RS Standard Libraries" in the manual, for more details.
-
-** Support for `letrec*'
-
-Guile now supports `letrec*', a recursive lexical binding operator in
-which the identifiers are bound in order. See "Local Bindings" in the
-manual, for more details.
-
-** Internal definitions now expand to `letrec*'
-
-Following the R6RS, internal definitions now expand to letrec* instead
-of letrec. The following program is invalid for R5RS, but valid for
-R6RS:
-
-    (define (foo)
-      (define bar 10)
-      (define baz (+ bar 20))
-      baz)
-
-    ;; R5RS and Guile <= 1.8:
-    (foo) => Unbound variable: bar
-    ;; R6RS and Guile >= 2.0:
-    (foo) => 30
-
-This change should not affect correct R5RS programs, or programs written
-in earlier Guile dialects.
-
-** Recursive debugging REPL on error
-
-When Guile sees an error, instead of dropping into a special debugging
-prompt, it will enter a recursive REPL in the dynamic context of the
-error. See "Error Handling" in the manual, for more information.
-
-A recursive REPL is the same as any other REPL, except that it
-has been augmented with debugging information, so that one can inspect
-the context of the error. The debugger has been integrated with the REPL
-via a set of debugging meta-commands.
-
-For example, one may access a backtrace with `,backtrace' (or
-`,bt'). See "Interactive Debugging" in the manual, for more
-information.
-
-** New `error-message' meta-command at the REPL
-
-The new `error-message' meta-command displays the message associated
-with the error that started the current debugging REPL.  See "Debug
-Commands" in the manual.
-
-** Readline tab completion for arguments
-
-When readline is enabled, tab completion works for arguments too, not
-just for the operator position.
-
-** Various REPL robustness fixes
-
-The REPL no longer enters the debugger when an error occurs at read-time
-and compile-time, or when executing meta-commands. Additionally, the
-REPL is more strict about the ports that it uses, saving the current
-input and output ports at startup and using those ports when entering
-recursive prompts. This allows debugging of an error within
-e.g. `call-with-input-port'.
-
-Finally, Ctrl-d can now be used to exit a recursive REPL, dropping the
-user back to the parent REPL.
-
-** Better procedure name and source location propagation
-
-There was a bug in 1.9.11 which would leave most procedures un-named;
-this and other previous deficiencies have been fixed.
-
-** New macro: `current-source-location'
-
-The macro returns the current source location (to be documented).
-
-** `module-filename' field and accessor
-
-Modules now record the file in which they are defined. This field may be
-accessed with the new `module-filename' procedure.
-
-** Deprecate the old `scm-style-repl'
-
-The following bindings from boot-9 are now found in `(ice-9
-scm-style-repl)': `scm-style-repl', `error-catching-loop',
-`error-catching-repl', `bad-throw', `scm-repl-silent'
-`assert-repl-silence', `repl-print-unspecified',
-`assert-repl-print-unspecified', `scm-repl-verbose',
-`assert-repl-verbosity', `scm-repl-prompt', `set-repl-prompt!', `repl',
-`default-pre-unwind-handler', `handle-system-error',
-
-The following bindings have been deprecated, with no replacement:
-`pre-unwind-handler-dispatch'.
-
-The following bindings have been totally removed:
-`before-signal-stack'.
-
-Deprecated forwarding shims have been installed so that users that
-expect these bindings in the main namespace will still work, but receive
-a deprecation warning.
-    
-** Passing a number as the destination of `format' is deprecated
-
-The `format' procedure in `(ice-9 format)' now emits a deprecation
-warning if a number is passed as its first argument.
-
-** Miscellaneous other deprecations
-
-`apply-to-args', `has-suffix?', `scheme-file-suffix'
-`get-option', `for-next-option', `display-usage-report',
-`transform-usage-lambda', `collect', `set-batch-mode?!'
-
-** All core defmacros reimplemented hygienically
-
-All macros present in the default environment are now implemented with
-syntax-case. This should not have practical ramifications, beyond those
-listed below in "Lexical bindings introduced by hygienic macros may not
-be referenced by nonhygienic macros".
-
-** Random generator state may be serialized to a datum
-
-`random-state->datum' will serialize a random state to a datum, which
-may be written out, read back in later, and revivified using
-`datum->random-state'.  See "Random" in the manual, for more details.
-
-** New primitive: `tmpfile'.
-    
-See "File System" in the manual.
-
-** Modules load within a known environment
-
-It takes a few procedure calls to define a module, and those procedure
-calls need to be in scope. Now we ensure that the current module when
-loading a module is one that has the needed bindings, instead of relying
-on chance.
-
-** Remove encoding of versions into the file system
-
-It used to be that, when loading a module, if the user specified a
-version, Guile would grovel about in the file system to find the
-module. This process was slow and not robust. This support has been
-removed:  modules are once more always loaded via `primitive-load-path'.
-
-Module versions in the file system may be added again in the future, in
-an extensible way. Contact address@hidden with patches.
-    
-** Alex Shinn's pattern matcher for (ice-9 match).
-    
-Guile's copy of Andrew K. Wright's `match' library has been replaced by
-a compatible hygienic implementation by Alex Shinn.  It is now
-documented, see "Pattern Matching" in the manual.
-
-Compared to Andrew K. Wright's `match', the new `match' lacks
-`match-define', `match:error-control', `match:set-error-control',
-`match:error', `match:set-error', and all structure-related procedures.
-
-** Better debugging for psyntax
-
-We now build psyntax-pp.go directly from psyntax.scm, which allows us to
-preserve the original source locations and variable names. Git users
-will also be pleased to note that psyntax-pp.scm is no longer
-automatically regenerated from a normal `make' invocation.
-    
-** AM_SILENT_RULES
-
-Guile's build is visually quieter, due to the use of Automake 1.11's
-AM_SILENT_RULES. Build as `make V=1' to see all of the output.
-    
-** Better REPL options interface
-
-The set of REPL options is now fixed and typechecked -- you can't
-mistakenly set an option that doesn't exist, or set an value with an
-incorrect type. The following options have been added: `prompt',
-`compile-options', and `value-history'.
-
-The new `repl-default-option-set!' procedure from `(system repl common)'
-can set default options for future REPLs. `repl-default-prompt-set!' is
-a convenience procedure to set default prompts.
-
-** `*unspecified*' is identifier syntax
-    
-`*unspecified*' is no longer a variable, so it is optimized properly by
-the compiler, and is not `set!'-able.
-
-** `set-batch-mode?!' replaced by `ensure-batch-mode!'
-
-"Batch mode" is a flag used to tell a program that it is not running
-interactively. One usually turns it on after a fork. It may not be
-turned off. `ensure-batch-mode!' deprecates the old `set-batch-mode?!',
-because it is a better interface, as it can only turn on batch mode, not
-turn it off.
-
-** Support for settable identifier syntax
-
-Following the R6RS, "variable transformers" are settable
-identifier-syntax. See "Identifier macros" in the manual, for more
-information.
-    
-** Deprecate `save-stack', `the-last-stack'
-
-It used to be that the way to debug programs in Guile was to capture the
-stack at the time of error, drop back to the REPL, then debug that
-stack. But this approach didn't compose, was tricky to get right in the
-presence of threads, and was not very powerful.
-
-So `save-stack', `stack-saved?', and `the-last-stack' have been moved to
-`(ice-9 save-stack)', with deprecated bindings left in the root module.
-
-** Compilation warnings at the REPL
-    
-By default, Guile now prints compile-time warnings for code entered at
-the REPL. Current warnings are for unbound variables and mismatched
-arities.
-
-** syntax-case treats `_' as a placeholder
-    
-Following R6RS, a `_' in a syntax-rules or syntax-case pattern matches
-anything, and binds no pattern variables. Unlike the R6RS, Guile also
-permits `_' to be in the literals list for a pattern.
-
-** Remove old Emacs interface
-
-Guile had an unused `--emacs' command line argument that was supposed to
-help when running Guile inside Emacs. This option has been removed, and
-the helper functions `named-module-use!' and `load-emacs-interface' have
-been deprecated.
-    
-** `top-repl' has its own module
-    
-The `top-repl' binding, called with Guile is run interactively, is now
-is its own module, `(ice-9 top-repl)'. A deprecated forwarding shim was
-left in the default environment.
-
-** Value history in the REPL on by default
-
-By default, the REPL will save computed values in variables like `$1',
-`$2', and the like. There are programmatic and interactive interfaces to
-control this. See "Value History" in the manual, for more information.
-
-** New threads are in `(guile-user)' by default, not `(guile)'
-
-It used to be that a new thread entering Guile would do so in the
-`(guile)' module, unless this was the first time Guile was initialized,
-in which case it was `(guile-user)'. This has been fixed to have all
-new threads unknown to Guile default to `(guile-user)'.
-
-** Backtrace improvements
-
-It used to be that backtraces showed a couple of extra frames, from the
-implementation of prompts. This has been fixed. Also, backtraces now
-print column numbers in addition to line numbers, if possible.
-
-** `display-error' takes a frame
-
-The `display-error' / `scm_display_error' helper now takes a frame as an
-argument instead of a stack. Stacks are still supported in deprecated
-builds. Additionally, `display-error' will again source location
-information for the error.
-
-** Better error reporting from the VM
-    
-If a value of the wrong type is passed to `car', `cdr', `set-car!',
-`set-cdr!', `apply', a struct accessor, or a bytevector accessors, the
-error from the VM now indicates which procedure failed, instead of
-lumping them all into the non-helpful "VM error". In addition, unbound
-variable reporting is now more helpful.
-
-** No more `(ice-9 debug)'
-    
-This module had some debugging helpers that are no longer applicable to
-the current debugging model. Importing this module will produce a
-deprecation warning. Users should contact bug-guile for support.
-
-** No more `(system vm debug)'
-
-This module is replaced by the recursive debugging REPL.
-    
-** File ports handle binary mode and coding declarations
-    
-Binary file ports are supported again, by opening files in the
-ISO-8859-1 encoding. If an encoding is not specified for textual ports,
-Guile now grovels the file for a "coding:" directive, and uses that if
-possible. See the documentation for `open-file', for more information.
-
-** R6RS character hex escapes on by default
-    
-However, R6RS character escapes within strings are incompatible with
-older Guile escape sequences, so they still need the reader option
-turned on. See "Reader Options" in the manual, for more information.
-
-** Fix random number generator on 64-bit platforms
-    
-There was a nasty bug on 64-bit platforms in which asking for a random
-integer with a range between 2**32 and 2**64 caused a segfault. After
-many embarrassing iterations, this was fixed.
-
-** Add `vhash-fold*' in `(ice-9 vlist)'
-
-See "VLists" in the manual, for more information.
-    
-** Timestamps on autocompiled files checked for freshness, not equality
-    
-It used to be that to load a `.go' file instead of a `.scm' file, we
-required that the timestamp of the `.go' file be equal to that of the
-`.scm'. This has been relaxed to accept newer `.go' files, to integrate
-better with `make' tools.
-
-** Use of nanosecond-resolution timestamps
-
-The auto-compilation logic now compares the source and compiled file
-timestamps using nano-second resolution, when available.
-
-** Simplifications and callback support added to the `(system foreign)'.
-    
-Guile's foreign function interface was simplified a great
-deal. Interested users should see "Foreign Function Interface" in the
-manual, for full details.
-
-In addition, the new procedure `procedure->pointer' makes it possible to
-use Scheme procedures as "callbacks" to C functions.
-
-** User Scheme code may be placed in a version-specific path
-
-Before, there was only one way to install user Scheme code to a
-version-specific Guile directory: install to Guile's own path,
-e.g. /usr/share/guile/2.0. The site directory,
-e.g. /usr/share/guile/site, was unversioned. This has been changed to
-add a version-specific site directory, e.g. /usr/share/guile/site/2.0,
-searched before the global site directory.
-
-** Docstrings for `syntax-rules' macros
-
-The `syntax-rules' form now accepts a docstring between the literals and
-the first clause.
-
-** SRFI-1 partly rewritten in Scheme
-
-Some of the SRFI-1 procedures that were written in C "for efficiency"
-have been rewritten in Scheme.
-
 ** And of course, the usual collection of bugfixes
  
 Interested users should see the ChangeLog for more information.
@@ -391,6 +40,16 @@ Changes in 1.9.x (since the 1.8.x series):
 ** `(srfi srfi-9 gnu)', extensions to the SRFI-9 record library
 ** `(system vm coverage)', a line-by-line code coverage library
 
+** Replaced `(ice-9 match)' with Alex Shinn's compatible, hygienic matcher.
+    
+Guile's copy of Andrew K. Wright's `match' library has been replaced by
+a compatible hygienic implementation by Alex Shinn.  It is now
+documented, see "Pattern Matching" in the manual.
+
+Compared to Andrew K. Wright's `match', the new `match' lacks
+`match-define', `match:error-control', `match:set-error-control',
+`match:error', `match:set-error', and all structure-related procedures.
+
 ** Imported statprof, SSAX, and texinfo modules from Guile-Lib
     
 The statprof statistical profiler, the SSAX XML toolkit, and the texinfo
@@ -426,10 +85,16 @@ GUILE_SYSTEM_PATH.
 
 ** New read-eval-print loop (REPL) implementation
 
-Running Guile with no arguments drops the user into the new REPL. While
-it is self-documenting to an extent, the new REPL has not yet been
-documented in the manual. This will be fixed before 2.0.
+Running Guile with no arguments drops the user into the new REPL.  See
+"Using Guile Interactively" in the manual, for more information.
 
+** Remove old Emacs interface
+
+Guile had an unused `--emacs' command line argument that was supposed to
+help when running Guile inside Emacs. This option has been removed, and
+the helper functions `named-module-use!' and `load-emacs-interface' have
+been deprecated.
+    
 ** New reader options: `square-brackets' and `r6rs-hex-escapes'
 
 The reader supports a new option (changeable via `read-options'),
@@ -437,7 +102,9 @@ The reader supports a new option (changeable via 
`read-options'),
 parentheses.  This option is on by default.
 
 When the new `r6rs-hex-escapes' reader option is enabled, the reader
-will recognize string escape sequences as defined in R6RS.
+will recognize string escape sequences as defined in R6RS.  R6RS string
+escape sequences are incompatible with Guile's existing escapes, though,
+so this option is off by default.
 
 ** Function profiling and tracing at the REPL
     
@@ -448,12 +115,20 @@ time. See `,help profile' for more information.
 Similarly, `,trace FORM' traces all function applications that occur
 during the execution of `FORM'. See `,help trace' for more information.
 
-** New debugger
+** Recursive debugging REPL on error
+
+When Guile sees an error at the REPL, instead of saving the stack, Guile
+will directly enter a recursive REPL in the dynamic context of the
+error. See "Error Handling" in the manual, for more information.
+
+A recursive REPL is the same as any other REPL, except that it
+has been augmented with debugging information, so that one can inspect
+the context of the error. The debugger has been integrated with the REPL
+via a set of debugging meta-commands.
 
-By default, if an exception is raised at the REPL and not caught by user
-code, Guile will drop the user into a debugger. The user may request a
-backtrace, inspect frames, or continue raising the exception. Full
-documentation is available from within the debugger.
+For example, one may access a backtrace with `,backtrace' (or
+`,bt'). See "Interactive Debugging" in the manual, for more
+information.
 
 ** New `guile-tools' commands: `compile', `disassemble'
 
@@ -479,6 +154,17 @@ allows Guile's copy of SSAX to override any Guile-Lib copy 
the user has
 installed. Also it should cut the number of `stat' system calls by half,
 in the common case.
 
+** Value history in the REPL on by default
+
+By default, the REPL will save computed values in variables like `$1',
+`$2', and the like. There are programmatic and interactive interfaces to
+control this. See "Value History" in the manual, for more information.
+
+** Readline tab completion for arguments
+
+When readline is enabled, tab completion works for arguments too, not
+just for the operator position.
+
 ** Interactive Guile follows GNU conventions
 
 As recommended by the GPL, Guile now shows a brief copyright and
@@ -561,9 +247,9 @@ If a compiled .go file corresponding to a .scm file is not 
found or is
 not fresh, the .scm file will be compiled on the fly, and the resulting
 .go file stored away. An advisory note will be printed on the console.
 
-Note that this mechanism depends on preservation of the .scm and .go
-modification times; if the .scm or .go files are moved after
-installation, care should be taken to preserve their original
+Note that this mechanism depends on the timestamp of the .go file being
+newer than that of the .scm file; if the .scm or .go files are moved
+after installation, care should be taken to preserve their original
 timestamps.
 
 Autocompiled files will be stored in the $XDG_CACHE_HOME/guile/ccache
@@ -686,12 +372,11 @@ like this works now:
 It used to be you had to export `helper' from `(foo)' as well.
 Thankfully, this has been fixed.
 
-** Complete support for version information in Guile's `module' form
+** Support for version information in Guile's `module' form
     
-Guile modules now have a `#:version' field. They may be loaded by
-version as well. See "R6RS Version References", "General Information
-about Modules", "Using Guile Modules", and "Creating Guile Modules" in
-the manual for more information.
+Guile modules now have a `#:version' field.  See "R6RS Version
+References", "General Information about Modules", "Using Guile Modules",
+and "Creating Guile Modules" in the manual for more information.
 
 ** Support for renaming bindings on module export
     
@@ -728,6 +413,31 @@ feedback about this change (a consequence of using psyntax 
as the
 default expander), and may choose to revisit this situation before 2.0
 in response to user feedback.
 
+** Support for `letrec*'
+
+Guile now supports `letrec*', a recursive lexical binding operator in
+which the identifiers are bound in order. See "Local Bindings" in the
+manual, for more details.
+
+** Internal definitions now expand to `letrec*'
+
+Following the R6RS, internal definitions now expand to letrec* instead
+of letrec. The following program is invalid for R5RS, but valid for
+R6RS:
+
+    (define (foo)
+      (define bar 10)
+      (define baz (+ bar 20))
+      baz)
+
+    ;; R5RS and Guile <= 1.8:
+    (foo) => Unbound variable: bar
+    ;; R6RS and Guile >= 2.0:
+    (foo) => 30
+
+This change should not affect correct R5RS programs, or programs written
+in earlier Guile dialects.
+
 ** Macro expansion produces structures instead of s-expressions
 
 In the olden days, macroexpanding an s-expression would yield another
@@ -777,6 +487,18 @@ However its intent is fairly clear. Guile interprets "bar" 
to be the
 docstring of `foo', and the definition of `baz' is still in definition
 context.
 
+** Support for settable identifier syntax
+
+Following the R6RS, "variable transformers" are settable
+identifier-syntax. See "Identifier macros" in the manual, for more
+information.
+    
+** syntax-case treats `_' as a placeholder
+    
+Following R6RS, a `_' in a syntax-rules or syntax-case pattern matches
+anything, and binds no pattern variables. Unlike the R6RS, Guile also
+permits `_' to be in the literals list for a pattern.
+
 ** Macros need to be defined before their first use.
 
 It used to be that with lazy memoization, this might work:
@@ -871,6 +593,10 @@ different from backtraces in interpreted code. There are 
no semantic
 differences, however. Please mail address@hidden if you see any
 deficiencies with Guile's backtraces.
 
+** New macro: `current-source-location'
+
+The macro returns the current source location (to be documented).
+
 ** syntax-rules and syntax-case macros now propagate source information
    through to the expanded code
 
@@ -949,6 +675,18 @@ been deprecated. See the following mail for a full 
discussion:
 
 The `%app' binding is also deprecated.
 
+** `module-filename' field and accessor
+
+Modules now record the file in which they are defined. This field may be
+accessed with the new `module-filename' procedure.
+
+** Modules load within a known environment
+
+It takes a few procedure calls to define a module, and those procedure
+calls need to be in scope. Now we ensure that the current module when
+loading a module is one that has the needed bindings, instead of relying
+on chance.
+
 ** Many syntax errors have different texts now
 
 Syntax errors still throw to the `syntax-error' key, but the arguments
@@ -1076,7 +814,7 @@ But this does not:
     (bind-x 10 (ref x)))
 
 It is not normal to run into this situation with existing code. However,
-as code is ported over from defmacros to syntax-case, it is possible to
+if you have defmacros that expand to hygienic macros, it is possible to
 run into situations like this. For example, if you have a defmacro that
 generates a `while' expression, the `break' bound by the `while' may not
 be visible within other parts of your defmacro. The solution is to port
@@ -1136,6 +874,11 @@ There is a new `format' specifier, address@hidden', for 
doing a truncated
 print (as opposed to `~y', which does a pretty-print). See the `format'
 documentation for more details.
 
+** Passing a number as the destination of `format' is deprecated
+
+The `format' procedure in `(ice-9 format)' now emits a deprecation
+warning if a number is passed as its first argument.
+
 ** SRFI-4 vectors reimplemented in terms of R6RS bytevectors
 
 Guile now implements SRFI-4 vectors using bytevectors. Often when you
@@ -1185,6 +928,11 @@ the load path. It can be used to compile other files into 
a file.
 documentation for more information. Thanks to Andre van Tonder for the
 implementation.
 
+** `*unspecified*' is identifier syntax
+    
+`*unspecified*' is no longer a variable, so it is optimized properly by
+the compiler, and is not `set!'-able.
+
 ** Unicode characters
 
 Unicode characters may be entered in octal format via e.g. `#\454', or
@@ -1216,7 +964,8 @@ declaration. See the section of the manual entitled, 
"Character Encoding
 of Source Files".
 
 The pre-1.9.3 reader handled 8-bit clean but otherwise unspecified source
-code.  This use is now discouraged.
+code.  This use is now discouraged.  Binary input and output is
+currently supported by opening ports in the ISO-8859-1 locale.
 
 ** Support for locale transcoding when reading from and writing to ports
 
@@ -1262,7 +1011,8 @@ and was unmaintained.
 Guile can warn about potentially unbound free variables. Pass the
 -Wunbound-variable on the `guile-tools compile' command line, or add
 `#:warnings '(unbound-variable)' to your `compile' or `compile-file'
-invocation.
+invocation. Warnings are also enabled by default for expressions entered
+at the REPL.
 
 Guile can also warn when you pass the wrong number of arguments to a
 procedure, with -Warity-mismatch, or `arity-mismatch' in the
@@ -1284,6 +1034,13 @@ This slightly improves program startup times.
 
 See `cancel-thread', `set-thread-cleanup!', and `thread-cleanup'.
 
+** New threads are in `(guile-user)' by default, not `(guile)'
+
+It used to be that a new thread entering Guile would do so in the
+`(guile)' module, unless this was the first time Guile was initialized,
+in which case it was `(guile-user)'. This has been fixed to have all
+new threads unknown to Guile default to `(guile-user)'.
+
 ** GOOPS dispatch in scheme
 
 As an implementation detail, GOOPS dispatch is no longer implemented by
@@ -1334,6 +1091,22 @@ Guile now use a portable implementation of 
`inet_pton'/`inet_ntop', so
 there is no more need to use `inet-aton'/`inet-ntoa'. The latter
 functions are deprecated.
 
+** New primitive: `tmpfile'.
+    
+See "File System" in the manual.
+
+** Random generator state may be serialized to a datum
+
+`random-state->datum' will serialize a random state to a datum, which
+may be written out, read back in later, and revivified using
+`datum->random-state'.  See "Random" in the manual, for more details.
+
+** Fix random number generator on 64-bit platforms
+    
+There was a nasty bug on 64-bit platforms in which asking for a random
+integer with a range between 2**32 and 2**64 caused a segfault. After
+many embarrassing iterations, this was fixed.
+
 ** Fast bit operations.
 
 The bit-twiddling operations `ash', `logand', `logior', and `logxor' now
@@ -1365,12 +1138,6 @@ test for the `guile-2' cond-expand feature. Like this:
                            ;; separate compilation phase.
                            (fluid-set! current-reader my-reader)))
 
-** Fix bad interaction between `false-if-exception' and stack-call.
-
-Exceptions thrown by `false-if-exception' were erronously causing the
-stack to be saved, causing later errors to show the incorrectly-saved
-backtrace. This has been fixed.
-
 ** New global variables: %load-compiled-path, %load-compiled-extensions
 
 These are analogous to %load-path and %load-extensions.
@@ -1423,6 +1190,63 @@ History library functions.
 Instead, use make-typed-array, list->typed-array, or array-type,
 respectively.
 
+** Deprecate the old `scm-style-repl'
+
+The following bindings from boot-9 are now found in `(ice-9
+scm-style-repl)': `scm-style-repl', `error-catching-loop',
+`error-catching-repl', `bad-throw', `scm-repl-silent'
+`assert-repl-silence', `repl-print-unspecified',
+`assert-repl-print-unspecified', `scm-repl-verbose',
+`assert-repl-verbosity', `scm-repl-prompt', `set-repl-prompt!', `repl',
+`default-pre-unwind-handler', `handle-system-error',
+
+The following bindings have been deprecated, with no replacement:
+`pre-unwind-handler-dispatch'.
+
+The following bindings have been totally removed:
+`before-signal-stack'.
+
+Deprecated forwarding shims have been installed so that users that
+expect these bindings in the main namespace will still work, but receive
+a deprecation warning.
+
+** `set-batch-mode?!' replaced by `ensure-batch-mode!'
+
+"Batch mode" is a flag used to tell a program that it is not running
+interactively. One usually turns it on after a fork. It may not be
+turned off. `ensure-batch-mode!' deprecates the old `set-batch-mode?!',
+because it is a better interface, as it can only turn on batch mode, not
+turn it off.
+
+** Deprecate `save-stack', `the-last-stack'
+
+It used to be that the way to debug programs in Guile was to capture the
+stack at the time of error, drop back to the REPL, then debug that
+stack. But this approach didn't compose, was tricky to get right in the
+presence of threads, and was not very powerful.
+
+So `save-stack', `stack-saved?', and `the-last-stack' have been moved to
+`(ice-9 save-stack)', with deprecated bindings left in the root module.
+
+** `top-repl' has its own module
+    
+The `top-repl' binding, called with Guile is run interactively, is now
+is its own module, `(ice-9 top-repl)'. A deprecated forwarding shim was
+left in the default environment.
+
+** `display-error' takes a frame
+
+The `display-error' / `scm_display_error' helper now takes a frame as an
+argument instead of a stack. Stacks are still supported in deprecated
+builds. Additionally, `display-error' will again source location
+information for the error.
+
+** No more `(ice-9 debug)'
+    
+This module had some debugging helpers that are no longer applicable to
+the current debugging model. Importing this module will produce a
+deprecation warning. Users should contact bug-guile for support.
+
 ** Deprecated: `lazy-catch'
 
 `lazy-catch' was a form that captured the stack at the point of a
@@ -1435,6 +1259,12 @@ crazy. Please change to use `catch', possibly with a 
throw-handler, or
 address@hidden' was part of an older implementation of the Emacs Lisp language,
 and is no longer used.
     
+** Miscellaneous other deprecations
+
+`apply-to-args', `has-suffix?', `scheme-file-suffix'
+`get-option', `for-next-option', `display-usage-report',
+`transform-usage-lambda', `collect', `set-batch-mode?!'
+
 ** Last but not least, the `λ' macro can be used in lieu of `lambda'
 
 * Changes to the C interface
@@ -1669,6 +1499,11 @@ In other words the GNU Lesser General Public License, 
version 3 or
 later (at the discretion of each person that chooses to redistribute
 part of Guile).
 
+** AM_SILENT_RULES
+
+Guile's build is visually quieter, due to the use of Automake 1.11's
+AM_SILENT_RULES. Build as `make V=1' to see all of the output.
+    
 ** GOOPS documentation folded into Guile reference manual
 
 GOOPS, Guile's object system, used to be documented in separate manuals.
@@ -1710,6 +1545,15 @@ be globally unique. Installing them to a Guile-specific 
extensions
 directory is cleaner. Use `pkg-config --variable=extensiondir
 guile-2.0' to get the location of the extensions directory.
 
+** User Scheme code may be placed in a version-specific path
+
+Before, there was only one way to install user Scheme code to a
+version-specific Guile directory: install to Guile's own path,
+e.g. /usr/share/guile/2.0. The site directory,
+e.g. /usr/share/guile/site, was unversioned. This has been changed to
+add a version-specific site directory, e.g. /usr/share/guile/site/2.0,
+searched before the global site directory.
+
 ** New dependency: libgc
 
 See http://www.hpl.hp.com/personal/Hans_Boehm/gc/, for more information.
diff --git a/doc/ref/scheme-scripts.texi b/doc/ref/scheme-scripts.texi
index 5a151a4..225b34b 100644
--- a/doc/ref/scheme-scripts.texi
+++ b/doc/ref/scheme-scripts.texi
@@ -199,13 +199,13 @@ If @var{p} is not given, the default is local port 37146. 
 If you look
 at it upside down, it almost spells ``Guile''.  If you have netcat
 installed, you should be able to @kbd{nc localhost 37146} and get a
 Guile prompt.  Alternately you can fire up Emacs and connect to the
-procedure; see @ref{Using Guile in Emacs} for more details.
+process; see @ref{Using Guile in Emacs} for more details.
 
 Note that opening a port allows anyone who can connect to that port---in
 the TCP case, any local user---to do anything Guile can do, as the user
 that the Guile process is running as.  Don't use @option{--listen} on
-multi-user machines.  Of course, if there is no @option{--listen}
-argument, no port will be opened.
+multi-user machines.  Of course, if you don't pass @option{--listen} to
+Guile, no port will be opened.
 
 That said, @code{--listen} is great for interactive debugging and
 development.
diff --git a/doc/ref/scheme-using.texi b/doc/ref/scheme-using.texi
index 5749f02..4e666d7 100644
--- a/doc/ref/scheme-using.texi
+++ b/doc/ref/scheme-using.texi
@@ -57,21 +57,22 @@ scheme@@(guile-user)> (use-modules (ice-9 readline))
 scheme@@(guile-user)> (activate-readline)
 @end lisp
 
-It's a good idea to put these two lines (without the ``scheme@@(guile-user)>''
-prompts) in your @file{.guile} file.  Guile reads this file when it
-starts up interactively, so anything in this file has the same effect
-as if you type it in by hand at the ``scheme@@(guile-user)>'' prompt.
+It's a good idea to put these two lines (without the
address@hidden@@(guile-user)>} prompts) in your @file{.guile} file.  Guile
+reads this file when it starts up interactively, so anything in this
+file has the same effect as if you type it in by hand at the
address@hidden@@(guile-user)>} prompt.
 
 
 @node Value History
 @subsection Value History
 
 Just as Readline helps you to reuse a previous input line, @dfn{value
-history} allows you to use the @emph{result} of a previous evaluation
-in a new expression.  When value history is enabled, each evaluation
-result is automatically assigned to the next in the sequence of
-variables @code{$1}, @code{$2}, @dots{}, and you can then use these
-variables in subsequent expressions.
+history} allows you to use the @emph{result} of a previous evaluation in
+a new expression.  When value history is enabled, each evaluation result
+is automatically assigned to the next in the sequence of variables
address@hidden, @code{$2}, @dots{}.  You can then use these variables in
+subsequent expressions.
 
 @lisp
 scheme@@(guile-user)> (iota 10)
@@ -175,7 +176,7 @@ had by typing @samp{,help}. Indeed, @code{help} is a 
command, and a
 particularly useful one, as it allows the user to discover the rest of
 the commands.
 
address@hidden {REPL Command} help address@hidden | group | @samp{[-c]} command]
address@hidden {REPL Command} help address@hidden | group | @code{[-c]} command]
 Show help.
 
 With one argument, tries to look up the argument as a group name, giving
@@ -566,735 +567,64 @@ Finally, as a word to the wise: hackers close their REPL 
prompts with
 @node Using Guile in Emacs
 @section Using Guile in Emacs
 
address@hidden GDS
 @cindex Emacs
-There are several options for working on Guile Scheme code in Emacs.
-The simplest are to use Emacs's standard @code{scheme-mode} for
-editing code, and to run the interpreter when you need it by typing
-``guile'' at the prompt of a @code{*shell*} buffer, but there are
-Emacs libraries available which add various bells and whistles to
-this.  The following diagram shows these libraries and how they relate
-to each other, with the arrows indicating ``builds on'' or
-``extends''.  For example, the Quack library builds on cmuscheme,
-which in turn builds on the standard scheme mode.
-
address@hidden
address@hidden @image{scheme,5in}
address@hidden iftex
address@hidden
address@hidden
address@hidden scheme.txt
address@hidden example
address@hidden ifnottex
-
address@hidden, written by Bill Rozas and Dave Love, is Emacs's standard
-mode for Scheme code files.  It provides Scheme-sensitive syntax
-highlighting, parenthesis matching, indentation and so on.
-
address@hidden, written by Olin Shivers, provides a comint-based Scheme
-interaction buffer, so that you can run an interpreter more directly
-than with the @code{*shell*} buffer approach by typing @kbd{M-x
-run-scheme}.  It also extends @code{scheme-mode} so that there are key
-presses for sending selected bits of code from a Scheme buffer to this
-interpreter.  This means that when you are writing some code and want to
-check what an expression evaluates to, you can easily select that code
-and send it to the interpreter for evaluation, then switch to the
-interpreter to see what the result is.  cmuscheme is included in the
-standard Emacs distribution.
-
address@hidden, written by Neil Van Dyke, adds a number of incremental
-improvements to the scheme/cmuscheme combination: convenient menu
-entries for looking up Scheme-related references (such as the SRFIs);
-enhanced indentation rules that are customized for particular Scheme
-interpreters, including Guile; an enhanced version of the
address@hidden command that knows the names of the common Scheme
-interpreters and remembers which one you used last time; and so on.
-Quack is available from @uref{http://www.neilvandyke.org/quack}.
-
address@hidden, written by Neil Jerram, also builds on the scheme/cmuscheme
-combination, but with a change to the way that Scheme code fragments
-are sent to the interpreter for evaluation.  cmuscheme and Quack send
-code fragments to the interpreter's standard input, on the assumption
-that the interpreter is expecting to read Scheme expressions there,
-and then monitor the interpreter's standard output to infer what the
-result of the evaluation is.  GDS doesn't use standard input and
-output like this.  Instead, it sets up a socket connection between the
-Scheme interpreter and Emacs, and sends and receives messages using a
-simple protocol through this socket.  The messages include requests to
-evaluate Scheme code, and responses conveying the results of an
-evaluation, thus providing similar function to cmuscheme or Quack.
-They also include requests for stack exploration and debugging, which
-go beyond what cmuscheme or Quack can do.  The price of this extra
-power, however, is that GDS is Guile-specific.  GDS requires the
-Scheme interpreter to run some GDS-specific library code; currently
-this code is written as a Guile module and uses features that are
-specific to Guile.  GDS is now included in the Guile distribution; for
-previous Guile releases (1.8.4 and earlier) it can be obtained as part
-of the @code{guile-debugging} package from
address@hidden://www.ossau.uklinux.net/guile}.
-
-Finally, @dfn{xscheme} is similar to cmuscheme --- in that it starts up
-a Scheme interaction process and sends commands to that process's
-standard input --- and to GDS --- in that it has support beyond
-cmuscheme or Quack for exploring the Scheme stack when an error has
-occurred --- but is implemented specifically for MIT/GNU Scheme.  Hence
-it isn't really relevant to Guile work in Emacs, except as a reference
-for useful features that could be implemented in one of the other
-libraries mentioned here.
-
-In summary, the best current choice for working on Guile code in Emacs
-is either Quack or GDS, depending on which of these libraries' features
-you find most important.  For more information on Quack, please see the
-website referenced above.  GDS is documented further in the rest of this
-section.
+Any text editor can edit Scheme, but some are better than others.  Emacs
+is the best, of course, and not just because it is a fine text editor.
+Emacs has good support for Scheme out of the box, with sensible
+indentation rules, parenthesis-matching, syntax highlighting, and even a
+set of keybindings for structural editing, allowing navigation,
+cut-and-paste, and transposition operations that work on balanced
+S-expressions.
+
+As good as it is, though, two things will vastly improve your experience
+with Emacs and Guile.
+
address@hidden Paredit
+The first is Taylor Campbell's
address@hidden://www.emacswiki.org/emacs/ParEdit, Paredit}.  You should not
+code in any dialect of Lisp without Paredit.  (They say that
+unopinionated writing is boring---hence this tone---but it's the
+truth, regardless.)  Paredit is the bee's knees.
+
address@hidden Geiser
+The second is José Antonio Ortega Ruiz's
address@hidden://www.nongnu.org/geiser/, Geiser}.  Geiser complements Emacs'
address@hidden with tight integration to running Guile processes via
+a @code{comint-mode} REPL buffer.
+
+Of course there are keybindings to switch to the REPL, and a good REPL
+environment, but Geiser goes beyond that, providing:
 
address@hidden
-* GDS Introduction::
-* GDS Architecture::
-* GDS Getting Started::
-* Working with GDS in Scheme Buffers::
-* Displaying the Scheme Stack::
-* Continuing Execution::
-* Associating Buffers with Clients::
-* An Example GDS Session::
address@hidden menu
-
-
address@hidden GDS Introduction
address@hidden GDS Introduction
-
-GDS aims to allow you to work on Guile Scheme code in the same kind of
-way that Emacs allows you to work on Emacs Lisp code: providing easy
-access to help, evaluating arbitrary fragments of code, a nice debugging
-interface, and so on.  The thinking behind the GDS library is that you
-will usually be doing one of two things.
-
address@hidden
address@hidden @bullet
 @item
-Writing or editing code.  The code will be in a normal Emacs Scheme mode
-buffer, and GDS extends Scheme mode to add keystrokes and menu items for
-the things that are likely to be useful to you when working on code:
-
address@hidden
+Form evaluation in the context of the current file's module.
 @item
-completing the identifier at point, with respect to the set of variable
-names that are known to the associated Guile process
+Macro expansion.
 @item
-accessing Guile's built in ``help'' and ``apropos'' commands
+File/module loading and/or compilation.
 @item
-evaluating fragments of code to check what they do, with the results
-popping up in a temporary Emacs window.
address@hidden itemize
-
+Namespace-aware identifier completion (including local bindings, names
+visible in the current module, and module names).
 @item
-Debugging a Guile Scheme program.  When your program hits an error or
-stops at a trap, GDS shows you the relevant code and the Scheme stack,
-and makes it easy to
-
address@hidden
+Autodoc: the echo area shows information about the signature of the
+procedure/macro around point automatically.
 @item
-look at the values of local variables
+Jump to definition of identifier at point.
 @item
-see what is happening at all levels of the Scheme stack
+Access to documentation (including docstrings when the implementation
+provides it).
 @item
-continue execution, either normally or step by step.
address@hidden itemize
-
-The presentation makes it very easy to move up and down the stack,
-showing whenever possible the source code for each frame in another
-Emacs buffer.  It also provides convenient keystrokes for telling Guile
-what to do next; for example, you can select a stack frame and tell
-Guile to run until that frame completes, at which point GDS will display
-the frame's return value.
address@hidden enumerate
-
-GDS can provide these facilities for any number of Guile Scheme programs
-(which we often refer to as ``clients'') at once, and these programs can
-be started either independently of GDS, including outside Emacs, or
-specifically @emph{by} GDS.
-
-Communication between each Guile client program and GDS uses a TCP
-socket, which means that it is orthogonal to any other interfaces that
-the client program has.  In particular GDS does not interfere with a
-program's standard input and output.
-
-
address@hidden GDS Architecture
address@hidden GDS Architecture
-
-In order to understand the following documentation fully it will help to
-have a picture in mind of how GDS works, so we briefly describe that
-here.  GDS consists of three components.
-
address@hidden
+Listings of identifiers exported by a given module.
 @item
-The GDS @dfn{interface} code is written in Emacs Lisp and runs inside
-Emacs.  This code, consisting of the installed files @file{gds.el} and
address@hidden, is responsible for displaying information from
-Guile in Emacs windows, and for responding to Emacs commands and
-keystrokes by sending instructions back to the Guile program being
-worked on.
-
+Listings of callers/callees of procedures.
 @item
-The GDS @dfn{server} code is written in Scheme and runs as an Emacs
-inferior process.  It acts as a multiplexer between the (possibly
-multiple) Guile programs being debugged and the interface code running
-in Emacs.  The server code is the installed file
address@hidden
-
+Rudimentary support for debugging and error navigation.
 @item
-The GDS @dfn{client} code is written in Scheme (installed file
address@hidden), and must be loaded as a module by each Guile
-program that wants to use GDS in any way.
+Support for multiple, simultaneous REPLs.
 @end itemize
 
address@hidden
-The following diagram shows how these components are connected to each
-other.
-
address@hidden
address@hidden @image{gds,5in}
address@hidden iftex
address@hidden
address@hidden
address@hidden gds.txt
address@hidden example
address@hidden ifnottex
-
address@hidden TCP, use of
-The data exchanged between client and server components, and between
-server and interface, is a sequence of sexps (parenthesised expressions)
-that are designed so as to be directly readable by both Scheme and Emacs
-Lisp.  The use of a TCP connection means that the server and Emacs
-interface can theoretically be on a different computer from the client
-programs, but in practice there are currently two problems with
-this.  Firstly the GDS API doesn't provide any way of specifying a
-non-local server to connect to, and secondly there is no security or
-authentication mechanism in the GDS protocol.  These are issues that
-should be addressed in the future.
-
-      
address@hidden GDS Getting Started
address@hidden Getting Started with GDS
-
-To enable the use of GDS in your own Emacs sessions, simply add
-
address@hidden
-(require 'gds)
address@hidden lisp
-
address@hidden
-somewhere in your @file{.emacs} file.  This will cause Emacs to load the
-GDS Emacs Lisp code when starting up, and to start the inferior GDS
-server process so that it is ready and waiting for any Guile programs
-that want to use GDS.
-
-(If GDS's Scheme code is not installed in one of the locations in
-Guile's load path, you may find that the server process fails to start.
-When this happens you will see an error message from Emacs:
-
address@hidden
-error in process filter: Wrong type argument: listp, Backtrace:
address@hidden lisp
-
address@hidden
-and the @code{gds-debug} buffer will contain a Scheme backtrace ending
-with the message:
-
address@hidden
-no code for module (ice-9 gds-server)
address@hidden lisp
-
address@hidden
-The solution for this is to customize the Emacs variable
address@hidden so that it specifies where the GDS Scheme
-code is installed.  Then either restart Emacs or type @kbd{M-x
-gds-run-debug-server} to try starting the GDS server process again.)
-
-For evaluations, help and completion from Scheme code buffers that you
-are working on, this is all you need.  The first time you do any of
-these things, GDS will automatically start a new Guile client program as
-an Emacs subprocess.  This Guile program does nothing but wait for and
-act on instructions from GDS, and we refer to it as a @dfn{utility}
-Guile client.  Over time this utility client will accumulate the code
-that you ask it to evaluate, and you can also tell it to load complete
-files or modules by sending it @code{load} or @code{use-modules}
-expressions.
-
-When you want to use GDS to work on an independent Guile
-application, you need to add something to that application's Scheme code
-to cause it to connect to and interact with GDS at the right times.  The
-following subsections describe the ways of doing this.
-
address@hidden Invoking GDS when an Exception Occurs
-
-One option is to use GDS to catch and display any exceptions that
-are thrown by the application's code.  If you already have a
address@hidden or @code{with-throw-handler} around the area of code
-that you want to monitor, you just need to add the following to the
-handler code:
-
address@hidden
-(gds-debug-trap (throw->trap-context key args))
address@hidden lisp
-
address@hidden
-where @code{key} and @code{args} are the first and rest arguments that
-Guile passes to the handler.  (In other words, they assume the handler
-signature @code{(lambda (key . args) @dots{})}.)  With Guile 1.8 or
-later, you can also do this with a @code{catch}, by adding this same
-code to the catch's pre-unwind handler.
-
-If you don't already have any of these, insert a whole
address@hidden expression (or @code{lazy-catch} if your Guile
-is pre-1.8) around the code of interest like this:
-
address@hidden
-(with-throw-handler #t
-  (lambda ()
-    ;; Protected code here.
-    )
-  (lambda (key . args)
-    (gds-debug-trap (throw->trap-context key args))))
address@hidden lisp
-
-Either way, you will need to use the @code{(ice-9 gds-client)} and
address@hidden(ice-9 debugging traps)} modules.
-
-Two special cases of this are the lazy-catch that the Guile REPL code
-uses to catch exceptions in user code, and the lazy-catch inside the
address@hidden utility procedure that is provided by the
address@hidden(ice-9 stack-catch)} module.  Both of these use a handler called
address@hidden (defined in @file{boot-9.scm}), which you
-can hook into such that it calls GDS to display the stack when an
-exception occurs.  To do this, use the @code{on-lazy-handler-dispatch}
-procedure as follows.
-
address@hidden
-(use-modules (ice-9 gds-client)
-             (ice-9 debugging traps))
-(on-lazy-handler-dispatch gds-debug-trap)
address@hidden lisp
-
address@hidden
-After this the program will use GDS to display the stack whenever it
-hits an exception that is protected by a @code{lazy-catch} using
address@hidden
-
address@hidden Accepting GDS Instructions at Any Time
-
-In addition to setting an exception handler as described above, a
-Guile program can in principle set itself up to accept new
-instructions from GDS at any time, not just when it has stopped at an
-exception.  This would allow the GDS user to evaluate code in the
-context of the running program, without having to wait for the program
-to stop first.
-
address@hidden
-(use-modules (ice-9 gds-client))
-(gds-accept-input #t)
address@hidden lisp
-
address@hidden causes the calling program to loop processing
-instructions from GDS, until GDS sends the @code{continue} instruction.
-This blocks the thread that calls it, however, so it will normally be
-more practical for the program to set up a dedicated GDS thread and call
address@hidden from that thread.
-
-For @code{select}-driven applications, an alternative approach would be
-for the GDS client code to provide an API which allowed the application
-to
-
address@hidden
address@hidden
-discover the file descriptors (or Scheme ports) that are used for
-receiving instruction from the GDS front end, so that it could include
-these in its @code{select} call
-
address@hidden
-call the GDS instruction handler when @code{select} indicated data
-available for reading on those descriptors/ports.
address@hidden itemize
-
address@hidden
-This approach is not yet implemented, though.
-
address@hidden Utility Guile Implementation
-
-The ``utility'' Guile client mentioned above is a simple combination
-of the mechanisms that we have just described.  In fact the code for
-the utility Guile client is essentially just this:
-
address@hidden
-(use-modules (ice-9 gds-client))
-(named-module-use! '(guile-user) '(ice-9 session))
-(gds-accept-input #f))
address@hidden lisp
-
-The @code{named-module-use!} line ensures that the client can process
address@hidden and @code{apropos} expressions, to implement lookups in
-Guile's online help.  The @code{#f} parameter to
address@hidden means that the @code{continue} instruction
-will not cause the instruction loop to exit, which makes sense here
-because the utility client has nothing to do except to process GDS
-instructions.
-
-The utility client does not use @code{on-lazy-handler-dispatch} at its
-top level, because it has its own mechanism for catching and reporting
-exceptions in the code that it is asked to evaluate.  This mechanism
-summarizes the exception and gives the user a button they can click to
-see the full stack, so the end result is very similar to what
address@hidden provides.  Deep inside
address@hidden, in the part that handles evaluating
-expressions from Emacs, the GDS client code uses
address@hidden>trap-context} and @code{gds-debug-trap} to implement
-this.
-
-
address@hidden Working with GDS in Scheme Buffers
address@hidden Working with GDS in Scheme Buffers
-
-The following subsections describe the facilities and key sequences that
-GDS provides for working on code in @code{scheme-mode} buffers.
-
address@hidden
-* Access to Guile Help and Completion::
-* Evaluating Scheme Code::
address@hidden menu
-
-
address@hidden Access to Guile Help and Completion
address@hidden Access to Guile Help and Completion
-
-The following keystrokes provide fast and convenient access to Guile's
-built in help, and to completion with respect to the set of defined and
-accessible symbols.
-
address@hidden @kbd
address@hidden C-h g
address@hidden gds-help-symbol
-Get Guile help for a particular symbol, with the same results as if
-you had typed @code{(help SYMBOL)} into the Guile REPL
-(@code{gds-help-symbol}).  The symbol to query defaults to the word at
-or before the cursor but can also be entered or edited in the
-minibuffer.  The available help is popped up in a temporary Emacs
-window.
-
address@hidden C-h G
address@hidden gds-apropos
-List all accessible Guile symbols matching a given regular expression,
-with the same results as if you had typed @code{(apropos REGEXP)} into
-the Guile REPL (@code{gds-apropos}).  The regexp to query defaults to
-the word at or before the cursor but can also be entered or edited in
-the minibuffer.  The list of matching symbols is popped up in a
-temporary Emacs window.
-
address@hidden address@hidden
address@hidden gds-complete-symbol
-Try to complete the symbol at the cursor by matching it against the
-set of all defined and accessible bindings in the associated Guile
-process (@code{gds-complete-symbol}).  If there are any extra
-characters that can be definitively added to the symbol at point, they
-are inserted.  Otherwise, if there are any completions available, they
-are popped up in a temporary Emacs window, where one of them can be
-selected using either @address@hidden or the mouse.
address@hidden table
-
-
address@hidden Evaluating Scheme Code
address@hidden Evaluating Scheme Code
-
-The following keystrokes and commands provide various ways of sending
-code to a Guile client process for evaluation.
-
address@hidden @kbd
address@hidden M-C-x
address@hidden gds-eval-defun
-Evaluate the ``top level defun'' that the cursor is in, in other words
-the smallest balanced expression which includes the cursor and whose
-opening parenthesis is in column 0 (@code{gds-eval-defun}).
-
address@hidden C-x C-e
address@hidden gds-eval-last-sexp
-Evaluate the expression that ends just before the cursor
-(@code{gds-eval-last-sexp}).  This is designed so that it is easy to
-evaluate an expression that you have just finished typing.
-
address@hidden C-c C-e
address@hidden gds-eval-expression
-Read a Scheme expression using the minibuffer, and evaluate that
-expression (@code{gds-eval-expression}).
-
address@hidden C-c C-r
address@hidden gds-eval-region
-Evaluate the Scheme code in the marked region of the current buffer
-(@code{gds-eval-region}).  Note that GDS does not check whether the
-region contains a balanced expression, or try to expand the region so
-that it does; it uses the region exactly as it is.
address@hidden table
-
-If you type @kbd{C-u} before one of these commands, GDS will immediately
-pop up a Scheme stack buffer, showing the requested evaluation, so that
-you can single step through it.  The Scheme stack display, and the
-options for continuing through the code, are described in the next two
-sections.
-
-
address@hidden Displaying the Scheme Stack
address@hidden Displaying the Scheme Stack
-
-When you specify @code{gds-debug-trap} as the behaviour for a trap and
-the Guile program concerned hits that trap, GDS displays the stack and
-the relevant Scheme source code in Emacs, allowing you to explore the
-state of the program and then decide what to do next.  The same
-applies if the program calls @code{(on-lazy-handler-dispatch
-gds-debug-trap)} and then throws an exception that passes through
address@hidden, except that in this case you can only
-explore; it isn't possible to continue normal execution after an
-exception.
-
-The following commands are available in the stack buffer for exploring
-the state of the program.
-
address@hidden @asis
address@hidden @kbd{u}, @kbd{C-p}, @address@hidden
address@hidden gds-up
-Select the stack frame one up from the currently selected frame
-(@code{gds-up}).  GDS displays stack frames with the innermost at the
-top, so moving ``up'' means selecting a more ``inner'' frame.
-
address@hidden @kbd{d}, @kbd{C-n}, @address@hidden
address@hidden gds-down
-Select the stack frame one down from the currently selected frame
-(@code{gds-down}).  GDS displays stack frames with the innermost at the
-top, so moving ``down'' means selecting a more ``outer'' frame.
-
address@hidden @address@hidden
address@hidden gds-select-stack-frame
-Select the stack frame at point (@code{gds-select-stack-frame}).  This
-is useful after clicking somewhere in the stack trace with the mouse.
address@hidden table
-
-Selecting a frame means that GDS will display the source code
-corresponding to that frame in the adjacent window, and that
-subsequent frame-sensitive commands, such as @code{gds-evaluate} (see
-below) and @code{gds-step-over} (@pxref{Continuing Execution}), will
-refer to that frame.
-
address@hidden @kbd
address@hidden e
address@hidden gds-evaluate
-Evaluate a variable or expression in the local environment of the
-selected stack frame (@code{gds-evaluate}).  The result is displayed in
-the echo area.
-
address@hidden I
address@hidden gds-frame-info
-Show summary information about the selected stack frame
-(@code{gds-frame-info}).  This includes what type of frame it is, the
-associated expression, and the frame's source location, if any.
-
address@hidden A
address@hidden gds-frame-args
-For an application frame, display the frame's arguments
-(@code{gds-frame-args}).
-
address@hidden S
address@hidden gds-proc-source
-For an application frame, show the Scheme source code of the procedure
-being called (@code{gds-proc-source}).  The source code (where
-available) is displayed in the echo area.
address@hidden table
-
address@hidden (@code{gds-proc-source}) is useful when the procedure being
-called was created by an anonymous @code{(lambda @dots{})} expression.
-Such procedures appear in the stack trace as @code{<procedure #f
-(@dots{})>}, which doesn't give you much clue as to what will happen
-next.  @kbd{S} will show you the procedure's code, which is usually
-enough for you to identify it.
-
-
address@hidden Continuing Execution
address@hidden Continuing Execution
-
-If it makes sense to continue execution from the stack which is being
-displayed, GDS provides the following further commands in the stack
-buffer.
-
address@hidden @asis
address@hidden @kbd{g}, @kbd{c}, @kbd{q}
address@hidden gds-go
-Tell the program to continue running (@code{gds-go}).  It may of course
-stop again if it hits another trap, or another occurrence of the same
-trap.
-
-The multiple keystrokes reflect that you can think of this as ``going'',
-``continuing'' or ``quitting'' (in the sense of quitting the GDS
-display).
-
address@hidden @address@hidden
address@hidden gds-step-file
-Tell the program to do a single-step to the next entry or exit of a
-frame whose code comes from the same source file as the selected stack
-frame (@code{gds-step-file}).
-
-In other words, you can hit @address@hidden repeatedly to step through
-the code in a given file, automatically stepping @emph{over} any
-evaluations or procedure calls that use code from other files (or from
-no file).
-
-If the selected stack frame has no source, the effect of this command is
-the same as that of @kbd{i}, described next.
-
address@hidden @kbd{i}
address@hidden gds-step-into
-Tell the debugged program to do a single-step to the next frame entry or
-exit of any kind (@code{gds-step-into}).  @kbd{i} therefore steps
-through code at the most detailed level possible.
-
address@hidden @kbd{o}
address@hidden gds-step-over
-Tell the debugged program to continue running until the selected stack
-frame completes, and then to display its result (@code{gds-step-over}).
-Note that the program may stop before then if it hits another trap; in
-this case the trap telling it to stop when the marked frame completes
-remains in place and so will still fire at the appropriate point.
address@hidden table
-
-
address@hidden Associating Buffers with Clients
address@hidden Associating Buffers with Clients
-
-The first time that you use one of GDS's evaluation, help or completion
-commands from a given Scheme mode buffer, GDS will ask which Guile
-client program you want to use for the operation, or if you want to
-start up a new ``utility'' client.  After that GDS considers the buffer
-to be ``associated'' with the selected client, and so sends all further
-requests to that client, but you can override this by explicitly
-associating the buffer with a different client, or by removing the
-default association.
-
address@hidden @kbd
address@hidden M-x gds-associate-buffer
-Associate (or re-associate) the current buffer with a particular Guile
-client program.  The available clients are listed, and you can also
-choose to start up a new ``utility'' client for this buffer to associate
-with.
-
address@hidden M-x gds-dissociate-buffer
-Dissociate the current buffer from its client, if any.  This means that
-the next time you use an evaluation, help or completion command, GDS
-will ask you again which client to send the request to.
address@hidden table
-
-When a buffer is associated with a client program, the buffer's modeline
-shows whether the client is currently able to accept instruction from
-GDS.  This is done by adding one of the following suffixes to the
-``Scheme'' major mode indicator:
-
address@hidden @asis
address@hidden :ready
-The client program (or one of its threads, if multithreaded) is
-currently ready to accept instruction from GDS.  In other words, if you
-send it a help or evaluation request, you should see the result pretty
-much immediately.
-
address@hidden :running
-The client program is not currently able to accept instruction from
-GDS.  This means that it (or all of its threads, if multithreaded) is
-busy, or waiting for input other than from GDS.
-
address@hidden :debug
-The client program (or one of its threads, if multithreaded) is stopped
-in ``debugging mode'' with GDS displaying the stack for a trap or
-exception.  It is waiting for instruction from GDS on what to do next.
address@hidden table
-
-
address@hidden An Example GDS Session
address@hidden An Example GDS Session
-
-Create a file, @file{testgds.scm} say, for experimenting with GDS and
-Scheme code, and type this into it:
-
address@hidden
-(use-modules (ice-9 debugging traps)
-             (ice-9 gds-client)
-             (ice-9 debugging example-fns))
-(install-trap (make <procedure-trap>
-                #:behaviour gds-debug-trap
-                #:procedure fact1))
address@hidden lisp
-
address@hidden
-Now select all of this code and type @kbd{C-c C-r} to send the selected
-region to Guile for evaluation.  GDS will ask you which Guile process to
-use; unless you know that you already have another Guile application
-running and connected to GDS, choose the ``Start a new Guile'' option,
-which starts one of the ``utility'' processes described in @ref{GDS
-Getting Started}.
-
-The results of the evaluation pop up in a window like this:
-
address@hidden
-(use-modules (ice-9 debugging traps)\n    @dots{}
-
-;;; Evaluating subexpression 1 in current module (guile-user)
- @result{} no (or unspecified) value
-
-;;; Evaluating subexpression 2 in current module (guile-user)
- @result{} no (or unspecified) value
-
---:**  *Guile Evaluation*     (Scheme:ready)--All------------
address@hidden lisp
-
address@hidden
-this tells you that the evaluation was successful but that the return
-values were unspecified.  Its effect was to load a module of example
-functions and set a trap on one of these functions, @code{fact1}, that
-calculates the factorial of its argument.
-
-If you now call @code{fact1}, you can see the trap and GDS's stack
-display in action.  To do this add
-
address@hidden
-(fact1 4)
address@hidden lisp
-
address@hidden
-to your @file{testgds.scm} buffer and type @kbd{C-x C-e} (which
-evaluates the expression that the cursor is just after the end of).
-The result should be that a GDS stack window like the following
-appears:
-
address@hidden
-Calling procedure:
-=> s  [fact1 4]
-   s  [primitive-eval (fact1 4)]
-
-
---:**  PID 28729         (Guile-Debug)--All------------
address@hidden lisp
-
-This stack tells you that Guile is about to call the @code{fact1}
-procedure, with argument 4, and you can step through this call in
-detail by pressing @kbd{i} once and then @address@hidden
-(@pxref{Continuing Execution}).
-
-(@kbd{i} is needed as the first keystroke rather than @address@hidden,
-because the aim here is to step through code in the @code{(ice-9
-debugging example-fns)} module, whose source file is
address@hidden@dots{}/ice-9/debugging/example-fns.scm}, but the initial
address@hidden(fact1 4)} call comes from the Guile session, whose ``source
-file'' Guile presents as @file{standard input}.  If the user starts by
-pressing @address@hidden instead of @kbd{i}, the effect is that the
-program runs until it hits the first recursive call @code{(fact1 (- n
-1))}, where it stops because of the trap on @code{fact1} firing again.
-At this point, the source file @emph{is}
address@hidden@dots{}/ice-9/debugging/example-fns.scm}, because the recursive
address@hidden(fact1 (- n 1))} call comes from code in that file, so further
-pressing of @address@hidden successfully single-steps through this
-file.)
+See Geiser's web page at @uref{http://www.nongnu.org/geiser/}, for more
+information.
 
 
 @c Local Variables:
diff --git a/doc/ref/tour.texi b/doc/ref/tour.texi
index 9d378da..2215cf0 100644
--- a/doc/ref/tour.texi
+++ b/doc/ref/tour.texi
@@ -59,7 +59,7 @@ script is simply a file of Scheme code with some extra 
information at
 the beginning which tells the operating system how to invoke Guile, and
 then tells Guile how to handle the Scheme code.
 
-Here is a trivial Guile script, for more details @xref{Guile Scripting}.
+Here is a trivial Guile script.  @xref{Guile Scripting}, for more details.
 
 @example
 #!/usr/local/bin/guile -s
@@ -136,8 +136,8 @@ You can link Guile into your program and make Scheme 
available to the
 users of your program.  You can also link your library into Guile and
 make its functionality available to all users of Guile.
 
-A library that is linked into Guile is called an @dfn{extensions}, but
-it really just is an ordinary object library.
+A library that is linked into Guile is called an @dfn{extension}, but it
+really just is an ordinary object library.
 
 The following example shows how to write a simple extension for Guile
 that makes the @code{j0} function available to Scheme code.
@@ -357,7 +357,7 @@ If you built Guile yourself, the build configuration that 
you used:
 
 @example
 $ ./config.status --config
-'--enable-error-on-warning' '--disable-deprecated' '--prefix=/opt/guile' 
'--libdir=/opt/guile/lib64' 'CC=ccache gcc'
+'--enable-error-on-warning' '--disable-deprecated'...
 @end example
 
 @item
diff --git a/module/language/tree-il/analyze.scm 
b/module/language/tree-il/analyze.scm
index 8e7e2ef..8a51040 100644
--- a/module/language/tree-il/analyze.scm
+++ b/module/language/tree-il/analyze.scm
@@ -1369,7 +1369,13 @@ accurate information is missing from a given `tree-il' 
element."
                     (warning 'format loc 'syntax-error key fmt)))
                 (warning 'format loc 'wrong-format-string fmt))))
          ((,port ,fmt . ,rest)
-          (warning 'format loc 'non-literal-format-string))
+          ;; Warn on non-literal format strings, unless they refer to a
+          ;; lexical variable named "fmt".
+          (if (record-case fmt
+                ((<lexical-ref> name)
+                 (not (eq? name 'fmt)))
+                (else #t))
+              (warning 'format loc 'non-literal-format-string)))
          (else
           (warning 'format loc 'wrong-num-args (length args)))))
 
diff --git a/module/system/repl/command.scm b/module/system/repl/command.scm
index ef2c5a6..4fc2038 100644
--- a/module/system/repl/command.scm
+++ b/module/system/repl/command.scm
@@ -472,6 +472,8 @@ Trace execution."
                        (identifier-syntax (debug-frames debug)))
                       (#,(datum->syntax #'repl 'message)
                        (identifier-syntax (debug-error-message debug)))
+                      (#,(datum->syntax #'repl 'for-trap?)
+                       (identifier-syntax (debug-for-trap? debug)))
                       (#,(datum->syntax #'repl 'index)
                        (identifier-syntax
                         (id (debug-index debug))
@@ -493,7 +495,8 @@ If COUNT is negative, the last COUNT frames will be shown."
   (print-frames frames
                 #:count count
                 #:width width
-                #:full? full?))
+                #:full? full?
+                #:for-trap? for-trap?))
 
 (define-stack-command (up repl #:optional (count 1))
   "up [COUNT]
@@ -510,10 +513,12 @@ An argument says how many frames up to go."
       (format #t "Already at outermost frame.\n"))
      (else
       (set! index (1- (vector-length frames)))
-      (print-frame cur #:index index))))
+      (print-frame cur #:index index
+                   #:next-source? (and (zero? index) for-trap?)))))
    (else
     (set! index (+ count index))
-    (print-frame cur #:index index))))
+    (print-frame cur #:index index
+                 #:next-source? (and (zero? index) for-trap?)))))
 
 (define-stack-command (down repl #:optional (count 1))
   "down [COUNT]
@@ -530,10 +535,11 @@ An argument says how many frames down to go."
       (format #t "Already at innermost frame.\n"))
      (else
       (set! index 0)
-      (print-frame cur #:index index))))
+      (print-frame cur #:index index #:next-source? for-trap?))))
    (else
     (set! index (- index count))
-    (print-frame cur #:index index))))
+    (print-frame cur #:index index
+                 #:next-source? (and (zero? index) for-trap?)))))
 
 (define-stack-command (frame repl #:optional idx)
   "frame [IDX]
@@ -548,10 +554,12 @@ With an argument, select a frame by index, then show it."
       (format #t "Invalid argument to `frame': expected a non-negative integer 
for IDX.~%"))
      ((< idx (vector-length frames))
       (set! index idx)
-      (print-frame cur #:index index))
+      (print-frame cur #:index index
+                   #:next-source? (and (zero? index) for-trap?)))
      (else
       (format #t "No such frame.~%"))))
-   (else (print-frame cur #:index index))))
+   (else (print-frame cur #:index index
+                      #:next-source? (and (zero? index) for-trap?)))))
 
 (define-stack-command (procedure repl)
   "procedure
@@ -617,7 +625,7 @@ Note that the given source location must be inside a 
procedure."
                  (format #t "Return values:~%")
                  (for-each (lambda (x) (repl-print repl x)) vals))))
          ((module-ref (resolve-interface '(system repl repl)) 'start-repl)
-          #:debug (make-debug stack 0 msg))))))
+          #:debug (make-debug stack 0 msg #t))))))
 
 (define-stack-command (finish repl)
   "finish
@@ -641,7 +649,7 @@ Resume execution, breaking when the current frame finishes."
                        (k (frame->stack-vector frame)))))))
        (format #t "~a~%" msg)
        ((module-ref (resolve-interface '(system repl repl)) 'start-repl)
-        #:debug (make-debug stack 0 msg)))))
+        #:debug (make-debug stack 0 msg #t)))))
 
 (define-stack-command (step repl)
   "step
@@ -838,8 +846,8 @@ Display statistics."
     (set! (repl-gc-stats repl) this-gcs)))
 
 (define (display-stat title flag field1 field2 unit)
-  (let ((str (format #f "~~20~AA address@hidden /address@hidden ~~A~~%" (if 
flag "" "@"))))
-    (format #t str title field1 field2 unit)))
+  (let ((fmt (format #f "~~20~AA address@hidden /address@hidden ~~A~~%" (if 
flag "" "@"))))
+    (format #t fmt title field1 field2 unit)))
 
 (define (display-stat-title title field1 field2)
   (display-stat title #t field1 field2 ""))
diff --git a/module/system/repl/debug.scm b/module/system/repl/debug.scm
index e3beee1..46ea6b4 100644
--- a/module/system/repl/debug.scm
+++ b/module/system/repl/debug.scm
@@ -30,7 +30,8 @@
   #:use-module ((system vm inspect) #:select ((inspect . %inspect)))
   #:use-module (system vm program)
   #:export (<debug>
-            make-debug debug? debug-frames debug-index debug-error-message
+            make-debug debug?
+            debug-frames debug-index debug-error-message debug-for-trap?
             print-registers print-locals print-frame print-frames frame->module
             stack->vector narrow-stack->vector
             frame->stack-vector))
@@ -53,7 +54,7 @@
 ;;; accessors, and provides some helper functions.
 ;;;
 
-(define-record <debug> frames index error-message)
+(define-record <debug> frames index error-message for-trap?)
 
 
 
@@ -98,12 +99,13 @@
        (frame-bindings frame))))))
 
 (define* (print-frame frame #:optional (port (current-output-port))
-                      #:key index (width 72) (full? #f) (last-source #f))
+                      #:key index (width 72) (full? #f) (last-source #f)
+                      next-source?)
   (define (source:pretty-file source)
     (if source
         (or (source:file source) "current input")
         "unknown file"))
-  (let* ((source (frame-source frame))
+  (let* ((source ((if next-source? frame-next-source frame-source) frame))
          (file (source:pretty-file source))
          (line (and=> source source:line-for-user))
          (col (and=> source source:column)))
@@ -118,7 +120,8 @@
 
 (define* (print-frames frames
                        #:optional (port (current-output-port))
-                       #:key (width 72) (full? #f) (forward? #f) count)
+                       #:key (width 72) (full? #f) (forward? #f) count
+                       for-trap?)
   (let* ((len (vector-length frames))
          (lower-idx (if (or (not count) (positive? count))
                         0
@@ -132,8 +135,12 @@
       (if (<= lower-idx i upper-idx)
           (let* ((frame (vector-ref frames i)))
             (print-frame frame port #:index i #:width width #:full? full?
-                         #:last-source last-source)
-            (lp (+ i inc) (frame-source frame)))))))
+                         #:last-source last-source
+                         #:next-source? (and (zero? i) for-trap?))
+            (lp (+ i inc)
+                (if (and (zero? i) for-trap?)
+                    (frame-next-source frame)
+                    (frame-source frame))))))))
 
 ;; Ideally here we would have something much more syntactic, in that a set! to 
a
 ;; local var that is not settable would raise an error, and export etc forms
diff --git a/module/system/repl/error-handling.scm 
b/module/system/repl/error-handling.scm
index 58317a8..737eadf 100644
--- a/module/system/repl/error-handling.scm
+++ b/module/system/repl/error-handling.scm
@@ -76,7 +76,7 @@
              (error-msg (if trap-idx
                             (format #f "Trap ~d: ~a" trap-idx trap-name)
                             trap-name))
-             (debug (make-debug stack 0 error-msg)))
+             (debug (make-debug stack 0 error-msg #t)))
         (with-saved-ports
          (lambda ()
            (if trap-idx
@@ -145,7 +145,7 @@
                           ;; the start-stack thunk has its own frame too.
                           0 (and tag 1)))
                   (error-msg (error-string stack key args))
-                  (debug (make-debug stack 0 error-msg)))
+                  (debug (make-debug stack 0 error-msg #f)))
              (with-saved-ports
               (lambda ()
                 (format #t "~a~%" error-msg)


hooks/post-receive
-- 
GNU Guile



reply via email to

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