diff options
| author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2009-02-11 01:32:14 +0100 | 
|---|---|---|
| committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2009-02-11 01:32:14 +0100 | 
| commit | 849fc5ff74f24e755fc7c73d1ef6c4d41f060f10 (patch) | |
| tree | f0a1d7dcd0580230cda53c8925bf1ee22695d71b /geiser | |
| parent | 7d50479898c1b8cac46dd177867f2bc40d0e5ace (diff) | |
| download | geiser-guile-849fc5ff74f24e755fc7c73d1ef6c4d41f060f10.tar.gz geiser-guile-849fc5ff74f24e755fc7c73d1ef6c4d41f060f10.tar.bz2 | |
Compile file.
Diffstat (limited to 'geiser')
| -rw-r--r-- | geiser/eval.scm | 11 | 
1 files changed, 9 insertions, 2 deletions
| diff --git a/geiser/eval.scm b/geiser/eval.scm index 7d82f7d..b4c0ea0 100644 --- a/geiser/eval.scm +++ b/geiser/eval.scm @@ -62,8 +62,15 @@ SUBR, MSG and REST."            (cons 'msg (if msg (apply format (cons #f (cons msg margs))) '()))            (cons 'rest (or rest '()))))) -(define (comp-file path) +(define (comp-file path . dest)    "Compile and load file, given its full @var{path}." -  (compile-file path)) +  (let ((dest (if (null? dest) +                  (dirname path) +                  (car dest))) +        (current (getcwd))) +    (dynamic-wind +        (lambda () (chdir dest)) +        (lambda () (compile-file path)) +        (lambda () (chdir current)))))  ;;; eval.scm ends here | 
