GNU bug report logs - #37086
Guile Ice-9 Readline with-readline-completion-function

Previous Next

Package: guile;

Reported by: Matthew Henry <mcthenry <at> gmail.com>

Date: Mon, 19 Aug 2019 18:02:02 UTC

Severity: normal

Tags: notabug

Done: Mark H Weaver <mhw <at> netris.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Matthew Henry <mcthenry <at> gmail.com>
To: 37086 <at> debbugs.gnu.org
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)




This bug report was last modified 5 years and 273 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.