The simplest way to do what you want is to add a &whole parameter at the beginning of the argument list, that argument will receive the entire form as it appeared in your source code.

As a general rule you want to avoid mixing &key with &optional because if you don't specify all of the optional arguments then the compiler thinks that you meant to use the keyword as one of the optional arguments.

BTW sbcl gives you a style warning if you try to do this, because of this very issue.

You could fix this by manually scanning your &optional arguments for one of your &key argument keywords and then some setf action, but it is generally better to just make all optional args keyword args.

The thing is - those optional arguments are what SBCL adds on top of the standard make-hash-table arguments, and I'd like to keep them in the macro just the same way they appear in the original function.

As a general rule [...]

Yup, I've noticed - which makes them pretty much mandatory, in the contrast to the keyword used to declare them I think I'll just go with the all-keywords option then. Thanks.

PS. Actually, after you said that, I went to look at the function's source and it appears to have all of them as keywords - for w/e reason slime's autocompletion showed them as optional arguments instead.

Sorry, this actually does something strange for me... it complains about me not passing in the correct number of arguments, and it says that no more then 0 (zero) arguments are expected to satisfy the lambda list containing &whole. I.e. the code as you posted it won't work for me (won't create a hash table, unless I call it with no arguments).

Thanks, I've red that, but I can't make any legitimate use of the &whole keyword, unless I'm not passing any arguments, including your example (it doesn't compile for me, if any arguments are given). So, what I'm trying to understand is:(most probably) I'm doing something wrong, but I don't know what.(less probably) this keyword isn't implemented in SBCL, the version I'm using - which would also explain it.