emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: rewriting y-or-n-p to use read-char-choice


From: Edward O'Connor
Subject: Re: rewriting y-or-n-p to use read-char-choice
Date: Thu, 10 Mar 2011 11:10:06 -0800

Hi,

> Stefan Monnier asked me to look at rewriting `y-or-n-p' to use
> `read-char-choice'.  This looked easy at first but I realized it's not
> such a good idea because:
[snip]
> So I think a better way would be to write a
> `read-char-choice-from-keymap' function which can be passed
> `query-replace-map' or something else AND a prompt and a list of
> acceptable return values.

I don't know if this is at all useful, but I had implemented the
functionality that `read-char-choice' provides a couple of years ago:

http://edward.oconnor.cx/elisp/read-char-spec.el

I've signed papers, so feel free to pilfer anything useful out of there.


Ted



reply via email to

[Prev in Thread] Current Thread [Next in Thread]