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 | |
parent | 31a4bd02c78be39cdd4a58bbc286a57906a525ce (diff) | |
download | geiser-chez-fbd809ff8c48f12d1b13caae70810421aaa0aef4.tar.gz geiser-chez-fbd809ff8c48f12d1b13caae70810421aaa0aef4.tar.bz2 |
Fixes for eval/compilation error display.
-rw-r--r-- | elisp/geiser-compile.el | 6 | ||||
-rw-r--r-- | elisp/geiser-debug.el | 26 | ||||
-rw-r--r-- | elisp/geiser-plt.el | 1 |
3 files changed, 16 insertions, 17 deletions
diff --git a/elisp/geiser-compile.el b/elisp/geiser-compile.el index 8b4a4db..4e9e8cb 100644 --- a/elisp/geiser-compile.el +++ b/elisp/geiser-compile.el @@ -41,9 +41,9 @@ (defun geiser-compile--display-result (title ret) (if (not (geiser-eval--retort-error ret)) - (message "%s %s" title (or (geiser-eval--retort-result ret) "OK!")) - (message "") - (geiser-debug--display-retort title ret))) + (message "%s %s" title (or (geiser-eval--retort-result ret) "done.")) + (message "")) + (geiser-debug--display-retort title ret)) (defun geiser-compile--file-op (path compile-p msg) (let* ((b/p (geiser-compile--buffer/path path)) 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)) diff --git a/elisp/geiser-plt.el b/elisp/geiser-plt.el index 77551c6..a410e19 100644 --- a/elisp/geiser-plt.el +++ b/elisp/geiser-plt.el @@ -150,6 +150,7 @@ This function uses `geiser-plt-init-file' if it exists." (put 'sigaction 'scheme-indent-function 1) (put 'syntax-case 'scheme-indent-function 2) (put 'syntax/loc 'scheme-indent-function 1) +(put 'type-case 'scheme-indent-function 'defun) (put 'unit 'scheme-indent-function 'defun) (put 'unit/sig 'scheme-indent-function 2) (put 'unless 'scheme-indent-function 1) |