diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2010-08-06 19:15:35 +0200 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2010-08-06 19:15:35 +0200 |
commit | 94f40872f82fa08d780630ec492d5a4ef4875134 (patch) | |
tree | 96292100211a634b78ba256ea40d60ed52639052 /elisp/geiser-repl.el | |
parent | 3572a10cc7e9328f491ca20d95e05ae0e377e218 (diff) | |
download | geiser-guile-94f40872f82fa08d780630ec492d5a4ef4875134.tar.gz geiser-guile-94f40872f82fa08d780630ec492d5a4ef4875134.tar.bz2 |
Keybinding changes documented.
Diffstat (limited to 'elisp/geiser-repl.el')
-rw-r--r-- | elisp/geiser-repl.el | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/elisp/geiser-repl.el b/elisp/geiser-repl.el index 37572d0..9e36fa4 100644 --- a/elisp/geiser-repl.el +++ b/elisp/geiser-repl.el @@ -88,12 +88,13 @@ implementation name gets appended to it." (make-variable-buffer-local (defvar geiser-repl--repl nil)) -(defsubst geiser-repl--this-buffer-repl () - geiser-repl--repl) - (defsubst geiser-repl--set-this-buffer-repl (r) (setq geiser-repl--repl r)) +(defun geiser-repl--live-p () + (and geiser-repl--repl + (get-buffer-process geiser-repl--repl))) + (defun geiser-repl--repl/impl (impl &optional repls) (catch 'repl (dolist (repl (or repls geiser-repl--repls)) @@ -232,8 +233,7 @@ If no REPL is running, execute `run-geiser' to start a fresh one." (interactive "P") (let* ((impl (or impl geiser-impl--implementation)) (repl (cond ((and (not ask) (not impl) - (or (geiser-repl--this-buffer-repl) - (car geiser-repl--repls)))) + (or geiser-repl--repl (car geiser-repl--repls)))) ((and (not ask) impl (geiser-repl--repl/impl impl))))) (pop-up-windows geiser-repl-window-allow-split)) (cond ((and (eq (current-buffer) repl) @@ -315,7 +315,7 @@ module command as a string") (when (buffer-live-p buffer) (with-current-buffer buffer (when (and (eq geiser-impl--implementation impl) - (equal cb (geiser-repl--this-buffer-repl))) + (equal cb geiser-repl--repl)) (geiser-repl--get-repl geiser-impl--implementation))))))) (defun geiser-repl--sentinel (proc event) @@ -460,12 +460,11 @@ module command as a string") "Documentation for module at point" :enable (symbol-at-point)) -- ("Kill Scheme interpreter" "\C-c\C-q" comint-kill-subjob - :enable (geiser-repl--this-buffer-repl)) - ("Restart" "\C-c\C-z" switch-to-geiser - :enable (not (geiser-repl--this-buffer-repl))) + :enable (geiser-repl--live-p)) + ("Restart" "\C-c\C-z" switch-to-geiser :enable (not (geiser-repl--live-p))) ("Revive REPL" "\C-c\C-k" geiser-repl-nuke "Use this command if the REPL becomes irresponsive" - :enable (geiser-repl--this-buffer-repl)) + :enable (geiser-repl--live-p)) -- (custom "REPL options" geiser-repl)) |