Project author Jean-Philippe Paradis
Project type Library
Programming language Common Lisp
Status Ready-to-use
License Public Domain
Library type Wrapper macro
Project complexity Embarrassingly trivial
Latest release Version 1.0
Date 29 oct 2012
(Nov 2012 dist and later)
Status Available
Version Latest

enhanced-eval-when provides an enhanced eval-when macro that supports
(eval-when t ...) as a shorthand for
(eval-when (:compile-toplevel :load-toplevel :execute) ...), addressing concerns about verbosity. An enhanced-eval-when alias is also supported, as well as an eval-always macro and package nickname, for good measure.

As eval-when with all situations specified is used an overwhelming majority of the time by most users, these shorthands can really come handy!

The recommended way to use enhanced-eval-when is to put (:shadowing-import-from #:enhanced-eval-when #:eval-when) in one's defpackage.

For those who would object to such shadowing, two alternatives are:

(:import-from #:enhanced-eval-when #:enhanced-eval-when)


(:import-from #:eval-always #:eval-always)
              ;;The name used for ASDF is still enhanced-eval-when.

As always, it's also possible to fully qualify symbols instead, with:

Don't (:use)!