chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-users] multiple define from a macro


From: minh thu
Subject: [Chicken-users] multiple define from a macro
Date: Mon, 26 Mar 2007 12:59:57 +0200

Hi,

I began to write this macro:

(define-macro (csg:make-mode-handler mode)
 (let ((name+   (string->symbol (string-append "bind+/"
(symbol->string mode))))
       (name-   (string->symbol (string-append "bind-/"
(symbol->string mode))))
       (press   (string->symbol (string-append "key-press-bindings/"
(symbol->string mode))))
       (release (string->symbol (string-append
"key-release-bindings/" (symbol->string mode)))))
   `(define ,press '())
   `(define ,release '())
   `(define (,name+) (print "hello+"))
   `(define (,name-) (print "hello-"))))

Only the later `(define ...) is produced. How can I have the three
other ones produced too ?

Is it the correct way to achieve this ?

Thanks a lot,
thu




reply via email to

[Prev in Thread] Current Thread [Next in Thread]