[slime-cvs] CVS slime/contrib

CVS User sboukarev sboukarev at common-lisp.net
Tue Mar 9 14:10:38 UTC 2010


Update of /project/slime/cvsroot/slime/contrib
In directory cl-net:/tmp/cvs-serv8652/contrib

Modified Files:
	ChangeLog slime-repl.el 
Log Message:
* contrib/slime-repl.el (slime-call-defun): When on defclass insert
 (make-instance 'name).

* slime.el (slime-parse-context): Add defclass.


--- /project/slime/cvsroot/slime/contrib/ChangeLog	2010/03/08 16:35:06	1.353
+++ /project/slime/cvsroot/slime/contrib/ChangeLog	2010/03/09 14:10:37	1.354
@@ -1,3 +1,8 @@
+2010-03-09  Stas Boukarev  <stassats at gmail.com>
+
+	* slime-repl.el (slime-call-defun): When on defclass insert
+	 (make-instance 'name).
+
 2010-03-08  Stas Boukarev  <stassats at gmail.com>
 
 	* swank-fancy-inspector.lisp (all-slots-for-inspector): Sort class
--- /project/slime/cvsroot/slime/contrib/slime-repl.el	2010/03/08 16:32:00	1.38
+++ /project/slime/cvsroot/slime/contrib/slime-repl.el	2010/03/09 14:10:37	1.39
@@ -1444,7 +1444,8 @@
 (defun slime-call-defun ()
   "Insert a call to the toplevel form defined around point into the REPL."
   (interactive)
-  (flet ((insert-call (symbol &optional (function-call-p t))
+  (flet ((insert-call (symbol &key (function t)
+                              defclass)
            (let* ((qualified-symbol-name (slime-qualify-cl-symbol-name symbol))
                   (symbol-name (slime-cl-symbol-name qualified-symbol-name))
                   (symbol-package (slime-cl-symbol-package qualified-symbol-name))
@@ -1453,14 +1454,16 @@
                             qualified-symbol-name)))
              (slime-switch-to-output-buffer)
              (goto-char slime-repl-input-start-mark)
-             (insert (if function-call-p
+             (insert (if function
                          "("
                          " "))
+             (if defclass
+                 (insert "make-instance '"))
              (insert call)
-             (when function-call-p
+             (when function
                (insert " ")
                (save-excursion (insert ")")))
-             (unless function-call-p
+             (unless function
                (goto-char slime-repl-input-start-mark)))))           
     (let ((toplevel (slime-parse-toplevel-form)))
       (if (symbolp toplevel)
@@ -1472,7 +1475,9 @@
              (declare (ignore args))
              (insert-call symbol))
             (((:defparameter :defvar :defconstant) symbol)
-             (insert-call symbol nil))
+             (insert-call symbol :function nil))
+            (((:defclass) symbol)
+             (insert-call symbol :defclass t))
             (t
              (error "Not in a function definition")))))))
 





More information about the slime-cvs mailing list