summaryrefslogtreecommitdiff
path: root/elisp/geiser-autodoc.el
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2010-07-28 01:08:25 +0200
committerJose Antonio Ortega Ruiz <jao@gnu.org>2010-07-28 01:08:25 +0200
commit2a76df54515f4a0f3adc4e5e401c46434bb210e0 (patch)
treea15f5755ebf5cc362fbc6c718b469dd8c4bd5832 /elisp/geiser-autodoc.el
parent0b410d7b466f86afeb2848be5e3b7a236d7da208 (diff)
downloadgeiser-2a76df54515f4a0f3adc4e5e401c46434bb210e0.tar.gz
geiser-2a76df54515f4a0f3adc4e5e401c46434bb210e0.tar.bz2
Displaying variable values in autodoc.
Diffstat (limited to 'elisp/geiser-autodoc.el')
-rw-r--r--elisp/geiser-autodoc.el7
1 files changed, 6 insertions, 1 deletions
diff --git a/elisp/geiser-autodoc.el b/elisp/geiser-autodoc.el
index 06a10e7..1af0ae2 100644
--- a/elisp/geiser-autodoc.el
+++ b/elisp/geiser-autodoc.el
@@ -131,11 +131,16 @@ when `geiser-autodoc-display-module-p' is on."
(defun geiser-autodoc--str* (full-signature)
(geiser-autodoc--str (list (car full-signature)) full-signature))
+(defsubst geiser-autodoc--value-str (proc module value)
+ (let ((name (geiser-autodoc--proc-name proc module)))
+ (if value (format "%s => %s" name value) name)))
+
(defun geiser-autodoc--str (desc signature)
(let ((proc (car desc))
(args (cdr (assoc 'args signature)))
(module (cdr (assoc 'module signature))))
- (if (not args) (geiser-autodoc--proc-name proc module)
+ (if (not args)
+ (geiser-autodoc--value-str proc module (cdr (assoc 'value signature)))
(save-current-buffer
(set-buffer (geiser-syntax--font-lock-buffer))
(erase-buffer)