diff options
author | jao <jao@gnu.org> | 2022-08-13 23:03:01 +0100 |
---|---|---|
committer | jao <jao@gnu.org> | 2022-08-13 23:03:01 +0100 |
commit | 97dfdd1133a14bc6bccab804cdf286b94ad43381 (patch) | |
tree | edd236542c93863c632f759fc1c30d163d097e16 /elisp | |
parent | 956ec5ff543e9a0fcb3b3ceb339bb1e21c39719e (diff) | |
download | geiser-97dfdd1133a14bc6bccab804cdf286b94ad43381.tar.gz geiser-97dfdd1133a14bc6bccab804cdf286b94ad43381.tar.bz2 |
fix: start scheme just once if repl buffer doesn't exist
Should fix issue #49.
Diffstat (limited to 'elisp')
-rw-r--r-- | elisp/geiser-mode.el | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/elisp/geiser-mode.el b/elisp/geiser-mode.el index e0e22c6..615bbdd 100644 --- a/elisp/geiser-mode.el +++ b/elisp/geiser-mode.el @@ -279,12 +279,14 @@ With prefix, try to enter the current buffer's module." (defun geiser-restart-repl () "Restarts the REPL associated with the current buffer." (interactive) - (let ((b (current-buffer))) - (geiser-mode-switch-to-repl nil) - (comint-kill-subjob) - (sit-for 0.1) ;; ugly hack; but i don't care enough to fix it - (call-interactively 'run-geiser) - (sit-for 0.2) ;; ditto + (let ((b (current-buffer)) + (impl geiser-impl--implementation)) + (when (buffer-live-p geiser-repl--repl) + (geiser-mode-switch-to-repl nil) + (comint-kill-subjob) + (sit-for 0.1)) ;; ugly hack; but i don't care enough to fix it + (run-geiser impl) + (sit-for 0.2) (goto-char (point-max)) (pop-to-buffer b))) |