mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 11:50:28 +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:
parent
de3d1fc988
commit
76e834686e
2 changed files with 4 additions and 10 deletions
|
@ -2931,8 +2931,6 @@ module '(ice-9 q) '(make-q q-length))}."
|
||||||
(process-use-modules (list (list ,@(compile-interface-spec spec))))
|
(process-use-modules (list (list ,@(compile-interface-spec spec))))
|
||||||
*unspecified*))
|
*unspecified*))
|
||||||
|
|
||||||
;; Dirk:FIXME:: This incorrect (according to R5RS) syntax needs to be changed
|
|
||||||
;; as soon as guile supports hygienic macros.
|
|
||||||
(define-syntax define-private
|
(define-syntax define-private
|
||||||
(syntax-rules ()
|
(syntax-rules ()
|
||||||
((_ foo bar)
|
((_ foo bar)
|
||||||
|
|
|
@ -410,15 +410,11 @@
|
||||||
;; (defmacro* transmorgify (a #:optional b)
|
;; (defmacro* transmorgify (a #:optional b)
|
||||||
|
|
||||||
(defmacro defmacro* (NAME ARGLIST . BODY)
|
(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 defmacro*-public (NAME ARGLIST . BODY)
|
||||||
(defmacro*-guts 'define-public NAME ARGLIST BODY))
|
`(begin
|
||||||
|
(defmacro* ,NAME ,ARGLIST ,@BODY)
|
||||||
;; The guts of defmacro* and defmacro*-public
|
(export-syntax ,NAME)))
|
||||||
(define (defmacro*-guts DT NAME ARGLIST BODY)
|
|
||||||
`(,DT ,NAME
|
|
||||||
(,(lambda (transformer) (defmacro:transformer transformer))
|
|
||||||
(lambda* ,ARGLIST ,@BODY))))
|
|
||||||
|
|
||||||
;;; optargs.scm ends here
|
;;; optargs.scm ends here
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue