summaryrefslogtreecommitdiff
path: root/elisp/geiser-eval.el
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2010-11-23 01:58:33 +0100
committerJose Antonio Ortega Ruiz <jao@gnu.org>2010-11-23 01:58:33 +0100
commit3b24e917fdfebc8df3fefbbcc747963eb4bbd126 (patch)
treea44d5f0cb47639d47bdb57f2233b2db5e5a878b7 /elisp/geiser-eval.el
parenta53249b83cdc0711f23b1b8860cd3582977230c6 (diff)
downloadgeiser-guile-3b24e917fdfebc8df3fefbbcc747963eb4bbd126.tar.gz
geiser-guile-3b24e917fdfebc8df3fefbbcc747963eb4bbd126.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.el20
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