[Top][All Lists]

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

[Guile-commits] GNU Guile branch, master, updated. v2.1.0-163-g283ab48

From: Andy Wingo
Subject: [Guile-commits] GNU Guile branch, master, updated. v2.1.0-163-g283ab48
Date: Wed, 07 Mar 2012 18:02:06 +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".

The branch, master has been updated
       via  283ab48d3f20a5c5281cafc29f0c30c8d8ace9ee (commit)
      from  a62b5c3d5431cf68d94af5397116ca38f7d15840 (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 283ab48d3f20a5c5281cafc29f0c30c8d8ace9ee
Author: Andy Wingo <address@hidden>
Date:   Wed Mar 7 19:01:56 2012 +0100

    faster (make-prompt-tag); default-prompt-tag is a parameter
    * module/ice-9/boot-9.scm (default-prompt-tag): Once parameters have
      booted, redefine as a parameter.
      (make-prompt-tag): Change from a gensym to a list.  Thanks to Mark
      Weaver for the suggestion.
    * doc/ref/api-control.texi (Prompt Primitives): Update docs.


Summary of changes:
 doc/ref/api-control.texi |    9 ++++++---
 module/ice-9/boot-9.scm  |   14 ++++++++++++--
 2 files changed, 18 insertions(+), 5 deletions(-)

diff --git a/doc/ref/api-control.texi b/doc/ref/api-control.texi
index ca7ad4a..6eac872 100644
--- a/doc/ref/api-control.texi
+++ b/doc/ref/api-control.texi
@@ -494,14 +494,17 @@ those passed to @code{abort-to-prompt}.
 @end deffn
 @deffn {Scheme Procedure} make-prompt-tag [stem]
-Make a new prompt tag.  Currently prompt tags are generated symbols.
-This may change in some future Guile version.
+Make a new prompt tag.  A prompt tag is simply a unique object.
+Currently, a prompt tag is a fresh pair.  This may change in some future
+Guile version.
 @end deffn
 @deffn {Scheme Procedure} default-prompt-tag
 Return the default prompt tag.  Having a distinguished default prompt
 tag allows some useful prompt and abort idioms, discussed in the next
+section.  Note that @code{default-prompt-tag} is actually a parameter,
+and so may be dynamically rebound using @code{parameterize}.
 @end deffn
 @deffn {Scheme Procedure} abort-to-prompt tag val1 val2 @dots{}
diff --git a/module/ice-9/boot-9.scm b/module/ice-9/boot-9.scm
index 1630461..94538fe 100644
--- a/module/ice-9/boot-9.scm
+++ b/module/ice-9/boot-9.scm
@@ -51,10 +51,12 @@
 (define make-prompt-tag
   (lambda* (#:optional (stem "prompt"))
-    (gensym stem)))
+    ;; The only property that prompt tags need have is uniqueness in the
+    ;; sense of eq?.  A one-element list will serve nicely.
+    (list stem)))
 (define default-prompt-tag
-  ;; not sure if we should expose this to the user as a fluid
+  ;; Redefined later to be a parameter.
   (let ((%default-prompt-tag (make-prompt-tag)))
     (lambda ()
@@ -1326,6 +1328,14 @@ VALUE."
+;;; Once parameters have booted, define the default prompt tag as being
+;;; a parameter.
+(set! default-prompt-tag (make-parameter (default-prompt-tag)))
 ;;; Current ports as parameters.

GNU Guile

reply via email to

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