summaryrefslogtreecommitdiff
path: root/elisp/geiser-completion.el
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2009-02-16 00:46:31 +0100
committerJose Antonio Ortega Ruiz <jao@gnu.org>2009-02-16 00:46:31 +0100
commitfbc65dfc767da1dc3b28262eae041e9d303752c2 (patch)
tree47d8e715d9a608258e4bc8064504be801cd0dd17 /elisp/geiser-completion.el
parentecf460e9aca83a32bb1149ecd5b0238c7a5cb233 (diff)
downloadgeiser-guile-fbc65dfc767da1dc3b28262eae041e9d303752c2.tar.gz
geiser-guile-fbc65dfc767da1dc3b28262eae041e9d303752c2.tar.bz2
New command: module documentation.
Diffstat (limited to 'elisp/geiser-completion.el')
-rw-r--r--elisp/geiser-completion.el15
1 files changed, 8 insertions, 7 deletions
diff --git a/elisp/geiser-completion.el b/elisp/geiser-completion.el
index 814a587..22b36a1 100644
--- a/elisp/geiser-completion.el
+++ b/elisp/geiser-completion.el
@@ -26,6 +26,7 @@
(require 'geiser-eval)
(require 'geiser-log)
+(require 'geiser-syntax)
(require 'geiser-base)
@@ -172,13 +173,13 @@ terminates a current completion."
(defvar geiser-completion--module-history nil)
-(defun geiser-completion--read-module ()
- (let ((minibuffer-local-completion-map geiser-completion--module-minibuffer-map)
- (modules (geiser-completion--module-list))
- (prompt "Module name: "))
- (if modules
- (completing-read prompt modules nil nil nil geiser-completion--module-history)
- (read-string prompt nil geiser-completion--module-history))))
+(defun geiser-completion--read-module (&optional prompt default history)
+ (let ((minibuffer-local-completion-map geiser-completion--module-minibuffer-map))
+ (completing-read (or prompt "Module name: ")
+ (geiser-completion--module-list)
+ nil nil
+ (or default (geiser-syntax--buffer-module))
+ (or history geiser-completion--module-history))))
(defun geiser--respecting-message (format &rest format-args)
"Display TEXT as a message, without hiding any minibuffer contents."