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
commitdba34f8fdf4cf29703126abc498261ea410a9702 (patch)
tree0cff79320ee26788d525bb67b98be1dae9e34e5f /elisp/geiser-completion.el
parent90cab862978ec01dfb7fa2b06592d835400d798c (diff)
downloadgeiser-dba34f8fdf4cf29703126abc498261ea410a9702.tar.gz
geiser-dba34f8fdf4cf29703126abc498261ea410a9702.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."