summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2012-01-20 21:16:50 +0100
committerAndy Wingo <wingo@pobox.com>2012-01-20 21:16:50 +0100
commitfb01fd87729256ac9740a275ced1dd83dafadfdf (patch)
tree12aa770465904a26409fd0a68d644320ed32c77d
parent9accf3d98ffd1d9d484e5214a9dd9e4054204557 (diff)
downloadguile-fb01fd87729256ac9740a275ced1dd83dafadfdf.tar.gz
remove duplicate when/unless definitions
* module/rnrs/control.scm: * module/sxml/ssax.scm: * test-suite/lalr/common-test.scm: Remove local `when'/`unless' definitions.
-rw-r--r--module/rnrs/control.scm14
-rw-r--r--module/sxml/ssax.scm9
-rw-r--r--test-suite/lalr/common-test.scm7
3 files changed, 3 insertions, 27 deletions
diff --git a/module/rnrs/control.scm b/module/rnrs/control.scm
index b81c1338a..25ffa3eec 100644
--- a/module/rnrs/control.scm
+++ b/module/rnrs/control.scm
@@ -1,6 +1,6 @@
;;; control.scm --- The R6RS control structures library
-;; Copyright (C) 2010 Free Software Foundation, Inc.
+;; Copyright (C) 2010, 2012 Free Software Foundation, Inc.
;;
;; This library is free software; you can redistribute it and/or
;; modify it under the terms of the GNU Lesser General Public
@@ -19,14 +19,4 @@
(library (rnrs control (6))
(export when unless do case-lambda)
- (import (only (guile) if not begin define-syntax syntax-rules do case-lambda))
-
- (define-syntax when
- (syntax-rules ()
- ((when test result1 result2 ...)
- (if test (begin result1 result2 ...)))))
-
- (define-syntax unless
- (syntax-rules ()
- ((unless test result1 result2 ...)
- (if (not test) (begin result1 result2 ...))))))
+ (import (only (guile) when unless do case-lambda)))
diff --git a/module/sxml/ssax.scm b/module/sxml/ssax.scm
index 9709641d4..a4de0e3e1 100644
--- a/module/sxml/ssax.scm
+++ b/module/sxml/ssax.scm
@@ -1,6 +1,6 @@
;;;; (sxml ssax) -- the SSAX parser
;;;;
-;;;; Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+;;;; Copyright (C) 2009, 2010,2012 Free Software Foundation, Inc.
;;;; Modified 2004 by Andy Wingo <wingo at pobox dot com>.
;;;; Written 2001,2002,2003,2004 by Oleg Kiselyov <oleg at pobox dot com> as SSAX.scm.
;;;;
@@ -209,13 +209,6 @@ string @var{str}, which will then be parsed."
(set! ssax:predefined-parsed-entities
(acons entity str ssax:predefined-parsed-entities)))
-;; if condition is true, execute stmts in turn and return the result of
-;; the last statement otherwise, return #f
-(define-syntax when
- (syntax-rules ()
- ((when condition . stmts)
- (and condition (begin . stmts)))))
-
;; Execute a sequence of forms and return the result of the _first_ one.
;; Like PROG1 in Lisp. Typically used to evaluate one or more forms with
;; side effects and return a value that must be computed before some or
diff --git a/test-suite/lalr/common-test.scm b/test-suite/lalr/common-test.scm
index 8563029ce..8009148d0 100644
--- a/test-suite/lalr/common-test.scm
+++ b/test-suite/lalr/common-test.scm
@@ -8,13 +8,6 @@
(define *error* '())
-(define-syntax when
- (syntax-rules ()
- ((_ ?expr ?body ...)
- (if ?expr
- (let () ?body ...)
- #f))))
-
(define-syntax check
(syntax-rules (=>)
((_ ?expr => ?expected-result)