[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] GNU Guile branch, master, updated. release_1-9-4-12-g60c
From: |
Ludovic Courtès |
Subject: |
[Guile-commits] GNU Guile branch, master, updated. release_1-9-4-12-g60c8ad9 |
Date: |
Wed, 21 Oct 2009 21:42:05 +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=60c8ad9ea3e84c4957d978afc6c311b490e8e5b2
The branch, master has been updated
via 60c8ad9ea3e84c4957d978afc6c311b490e8e5b2 (commit)
from d587c9e8b27219e68f8813fb648fc6913c93be0f (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 60c8ad9ea3e84c4957d978afc6c311b490e8e5b2
Author: Ludovic Courtès <address@hidden>
Date: Wed Oct 21 23:41:56 2009 +0200
Add a `guile-2' SRFI-0 feature.
* doc/ref/srfi-modules.texi (SRFI-0): Mention the `guile-2' feature.
* module/ice-9/boot-9.scm (%cond-expand-features): Add `guile-2'.
-----------------------------------------------------------------------
Summary of changes:
doc/ref/srfi-modules.texi | 18 ++++++++++++++++++
module/ice-9/boot-9.scm | 1 +
2 files changed, 19 insertions(+), 0 deletions(-)
diff --git a/doc/ref/srfi-modules.texi b/doc/ref/srfi-modules.texi
index d3183e2..fbba7c5 100644
--- a/doc/ref/srfi-modules.texi
+++ b/doc/ref/srfi-modules.texi
@@ -135,6 +135,7 @@ The Guile core has the following features,
@example
guile
+guile-2 ;; starting from Guile 2.x
r5rs
srfi-0
srfi-4
@@ -162,6 +163,23 @@ how to load it with the Guile mechanism.
(use-modules (srfi srfi-8))))
@end example
address@hidden @code{guile-2} SRFI-0 feature
address@hidden portability between 2.0 and older versions
+Likewise, testing the @code{guile-2} feature allows code to be portable
+between Guile 2.0 and previous versions of Guile. For instance, it
+makes it possible to write code that accounts for Guile 2.0's compiler,
+yet be correctly interpreted on 1.8 and earlier versions:
+
address@hidden
+(cond-expand (guile-2 (eval-when (compile)
+ ;; This must be evaluated at compile time.
+ (fluid-set! current-reader my-reader)))
+ (guile
+ ;; Earlier versions of Guile do not have a
+ ;; separate compilation phase.
+ (fluid-set! current-reader my-reader)))
address@hidden example
+
It should be noted that @code{cond-expand} is separate from the
@code{*features*} mechanism (@pxref{Feature Tracking}), feature
symbols in one are unrelated to those in the other.
diff --git a/module/ice-9/boot-9.scm b/module/ice-9/boot-9.scm
index 140a761..7af2fd4 100644
--- a/module/ice-9/boot-9.scm
+++ b/module/ice-9/boot-9.scm
@@ -3258,6 +3258,7 @@ module '(ice-9 q) '(make-q q-length))}."
(define %cond-expand-features
;; Adjust the above comment when changing this.
'(guile
+ guile-2
r5rs
srfi-0 ;; cond-expand itself
srfi-4 ;; homogenous numeric vectors
hooks/post-receive
--
GNU Guile
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Guile-commits] GNU Guile branch, master, updated. release_1-9-4-12-g60c8ad9,
Ludovic Courtès <=