unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Edward O'Connor" <hober0@gmail.com>
To: emacs-devel@gnu.org
Subject: Re: rewriting y-or-n-p to use read-char-choice
Date: Thu, 10 Mar 2011 11:10:06 -0800	[thread overview]
Message-ID: <AANLkTi=fzRiqFcan5gxXTipZYjkEnJX-X8W1gkZoVZ-u@mail.gmail.com> (raw)
In-Reply-To: <8739mulshy.fsf@lifelogs.com>

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	other threads:[~2011-03-10 19:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-10 18:50 rewriting y-or-n-p to use read-char-choice Ted Zlatanov
2011-03-10 19:10 ` Edward O'Connor [this message]
2011-03-10 19:46   ` Ted Zlatanov
2011-03-10 22:35 ` Drew Adams
2011-03-10 22:54   ` Ted Zlatanov
2011-03-10 23:48     ` Drew Adams
2011-03-11  2:05 ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='AANLkTi=fzRiqFcan5gxXTipZYjkEnJX-X8W1gkZoVZ-u@mail.gmail.com' \
    --to=hober0@gmail.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).