diff options
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)) |