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

Luke Gorrie lgorrie at common-lisp.net
Wed Aug 4 17:17:55 UTC 2004


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

Modified Files:
	swank-allegro.lisp 
Log Message:
(find-fspec-location): Include the type of the definition in the
designator sent to Emacs.

Date: Wed Aug  4 10:17:55 2004
Author: lgorrie

Index: slime/swank-allegro.lisp
diff -u slime/swank-allegro.lisp:1.48 slime/swank-allegro.lisp:1.49
--- slime/swank-allegro.lisp:1.48	Wed Aug  4 09:18:55 2004
+++ slime/swank-allegro.lisp	Wed Aug  4 10:17:55 2004
@@ -273,19 +273,26 @@
          (make-location (list :file (namestring (truename file)))
                         pos)))
       ((member :top-level)
-       (list :error (format nil "Defined at toplevel: ~A" fspec)))
+       (list :error (format nil "Defined at toplevel: ~A" (fspec->string fspec))))
       (string
        (let ((pos (position #\: file)))
-         (make-location 
+         (make-location
           (list :buffer (subseq file 0 pos))
           (list :position (parse-integer (subseq file (1+ pos)))))))
       (null 
-       (list :error (format nil "Unknown source location for ~A" fspec))))))
+       (list :error (format nil "Unknown source location for ~A" (fspec->string fspec)))))))
+
+(defun fspec->string (fspec &aux (*package* (find-package :keyword)))
+  (etypecase fspec
+    (symbol (prin1-to-string fspec))
+    (list (format nil "(method ~A)" 
+                  (prin1-to-string (second fspec))))))
 
 (defun fspec-definition-locations (fspec)
   (let ((defs (excl::find-multiple-definitions fspec)))
     (loop for (fspec type) in defs 
-          collect (list fspec (find-fspec-location fspec type)))))
+          collect (list (list type fspec)
+                        (find-fspec-location fspec type)))))
 
 (defimplementation find-definitions (symbol)
   (fspec-definition-locations symbol))





More information about the slime-cvs mailing list