Next: , Previous: , Up: Technical Notes   [Contents][Index]

A.2 Optional Features

As seen in Current Format Table, the current format table is stored in the variable *format-table*. In many regards, this variable looks very much like *package* or *readtable* and we sure would like it to behave in the same way, notably with respect to load and compile-file.

Standard Common Lisp doesn’t allow this, but fortunately, there is one workaround. ASDF has an extension called asdf-flv, also written by me, which essentially allows one to define any number of file-local variables, behaving like *package* or *readtable* with respect to load and compile-file.

Normally, FoCus automatically detects the availability of this extension, and if applicable, makes the variable *format-table* file-local and defines the in-format-table macro. It also puts :net.didierverna.focus.flv on *features* so that you may conditionalize your code accordingly.

FoCus can be used without this extension, but if you want to make it a strong requirement, you may load the system ‘net.didierverna.focus.flv’ instead of the regular one. Loading it will fail if asdf-flv isn’t available.