From: Andreas Rottmann <a.rottmann@gmx.at>
To: Guile Development <guile-devel@gnu.org>
Subject: [PATCH] ice-9 receive without defmacro
Date: Sat, 19 Jun 2010 14:10:34 +0200 [thread overview]
Message-ID: <87iq5fussl.fsf@delenn.lan> (raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: receive-without-defmacro.diff --]
[-- Type: text/x-diff, Size: 1166 bytes --]
From: Andreas Rottmann <a.rottmann@gmx.at>
Subject: ice-9 receive without define-macro
* module/ice-9/receive.scm: Replace define-macro usage with syntax-rules.
---
module/ice-9/receive.scm | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/module/ice-9/receive.scm b/module/ice-9/receive.scm
index d550c6f..f4f4d81 100644
--- a/module/ice-9/receive.scm
+++ b/module/ice-9/receive.scm
@@ -1,6 +1,6 @@
;;;; SRFI-8
-;;; Copyright (C) 2000, 2001, 2004, 2006 Free Software Foundation, Inc.
+;;; Copyright (C) 2000, 2001, 2004, 2006, 2010 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
@@ -21,8 +21,10 @@
:no-backtrace
)
-(define-macro (receive vars vals . body)
- `(call-with-values (lambda () ,vals)
- (lambda ,vars ,@body)))
+(define-syntax receive
+ (syntax-rules ()
+ ((receive vars vals . body)
+ (call-with-values (lambda () vals)
+ (lambda vars . body)))))
(cond-expand-provide (current-module) '(srfi-8))
--
tg: (c399333..) t/receive-without-defmacro (depends on: master)
[-- Attachment #2: Type: text/plain, Size: 57 bytes --]
Regards,
--
Andreas Rottmann -- <http://rotty.yi.org/>
reply other threads:[~2010-06-19 12:10 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87iq5fussl.fsf@delenn.lan \
--to=a.rottmann@gmx.at \
--cc=guile-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).