summaryrefslogtreecommitdiff
path: root/elisp/geiser-debug.el
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2010-01-28 14:53:33 +0100
committerJose Antonio Ortega Ruiz <jao@gnu.org>2010-01-28 14:53:33 +0100
commitbdda30e6f263f7142f2f33a8be2545d3061fb598 (patch)
tree7373d0e4bc2cb2fffd35296cecfa07b74c59e59b /elisp/geiser-debug.el
parentdd0ef53303074c1217363d363c1cccc6fcad6dc7 (diff)
downloadgeiser-chez-bdda30e6f263f7142f2f33a8be2545d3061fb598.tar.gz
geiser-chez-bdda30e6f263f7142f2f33a8be2545d3061fb598.tar.bz2
Generic support for debugging prompts in the REPL
Diffstat (limited to 'elisp/geiser-debug.el')
-rw-r--r--elisp/geiser-debug.el27
1 files changed, 14 insertions, 13 deletions
diff --git a/elisp/geiser-debug.el b/elisp/geiser-debug.el
index 9b31968..b181ef5 100644
--- a/elisp/geiser-debug.el
+++ b/elisp/geiser-debug.el
@@ -1,6 +1,6 @@
;;; geiser-debug.el -- displaying debug information and evaluation results
-;; Copyright (C) 2009 Jose Antonio Ortega Ruiz
+;; Copyright (C) 2009, 2010 Jose Antonio Ortega Ruiz
;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the Modified BSD License. You should
@@ -59,18 +59,19 @@ non-null value.")
(output (geiser-eval--retort-output ret))
(impl geiser-impl--implementation)
(module (geiser-eval--get-module)))
- (geiser-debug--with-buffer
- (erase-buffer)
- (insert what)
- (newline 2)
- (when res
- (insert res)
- (newline 2))
- (unless (geiser-debug--display-error impl module key output)
- (when err (insert (geiser-eval--error-str err) "\n\n"))
- (when output (insert output "\n\n")))
- (goto-char (point-min)))
- (when err (geiser-debug--pop-to-buffer))))
+ (if (eq key 'geiser-debugger) (switch-to-geiser)
+ (geiser-debug--with-buffer
+ (erase-buffer)
+ (insert what)
+ (newline 2)
+ (when res
+ (insert res)
+ (newline 2))
+ (unless (geiser-debug--display-error impl module key output)
+ (when err (insert (geiser-eval--error-str err) "\n\n"))
+ (when output (insert output "\n\n")))
+ (goto-char (point-min)))
+ (when err (geiser-debug--pop-to-buffer)))))
(defsubst geiser-debug--wrap-region (str)
(format "(begin %s)" str))