From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Davis Herring" Newsgroups: gmane.emacs.devel Subject: Re: Reading char choices Date: Fri, 7 Jan 2011 09:16:40 -0800 (PST) Message-ID: <45079.130.55.118.19.1294420600.squirrel@webmail.lanl.gov> References: <871v4ohesj.fsf@stupidchicken.com> Reply-To: herring@lanl.gov NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1294421425 10854 80.91.229.12 (7 Jan 2011 17:30:25 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 7 Jan 2011 17:30:25 +0000 (UTC) Cc: emacs-devel@gnu.org To: "Chong Yidong" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jan 07 18:30:20 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 1PbG8q-0002SC-1k for ged-emacs-devel@m.gmane.org; Fri, 07 Jan 2011 18:30:20 +0100 Original-Received: from localhost ([127.0.0.1]:52774 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PbG8p-0007Ji-4c for ged-emacs-devel@m.gmane.org; Fri, 07 Jan 2011 12:30:19 -0500 Original-Received: from [140.186.70.92] (port=38401 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PbFw1-0006Am-BB for emacs-devel@gnu.org; Fri, 07 Jan 2011 12:17:24 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PbFvg-0000oM-EZ for emacs-devel@gnu.org; Fri, 07 Jan 2011 12:17:04 -0500 Original-Received: from proofpoint2.lanl.gov ([204.121.3.26]:39573) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PbFvg-0000mx-1l for emacs-devel@gnu.org; Fri, 07 Jan 2011 12:16:44 -0500 Original-Received: from mailrelay1.lanl.gov (mailrelay1.lanl.gov [128.165.4.101]) by proofpoint2.lanl.gov (8.14.3/8.14.3) with ESMTP id p07IXTun006944; Fri, 7 Jan 2011 11:33:29 -0700 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by mailrelay1.lanl.gov (Postfix) with ESMTP id E0AEE160B8C; Fri, 7 Jan 2011 10:16:40 -0700 (MST) X-NIE-2-Virus-Scanner: amavisd-new at mailrelay1.lanl.gov Original-Received: from webmail1.lanl.gov (webmail1.lanl.gov [128.165.4.106]) by mailrelay1.lanl.gov (Postfix) with ESMTP id CD548160B8B; Fri, 7 Jan 2011 10:16:40 -0700 (MST) Original-Received: by webmail1.lanl.gov (Postfix, from userid 48) id CB5191CA8298; Fri, 7 Jan 2011 10:16:40 -0700 (MST) Original-Received: from 130.55.118.19 (SquirrelMail authenticated user 196434) by webmail.lanl.gov with HTTP; Fri, 7 Jan 2011 09:16:40 -0800 (PST) In-Reply-To: <871v4ohesj.fsf@stupidchicken.com> User-Agent: SquirrelMail/1.4.8-5.el5_4.10.lanl3 X-Priority: 3 (Normal) Importance: Normal X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.2.15, 1.0.148, 0.0.0000 definitions=2011-01-07_08:2011-01-07, 2011-01-07, 1970-01-01 signatures=0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. 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:134355 Archived-At: > (message "%s" prompt) > (setq char (read-event)) Couldn't we pass the prompt to read-event? Also, how does this inhibit quitting out of the whole function? > ((eq (key-binding (vector char)) 'keyboard-quit) > (if inhibit-keyboard-quit (keyboard-quit))) If I'm missing something and we really do inhibit quitting, surely this should be (unless inhibit-keyboard-quit ...). > ((setq done (memq char chars)))))) So if it's not valid, we just ignore it. Would we rather display a message (as for `y-or-n-p'), at least optionally? Davis -- This product is sold by volume, not by mass. If it appears too dense or too sparse, it is because mass-energy conversion has occurred during shipping.