summaryrefslogtreecommitdiff
path: root/elisp/geiser-guile.el
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2010-10-11 02:25:34 +0200
committerJose Antonio Ortega Ruiz <jao@gnu.org>2010-10-11 02:25:34 +0200
commitaa3b4233fd2ce19bd3de6759173172e014ef2f63 (patch)
treea5ac8531300b28a227008c1c361c4740ef3b1e58 /elisp/geiser-guile.el
parent30824831a0211277769ddcbaee431321c603bc03 (diff)
downloadgeiser-chez-aa3b4233fd2ce19bd3de6759173172e014ef2f63.tar.gz
geiser-chez-aa3b4233fd2ce19bd3de6759173172e014ef2f63.tar.bz2
Guile: remote REPLs (connect-to-guile)
geiser-connect (or its specialisation, connect-to-guile) working for Guile, where the external process is started with the new --listen flag.
Diffstat (limited to 'elisp/geiser-guile.el')
-rw-r--r--elisp/geiser-guile.el12
1 files changed, 11 insertions, 1 deletions
diff --git a/elisp/geiser-guile.el b/elisp/geiser-guile.el
index 7dfb9ad..d831bbf 100644
--- a/elisp/geiser-guile.el
+++ b/elisp/geiser-guile.el
@@ -101,7 +101,7 @@ This function uses `geiser-guile-init-file' if it exists."
(let ((init-file (and (stringp geiser-guile-init-file)
(expand-file-name geiser-guile-init-file))))
`(,@(and (listp geiser-guile-binary) (cdr geiser-guile-binary))
- "-q" "-L" ,(expand-file-name "guile/" geiser-scheme-dir)
+ "-q"
,@(apply 'append (mapcar (lambda (p) (list "-L" p)) geiser-guile-load-path))
,@(and init-file (file-readable-p init-file) (list "-l" init-file)))))
@@ -223,6 +223,13 @@ The new level is set using the value of `geiser-guile-warning-level'."
(geiser evaluation))))
(geiser-eval--send/result code)))
+(defun connect-to-guile ()
+ "Start a Guile REPL connected to a remote process.
+
+Start the external Guile process with the flag --listen to make
+it spawn a server thread."
+ (geiser-connect 'guile))
+
(defun geiser-guile--startup ()
(set (make-local-variable 'compilation-error-regexp-alist)
`((,geiser-guile--path-rx geiser-guile--resolve-file-x)
@@ -232,6 +239,9 @@ The new level is set using the value of `geiser-guile-warning-level'."
(font-lock-add-keywords nil
`((,geiser-guile--path-rx 1
compilation-error-face)))
+ (geiser-eval--send/result
+ `(:scm ,(format "(set! %%load-path (cons %S %%load-path))"
+ (expand-file-name "guile/" geiser-scheme-dir))))
(geiser-guile-update-warning-level))