From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong 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 19:57:54 -0400 Message-ID: <87y7rdfa7x.fsf@stupidchicken.com> References: <87y7rfdmjg.fsf@furball.mit.edu> <87zmbuabq9.fsf@stupidchicken.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1161215887 30830 80.91.229.2 (18 Oct 2006 23:58:07 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 18 Oct 2006 23:58:07 +0000 (UTC) Cc: Stefan Monnier , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Oct 19 01:58:04 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 1GaLIN-0001L1-8N for ged-emacs-devel@m.gmane.org; Thu, 19 Oct 2006 01:57:59 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GaLIM-0006a0-Ss for ged-emacs-devel@m.gmane.org; Wed, 18 Oct 2006 19:57:58 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GaLI8-0006YT-9c for emacs-devel@gnu.org; Wed, 18 Oct 2006 19:57:44 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GaLI7-0006Y5-MS for emacs-devel@gnu.org; Wed, 18 Oct 2006 19:57:43 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GaLI7-0006Y1-Jg for emacs-devel@gnu.org; Wed, 18 Oct 2006 19:57:43 -0400 Original-Received: from [18.19.1.138] (helo=cyd) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GaLI4-0000bB-Jn; Wed, 18 Oct 2006 19:57:40 -0400 Original-Received: by cyd (Postfix, from userid 1000) id 47CEC4E420; Wed, 18 Oct 2006 19:57:54 -0400 (EDT) Original-To: rms@gnu.org In-Reply-To: (Richard Stallman's message of "Wed\, 18 Oct 2006 13\:54\:46 -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:60900 Archived-At: Richard Stallman writes: > 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? This would involve lugging around an extra set of variables, exactly like `this_command_keys' and `this_command_key_count' except reread events get updated there too. Sounds ugly. How about a variable that tells the command loop to re-insert reread commands into `this-command-keys' until the next command? The command loop could automagically reset this at the start of the loop, in case of a quit. Then universal-argument could toggle this variable.