summaryrefslogtreecommitdiff
path: root/elisp/geiser-autodoc.el
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2010-12-30 15:44:09 +0100
committerJose Antonio Ortega Ruiz <jao@gnu.org>2010-12-30 15:44:09 +0100
commitd2601ace1339835acd542e2fa03d214b38c1f663 (patch)
treef1f8b42e59c476c59b45047c16cd45327f3615a9 /elisp/geiser-autodoc.el
parentb355f7fb31d19ac680eef38005035a95414a2612 (diff)
downloadgeiser-chez-d2601ace1339835acd542e2fa03d214b38c1f663.tar.gz
geiser-chez-d2601ace1339835acd542e2fa03d214b38c1f663.tar.bz2
New command: "manual" autodoc (C-c C-d s)
Diffstat (limited to 'elisp/geiser-autodoc.el')
-rw-r--r--elisp/geiser-autodoc.el13
1 files changed, 10 insertions, 3 deletions
diff --git a/elisp/geiser-autodoc.el b/elisp/geiser-autodoc.el
index 2f07b8e..3cb6204 100644
--- a/elisp/geiser-autodoc.el
+++ b/elisp/geiser-autodoc.el
@@ -171,7 +171,7 @@ when `geiser-autodoc-display-module-p' is on."
(when s (geiser-autodoc--str p s))))
-;;; Autodoc function:
+;;; Autodoc functions:
(make-variable-buffer-local
(defvar geiser-autodoc--inhibit-function nil))
@@ -180,12 +180,19 @@ when `geiser-autodoc-display-module-p' is on."
(and geiser-autodoc--inhibit-function
(funcall geiser-autodoc--inhibit-function)))
+(defsubst geiser-autodoc--autodoc-at-point ()
+ (geiser-autodoc--autodoc (geiser-syntax--scan-sexps)))
+
(defun geiser-autodoc--eldoc-function ()
(condition-case e
- (and (not (geiser-autodoc--inhibit))
- (geiser-autodoc--autodoc (geiser-syntax--scan-sexps)))
+ (and (not (geiser-autodoc--inhibit)) (geiser-autodoc--autodoc-at-point))
(error (format "Autodoc not available (%s)" (error-message-string e)))))
+(defun geiser-autodoc-show ()
+ "Show the signature or value of the symbol at point in the echo area."
+ (interactive)
+ (message (geiser-autodoc--autodoc-at-point)))
+
;;; Autodoc mode: