summaryrefslogtreecommitdiff
path: root/elisp/geiser-guile.el
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2010-09-08 01:34:48 +0200
committerJose Antonio Ortega Ruiz <jao@gnu.org>2010-09-08 01:34:48 +0200
commitb1db6b49d1c42f9ab40317ccbadcc3ad5005aa98 (patch)
treebd96be144449649eb9c6fda6f4d712b3bf712f57 /elisp/geiser-guile.el
parent2fd5d5bdeb75f452a0a97208e262cc0da8e45c5a (diff)
downloadgeiser-guile-b1db6b49d1c42f9ab40317ccbadcc3ad5005aa98.tar.gz
geiser-guile-b1db6b49d1c42f9ab40317ccbadcc3ad5005aa98.tar.bz2
Better REPL exit command
Diffstat (limited to 'elisp/geiser-guile.el')
-rw-r--r--elisp/geiser-guile.el31
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)