summaryrefslogtreecommitdiff
path: root/elisp/geiser-debug.el
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2009-09-22 22:43:28 +0200
committerJose Antonio Ortega Ruiz <jao@gnu.org>2009-09-22 22:43:28 +0200
commitac2066b6f439b2497e761fbd99c9675db0b03bbd (patch)
tree0370d7256ca125510dba4b5912220a7d064fb702 /elisp/geiser-debug.el
parent8588781981a686dbd921c377fa9887bcd74728af (diff)
downloadgeiser-chez-ac2066b6f439b2497e761fbd99c9675db0b03bbd.tar.gz
geiser-chez-ac2066b6f439b2497e761fbd99c9675db0b03bbd.tar.bz2
New implementation registration mechanism, for the elisp side of things.
Implementations must invoke define-geiser-implementation with an appropriate set of methods. Simple inheritance is supported. Each geiser module defines and registers the method names it uses.
Diffstat (limited to 'elisp/geiser-debug.el')
-rw-r--r--elisp/geiser-debug.el9
1 files changed, 8 insertions, 1 deletions
diff --git a/elisp/geiser-debug.el b/elisp/geiser-debug.el
index 62b3ead..7a9f915 100644
--- a/elisp/geiser-debug.el
+++ b/elisp/geiser-debug.el
@@ -45,6 +45,13 @@
;;; Displaying retorts
+(geiser-impl--define-caller geiser-debug--display-error display-error (module key message)
+ "This method takes 3 parameters (a module name, the error key,
+and the accompanying error message) and should display
+(in the current buffer) a formatted version of the error. If the
+error was successfully displayed, the call should evaluate to a
+non-null value.")
+
(defun geiser-debug--display-retort (what ret &optional res)
(let* ((err (geiser-eval--retort-error ret))
(key (geiser-eval--error-key err))
@@ -58,7 +65,7 @@
(when res
(insert res)
(newline 2))
- (unless (geiser-impl--display-error impl module key output)
+ (unless (geiser-debug--display-error impl module key output)
(when err (insert (geiser-eval--error-str err) "\n\n"))
(when output (insert output "\n\n")))
(goto-char (point-min)))