summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2009-05-25 03:36:51 +0200
committerJose Antonio Ortega Ruiz <jao@gnu.org>2009-05-25 03:36:51 +0200
commit76d5f69c79182687225248a7a0e424ef990daafd (patch)
treec9f0fbd2124efa54fb66ddaefa2fd54832ebcbc3
parent2894d527589de0020d4ccacbb883e0b8823ee4ae (diff)
downloadgeiser-chez-76d5f69c79182687225248a7a0e424ef990daafd.tar.gz
geiser-chez-76d5f69c79182687225248a7a0e424ef990daafd.tar.bz2
Bug fix and a bit of refactoring in geiser-doc.el.
-rw-r--r--elisp/geiser-doc.el22
1 files changed, 9 insertions, 13 deletions
diff --git a/elisp/geiser-doc.el b/elisp/geiser-doc.el
index 2fc9f69..3141c59 100644
--- a/elisp/geiser-doc.el
+++ b/elisp/geiser-doc.el
@@ -200,7 +200,7 @@ With prefix argument, ask for symbol (with completion)."
(defun geiser-doc-module (&optional module impl)
"Display information about a given module."
(interactive)
- (let* ((module (geiser-completion--read-module))
+ (let* ((module (or module (geiser-completion--read-module)))
(children (geiser-doc--get-module-children module))
(impl (or impl geiser-impl--implementation)))
(if (not children)
@@ -209,18 +209,14 @@ With prefix argument, ask for symbol (with completion)."
(erase-buffer)
(geiser-doc--insert-title (format "%s" module))
(newline)
- (geiser-doc--insert-list "Procedures:"
- (cdr (assoc 'procs children))
- module
- impl)
- (geiser-doc--insert-list "Variables:"
- (cdr (assoc 'vars children))
- module
- impl)
- (geiser-doc--insert-list "Submodules:"
- (cdr (assoc 'modules children))
- module
- impl)
+ (dolist (g '(("Procedures:" . procs)
+ ("Variables:" . vars)
+ ("Syntax:" . syntax)
+ ("Submodules:" . modules)))
+ (geiser-doc--insert-list (car g)
+ (cdr (assoc (cdr g) children))
+ module
+ impl))
(goto-char (point-min))
(setq geiser-doc--buffer-link
(geiser-doc--history-push (geiser-doc--make-link nil module impl))))