[slime-cvs] CVS slime

mkoeppe mkoeppe at common-lisp.net
Thu May 4 14:38:07 UTC 2006


Update of /project/slime/cvsroot/slime
In directory clnet:/tmp/cvs-serv27677

Modified Files:
	swank-allegro.lisp 
Log Message:
(fspec-definition-locations): Handle
:top-level-form entries that appear in backtraces.


--- /project/slime/cvsroot/slime/swank-allegro.lisp	2006/03/24 07:30:18	1.86
+++ /project/slime/cvsroot/slime/swank-allegro.lisp	2006/05/04 14:38:07	1.87
@@ -400,16 +400,25 @@
                     (prin1-to-string (second fspec)))))))
 
 (defun fspec-definition-locations (fspec)
-  (let ((defs (excl::find-source-file fspec)))
-    (if (null defs)
-        (list
-         (list (list nil fspec)
-               (list :error
-                     (format nil "Unknown source location for ~A" 
-                             (fspec->string fspec)))))
+  (cond
+   ((and (listp fspec)
+         (eql (car fspec) :top-level-form))
+    (destructuring-bind (top-level-form file position) fspec 
+      (list
+       (list (list nil fspec)
+             (make-location (list :buffer file)
+                            (list :position position))))))
+   (t
+    (let ((defs (excl::find-source-file fspec)))
+      (if (null defs)
+          (list
+           (list (list nil fspec)
+                 (list :error
+                       (format nil "Unknown source location for ~A" 
+                               (fspec->string fspec)))))
         (loop for (fspec type file top-level) in defs 
-           collect (list (list type fspec)
-                         (find-fspec-location fspec type file top-level))))))
+              collect (list (list type fspec)
+                            (find-fspec-location fspec type file top-level))))))))
 
 (defimplementation find-definitions (symbol)
   (fspec-definition-locations symbol))




More information about the slime-cvs mailing list