summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2010-11-25 01:29:06 +0100
committerJose Antonio Ortega Ruiz <jao@gnu.org>2010-11-25 01:29:06 +0100
commit1417c2bc5090c362d341dc2e77a2623b56ea9753 (patch)
treef1dc2390a89f1f708fedf297d1d95d3400b6461e
parent094ecfb5c755b5f92ae993b685efdf98191b00c1 (diff)
downloadgeiser-chez-1417c2bc5090c362d341dc2e77a2623b56ea9753.tar.gz
geiser-chez-1417c2bc5090c362d341dc2e77a2623b56ea9753.tar.bz2
Guile: fix for connect-to-guile problems
Was a real bug, after all, and quite reproducible. Sending an ,use metacommand was not returning a prompt, and we were waiting for ever to start (or almost). Now, connect-to-guile is not only right, but spiffy again.
-rw-r--r--elisp/geiser-guile.el20
-rw-r--r--elisp/geiser-repl.el4
2 files changed, 9 insertions, 15 deletions
diff --git a/elisp/geiser-guile.el b/elisp/geiser-guile.el
index 6e14e88..e4473d8 100644
--- a/elisp/geiser-guile.el
+++ b/elisp/geiser-guile.el
@@ -235,7 +235,8 @@ This function uses `geiser-guile-init-file' if it exists."
(defvar geiser-guile--file-cache (make-hash-table :test 'equal))
(defun geiser-guile--resolve-file (file)
- (when (and (stringp file) (not (string-equal file "unknown file")))
+ (when (and (stringp file)
+ (not (member file '("socket" "stdin" "unknown file"))))
(if (file-name-absolute-p file) file
(or (gethash file geiser-guile--file-cache)
(puthash file
@@ -265,12 +266,13 @@ it spawn a server thread."
(interactive)
(geiser-connect 'guile))
-(defun geiser-guile--load-path-string ()
+(defun geiser-guile--set-load-path ()
(let* ((path (expand-file-name "guile/" geiser-scheme-dir))
(witness "geiser/emacs.scm")
- (code `(if (not (%search-load-path ,witness))
- (set! %load-path (cons ,path %load-path)))))
- (geiser-eval--scheme-str code)))
+ (code `(begin (if (not (%search-load-path ,witness))
+ (set! %load-path (cons ,path %load-path)))
+ 'done)))
+ (geiser-eval--send/wait code)))
(defun geiser-guile--startup (remote)
(set (make-local-variable 'compilation-error-regexp-alist)
@@ -281,12 +283,8 @@ it spawn a server thread."
`((,geiser-guile--path-rx 1
compilation-error-face)))
(let ((geiser-log-verbose-p t))
- (when remote
- (geiser-log--info
- "Guile: initialising load path... %s"
- (geiser-repl--send-silent (geiser-guile--load-path-string))))
- (geiser-log--info "Guile: using (geiser emacs)... %s"
- (geiser-repl--send-silent ",use (geiser emacs)"))
+ (when remote (geiser-guile--set-load-path))
+ (geiser-eval--send/wait ",use (geiser emacs)\n'done")
(geiser-guile-update-warning-level)))
diff --git a/elisp/geiser-repl.el b/elisp/geiser-repl.el
index d691dc8..7308a6e 100644
--- a/elisp/geiser-repl.el
+++ b/elisp/geiser-repl.el
@@ -327,10 +327,6 @@ module command as a string")
(let ((comint-input-filter (lambda (x) nil)))
(comint-send-input nil t))))
-(defun geiser-repl--send-silent (cmd)
- (geiser-repl--prepare-send)
- (comint-redirect-results-list cmd ".+" 0))
-
;;; REPL history