Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

* swank-backend.lisp (swank-compile-file): Take output-file as

additional argument.  Update backends accordingly.

* swank.lisp (*fasl-directory*): New variable.
(fasl-pathname): New function.
(compile-file-for-emacs): Use it.
  • Loading branch information...
commit f761f28fa16dd8eff6cdbefeecba4f9428317163 1 parent 01ce2bc
Helmut Eller authored
View
10 ChangeLog
@@ -4,7 +4,17 @@
2009-01-10 Helmut Eller <heller@common-lisp.net>
+ * swank-backend.lisp (swank-compile-file): Take output-file as
+ additional argument. Update backends accordingly.
+
+ * swank.lisp (*fasl-directory*): New variable.
+ (fasl-pathname): New function.
+ (compile-file-for-emacs): Use it.
+
+2009-01-10 Helmut Eller <heller@common-lisp.net>
+
* swank-backend.lisp (set-default-initial-binding): New function.
+
* swank.lisp (setup-stream-indirection): Use it
2009-01-09 Helmut Eller <heller@common-lisp.net>
View
8 swank-abcl.lisp
@@ -327,14 +327,16 @@
(defvar *abcl-signaled-conditions*)
-(defimplementation swank-compile-file (filename load-p external-format)
+(defimplementation swank-compile-file (input-file output-file
+ load-p external-format)
(declare (ignore external-format))
(let ((jvm::*resignal-compiler-warnings* t)
(*abcl-signaled-conditions* nil))
(handler-bind ((warning #'handle-compiler-warning))
(let ((*buffer-name* nil)
- (*compile-filename* filename))
- (multiple-value-bind (fn warn fail) (compile-file filename)
+ (*compile-filename* input-file))
+ (multiple-value-bind (fn warn fail)
+ (compile-file input-file :output-file output-file)
(values fn warn
(or fail
(and load-p
View
9 swank-allegro.lisp
@@ -285,11 +285,14 @@
)
(funcall function)))
-(defimplementation swank-compile-file (filename load-p external-format)
+(defimplementation swank-compile-file (input-file output-file
+ load-p external-format)
(with-compilation-hooks ()
(let ((*buffer-name* nil)
- (*compile-filename* filename))
- (compile-file *compile-filename* :load-after-compile load-p
+ (*compile-filename* input-file))
+ (compile-file *compile-filename*
+ :output-file output-file
+ :load-after-compile load-p
:external-format external-format))))
(defun call-with-temp-file (fn)
View
5 swank-backend.lisp
@@ -392,8 +392,9 @@ value.
Should return T on successfull compilation, NIL otherwise.
")
-(definterface swank-compile-file (pathname load-p external-format)
- "Compile PATHNAME signalling COMPILE-CONDITIONs.
+(definterface swank-compile-file (input-file output-file load-p
+ external-format)
+ "Compile INPUT-FILE signalling COMPILE-CONDITIONs.
If LOAD-P is true, load the file after compilation.
EXTERNAL-FORMAT is a value returned by find-external-format or
:default.
View
7 swank-clisp.lisp
@@ -625,11 +625,14 @@ Execute BODY with NAME's function slot set to FUNCTION."
:message (princ-to-string condition)
:location (compiler-note-location))))
-(defimplementation swank-compile-file (filename load-p external-format)
+(defimplementation swank-compile-file (input-file output-file
+ load-p external-format)
(with-compilation-hooks ()
(with-compilation-unit ()
(multiple-value-bind (fasl-file warningsp failurep)
- (compile-file filename :external-format external-format)
+ (compile-file input-file
+ :output-file output-file
+ :external-format external-format)
(values fasl-file warningsp
(or failurep
(and load-p
View
10 swank-cmucl.lisp
@@ -379,19 +379,21 @@ NIL if we aren't compiling from a buffer.")
(c::warning #'handle-notification-condition))
(funcall function))))
-(defimplementation swank-compile-file (filename load-p external-format)
+(defimplementation swank-compile-file (input-file output-file
+ load-p external-format)
(declare (ignore external-format))
- (clear-xref-info filename)
+ (clear-xref-info input-file)
(with-compilation-hooks ()
(let ((*buffer-name* nil)
(ext:*ignore-extra-close-parentheses* nil))
(multiple-value-bind (output-file warnings-p failure-p)
- (compile-file filename)
+ (compile-file input-file :output-file output-file)
(values output-file warnings-p
(or failure-p
(when load-p
;; Cache the latest source file for definition-finding.
- (source-cache-get filename (file-write-date filename))
+ (source-cache-get input-file
+ (file-write-date input-file))
(not (load output-file)))))))))
(defimplementation swank-compile-string (string &key buffer position filename
View
9 swank-corman.lisp
@@ -361,13 +361,14 @@
(list :error "No location"))))))))
(funcall fn)))
-(defimplementation swank-compile-file (*compile-filename* load-p
- external-format)
+(defimplementation swank-compile-file (input-file output-file
+ load-p external-format)
(declare (ignore external-format))
(with-compilation-hooks ()
- (let ((*buffer-name* nil))
+ (let ((*buffer-name* nil)
+ (*compile-filename* input-file))
(multiple-value-bind (output-file warnings? failure?)
- (compile-file *compile-filename*)
+ (compile-file input-file :output-file output-file)
(values output-file warnings?
(or failure? (and load-p (load output-file))))))))
View
9 swank-ecl.lisp
@@ -138,12 +138,13 @@
(handler-bind ((warning #'handle-compiler-warning))
(funcall function)))
-(defimplementation swank-compile-file (*compile-filename* load-p
- external-format)
+(defimplementation swank-compile-file (input-file output-file
+ load-p external-format)
(declare (ignore external-format))
(with-compilation-hooks ()
- (let ((*buffer-name* nil))
- (compile-file *compile-filename* :load t))))
+ (let ((*buffer-name* nil)
+ (*compile-filename* input-file))
+ (compile-file input-file :output-file output-file :load t))))
(defimplementation swank-compile-string (string &key buffer position filename
policy)
View
9 swank-lispworks.lisp
@@ -426,9 +426,12 @@ Return NIL if the symbol is unbound."
(signal-undefined-functions compiler::*unknown-functions*
,location))))))
-(defimplementation swank-compile-file (filename load-p external-format)
- (with-swank-compilation-unit (filename)
- (compile-file filename :load load-p
+(defimplementation swank-compile-file (input-file output-file
+ load-p external-format)
+ (with-swank-compilation-unit (input-file)
+ (compile-file input-file
+ :output-file output-file
+ :load load-p
:external-format external-format)))
(defvar *within-call-with-compilation-hooks* nil
View
7 swank-openmcl.lisp
@@ -261,12 +261,15 @@ condition."
(handler-bind ((ccl::compiler-warning 'handle-compiler-warning))
(funcall function)))
-(defimplementation swank-compile-file (filename load-p external-format)
+(defimplementation swank-compile-file (input-file output-file
+ load-p external-format)
(declare (ignore external-format))
(with-compilation-hooks ()
(let ((*buffer-name* nil)
(*buffer-offset* nil))
- (compile-file filename :load load-p))))
+ (compile-file input-file
+ :output-file output-file
+ :load load-p))))
(defimplementation frame-var-value (frame var)
(block frame-var-value
View
9 swank-sbcl.lisp
@@ -485,16 +485,19 @@ compiler state."
(defvar *trap-load-time-warnings* nil)
-(defimplementation swank-compile-file (pathname load-p external-format)
+(defimplementation swank-compile-file (input-file output-file
+ load-p external-format)
(handler-case
(multiple-value-bind (output-file warnings-p failure-p)
(with-compilation-hooks ()
- (compile-file pathname :external-format external-format))
+ (compile-file input-file :output-file output-file
+ :external-format external-format))
(values output-file warnings-p
(or failure-p
(when load-p
;; Cache the latest source file for definition-finding.
- (source-cache-get pathname (file-write-date pathname))
+ (source-cache-get input-file
+ (file-write-date input-file))
(not (load output-file))))))
(sb-c:fatal-compiler-error () nil)))
View
10 swank-scl.lisp
@@ -438,17 +438,21 @@
(c::warning #'handle-notification-condition))
(funcall function))))
-(defimplementation swank-compile-file (filename load-p external-format)
+(defimplementation swank-compile-file (input-file output-file
+ load-p external-format)
(with-compilation-hooks ()
(let ((*buffer-name* nil)
(ext:*ignore-extra-close-parentheses* nil))
(multiple-value-bind (output-file warnings-p failure-p)
- (compile-file filename :external-format external-format)
+ (compile-file input-file
+ :output-file output-file
+ :external-format external-format)
(values output-file warnings-p
(or failure-p
(when load-p
;; Cache the latest source file for definition-finding.
- (source-cache-get filename (file-write-date filename))
+ (source-cache-get input-file
+ (file-write-date input-file))
(not (load output-file)))))))))
(defimplementation swank-compile-string (string &key buffer position filename
View
4 swank.lisp
@@ -2756,6 +2756,10 @@ Record compiler notes signalled as `compiler-condition's."
(t
(compile-file-pathname input-file))))
+(pathname-to-filename
+ (compile-file-pathname "y.lisp"
+ :output-file (filename-to-pathname "/tmp/x/")))
+
(defslimefun compile-string-for-emacs (string buffer position filename policy)
"Compile STRING (exerpted from BUFFER at POSITION).
Record compiler notes signalled as `compiler-condition's."
Please sign in to comment.
Something went wrong with that request. Please try again.