diff options
author | jao <jao@gnu.org> | 2022-10-24 00:45:41 +0100 |
---|---|---|
committer | jao <jao@gnu.org> | 2022-10-24 00:45:41 +0100 |
commit | 67fae675d40833fe10471a6b237a16efef03b845 (patch) | |
tree | 65fd4510da39b479b416ad36e82ee47d515ebf88 /elisp/geiser-debug.el | |
parent | 8009febe4cc7d9ad1e8826dc2a1ee3e4c336f315 (diff) | |
download | geiser-67fae675d40833fe10471a6b237a16efef03b845.tar.gz geiser-67fae675d40833fe10471a6b237a16efef03b845.tar.bz2 |
geiser-debug: ensure next-error buffer and buttonize output
Diffstat (limited to 'elisp/geiser-debug.el')
-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 a0c2c51..01a6ab6 100644 --- a/elisp/geiser-debug.el +++ b/elisp/geiser-debug.el @@ -192,6 +192,11 @@ buffer.") (newline 2) (and no (> no 0)))))) +(defun geiser-debug--default-display-error (key msg) + (insert "\n" + (if key (format "Error: %s\n" key) "") + (format "%s" (or msg "")) "\n")) + (defun geiser-debug--display-retort (what ret &optional res _auto-p) (let* ((err (geiser-eval--retort-error ret)) (key (geiser-eval--error-key err)) @@ -220,11 +225,12 @@ buffer.") (setq img (when (and res (not err) (not debug)) (geiser-debug--insert-res res))) (when (or err key output) + (when (fboundp 'next-error-select-buffer) + (next-error-select-buffer (current-buffer))) (let ((msg (or (geiser-eval--error-msg err) output ""))) (or (geiser-debug--display-error impl module key msg) - (insert "\n" - (if key (format "Error: %s\n" key) "") - (format "%s" (or msg "")) "\n")))) + (geiser-debug--default-display-error key msg)) + (unless err (geiser-edit--buttonize-files)))) (when after (goto-char (point-max)) (insert "\nExpression evaluated was:\n\n") |