[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#37086: Guile Ice-9 Readline with-readline-completion-function
From: |
Matthew Henry |
Subject: |
bug#37086: Guile Ice-9 Readline with-readline-completion-function |
Date: |
Mon, 19 Aug 2019 20:12:27 -0400 |
I'm early in my Scheme journey, but here's a suggested fix:
(define-syntax-rule (with-readline-completion-function completer expr ...)
"With @var{completer} as readline completion function, call @var{expr ...}."
(let ((old-completer *readline-completion-function*))
(dynamic-wind
(lambda ()
(set! *readline-completion-function* completer))
(lambda () expr ...)
(lambda ()
(set! *readline-completion-function* old-completer)))))
(export with-readline-completion-function)