Copyright (C) 2000-2012 |
GNU Info (elisp)Eval During CompileEvaluation During Compilation ============================= These features permit you to write code to be evaluated during compilation of a program. - Special Form: eval-and-compile body This form marks BODY to be evaluated both when you compile the containing code and when you run it (whether compiled or not). You can get a similar result by putting BODY in a separate file and referring to that file with `require'. That method is preferable when BODY is large. - Special Form: eval-when-compile body This form marks BODY to be evaluated at compile time but not when the compiled program is loaded. The result of evaluation by the compiler becomes a constant which appears in the compiled program. If you load the source file, rather than compiling it, BODY is evaluated normally. *Common Lisp Note:* At top level, this is analogous to the Common Lisp idiom `(eval-when (compile eval) ...)'. Elsewhere, the Common Lisp `#.' reader macro (but not when interpreting) is closer to what `eval-when-compile' does. automatically generated by info2www version 1.2.2.9 |