diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2009-06-17 00:53:36 +0200 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2009-06-17 00:53:36 +0200 |
commit | 2045e7b4f66685dc1beb1159900e91df3195cc99 (patch) | |
tree | 4f09888a637d217918ccb893d9766ea899bfb483 | |
parent | 397bb86ecd17794b220c6b6c81fe1b0f66c19ba6 (diff) | |
download | geiser-chez-2045e7b4f66685dc1beb1159900e91df3195cc99.tar.gz geiser-chez-2045e7b4f66685dc1beb1159900e91df3195cc99.tar.bz2 |
Circular dependencies between elisp modules eliminated.
-rw-r--r-- | elisp/geiser-doc.el | 16 | ||||
-rw-r--r-- | elisp/geiser-impl.el | 12 | ||||
-rw-r--r-- | elisp/geiser.el | 4 |
3 files changed, 10 insertions, 22 deletions
diff --git a/elisp/geiser-doc.el b/elisp/geiser-doc.el index bece09e..adef4c6 100644 --- a/elisp/geiser-doc.el +++ b/elisp/geiser-doc.el @@ -24,6 +24,7 @@ ;;; Code: +(require 'geiser-impl) (require 'geiser-completion) (require 'geiser-eval) (require 'geiser-syntax) @@ -157,13 +158,6 @@ ;;; Commands: -(make-variable-buffer-local - (defvar geiser-doc--external-help-function nil)) - -(defun geiser-doc--external-help (symbol module) - (and geiser-doc--external-help-function - (funcall geiser-doc--external-help-function symbol module))) - (defun geiser-doc--get-docstring (symbol module) (geiser-eval--send/result `(:eval ((:ge symbol-documentation) ',symbol) ,module))) @@ -172,10 +166,10 @@ (geiser-eval--send/result `(:eval ((:ge module-exports) (:module ,module))))) (defun geiser-doc-symbol (symbol &optional module impl) - (let ((module (or module (geiser-eval--get-module)))) - (unless (geiser-doc--external-help symbol module) - (let ((impl (or impl geiser-impl--implementation)) - (ds (geiser-doc--get-docstring symbol module))) + (let ((module (or module (geiser-eval--get-module))) + (impl (or impl geiser-impl--implementation))) + (unless (geiser-impl--external-help impl symbol module) + (let ((ds (geiser-doc--get-docstring symbol module))) (if (or (not ds) (not (listp ds))) (message "No documentation available for '%s'" symbol) (geiser-doc--with-buffer diff --git a/elisp/geiser-impl.el b/elisp/geiser-impl.el index 38c34ee..b4c01c7 100644 --- a/elisp/geiser-impl.el +++ b/elisp/geiser-impl.el @@ -27,7 +27,6 @@ (require 'geiser-eval) (require 'geiser-base) -(require 'geiser-doc) (require 'geiser-completion) @@ -124,10 +123,6 @@ (defsubst geiser-impl--geiser-procedure-function (impl) (geiser-impl--sym impl "geiser-procedure")) -(defsubst geiser-impl--external-help-function (impl) - (let ((f (geiser-impl--sym impl "external-help"))) - (and (fboundp f) f))) - (defsubst geiser-impl--symbol-begin (impl) (geiser-impl--sym impl "symbol-begin")) @@ -136,8 +131,6 @@ (geiser-impl--module-function impl)) (setq geiser-eval--geiser-procedure-function (geiser-impl--geiser-procedure-function impl)) - (setq geiser-doc--external-help-function - (geiser-impl--external-help-function impl)) (setq geiser-completion--symbol-begin-function (geiser-impl--symbol-begin impl))) @@ -150,8 +143,6 @@ (geiser-impl--module-function imp)) (geiser-eval--geiser-procedure-function (geiser-impl--geiser-procedure-function imp)) - (geiser-doc--external-help-function - (geiser-impl--external-help-function imp)) (geiser-completion--symbol-begin-function (geiser-impl--symbol-begin imp))) (funcall thunk))) @@ -192,6 +183,9 @@ (defsubst geiser-impl--startup (impl) (geiser-impl--call-if-bound impl "startup")) +(defsubst geiser-impl--external-help (impl symbol module) + (geiser-impl--call-if-bound impl "external-help" symbol module)) + ;;; Access to implementation guessing function: diff --git a/elisp/geiser.el b/elisp/geiser.el index b12127c..926cb4f 100644 --- a/elisp/geiser.el +++ b/elisp/geiser.el @@ -114,10 +114,10 @@ (quote '( geiser-mode geiser-repl - geiser-impl - geiser-doc geiser-xref geiser-edit + geiser-doc + geiser-impl geiser-completion geiser-autodoc geiser-compile |