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

Helmut Eller heller at common-lisp.net
Sat Apr 17 09:26:00 UTC 2004


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

Modified Files:
	swank-cmucl.lisp 
Log Message:
(source-location-tlf-number, source-location-form-number): New
functions.
(resolve-stream-source-location, resolve-file-source-location): Use them.
Date: Sat Apr 17 05:25:58 2004
Author: heller

Index: slime/swank-cmucl.lisp
diff -u slime/swank-cmucl.lisp:1.94 slime/swank-cmucl.lisp:1.95
--- slime/swank-cmucl.lisp:1.94	Tue Apr  6 06:42:53 2004
+++ slime/swank-cmucl.lisp	Sat Apr 17 05:25:58 2004
@@ -712,19 +712,28 @@
                                    `(:function-name ,string)))
           (t (list :error (princ-to-string c))))))
 
+(defun source-location-form-numbers (location)
+  (c::decode-form-numbers (c::form-numbers-form-numbers location)))
+
+(defun source-location-tlf-number (location)
+  (nth-value 0 (source-location-form-numbers location)))
+
+(defun source-location-form-number (location)
+  (nth-value 1 (source-location-form-numbers location)))
+
 (defun resolve-file-source-location (location)
   (let ((filename (c::file-source-location-pathname location))
-        (tlf-number (c::file-source-location-tlf-number location))
-        (form-number (c::file-source-location-tlf-number location)))
+        (tlf-number (source-location-tlf-number location))
+        (form-number (source-location-form-number location)))
     (with-open-file (s filename)
       (let ((pos (form-number-stream-position tlf-number form-number s)))
         (make-location `(:file ,(unix-truename filename))
                        `(:position ,(1+ pos)))))))
 
-(defun resolve-source-location (location)
-  (let ((info (c::source-location-user-info location))
-        (tlf-number (c::source-location-tlf-number location))
-        (form-number (c::source-location-tlf-number location)))
+(defun resolve-stream-source-location (location)
+  (let ((info (c::stream-source-location-user-info location))
+        (tlf-number (source-location-tlf-number location))
+        (form-number (source-location-form-number location)))
     ;; XXX duplication in frame-source-location
     (assert (info-from-emacs-buffer-p info))
     (destructuring-bind (&key emacs-buffer emacs-buffer-string 
@@ -741,8 +750,8 @@
        `(:error ,(format nil "No source info for: ~A" object)))
       (c::file-source-location
        (resolve-file-source-location source))
-      (c::source-location
-       (resolve-source-location source))
+      (c::stream-source-location
+       (resolve-stream-source-location source))
       (pathname 
        (make-name-in-file-location source name))
       (cons





More information about the slime-cvs mailing list