[slime-cvs] CVS update: slime/slime.el slime/swank.lisp slime/ChangeLog

Nikodemus Siivola nsiivola at common-lisp.net
Fri Dec 16 13:35:29 UTC 2005


Update of /project/slime/cvsroot/slime
In directory common-lisp.net:/tmp/cvs-serv16632

Modified Files:
	slime.el swank.lisp ChangeLog 
Log Message:
slime-selector tweak, robuster printing
Date: Fri Dec 16 14:35:27 2005
Author: nsiivola

Index: slime/slime.el
diff -u slime/slime.el:1.569 slime/slime.el:1.570
--- slime/slime.el:1.569	Fri Dec 16 12:42:34 2005
+++ slime/slime.el	Fri Dec 16 14:35:13 2005
@@ -8517,7 +8517,10 @@
 
 (def-slime-selector-method ?r
   "SLIME Read-Eval-Print-Loop."
-  (slime-output-buffer))
+  (cond ((slime-current-connection)      
+         (slime-output-buffer))
+        ((y-or-n-p "No connection: start Slime? ")
+         (slime-start))))
 
 (def-slime-selector-method ?s
   "*slime-scratch* buffer."


Index: slime/swank.lisp
diff -u slime/swank.lisp:1.353 slime/swank.lisp:1.354
--- slime/swank.lisp:1.353	Mon Nov 21 00:27:26 2005
+++ slime/swank.lisp	Fri Dec 16 14:35:14 2005
@@ -1156,10 +1156,16 @@
 
 (defun to-string (object)
   "Write OBJECT in the *BUFFER-PACKAGE*.
-The result may not be readable."
+The result may not be readable. Handles problems with PRINT-OBJECT methods
+gracefully."
   (with-buffer-syntax ()
     (let ((*print-readably* nil))
-      (prin1-to-string object))))
+      (handler-case
+          (prin1-to-string object)
+        (error ()
+          (with-output-to-string (s)
+            (print-unreadable-object (object s :type t :identity t)
+              (princ "<<error printing object>>" s))))))))
 
 (defun from-string (string)
   "Read string in the *BUFFER-PACKAGE*"


Index: slime/ChangeLog
diff -u slime/ChangeLog:1.819 slime/ChangeLog:1.820
--- slime/ChangeLog:1.819	Fri Dec 16 12:43:42 2005
+++ slime/ChangeLog	Fri Dec 16 14:35:14 2005
@@ -1,3 +1,12 @@
+2005-12-16  Nikodemus Siivola <nikodemus at random-state.net>
+
+	* slime.el (slime-selector-method: ?r): If no connection offer to
+	start Slime.
+	
+	* swank.lisp (to-string): Handle errors from printing objects.
+	Among other things makes the inspector more robust in the face of
+	objects with unbound slots and print-methods that fail to cope.
+
 2005-12-16  William Bland <doctorbill.news at gmail.com>
 
 	Added hilighting of tetx which has been edited but not yet




More information about the slime-cvs mailing list