diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2010-11-23 01:58:33 +0100 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2010-11-23 01:58:33 +0100 |
commit | 632a069eed54f3912c799b5497ece78d4e8a42d0 (patch) | |
tree | bfcd52cf2295c3a6021bf9245c1c450645d82c95 /elisp/geiser-eval.el | |
parent | aaa6df34a5472094afed19863eb02723dd0b763e (diff) | |
download | geiser-632a069eed54f3912c799b5497ece78d4e8a42d0.tar.gz geiser-632a069eed54f3912c799b5497ece78d4e8a42d0.tar.bz2 |
Document browser improvements, and Racket using them
We have a new "manual lookup" command, and Racket now displays a doc
browser buffer for help with a button activating it. In the process,
we've cleaned-up a little mess in geiser-eval.el and geiser-doc.el,
and refactored the affected Racket modules.
Next in line is providing manual lookup for Guile.
Diffstat (limited to 'elisp/geiser-eval.el')
-rw-r--r-- | elisp/geiser-eval.el | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/elisp/geiser-eval.el b/elisp/geiser-eval.el index 64b36ee..2ca20b4 100644 --- a/elisp/geiser-eval.el +++ b/elisp/geiser-eval.el @@ -23,19 +23,23 @@ ;;; Plug-able functions: -(defvar geiser-eval--get-module-function nil) +(make-variable-buffer-local + (defvar geiser-eval--get-module-function nil)) +(set-default 'geiser-eval--get-module-function nil) +(defvar geiser-eval--get-impl-module) (geiser-impl--register-local-method - 'geiser-eval--get-module-function 'find-module '(lambda (&rest) nil) + 'geiser-eval--get-impl-module 'find-module '(lambda (&rest) nil) "Function used to obtain the module for current buffer. It takes an optional argument, for cases where we want to force its value.") -(defsubst geiser-eval--get-module (&optional module) - (and geiser-eval--get-module-function - (funcall geiser-eval--get-module-function module))) +(defun geiser-eval--get-module (&optional module) + (if geiser-eval--get-module-function + (funcall geiser-eval--get-module-function module) + (funcall geiser-eval--get-impl-module module))) -(defvar geiser-eval--geiser-procedure-function nil) +(defvar geiser-eval--geiser-procedure-function) (geiser-impl--register-local-method 'geiser-eval--geiser-procedure-function 'marshall-procedure 'identity "Function to translate a bare procedure symbol to one executable @@ -86,9 +90,9 @@ module-exports, autodoc, callers, callees and generic-methods.") (defsubst geiser-eval--module (code) (geiser-eval--scheme-str (cond ((or (null code) (eq code :t) (eq code :buffer)) - (funcall geiser-eval--get-module-function)) + (geiser-eval--get-module)) ((or (eq code :repl) (eq code :f)) :f) - (t (funcall geiser-eval--get-module-function code))))) + (t (geiser-eval--get-module code))))) (defsubst geiser-eval--ge (proc args) (apply 'geiser-eval--form (cons proc |