text-query
The text-query package is a generalized form of Common Lisp's builtin Y-OR-N-P and YES-OR-NO-P, adding more generality and the ability to time out with a default value. It is asdf-installable and should work on any modern Lisp. It was written by Mark Kantrowitz and can be freely used, modified, and distributed.

Author's Description

The text-query package generalizes the capabilities of the Lisp functions Y-OR-N-P and YES-OR-NO-P, and is similar in many ways to the Symbolics FQUERY function. There are several major differences, one of which is text-query's ability to timeout with a default value. In addition to redefining Y-OR-N-P and YES-OR-NO-P in terms of QUERY, this package defines Y-OR-N-P-WAIT and YES-OR-NO-P-WAIT to illustrate the timeout capability. More complicated queries are possible using the QUERY function.

Packager's Notes

This is old code, from 1993, but it is good ANSI Common Lisp. It compiles and runs well under SBCL and should work in any modern Lisp implementation.

Please see the source code for documentation, since it contains plenty of comments, docstrings, and examples.

-Peter Scott, October 2004

Acknowledgements

This code was entirely written by Mark Kantrowitz and made available to us because of his generosity. Peter Scott, the maintainer of this package, would not be so presumptious to take credit for anything other than the asdf packaging.

ASDF-install package (obsolete) http://common-lisp.net/project/asdf-packaging/text-query-latest.tar.gz