diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2010-09-08 01:34:48 +0200 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2010-09-08 01:34:48 +0200 |
commit | e70c2887af00bb60b7dad37aa0654751233bdcd3 (patch) | |
tree | e6a4f0bf0f30f4099c827ecd3f5a186dad08a553 /elisp/geiser-guile.el | |
parent | 9e072c67041be2a9968d153ab6a6de3c047bc0f0 (diff) | |
download | geiser-guile-e70c2887af00bb60b7dad37aa0654751233bdcd3.tar.gz geiser-guile-e70c2887af00bb60b7dad37aa0654751233bdcd3.tar.bz2 |
Better REPL exit command
Diffstat (limited to 'elisp/geiser-guile.el')
-rw-r--r-- | elisp/geiser-guile.el | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/elisp/geiser-guile.el b/elisp/geiser-guile.el index 55116d3..7f73efe 100644 --- a/elisp/geiser-guile.el +++ b/elisp/geiser-guile.el @@ -148,6 +148,9 @@ This function uses `geiser-guile-init-file' if it exists." (defun geiser-guile--enter-command (module) (geiser-guile--module-cmd module ",m %s" "(guile-user)")) + +(defun geiser-guile--exit-command () ",q") + (defun geiser-guile--symbol-begin (module) (if module (max (save-excursion (beginning-of-line) (point)) @@ -158,20 +161,19 @@ This function uses `geiser-guile-init-file' if it exists." ;;; Error display (defun geiser-guile--enter-debugger () - (when (eq key 'geiser-debugger) - (let ((bt-cmd (format ",%s\n" - (if geiser-guile-debug-show-bt-p "bt" "fr")))) - (compilation-forget-errors) - (goto-char (point-max)) - (comint-send-string nil "((@ (geiser emacs) ge:newline))\n") - (comint-send-string nil ",error-message\n") - (comint-send-string nil bt-cmd) - (when geiser-guile-show-debug-help-p - (message "Debug REPL. Enter ,q to quit, ,h for help.")) - (when geiser-guile-jump-on-debug-p - (accept-process-output (get-buffer-process (current-buffer)) - 0.2 nil t) - (ignore-errors (next-error)))))) + (let ((bt-cmd (format ",%s\n" + (if geiser-guile-debug-show-bt-p "bt" "fr")))) + (compilation-forget-errors) + (goto-char (point-max)) + (comint-send-string nil "((@ (geiser emacs) ge:newline))\n") + (comint-send-string nil ",error-message\n") + (comint-send-string nil bt-cmd) + (when geiser-guile-show-debug-help-p + (message "Debug REPL. Enter ,q to quit, ,h for help.")) + (when geiser-guile-jump-on-debug-p + (accept-process-output (get-buffer-process (current-buffer)) + 0.2 nil t) + (ignore-errors (next-error))))) (defun geiser-guile--display-error (module key msg) (newline) @@ -245,6 +247,7 @@ The new level is set using the value of `geiser-guile-warning-level'." (marshall-procedure geiser-guile--geiser-procedure) (find-module geiser-guile--get-module) (enter-command geiser-guile--enter-command) + (exit-command geiser-guile--exit-command) (import-command geiser-guile--import-command) (find-symbol-begin geiser-guile--symbol-begin) (display-error geiser-guile--display-error) |