summaryrefslogtreecommitdiff
path: root/elisp
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2010-02-03 01:03:20 +0100
committerJose Antonio Ortega Ruiz <jao@gnu.org>2010-02-03 01:03:20 +0100
commit0b7fbcf0bb64d5ede412f6e57e7b873c40f067f1 (patch)
tree650273b4ca0d987044de0c9b57a9ffc06297720d /elisp
parent143a0696ff04d4c56cbfb0204352380a21765b1f (diff)
downloadgeiser-0b7fbcf0bb64d5ede412f6e57e7b873c40f067f1.tar.gz
geiser-0b7fbcf0bb64d5ede412f6e57e7b873c40f067f1.tar.bz2
PLT: Better help lookups.
Diffstat (limited to 'elisp')
-rw-r--r--elisp/geiser-plt.el13
1 files changed, 9 insertions, 4 deletions
diff --git a/elisp/geiser-plt.el b/elisp/geiser-plt.el
index 9fcd3f5..d9b3ca9 100644
--- a/elisp/geiser-plt.el
+++ b/elisp/geiser-plt.el
@@ -1,6 +1,6 @@
;; geiser-plt.el -- geiser support for PLT scheme
-;; Copyright (C) 2009 Jose Antonio Ortega Ruiz
+;; Copyright (C) 2009, 2010 Jose Antonio Ortega Ruiz
;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the Modified BSD License. You should
@@ -112,10 +112,15 @@ This function uses `geiser-plt-init-file' if it exists."
;;; External help
-(defun geiser-plt--external-help (symbol module)
- (message "Requesting help for '%s'..." symbol)
+(defsubst geiser-plt--get-help (symbol module)
(geiser-eval--send/wait
- `(:eval (get-help ',symbol (:module ,module)) geiser/autodoc))
+ `(:eval (get-help ',symbol (:module ,module)) geiser/autodoc)))
+
+(defun geiser-plt--external-help (id module)
+ (message "Requesting help for '%s'..." id)
+ (let ((out (geiser-eval--retort-output (geiser-plt--get-help id module))))
+ (when (and out (string-match " but provided by:\n +\\(.+\\)\n" out))
+ (geiser-plt--get-help symbol (match-string 1 out))))
(minibuffer-message "%s done" (current-message))
t)