From 45dbc624fcb57134c02db510a7f3ba50b09f4d88 Mon Sep 17 00:00:00 2001 From: Jose Antonio Ortega Ruiz Date: Sat, 11 Dec 2010 02:47:56 +0100 Subject: 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? --- elisp/geiser-debug.el | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'elisp') 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)))) -- cgit v1.2.3