cl-eval-when

cl-eval-when is an autoloaded Lisp macro in `cl-macs.el'.

(cl-eval-when (WHEN...) BODY...)

Control when BODY is evaluated.
If `compile' is in WHEN, BODY is evaluated when compiled at top-level.
If `load' is in WHEN, BODY is evaluated when loaded after top-level compile.
If `eval' is in WHEN, BODY is evaluated when interpreted or at non-top-level.