Luke Gorrie luke@synap.se writes:
I know it's late in the game to be asking this, but what's the complete-form command really used for?
I type an operator that has a complicated arglist. Slime-complete-form fills in a template for the arglist. I can C-M-f over the formal arguments and replace them with the actual args. I can C-M-k unneeded keyword arguments. When the actual args are complicated, I often let-bind them to the formal argument name instead, so I don't even have to modify the inserted template.
This is more efficient (and feels much less stupid) than looking at the echo area and typing in what is displayed there.
The patch integrates the code for detecting extra keyword arguments for generic functions into the arglist display in the echo area, as suggested by Luke.
What I would really like is that if I type this:
CL-USER> (defclass foo () ((x :initarg :x) (y :initarg :y))) #<STANDARD-CLASS FOO> CL-USER> (make-instance 'foo
then slime-space arglist display shows this:
(make-instance 'foo &key x y)
basically for slime-space to generate output similarly to slime-complete-form.
Yes, I also want this. It requires, however, a change in the protocol of ARGLIST-FOR-ECHO-AREA. Currently it only gets the list of nested operator names as strings. For the new functionality, we would also need the "nested operands" before point. And one needs to be more careful with READing the operands before point, so as not to INTERN too much. (Like for reading the operators, where SLIME uses PARSE-SYMBOL rather than READ.) Maybe someone would like to help here.
And if we had such good arglist display as this I wonder if slime-complete-form would still be neede?
Yes!
Cheers,