#291: Compiler-macros and symbol-macros -----------------------+---------------------------------------------------- Reporter: sboukarev | Owner: ehuelsmann Type: defect | Status: new Priority: major | Milestone: Component: compiler | Version: Keywords: | -----------------------+---------------------------------------------------- {{{ (define-symbol-macro +sm+ (print "hello"))
(defun test () (list +sm+ 1))
(eval-when (:compile-toplevel :load-toplevel :execute) (define-compiler-macro test () '+sm+))
(defun bar () (test))
(bar) }}}
(load (compile-file "/tmp/foo.lisp")) ; in (DEFUN BAR ...)
; Caught STYLE-WARNING: ; Undefined variable +SM+ assumed special
; Compilation unit finished ; Caught 1 STYLE-WARNING condition
Error loading /tmp/foo.abcl at line 13 (offset 536) #<THREAD "interpreter" {5BDCD49D}>: Debugger invoked on condition of type UNBOUND-VARIABLE The variable +SM+ is unbound