diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2009-04-28 00:50:18 +0200 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2009-04-28 00:50:18 +0200 |
commit | fbd809ff8c48f12d1b13caae70810421aaa0aef4 (patch) | |
tree | c4b248cfc8ca0e3d8b4cec4ecce1193c504b7611 /elisp/geiser-debug.el | |
parent | 31a4bd02c78be39cdd4a58bbc286a57906a525ce (diff) | |
download | geiser-guile-fbd809ff8c48f12d1b13caae70810421aaa0aef4.tar.gz geiser-guile-fbd809ff8c48f12d1b13caae70810421aaa0aef4.tar.bz2 |
Fixes for eval/compilation error display.
Diffstat (limited to 'elisp/geiser-debug.el')
-rw-r--r-- | elisp/geiser-debug.el | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/elisp/geiser-debug.el b/elisp/geiser-debug.el index dbebc35..c8fb3f4 100644 --- a/elisp/geiser-debug.el +++ b/elisp/geiser-debug.el @@ -33,7 +33,7 @@ ;;; Debug buffer mode: (defconst geiser-debug--error-alist - '(("^In file \\([^ \n]+\\):\\([0-9]+\\):\\([0-9]+\\)" 1 2 3) + '(("^\\(In file +\\| +\\)\\([^ \n]+\\):\\([0-9]+\\):\\([0-9]+\\)" 2 3 4) ("^Error.+$" nil nil nil 0))) (define-derived-mode geiser-debug-mode compilation-mode "Geiser Dbg" @@ -54,16 +54,15 @@ (let* ((err (geiser-eval--retort-error ret)) (output (geiser-eval--retort-output ret)) (stack (geiser-eval--retort-stack ret))) - (when err - (geiser-debug--with-buffer - (erase-buffer) - (insert what) - (newline 2) - (insert (geiser-eval--error-str err) "\n\n") - (when output (insert output "\n\n")) - (geiser-debug--display-stack stack) - (goto-char (point-min))) - (geiser-debug--pop-to-buffer)))) + (geiser-debug--with-buffer + (erase-buffer) + (insert what) + (newline 2) + (when err (insert (geiser-eval--error-str err) "\n\n")) + (when output (insert output "\n\n")) + (when stack (geiser-debug--display-stack stack)) + (goto-char (point-min))) + (when (or err output) (geiser-debug--pop-to-buffer)))) (defsubst geiser-debug--frame-proc (frame) (cdr (assoc 'procedure frame))) (defsubst geiser-debug--frame-desc (frame) (cdr (assoc 'description frame))) @@ -101,9 +100,8 @@ (switch-to-geiser) (push-mark) (goto-char (point-max))) - (if (not err) - (message (format "=> %s" (geiser-eval--retort-result ret))) - (geiser-debug--display-retort str ret)))) + (when (not err) (message (format "=> %s" (geiser-eval--retort-result ret)))) + (geiser-debug--display-retort str ret))) (defun geiser-debug--expand-region (start end all) (let* ((str (buffer-substring-no-properties start end)) |