From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jay Belanger Newsgroups: gmane.emacs.devel Subject: Re: Behavior of `this-command-keys' Date: Tue, 12 Sep 2006 11:40:27 -0500 Message-ID: <87hczdyr5w.fsf@vh213602.truman.edu> References: <87hczel26d.fsf@vh213602.truman.edu> Reply-To: belanger@truman.edu NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1158079275 11717 80.91.229.2 (12 Sep 2006 16:41:15 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 12 Sep 2006 16:41:15 +0000 (UTC) Cc: belanger@truman.edu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Sep 12 18:41:09 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GNBJY-0007hs-NZ for ged-emacs-devel@m.gmane.org; Tue, 12 Sep 2006 18:40:49 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GNBJX-0004pM-Vb for ged-emacs-devel@m.gmane.org; Tue, 12 Sep 2006 12:40:47 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GNBJJ-0004mZ-KU for emacs-devel@gnu.org; Tue, 12 Sep 2006 12:40:33 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GNBJH-0004ih-0V for emacs-devel@gnu.org; Tue, 12 Sep 2006 12:40:33 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GNBJG-0004ie-T7 for emacs-devel@gnu.org; Tue, 12 Sep 2006 12:40:30 -0400 Original-Received: from [150.243.160.94] (helo=uranium.truman.edu) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GNBKn-0006zJ-Pb for emacs-devel@gnu.org; Tue, 12 Sep 2006 12:42:05 -0400 Original-Received: from uranium.truman.edu (localhost.localdomain [127.0.0.1]) by localhost (Postfix) with SMTP id AEE0548E22 for ; Tue, 12 Sep 2006 11:47:06 -0500 (CDT) Original-Received: from vh213602.truman.edu.truman.edu (vh213602.truman.edu [150.243.64.4]) by uranium.truman.edu (Postfix) with ESMTP id 4FE8E5797A; Tue, 12 Sep 2006 11:47:05 -0500 (CDT) Original-To: emacs-devel@gnu.org In-Reply-To: (Richard Stallman's message of "Mon\, 11 Sep 2006 22\:01\:04 -0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) 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:59737 Archived-At: Richard Stallman writes: > Consider something like: > (defun test () > (interactive) > (sit-for 1) > (setq result (this-command-keys))) > (global-set-key "a" 'test) > To me, it sounds like as if `result' should equal "a" (the key which > calls the function) if "ab" were pressed, whether or not the `sit-for' > had run its course. > > It seems that the documentation of this-command-keys is wrong. Its > value seems to include any keys that were read by read-event. I take it that's the desired value, then. > Given this fact, it is clear why sit-for now has the result it does: > it reads that event using read-event. > > Does this fix it? In the above test, the result is always "a"; so I guess the patch fixes it. Jay