diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2010-12-11 02:47:56 +0100 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2010-12-11 02:47:56 +0100 |
commit | 45dbc624fcb57134c02db510a7f3ba50b09f4d88 (patch) | |
tree | 131786e57dd7aceabc11ddf302f1018a749db910 | |
parent | d655282cc2bb6146782cb5c8ea3dafdccaeecef9 (diff) | |
download | geiser-chez-45dbc624fcb57134c02db510a7f3ba50b09f4d88.tar.gz geiser-chez-45dbc624fcb57134c02db510a7f3ba50b09f4d88.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?
-rw-r--r-- | elisp/geiser-debug.el | 12 |
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)))) |