diff options
author | Andy Wingo <wingo@oblong.net> | 2009-06-10 10:53:00 +0200 |
---|---|---|
committer | Andy Wingo <wingo@oblong.net> | 2009-06-10 10:53:22 +0200 |
commit | 76e834686ede4d55739556af60c80ff66145d74c (patch) | |
tree | 45730b738168165766b491aaaad23b4f74d99101 | |
parent | de3d1fc9884ae587862ed119700fcc59c1452407 (diff) | |
download | guile-76e834686ede4d55739556af60c80ff66145d74c.tar.gz |
fix defmacro*, defmacro*-public
* module/ice-9/boot-9.scm (define-private): Remove apocyphal comment. The
FIXME would really be to remove `define-private', though...
* module/ice-9/optargs.scm (defmacro*, defmacro*-public): Fix these
macros. Thanks to Dale Smith for the report.
-rw-r--r-- | module/ice-9/boot-9.scm | 2 | ||||
-rw-r--r-- | module/ice-9/optargs.scm | 12 |
2 files changed, 4 insertions, 10 deletions
diff --git a/module/ice-9/boot-9.scm b/module/ice-9/boot-9.scm index 78b194aa3..3d77093c0 100644 --- a/module/ice-9/boot-9.scm +++ b/module/ice-9/boot-9.scm @@ -2931,8 +2931,6 @@ module '(ice-9 q) '(make-q q-length))}." (process-use-modules (list (list ,@(compile-interface-spec spec)))) *unspecified*)) -;; Dirk:FIXME:: This incorrect (according to R5RS) syntax needs to be changed -;; as soon as guile supports hygienic macros. (define-syntax define-private (syntax-rules () ((_ foo bar) diff --git a/module/ice-9/optargs.scm b/module/ice-9/optargs.scm index 4dea92fd7..975703c2d 100644 --- a/module/ice-9/optargs.scm +++ b/module/ice-9/optargs.scm @@ -410,15 +410,11 @@ ;; (defmacro* transmorgify (a #:optional b) (defmacro defmacro* (NAME ARGLIST . BODY) - (defmacro*-guts 'define NAME ARGLIST BODY)) + `(define-macro ,NAME #f (lambda* ,ARGLIST ,@BODY))) (defmacro defmacro*-public (NAME ARGLIST . BODY) - (defmacro*-guts 'define-public NAME ARGLIST BODY)) - -;; The guts of defmacro* and defmacro*-public -(define (defmacro*-guts DT NAME ARGLIST BODY) - `(,DT ,NAME - (,(lambda (transformer) (defmacro:transformer transformer)) - (lambda* ,ARGLIST ,@BODY)))) + `(begin + (defmacro* ,NAME ,ARGLIST ,@BODY) + (export-syntax ,NAME))) ;;; optargs.scm ends here |