delq-oneGBBopen Toolsdefine-classdefcmGoTo Top

defcm   name lambda-list [[declaration* | documentation]] form* => name[Macro]

Define a read-time conditional compiler macro.

Package   :gbbopen-tools

Module   :gbbopen-tools

Arguments and values

name     A non-nil, non-keyword symbol that names a function or macro
lambda-list     A lambda-list
declaration     A declare expression (not evaluated)
documentation     A documentation string (not evaluated)
form     A form

The supplied name.

Defcm is a read-time conditional version of Common Lisp's define-compiler-macro. As with define-compiler-macro:

A compiler macro is not defined if the feature :disable-compiler-macros or the feature :full-safety is present when the expander function is executed on a form.

See also

Here is the compiler macro defined for ensure-list:

  > (defcm ensure-list (x)
      (with-once-only-bindings (x)
        `(if (listp ,x) ,x (list ,x))))

The GBBopen Project

delq-oneGBBopen Toolsdefine-classdefcmGoTo Top