1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 03:40:34 +02:00

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.
This commit is contained in:
Andy Wingo 2009-06-10 10:53:00 +02:00
parent de3d1fc988
commit 76e834686e
2 changed files with 4 additions and 10 deletions

View file

@ -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)

View file

@ -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