diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2016-06-11 18:37:36 +0200 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2016-06-11 18:37:36 +0200 |
commit | 2fc156374fb2e20e2f25ab020589dc032ff4578a (patch) | |
tree | 9ed0b63f95c85ae005cbe7574960ce3bf8f06fe6 /elisp/geiser-debug.el | |
parent | cc84a03528f016779f7ce478b46d6170b989de81 (diff) | |
download | geiser-2fc156374fb2e20e2f25ab020589dc032ff4578a.tar.gz geiser-2fc156374fb2e20e2f25ab020589dc032ff4578a.tar.bz2 |
Cleanups to the show/jump debug buffer mess
Let's see if i finally got this right...
Diffstat (limited to 'elisp/geiser-debug.el')
-rw-r--r-- | elisp/geiser-debug.el | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/elisp/geiser-debug.el b/elisp/geiser-debug.el index 7afcb53..07ac98a 100644 --- a/elisp/geiser-debug.el +++ b/elisp/geiser-debug.el @@ -155,6 +155,7 @@ buffer.") (when dir (setq default-directory dir)) (unless after (geiser-debug--display-error impl module nil what) + (goto-char (point-max)) (newline 2)) (setq img (when (and res (not err)) (geiser-debug--insert-res res))) (setq dbg (geiser-debug--display-error impl module key output)) @@ -164,15 +165,13 @@ buffer.") (geiser-debug--display-error impl module nil what)) (goto-char (point-min))) (when (or img dbg) - (when geiser-debug-show-debug-p - (geiser-debug--pop-to-buffer)) - (when (and dbg (not geiser-debug-jump-to-debug-p)) - (ignore-errors (next-error)) - (when (not geiser-debug-show-debug-p) - (pop-to-buffer (geiser-debug--buffer) - 'display-buffer-reuse-window t) - (View-quit)) - (message "Evaluation error: %s" dbg))))) + (when (or geiser-debug-jump-to-debug-p geiser-debug-show-debug-p) + (if geiser-debug-jump-to-debug-p + (geiser-debug--pop-to-buffer) + (display-buffer (geiser-debug--buffer)) + (when dbg + (ignore-errors (next-error)) + (message "=> %s" dbg))))))) (defsubst geiser-debug--wrap-region (str) (format "(begin %s)" str)) |