In complex macros, that would for instance implement some
domain-specific language, it would be benefitical when the macro could
point to subform in question. The compiler-warn
function does allow
you to do that.
http://clim.rocks/systems/compiler-warn/compiler-warn.tar.gz
compiler-warn.lisp
de.bauhh.compiler-warn.asd
| Function |
Issue a warning about the form form. When possible implementation specific means are used to point the finger at the form, so that eventually SLIME or whatever IDE could highlight the context. When not available or not within the compiler, a normal warning is issued.
Obviously this does not work if form is an atom.
To narrow down the context you could setup a next best context
with compiler-descend
.
| Function |
Same as compiler-warn
, but signals an error.
| Macro |
The compiler-warn
function could point the finger at the form
warned about, if it is an atom. A next best (outer) choice could
be given by compiler-descend
.
Gilbert Baumann, 2021-02-15