summaryrefslogtreecommitdiff
path: root/elisp/geiser-doc.el
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2010-06-11 20:00:35 +0200
committerJose Antonio Ortega Ruiz <jao@gnu.org>2010-06-11 20:00:35 +0200
commita4c9547ba10bd47078c42e389a1abc87d4b54ab6 (patch)
tree0370bd958baa9b4b283e69bc9b231585a93a8a6d /elisp/geiser-doc.el
parent1ac457ed19a03e5f6845a10af4c701d1e9eafe90 (diff)
downloadgeiser-a4c9547ba10bd47078c42e389a1abc87d4b54ab6.tar.gz
geiser-a4c9547ba10bd47078c42e389a1abc87d4b54ab6.tar.bz2
Fixes for module navigation in doc browser.
Diffstat (limited to 'elisp/geiser-doc.el')
-rw-r--r--elisp/geiser-doc.el20
1 files changed, 14 insertions, 6 deletions
diff --git a/elisp/geiser-doc.el b/elisp/geiser-doc.el
index 866d65b..ef20938 100644
--- a/elisp/geiser-doc.el
+++ b/elisp/geiser-doc.el
@@ -108,8 +108,10 @@
(defun geiser-doc--insert-button (target module impl)
(let ((link (geiser-doc--make-link target module impl))
- (text (format "%s" target))
- (help (if module (format "%s in module %s" target module) "")))
+ (text (format "%s" (or target module)))
+ (help (format "%smodule %s"
+ (if target (format "%s in " target) "")
+ (or module "<unknown>"))))
(insert-text-button text
:type 'geiser-doc--button
'geiser-link link
@@ -135,7 +137,9 @@
(newline)
(dolist (w lst)
(insert (format "\t- "))
- (geiser-doc--insert-button w module impl)
+ (if module
+ (geiser-doc--insert-button w module impl)
+ (geiser-doc--insert-button nil w impl))
(newline))
(newline)))
@@ -148,7 +152,8 @@
;;; Commands:
-(geiser-impl--define-caller geiser-doc--external-help display-help (symbol module)
+(geiser-impl--define-caller geiser-doc--external-help display-help
+ (symbol module)
"By default, Geiser will display help about an identifier in a
help buffer, after collecting the associated signature and
docstring. You can provide an alternative function for displaying
@@ -206,12 +211,15 @@ With prefix argument, ask for symbol (with completion)."
(newline)
(dolist (g '(("Procedures:" . procs)
("Variables:" . vars)
- ("Syntax:" . syntax)
- ("Submodules:" . modules)))
+ ("Syntax:" . syntax)))
(geiser-doc--insert-list (car g)
(cdr (assoc (cdr g) exports))
module
impl))
+ (geiser-doc--insert-list "Submodules:"
+ (cdr (assoc 'modules exports))
+ nil
+ impl)
(goto-char (point-min))
(setq geiser-doc--buffer-link
(geiser-doc--history-push