In guile 1.6.3 on a recent i386 debian, I thought to make myself a "define if not already defined" using
(use-modules (ice-9 syncase)) (define-syntax define-maybe (syntax-rules () ((define-maybe name value) (if (not (defined? 'name)) (define name value))))) (define-maybe x 123) but run with "guile -s foo.scm" gives /down/guile/usr/share/guile/1.6/ice-9/syncase.scm:130:16: In procedure scm-error in expression (scm-error (quote misc-error) who ...): /down/guile/usr/share/guile/1.6/ice-9/syncase.scm:130:16: invalid context for definition of x I guess I'm not sure if this is a bug, but (if (not (defined? 'x)) (define x 123)) worked at the top-level, so I thought perhaps it could be expected to in a macro too. _______________________________________________ Bug-guile mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-guile