summaryrefslogtreecommitdiff
path: root/elisp
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2009-02-17 01:31:26 +0100
committerJose Antonio Ortega Ruiz <jao@gnu.org>2009-02-17 01:31:26 +0100
commit29eaa9f0984aa0d0aeb516e1351ab945164249ae (patch)
treef621f729272fa0681e9a198e1efbfad3bd78e0a1 /elisp
parent4814d02ad67edb086b8ccd8ad6a6798fe780b968 (diff)
downloadgeiser-29eaa9f0984aa0d0aeb516e1351ab945164249ae.tar.gz
geiser-29eaa9f0984aa0d0aeb516e1351ab945164249ae.tar.bz2
Better symbol documentation.
Diffstat (limited to 'elisp')
-rw-r--r--elisp/geiser-doc.el11
1 files changed, 7 insertions, 4 deletions
diff --git a/elisp/geiser-doc.el b/elisp/geiser-doc.el
index 3a1759c..a7d6eae 100644
--- a/elisp/geiser-doc.el
+++ b/elisp/geiser-doc.el
@@ -53,7 +53,7 @@
;;; Docstrings:
(defun geiser-doc--get-docstring (symbol)
- (geiser-eval--send/result `(:eval ((:ge docstring) ',symbol))))
+ (geiser-eval--send/result `(:eval ((:ge symbol-documentation) ',symbol))))
(defun geiser-doc--get-module-children (module)
(geiser-eval--send/result `(:eval ((:ge module-children) (quote (:scm ,module))))))
@@ -63,7 +63,7 @@
(defun geiser-doc--insert-title (title)
(let ((p (point)))
- (insert title)
+ (insert (format "%s" title))
(put-text-property p (point) 'face 'geiser-font-lock-doc-title))
(newline))
@@ -86,11 +86,14 @@ With prefix argument, ask for symbol (with completion)."
(geiser-completion--read-symbol "Symbol: " (symbol-at-point)))))
(when symbol
(let ((ds (geiser-doc--get-docstring symbol)))
- (if (or (not (stringp ds)) (zerop (length ds)))
+ (if (or (not ds) (not (listp ds)))
(message "No documentation available for '%s'" symbol)
(geiser-doc--with-buffer
(erase-buffer)
- (insert ds))
+ (geiser-doc--insert-title (cdr (assoc 'signature ds)))
+ (newline)
+ (insert (or (cdr (assoc 'docstring ds)) ""))
+ (goto-line (point-min)))
(geiser-doc--pop-to-buffer))))))
(defun geiser-doc-module (module)