Hello,
The attached patch extends slime-echo-arglist in order to display a classe's initargs and initforms when make-instance is detected. Here's an example:
CL-USER> (defclass foo () ((a :initarg :initarg-a :initform nil) (b :initarg :initarg-b) c)) #<STANDARD-CLASS FOO> CL-USER> (make-instance<space> ;; minibuffer displays: (make-instance class &rest initargs)
CL-USER> (make-instance 'foo<space> ;; minibuffer displays: (make-instance 'foo &key (initarg-a nil) initarg-b)
The code is a bit ugly, specially on the elisp side. It could perhaps be generalized to support more cases like this. Suggestions on how to improve it are most welcome!
(BTW, the ChangeLog seems to be use the latin-1 enconding, perhaps using utf-8 and/or adding a -*- coding: ... -*- line at the top would be a good idea?)
* Luís Oliveira [2006-01-27 02:29+0100] writes:
CL-USER> (make-instance 'foo<space> ;; minibuffer displays: (make-instance 'foo &key (initarg-a nil) initarg-b)
That's very useful. Thanks for sharing that feature.
The code is a bit ugly, specially on the elisp side. It could perhaps be generalized to support more cases like this. Suggestions on how to improve it are most welcome!
The code looks OK to me. I committed your patch.
(BTW, the ChangeLog seems to be use the latin-1 enconding, perhaps using utf-8 and/or adding a -*- coding: ... -*- line at the top would be a good idea?)
Add added coding line, too.
Helmut.