summaryrefslogtreecommitdiff
path: root/guile-readline
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2009-04-24 14:01:26 +0200
committerAndy Wingo <wingo@pobox.com>2009-04-24 14:21:06 +0200
commit64e5d08d3e7076b554f724efede860883f846b5f (patch)
treebfe5f5cd58ff2afc661106b55763ccecf6e35e80 /guile-readline
parent131826039c62bdfd5932272b5d19d4b08cbe4e63 (diff)
leap of faith: (ice-9 syncase) in psyntax-pp.scm -> (guile)
* module/ice-9/psyntax-pp.scm: Manually switch psyntax-pp over to (guile) from (ice-9 syncase). Heh heh.
Diffstat (limited to 'guile-readline')
-rw-r--r--guile-readline/ice-9/readline.scm32
1 files changed, 15 insertions, 17 deletions
diff --git a/guile-readline/ice-9/readline.scm b/guile-readline/ice-9/readline.scm
index c35602f0c..19dda94db 100644
--- a/guile-readline/ice-9/readline.scm
+++ b/guile-readline/ice-9/readline.scm
@@ -169,24 +169,22 @@
(define-public (set-readline-read-hook! h)
(set! read-hook h))
+(define-public apropos-completion-function
+ (let ((completions '()))
+ (lambda (text cont?)
+ (if (not cont?)
+ (set! completions
+ (map symbol->string
+ (apropos-internal
+ (string-append "^" (regexp-quote text))))))
+ (if (null? completions)
+ #f
+ (let ((retval (car completions)))
+ (begin (set! completions (cdr completions))
+ retval))))))
+
(if (provided? 'regex)
- (begin
- (define-public apropos-completion-function
- (let ((completions '()))
- (lambda (text cont?)
- (if (not cont?)
- (set! completions
- (map symbol->string
- (apropos-internal
- (string-append "^" (regexp-quote text))))))
- (if (null? completions)
- #f
- (let ((retval (car completions)))
- (begin (set! completions (cdr completions))
- retval))))))
-
- (set! *readline-completion-function* apropos-completion-function)
- ))
+ (set! *readline-completion-function* apropos-completion-function))
(define-public (with-readline-completion-function completer thunk)
"With @var{completer} as readline completion function, call @var{thunk}."