summaryrefslogtreecommitdiff
path: root/elisp
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2009-09-26 03:17:20 +0200
committerJose Antonio Ortega Ruiz <jao@gnu.org>2009-09-26 03:17:20 +0200
commit4f51508ab0f7882dd8f0f80ae53fa238eacd5278 (patch)
tree133b7522476881ca19103cbe49d1b6d0e2b646c5 /elisp
parent4183334cb12e4096fd8888237176a9a96868d163 (diff)
downloadgeiser-4f51508ab0f7882dd8f0f80ae53fa238eacd5278.tar.gz
geiser-4f51508ab0f7882dd8f0f80ae53fa238eacd5278.tar.bz2
Bug fix: proper handling of implementation methods specified as variables.
Diffstat (limited to 'elisp')
-rw-r--r--elisp/geiser-impl.el8
1 files changed, 3 insertions, 5 deletions
diff --git a/elisp/geiser-impl.el b/elisp/geiser-impl.el
index f278477..a85b97b 100644
--- a/elisp/geiser-impl.el
+++ b/elisp/geiser-impl.el
@@ -120,8 +120,7 @@ determine its scheme flavour."
(defun geiser-impl--normalize-method (m)
(when (and (listp m)
(= 2 (length m))
- (symbolp (car m))
- (symbolp (cadr m)))
+ (symbolp (car m)))
(if (functionp (cadr m)) m
`(,(car m) (lambda (&rest) ,(cadr m))))))
@@ -213,12 +212,11 @@ buffer contains Scheme code of the given implementation.")
(defsubst geiser-impl--registered-method (impl method fallback)
(let ((m (geiser-impl--method method impl)))
(if (fboundp m) m
- (or fallback (error "%s not defined for %s" method impl)))))
+ (or fallback (error "%s not defined for %s implementation" method impl)))))
(defsubst geiser-impl--registered-value (impl method fallback)
(let ((m (geiser-impl--method method impl)))
- (if (fboundp m) (funcall m)
- (or fallback (error "%s not defined for %s" method impl)))))
+ (if (functionp m) (funcall m) fallback)))
(defun geiser-impl--set-buffer-implementation (&optional impl)
(let ((impl (or impl (geiser-impl--guess))))