Complete the WITH-BINDINGS set of macros
The following features are planned for with-bindings
and with-bindings*
, which are currently located in util.lisp:
- There should be a way to add options, probably as a
(:options ...
"binding" entry. - In the options, allow a variation of the macro that generates
check-type
instead ofdeclare
, just likedefine-function
. - Add options to change the default values of the options allowed in the generated
flet*
/labels*
, essentially serving as a local override for thedefine-function
defaults. - Add support for
destructuring-bind
s, perhaps as a reimplementation of thedestructuring-bind
concept so the errors are portable. - Generate
dynamic-extent
declarations (static rather than heap allocated). - Generate
special
(dynamic) variable declarations. - Generate
ignore
andignorable
declarations. - Options should be able to set the default values for these additional declarations that can be generated.
Additionally, do-with-bindings
and do-with-bindings*
need to be added to provide do
-like or do*
-like behavior, but using with-bindings
or with-bindings*
instead of let
or let*
, thus giving them almost as much power as loop
. This requires a tagbody
-and-go
reimplementation since neither do
nor loop
is extensible enough.
Tangentially (possibly as its own issue), there should be a compatible way to handle global defvar
, defparameter
, defconstant
, etc., just like with-bindings
, via flet*
and labels*
, ties into the define-function
macro.
Finally, these macros are not very usable if their sophisticated indentation isn't supported inside of GNU Emacs, but that will be filed as a related issue.