6.1.2 Macros

Macro: defgroup (&rest KEYS &key HEADER HIDDEN) &body FORMS

Define a new group.
KEYS are initargs to MAKE-GROUP (currently, only :header).
Each form in FORMS will be treated as a new :item.
The CAR of each form is the name of the operation to perform: TEXT, GROUP, or an option class name. The rest are the arguments to the MAKE-<OP> function or the DEFGROUP macro.

Package

net.didierverna.clon

Source

group.lisp (file)

Macro: defsynopsis (&rest KEYS &key POSTFIX MAKE-DEFAULT) &body FORMS

Define a new synopsis.

Package

net.didierverna.clon

Source

synopsis.lisp (file)

Macro: do-cmdline-options (OPTION NAME VALUE SOURCE &key CONTEXT) &body BODY

Evaluate BODY over all command-line options in CONTEXT.
OPTION, NAME and VALUE are bound to each option’s object, name used on the command-line and retrieved value.

Package

net.didierverna.clon

Source

context.lisp (file)

Macro: dump NAME FUNCTION &rest ARGS

Dump a standalone executable named NAME starting with FUNCTION.
ARGS may be any arguments understood by the underlying implementation’s dumping facility. They will simply be passed along. Note that DUMP already passes some such arguments. Some of them are critical for the dumping facility (e.g. :executable) and cannot be overridden. Some others, however, will be if you provide them as well (e.g. :load-init-file).

Since executable dumping is not available in all supported implementations, this function behaves differently in some cases, as described below.

- ECL doesn’t create executables by dumping a Lisp image, but relies on having toplevel code to execute instead, so this macro simply expands to a call to FUNCTION. This also means that ARGS is unused.
- ABCL can’t dump executables at all because of the underlying Java implementation, so this macro expands to just (PROGN) but creates a Java class file with a main function that creates an interpreter, loads
the file in which this macro call appears and calls FUNCTION. This also means that ARGS is unused.

Package

net.didierverna.clon

Source

util.lisp (file)

Macro: multiple-value-getopt-cmdline (OPTION NAME VALUE SOURCE &key CONTEXT) &body BODY

Get the next command-line option in CONTEXT. and evaluate BODY. OPTION, NAME and VALUE are bound to the values returned by GETOPT-CMDLINE. BODY is executed only if there is a next command-line option.

Package

net.didierverna.clon

Source

context.lisp (file)

Macro: with-context CONTEXT &body BODY

Execute BODY with *context* bound to CONTEXT.

Package

net.didierverna.clon

Source

context.lisp (file)