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

Helmut Eller heller at common-lisp.net
Sat May 22 08:04:20 UTC 2004


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

Modified Files:
	swank-allegro.lisp 
Log Message:
(fspec-primary-name): New function.
(find-fspec-location): Use it, if the start position cannot be found.
Date: Sat May 22 04:04:20 2004
Author: heller

Index: slime/swank-allegro.lisp
diff -u slime/swank-allegro.lisp:1.31 slime/swank-allegro.lisp:1.32
--- slime/swank-allegro.lisp:1.31	Fri May 21 04:19:47 2004
+++ slime/swank-allegro.lisp	Sat May 22 04:04:19 2004
@@ -202,19 +202,21 @@
 
 ;;;; Definition Finding
 
+(defun fspec-primary-name (fspec)
+  (etypecase fspec
+    (symbol (string fspec))
+    (list (string (second fspec)))))
+
 (defun find-fspec-location (fspec type)
-  (let* ((fspec (if (consp fspec) 
-                    (excl::to-internal-fspec fspec)
-                    fspec))
-         (info (car (excl::fspec-fspec-info fspec)))
-         (file (excl::fspec-info-pathname info)))
+  (let ((file (excl:source-file fspec)))
     (etypecase file
       (pathname
-       (let ((start (scm:find-definition-in-file fspec type file)))
+       (let* ((start (scm:find-definition-in-file fspec type file))
+              (pos (if start
+                       (list :position (1+ start))
+                       (list :function-name (fspec-primary-name fspec)))))
          (make-location (list :file (namestring (truename file)))
-                        (if start
-                            (list :position (1+ start))
-                            (list :function-name (string (third info)))))))
+                        pos)))
       ((member :top-level)
        (list :error (format nil "Defined at toplevel: ~A" fspec)))
       (null 





More information about the slime-cvs mailing list