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
commit5f64d69c0e8c100c5a9954a0b1317d9d345a78e2 (patch)
tree46fdfde9f3ea107b49c7555886eca68301f13553 /elisp/geiser-debug.el
parentaecb2b8a0debdfd29e6865c2f4854b37210d9160 (diff)
downloadgeiser-5f64d69c0e8c100c5a9954a0b1317d9d345a78e2.tar.gz
geiser-5f64d69c0e8c100c5a9954a0b1317d9d345a78e2.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)))