summaryrefslogtreecommitdiff
path: root/elisp
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2010-12-11 02:47:56 +0100
committerJose Antonio Ortega Ruiz <jao@gnu.org>2010-12-11 02:47:56 +0100
commit08e2e3fbda3092dea615d024e408d400ae8b2493 (patch)
tree9ee970740a84a64cabdb24d8e30b1e9b10ce4d8b /elisp
parentfb6708e749fc42724ec821d9e12c7e7154be4372 (diff)
downloadgeiser-08e2e3fbda3092dea615d024e408d400ae8b2493.tar.gz
geiser-08e2e3fbda3092dea615d024e408d400ae8b2493.tar.bz2
Print long expressions after errors in debug buffer.
You won't believe it, but people write procedures spanning several pages, even in Scheme. Where's the art and the poetry of programming?
Diffstat (limited to 'elisp')
-rw-r--r--elisp/geiser-debug.el12
1 files changed, 9 insertions, 3 deletions
diff --git a/elisp/geiser-debug.el b/elisp/geiser-debug.el
index 9266eb3..25391db 100644
--- a/elisp/geiser-debug.el
+++ b/elisp/geiser-debug.el
@@ -81,19 +81,25 @@ buffer.")
(jump nil)
(dir default-directory)
(buffer (current-buffer))
- (debug (eq key 'geiser-debugger)))
+ (debug (eq key 'geiser-debugger))
+ (lines (with-temp-buffer
+ (insert what)
+ (count-lines (point-min) (point-max))))
+ (after (> lines 5)))
(when debug
(switch-to-geiser nil nil buffer)
(geiser-debug--enter-debugger impl))
(geiser-debug--with-buffer
(erase-buffer)
(when dir (setq default-directory dir))
- (insert what)
- (newline 2)
+ (unless after
+ (insert what)
+ (newline 2))
(when (and res (not err))
(insert res)
(newline 2))
(setq jump (geiser-debug--display-error impl module key output))
+ (when after (insert "\nExpression evaluated was:\n\n" what))
(goto-char (point-min)))
(when jump (geiser-debug--pop-to-buffer))))