summaryrefslogtreecommitdiff
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
parentb355f7fb31d19ac680eef38005035a95414a2612 (diff)
downloadgeiser-guile-d2601ace1339835acd542e2fa03d214b38c1f663.tar.gz
geiser-guile-d2601ace1339835acd542e2fa03d214b38c1f663.tar.bz2
New command: "manual" autodoc (C-c C-d s)
-rw-r--r--doc/cheat.texi8
-rw-r--r--doc/parens.texi5
-rw-r--r--elisp/geiser-autodoc.el13
-rw-r--r--elisp/geiser-mode.el2
4 files changed, 24 insertions, 4 deletions
diff --git a/doc/cheat.texi b/doc/cheat.texi
index 35d57de..3147ccf 100644
--- a/doc/cheat.texi
+++ b/doc/cheat.texi
@@ -1,6 +1,11 @@
@node Cheat sheet, No hacker is an island, Between the parens, Top
@chapter Cheat sheet
+In the tables below, triple chords always accept a variant with the
+third key not modified by @key{Control}; e.g.,
+@code{geiser-autodoc-show} is bound both to @kbd{C-c C-d C-s} and
+@kbd{C-c C-d s}.
+
@menu
* Scheme buffers::
* REPL::
@@ -74,6 +79,9 @@
@item C-c C-d C-d
@tab geiser-doc-symbol-at-point
@tab See documentation for identifier at point
+@item C-c C-d C-s
+@tab geiser-autodoc-show
+@tab Show signature or value for identifier at point in echo area
@item C-c C-d C-m
@tab geiser-doc-module
@tab See a list of a module's exported identifiers
diff --git a/doc/parens.texi b/doc/parens.texi
index 6bd5e5f..63c6d94 100644
--- a/doc/parens.texi
+++ b/doc/parens.texi
@@ -225,6 +225,9 @@ keyboard shortcut, @kbd{C-c C-d a}. That @t{/A} indicator in the
mode-line is telling you that autodoc is active. If you prefer, for some
obscure reason, that it be inactive by default, just set
@code{geiser-mode-autodoc-p} to @code{nil} in your customization files.
+Even when autodoc mode is off, you can use @code{geiser-autodoc-show},
+bound by default to @kbd{C-c C-d s}, to show the autodoc string for the
+symbol at point.
@cindex autodoc explained
@img{autodoc-scm, right} The way autodoc displays information deserves
@@ -327,7 +330,7 @@ You can also jump directly to the manual page for the symbol at point
with the command @code{geiser-doc-look-up-manual}, bound to @kbd{C-c C-d
i}.
-See also our @ref{Documentation browser,,cheat-sheet} for a list of
+See our @ref{Documentation browser,,cheat-sheet} for a list of all
navigation commands available in the documentation browser.
@node To eval or not to eval, To err perchance to debug, Documentation helpers, Between the parens
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:
diff --git a/elisp/geiser-mode.el b/elisp/geiser-mode.el
index a933963..b6899c6 100644
--- a/elisp/geiser-mode.el
+++ b/elisp/geiser-mode.el
@@ -282,6 +282,8 @@ interacting with the Geiser REPL is at your disposal.
--
("Symbol documentation" ("\C-c\C-d\C-d" "\C-c\C-dd")
geiser-doc-symbol-at-point :enable (geiser--symbol-at-point))
+ ("Short symbol documentation" ("\C-c\C-d\C-s" "\C-c\C-ds")
+ geiser-autodoc-show :enable (geiser--symbol-at-point))
("Module documentation" ("\C-c\C-d\C-m" "\C-c\C-dm") geiser-doc-module)
("Symbol manual lookup" ("\C-c\C-d\C-i" "\C-c\C-di")
geiser-doc-look-up-manual :enable (geiser-doc--manual-available-p))