From: Richard M. Stallman Date: Sun, 4 Mar 2007 17:55:23 +0000 (+0000) Subject: (Eval During Compile): Clarify putting macros in eval-when-compile. X-Git-Tag: emacs-pretest-22.0.96~283 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0c47ccd44ef2de6c7df6241b46bb99977251427b;p=emacs.git (Eval During Compile): Clarify putting macros in eval-when-compile. --- diff --git a/lispref/compile.texi b/lispref/compile.texi index 0d63887e1cc..4ed0eb8c1bf 100644 --- a/lispref/compile.texi +++ b/lispref/compile.texi @@ -454,11 +454,10 @@ used to load it for compiling, but not executing. For example, (require 'my-macro-package)) ;; only macros needed from this @end lisp -The same sort of thing goes for macros or @code{defalias}es defined -locally and only for use within the file. They can be defined while -compiling, but then not needed when executing. This is good for code -that's only a fallback for compatibility with other versions of Emacs. -For example. +The same sort of thing goes for macros and @code{defsubst} functions +defined locally and only for use within the file. They are needed for +compiling the file, but in most cases they are not needed for +execution of the compiled file. For example, @lisp (eval-when-compile @@ -467,6 +466,10 @@ For example. (compatibility code)))) @end lisp +@noindent +This is often good for code that's only a fallback for compatibility +with other versions of Emacs. + @strong{Common Lisp Note:} At top level, @code{eval-when-compile} is analogous to the Common Lisp idiom @code{(eval-when (compile eval) @dots{})}. Elsewhere, the Common Lisp @samp{#.} reader macro (but not when interpreting) is closer