[slime-devel] Better arglist support for make-instance?

Daniel Barlow dan at telent.net
Sun Apr 16 22:29:54 UTC 2006


I was quite impressed to see the special arglist support for
make-instance.  Using SBCL I had to hack it slightly so that it pays
attention to user-supplied methods on SHARED-INITIALIZE: the following
appears to work, though I don't guarantee it's Correct.


:; cvs diff -u swank.lisp 
Index: swank.lisp
===================================================================
RCS file: /project/slime/cvsroot/slime/swank.lisp,v
retrieving revision 1.375
diff -u -r1.375 swank.lisp
--- swank.lisp  28 Mar 2006 20:41:53 -0000      1.375
+++ swank.lisp  16 Apr 2006 22:06:36 -0000
@@ -1792,9 +1792,13 @@
                                    (swank-mop:slot-definition-initargs slot))))
                     (initialize-instance-keywords
                      (applicable-methods-keywords #'initialize-instance 
-                                                  (list class))))
+                                                  (list class)))
+                    (shared-initialize-keywords
+                     (applicable-methods-keywords #'shared-initialize 
+                                                  (list class nil))))
                 (return-from extra-keywords/make-instance
                   (values (append slot-init-keywords 
+                                  shared-initialize-keywords
                                   initialize-instance-keywords)
                           allow-other-keys-p
                           (list class-name-form)))))))))))




More information about the slime-devel mailing list