diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2009-06-20 22:04:19 +0200 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2009-06-20 22:04:19 +0200 |
commit | 7eae5fdf9d5841027701b2f1d555543b472109b7 (patch) | |
tree | e569b1009db962327853da16f626d7b1a7949209 /elisp | |
parent | 5e9892d0cfbd25448ee106a8304b5b1ed528c121 (diff) | |
download | geiser-7eae5fdf9d5841027701b2f1d555543b472109b7.tar.gz geiser-7eae5fdf9d5841027701b2f1d555543b472109b7.tar.bz2 |
REPL improvements: bailing out earlier on startup abort; C-c z DTRT
for a running REPL.
Diffstat (limited to 'elisp')
-rw-r--r-- | elisp/geiser-repl.el | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/elisp/geiser-repl.el b/elisp/geiser-repl.el index da7dde7..38ebc6c 100644 --- a/elisp/geiser-repl.el +++ b/elisp/geiser-repl.el @@ -152,8 +152,10 @@ implementation name gets appended to it." (setq geiser-eval--default-proc-function 'geiser-repl--process) (defun geiser-repl--wait-for-prompt (timeout) - (let ((p (point)) (seen)) - (while (and (not seen) (> timeout 0)) + (let ((p (point)) (seen) (buffer (current-buffer))) + (while (and (not seen) + (> timeout 0) + (get-buffer-process buffer)) (sleep-for 0.1) (setq timeout (- timeout 100)) (goto-char p) @@ -176,7 +178,8 @@ implementation name gets appended to it." (interactive (list (or (geiser-repl--only-impl-p) (and (eq major-mode 'geiser-repl-mode) geiser-impl--implementation) - (geiser-repl--read-impl "Start Geiser for scheme implementation: ")))) + (geiser-repl--read-impl + "Start Geiser for scheme implementation: ")))) (geiser-repl--start-repl impl)) (defun switch-to-geiser (&optional ask impl) @@ -292,8 +295,8 @@ If no REPL is running, execute `run-geiser' to start a fresh one." (define-key geiser-repl-mode-map "\C-d" 'delete-char) -(define-key geiser-repl-mode-map "\C-cz" 'run-geiser) -(define-key geiser-repl-mode-map "\C-c\C-z" 'run-geiser) +(define-key geiser-repl-mode-map "\C-cz" 'switch-to-geiser) +(define-key geiser-repl-mode-map "\C-c\C-z" 'switch-to-geiser) (define-key geiser-repl-mode-map "\C-a" 'geiser-repl--bol) (define-key geiser-repl-mode-map (kbd "<home>") 'geiser-repl--bol) (define-key geiser-repl-mode-map "\C-ca" 'geiser-autodoc-mode) |