diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2010-12-30 15:44:09 +0100 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2010-12-30 15:44:09 +0100 |
commit | d2601ace1339835acd542e2fa03d214b38c1f663 (patch) | |
tree | f1f8b42e59c476c59b45047c16cd45327f3615a9 /elisp | |
parent | b355f7fb31d19ac680eef38005035a95414a2612 (diff) | |
download | geiser-guile-d2601ace1339835acd542e2fa03d214b38c1f663.tar.gz geiser-guile-d2601ace1339835acd542e2fa03d214b38c1f663.tar.bz2 |
New command: "manual" autodoc (C-c C-d s)
Diffstat (limited to 'elisp')
-rw-r--r-- | elisp/geiser-autodoc.el | 13 | ||||
-rw-r--r-- | elisp/geiser-mode.el | 2 |
2 files changed, 12 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: 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)) |