[slime-cvs] CVS update: slime/ChangeLog slime/slime.el slime/swank-abcl.lisp slime/swank-allegro.lisp slime/swank-backend.lisp slime/swank-clisp.lisp slime/swank-cmucl.lisp slime/swank-lispworks.lisp slime/swank-openmcl.lisp slime/swank-sbcl.lisp slime/swank.lisp

Peter Seibel pseibel at common-lisp.net
Sat Aug 28 02:27:14 UTC 2004


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

Modified Files:
	ChangeLog slime.el swank-abcl.lisp swank-allegro.lisp 
	swank-backend.lisp swank-clisp.lisp swank-cmucl.lisp 
	swank-lispworks.lisp swank-openmcl.lisp swank-sbcl.lisp 
	swank.lisp 
Log Message:
Adding directory argument to swank-compile-string.

Date: Fri Aug 27 19:27:08 2004
Author: pseibel

Index: slime/ChangeLog
diff -u slime/ChangeLog:1.509 slime/ChangeLog:1.510
--- slime/ChangeLog:1.509	Mon Aug 23 02:57:45 2004
+++ slime/ChangeLog	Fri Aug 27 19:27:08 2004
@@ -1,3 +1,9 @@
+2004-08-27  Peter Seibel  <peter at javamonkey.com>
+
+	* swank-backend.lisp (swank-compile-string): Add directory
+	argument which is used by Allegro backend to improve source
+	recording for definitions compiled with C-c C-c.
+ 
 2004-08-23  John Paul Wallington  <jpw at gnu.org>
 
 	* slime.el (slime-pretty-package-name): Fix last cond clause.


Index: slime/slime.el
diff -u slime/slime.el:1.393 slime/slime.el:1.394
--- slime/slime.el:1.393	Mon Aug 23 02:51:07 2004
+++ slime/slime.el	Fri Aug 27 19:27:08 2004
@@ -3147,7 +3147,11 @@
 
 (defun slime-compile-string (string start-offset)
   (slime-eval-async 
-   `(swank:compile-string-for-emacs ,string ,(buffer-name) ,start-offset)
+   `(swank:compile-string-for-emacs
+     ,string
+     ,(buffer-name)
+     ,start-offset
+     ,(if (buffer-file-name) (file-name-directory (buffer-file-name))))
    (slime-compilation-finished-continuation)))
 
 (defvar slime-hide-style-warning-count-if-zero t)
@@ -7157,7 +7161,7 @@
       ("swank::emacs-connected"
        "(swank::emacs-connected stream)")
       ("swank::compile-string-for-emacs"
-       "(swank::compile-string-for-emacs string buffer position)")
+       "(swank::compile-string-for-emacs string buffer position directory)")
       ("swank::connection.socket-io"
        "(swank::connection.socket-io \\(struct\\(ure\\)?\\|object\\|instance\\))")
       ("cl:lisp-implementation-type"


Index: slime/swank-abcl.lisp
diff -u slime/swank-abcl.lisp:1.9 slime/swank-abcl.lisp:1.10
--- slime/swank-abcl.lisp:1.9	Tue Aug  3 05:15:57 2004
+++ slime/swank-abcl.lisp	Fri Aug 27 19:27:08 2004
@@ -215,7 +215,8 @@
                       (compile-file *compile-filename*)
                     (when load-p (unless fail (load fn)))))))
 
-(defimplementation swank-compile-string (string &key buffer position)
+(defimplementation swank-compile-string (string &key buffer position directory)
+  (declare (ignore directory))
   (handler-bind ((warning #'handle-compiler-warning))
     (let ((*buffer-name* buffer)
           (*buffer-start-position* position)


Index: slime/swank-allegro.lisp
diff -u slime/swank-allegro.lisp:1.50 slime/swank-allegro.lisp:1.51
--- slime/swank-allegro.lisp:1.50	Wed Aug 18 14:19:27 2004
+++ slime/swank-allegro.lisp	Fri Aug 27 19:27:08 2004
@@ -239,14 +239,17 @@
          (when binary-filename
            (delete-file binary-filename))))))
 
-(defimplementation swank-compile-string (string &key buffer position)
+(defimplementation swank-compile-string (string &key buffer position directory)
   ;; We store the source buffer in excl::*source-pathname* as a string
   ;; of the form <buffername>;<start-offset>.  Quite ugly encoding, but
   ;; the fasl file is corrupted if we use some other datatype.
   (with-compilation-hooks ()
     (let ((*buffer-name* buffer)
           (*buffer-start-position* position)
-          (*buffer-string* string))
+          (*buffer-string* string)
+          (*default-pathname-defaults*
+           (if directory (merge-pathnames (pathname directory))
+               *default-pathname-defaults*)))
       (compile-from-temp-file
        (format nil "~S ~S~%~A" 
                `(in-package ,(package-name *package*))


Index: slime/swank-backend.lisp
diff -u slime/swank-backend.lisp:1.63 slime/swank-backend.lisp:1.64
--- slime/swank-backend.lisp:1.63	Fri Jul 30 14:44:05 2004
+++ slime/swank-backend.lisp	Fri Aug 27 19:27:08 2004
@@ -191,14 +191,18 @@
   (declare (ignore ignore))
   `(call-with-compilation-hooks (lambda () (progn , at body))))
 
-(definterface swank-compile-string (string &key buffer position)
+(definterface swank-compile-string (string &key buffer position directory)
   "Compile source from STRING.  During compilation, compiler
 conditions must be trapped and resignalled as COMPILER-CONDITIONs.
 
 If supplied, BUFFER and POSITION specify the source location in Emacs.
 
 Additionally, if POSITION is supplied, it must be added to source
-positions reported in compiler conditions.")
+positions reported in compiler conditions.
+
+If DIRECTORY is specified it may be used by certain implementations to
+rebind *DEFAULT-PATHNAME-DEFAULTS* which may improve the recording of
+source information.")
 
 (definterface operate-on-system (system-name operation-name &rest keyword-args)
   "Perform OPERATION-NAME on SYSTEM-NAME using ASDF.


Index: slime/swank-clisp.lisp
diff -u slime/swank-clisp.lisp:1.33 slime/swank-clisp.lisp:1.34
--- slime/swank-clisp.lisp:1.33	Fri Jun 25 01:05:29 2004
+++ slime/swank-clisp.lisp	Fri Aug 27 19:27:08 2004
@@ -353,7 +353,8 @@
 	  (load fasl-file))
 	nil))))
 
-(defimplementation swank-compile-string (string &key buffer position)
+(defimplementation swank-compile-string (string &key buffer position directory)
+  (declare (ignore directory))
   (with-compilation-hooks ()
     (let ((*buffer-name* buffer)
 	  (*buffer-offset* position))


Index: slime/swank-cmucl.lisp
diff -u slime/swank-cmucl.lisp:1.112 slime/swank-cmucl.lisp:1.113
--- slime/swank-cmucl.lisp:1.112	Fri Jul 30 14:39:15 2004
+++ slime/swank-cmucl.lisp	Fri Aug 27 19:27:08 2004
@@ -286,7 +286,8 @@
           (source-cache-get filename (file-write-date filename)))
         (values output-file warnings-p failure-p)))))
 
-(defimplementation swank-compile-string (string &key buffer position)
+(defimplementation swank-compile-string (string &key buffer position directory)
+  (declare (ignore directory))
   (with-compilation-hooks ()
     (let ((*buffer-name* buffer)
           (*buffer-start-position* position)


Index: slime/swank-lispworks.lisp
diff -u slime/swank-lispworks.lisp:1.53 slime/swank-lispworks.lisp:1.54
--- slime/swank-lispworks.lisp:1.53	Wed Aug  4 03:56:58 2004
+++ slime/swank-lispworks.lisp	Fri Aug 27 19:27:08 2004
@@ -466,7 +466,8 @@
 		nil)))
 	   htab))
 
-(defimplementation swank-compile-string (string &key buffer position)
+(defimplementation swank-compile-string (string &key buffer position directory)
+  (declare (ignore directory))
   (assert buffer)
   (assert position)
   (let* ((location (list :emacs-buffer buffer position string))


Index: slime/swank-openmcl.lisp
diff -u slime/swank-openmcl.lisp:1.78 slime/swank-openmcl.lisp:1.79
--- slime/swank-openmcl.lisp:1.78	Sun Jun 27 08:00:50 2004
+++ slime/swank-openmcl.lisp	Fri Aug 27 19:27:08 2004
@@ -203,7 +203,8 @@
           (*buffer-offset* nil))
       (compile-file filename :load load-p))))
 
-(defimplementation swank-compile-string (string &key buffer position)
+(defimplementation swank-compile-string (string &key buffer position directory)
+  (declare (ignore directory))
   (with-compilation-hooks ()
     (let ((*buffer-name* buffer)
           (*buffer-offset* position)


Index: slime/swank-sbcl.lisp
diff -u slime/swank-sbcl.lisp:1.97 slime/swank-sbcl.lisp:1.98
--- slime/swank-sbcl.lisp:1.97	Wed Jul 28 14:07:18 2004
+++ slime/swank-sbcl.lisp	Fri Aug 27 19:27:08 2004
@@ -301,7 +301,8 @@
           (load output-file)))
     (sb-c:fatal-compiler-error () nil)))
 
-(defimplementation swank-compile-string (string &key buffer position)
+(defimplementation swank-compile-string (string &key buffer position directory)
+  (declare (ignore directory))
   (let ((form (read-from-string (format nil "(~S () ~A)" 'lambda string))))
     (flet ((compileit (cont)
              (with-compilation-hooks ()


Index: slime/swank.lisp
diff -u slime/swank.lisp:1.223 slime/swank.lisp:1.224
--- slime/swank.lisp:1.223	Fri Aug 20 18:37:26 2004
+++ slime/swank.lisp	Fri Aug 27 19:27:08 2004
@@ -1515,13 +1515,13 @@
 Record compiler notes signalled as `compiler-condition's."
   (swank-compiler (lambda () (swank-compile-file filename load-p))))
 
-(defslimefun compile-string-for-emacs (string buffer position)
+(defslimefun compile-string-for-emacs (string buffer position directory)
   "Compile STRING (exerpted from BUFFER at POSITION).
 Record compiler notes signalled as `compiler-condition's."
   (with-buffer-syntax ()
     (swank-compiler
      (lambda () 
-       (swank-compile-string string :buffer buffer :position position)))))
+       (swank-compile-string string :buffer buffer :position position :directory directory)))))
 
 (defslimefun operate-on-system-for-emacs (system-name operation &rest keywords)
   "Compile and load SYSTEM using ASDF.





More information about the slime-cvs mailing list