diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2009-05-04 20:49:20 +0200 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2009-05-04 20:49:20 +0200 |
commit | fbd678c1d48c69e7a07730eea9a852236b9af737 (patch) | |
tree | 4cacde6280087aee9f184577bfe6df985e6adfb9 /elisp/geiser-autodoc.el | |
parent | 864392c532baa956412df895f7193946ed7609b3 (diff) | |
download | geiser-fbd678c1d48c69e7a07730eea9a852236b9af737.tar.gz geiser-fbd678c1d48c69e7a07730eea9a852236b9af737.tar.bz2 |
Autodoc: support for info about variables.
Diffstat (limited to 'elisp/geiser-autodoc.el')
-rw-r--r-- | elisp/geiser-autodoc.el | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/elisp/geiser-autodoc.el b/elisp/geiser-autodoc.el index 6565d88..f6d36a8 100644 --- a/elisp/geiser-autodoc.el +++ b/elisp/geiser-autodoc.el @@ -122,21 +122,24 @@ when `geiser-autodoc-display-module-p' is on." str)) (defun geiser-autodoc--str (signature pos module) - (when signature - (save-current-buffer - (set-buffer (geiser-syntax--font-lock-buffer)) - (erase-buffer) - (let* ((proc (car signature)) - (args (cdr signature)) - (current 1) - (pos (if (> pos (length args)) (length args) pos))) - (insert (format "(%s" (geiser-autodoc--proc-name proc module))) - (dolist (a args) - (insert " ") - (geiser-autodoc--insert-arg a current pos) - (setq current (1+ current))) - (insert ")") - (buffer-string))))) + (when (consp signature) + (let* ((proc (car signature)) + (args (cdr signature)) + (len (if (listp args) (length args) 0)) + (current 1) + (pos (if (> pos len) len pos))) + (if (eq args 'variable) + (geiser-autodoc--proc-name proc module) + (save-current-buffer + (set-buffer (geiser-syntax--font-lock-buffer)) + (erase-buffer) + (insert (format "(%s" (geiser-autodoc--proc-name proc module))) + (dolist (a args) + (insert " ") + (geiser-autodoc--insert-arg a current pos) + (setq current (1+ current))) + (insert ")") + (buffer-string)))))) ;;; Autodoc function: |