[slime-devel] Re: slime-edit-definition error

Juho Snellman jsnell at iki.fi
Tue Jan 17 19:27:00 UTC 2006


On Mon, Jan 16, 2006 at 11:48:07PM +0000, Jonathon McKitrick wrote:
> I am trying to jump to the definition of a function, and got this running
> SBCL.  Any idea what this could be?

At a guess the Lisp file that contains the definition you're trying to
view is using a different encoding than your default locale. Does the
following patch fix your problem?

Index: swank-sbcl.lisp
===================================================================
RCS file: /project/slime/cvsroot/slime/swank-sbcl.lisp,v
retrieving revision 1.151
diff -u -r1.151 swank-sbcl.lisp
--- swank-sbcl.lisp	5 Dec 2005 23:01:50 -0000	1.151
+++ swank-sbcl.lisp	17 Jan 2006 19:14:17 -0000
@@ -444,12 +444,18 @@
   (list (list* (getf *definition-types* type)
                name
                (sb-introspect::definition-source-description source-location))
-        (if *debug-definition-finding*
-            (make-definition-source-location source-location type name)
-            (handler-case (make-definition-source-location source-location
-                                                           type name)
-              (error (e)
-                     (list :error (format nil "Error: ~A" e)))))))
+        (block test
+          (if *debug-definition-finding*
+              (make-definition-source-location source-location type name)
+              (handler-bind
+                  ((sb-int:stream-decoding-error
+                    (lambda (e)
+                      (invoke-restart 'sb-int:attempt-resync)))
+                   (error
+                    (lambda (e)
+                      (return-from test
+                        (list :error (format nil "Error: ~A" e))))))
+                (make-definition-source-location source-location type name))))))
 
 (defun make-definition-source-location (definition-source type name)
   (with-struct (sb-introspect::definition-source-

-- 
Juho Snellman



More information about the slime-devel mailing list