diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2010-01-28 14:53:33 +0100 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2010-01-28 14:53:33 +0100 |
commit | 68d3cb6c453d1c0165e9232cffafb96716018490 (patch) | |
tree | b6e5a73b33f3bee2251e4be6a9d4ee3e2e1df606 /elisp/geiser-debug.el | |
parent | 16ea3d3b90838cd05a2ab6d54228a976000613e3 (diff) | |
download | geiser-68d3cb6c453d1c0165e9232cffafb96716018490.tar.gz geiser-68d3cb6c453d1c0165e9232cffafb96716018490.tar.bz2 |
Generic support for debugging prompts in the REPL
Diffstat (limited to 'elisp/geiser-debug.el')
-rw-r--r-- | elisp/geiser-debug.el | 27 |
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)) |