diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2019-06-24 19:07:16 +0100 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2019-06-24 19:07:16 +0100 |
commit | fbdfbee56a03a1a0396d61fdc8f0b0af87273fc9 (patch) | |
tree | 63f44cd5a1bdbb65f034485164ffdd6c9c16d3ad | |
parent | 5dc8efd319f305e4322269ebc9d7836cb1c23764 (diff) | |
download | geiser-guile-fbdfbee56a03a1a0396d61fdc8f0b0af87273fc9.tar.gz geiser-guile-fbdfbee56a03a1a0396d61fdc8f0b0af87273fc9.tar.bz2 |
Fix: use default method implementations
See discussion in issue !256.
-rw-r--r-- | elisp/geiser-impl.el | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/elisp/geiser-impl.el b/elisp/geiser-impl.el index 4f4f0ee..c14db42 100644 --- a/elisp/geiser-impl.el +++ b/elisp/geiser-impl.el @@ -1,6 +1,6 @@ ;; geiser-impl.el -- generic support for scheme implementations -;; Copyright (C) 2009, 2010, 2012, 2013, 2015, 2016 Jose Antonio Ortega Ruiz +;; Copyright (C) 2009, 2010, 2012, 2013, 2015, 2016, 2019 Jose Antonio Ortega Ruiz ;; This program is free software; you can redistribute it and/or ;; modify it under the terms of the Modified BSD License. You should @@ -81,8 +81,12 @@ determine its scheme flavour." geiser-default-implementation))) (cadr (assq method (geiser-impl--methods impl))))) +(defun geiser-impl--default-method (method) + (cadr (assoc method (mapcar 'cdr geiser-impl--local-methods)))) + (defun geiser-impl--call-method (method impl &rest args) - (let ((fun (geiser-impl--method method impl))) + (let ((fun (or (geiser-impl--method method impl) + (geiser-impl--default-method method)))) (when (functionp fun) (apply fun args)))) (defun geiser-impl--method-doc (method doc user) |