From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: Strange behavior of C-u in the presence of sit-for in p-c-h Date: Wed, 18 Oct 2006 13:54:46 -0400 Message-ID: References: <87y7rfdmjg.fsf@furball.mit.edu> <87zmbuabq9.fsf@stupidchicken.com> Reply-To: rms@gnu.org NNTP-Posting-Host: main.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: sea.gmane.org 1161194220 11607 80.91.229.2 (18 Oct 2006 17:57:00 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 18 Oct 2006 17:57:00 +0000 (UTC) Cc: cyd@stupidchicken.com, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Oct 18 19:56:58 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 1GaFek-0006g6-U6 for ged-emacs-devel@m.gmane.org; Wed, 18 Oct 2006 19:56:43 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GaFek-00065O-JK for ged-emacs-devel@m.gmane.org; Wed, 18 Oct 2006 13:56:42 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GaFcw-0003AE-5G for emacs-devel@gnu.org; Wed, 18 Oct 2006 13:54:50 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GaFcu-00035i-Dt for emacs-devel@gnu.org; Wed, 18 Oct 2006 13:54:48 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GaFct-00035B-PC for emacs-devel@gnu.org; Wed, 18 Oct 2006 13:54:47 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GaFct-0000SF-UG for emacs-devel@gnu.org; Wed, 18 Oct 2006 13:54:47 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1GaFcs-0006g8-NC; Wed, 18 Oct 2006 13:54:46 -0400 Original-To: Stefan Monnier In-reply-to: (message from Stefan Monnier on Tue, 17 Oct 2006 21:57:17 -0400) 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:60894 Archived-At: I'm not sure exactly what this was trying to avoid, but the test looks odd. Maybe the "!reread" could make some sense, but the "this_command_key_count==0" looks positively odd since it may end up recording the first (and only the first) of a sequence of keys. I designed that test to do the right thing in the cases that were encountered, and both conditions proved to be necessary. !reread is the usual case of reading a new character. this_command_key_count==0 is the case you get when a command reads input with read-event and then unreads it. This usually IS the first event of a key sequence; it is supposed to be. To really do the right thing, we would need to associate each unread key with a flag indicating whether it was previously added to this-command-keys. That would be a very painful incompatibility, so I never wanted to do it, and I don't want to do it now. Maybe the problem is that `this-command-keys' has several potential uses and they are incompatible: in one case one wants this-command-keys to list the keys the user has typed (independently from whether or not some of those keys were later read&unread&reread&reunread&rereread), whereas in the other one wants the exact key-sequence which triggered this command, so we can push it back on unread-command-events to force re-interpretation of those keys. I think that is true. I suggest that we add a new primitive that does precisely what `universal-argument-other-key' needs, and use it there. That will be safe, in that the change can't break anything else. Does anyone disagree? Would someone like to do this?