From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Edward O'Connor" Newsgroups: gmane.emacs.devel Subject: Re: rewriting y-or-n-p to use read-char-choice Date: Thu, 10 Mar 2011 11:10:06 -0800 Message-ID: References: <8739mulshy.fsf@lifelogs.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1299784255 8717 80.91.229.12 (10 Mar 2011 19:10:55 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 10 Mar 2011 19:10:55 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Mar 10 20:10:51 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PxlG6-0000yk-Q3 for ged-emacs-devel@m.gmane.org; Thu, 10 Mar 2011 20:10:51 +0100 Original-Received: from localhost ([127.0.0.1]:46992 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PxlG5-0004Sq-6Q for ged-emacs-devel@m.gmane.org; Thu, 10 Mar 2011 14:10:49 -0500 Original-Received: from [140.186.70.92] (port=58000 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PxlFt-0004Mk-5I for emacs-devel@gnu.org; Thu, 10 Mar 2011 14:10:38 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PxlFj-0004Xx-CB for emacs-devel@gnu.org; Thu, 10 Mar 2011 14:10:28 -0500 Original-Received: from mail-gy0-f169.google.com ([209.85.160.169]:63349) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PxlFj-0004Xp-8u for emacs-devel@gnu.org; Thu, 10 Mar 2011 14:10:27 -0500 Original-Received: by gyb13 with SMTP id 13so1073240gyb.0 for ; Thu, 10 Mar 2011 11:10:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type:content-transfer-encoding; bh=HjtcP4VlB0uWw3dYtvFlurykx1isnLVvnx/VCH6/z6c=; b=NBjK9Q9+EKq+2BtJ0qAulsI02NIqHYTUehLWyZoVYljSkpCUuSWkiFyhq1iAml3vbN R5Gc4UrNjhl6F9+HLGVAA3QIn8M+BqgBnf1IV+2fncEOkoQ6QKRpGpBOoXsZILy3+CxL x6rk4sfDp/DM7LVE+0+b0sd2m+o1wudSCxWto= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; b=gXM0VmnZ6MLC/ZsHmdWEWPgqzudH1tZGHKyDDG1aHMtVWuE+/cpFIJdhw8a8/+b8Yk 1ZofKw2ZX2yMiZuxvkQ9F0sn9s7cValZYYMmu/h6VghehfIaShsWPFPAWjwN/CnZE4YE srCBKdrukntWZ6bb0H/qWLukeWtTduUrH3Q0o= Original-Received: by 10.236.76.135 with SMTP id b7mr1561127yhe.272.1299784226072; Thu, 10 Mar 2011 11:10:26 -0800 (PST) Original-Received: by 10.236.105.207 with HTTP; Thu, 10 Mar 2011 11:10:06 -0800 (PST) In-Reply-To: <8739mulshy.fsf@lifelogs.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.160.169 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:137050 Archived-At: Hi, > Stefan Monnier asked me to look at rewriting `y-or-n-p' to use > `read-char-choice'. =C2=A0This looked easy at first but I realized it's n= ot > 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