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: bug: "C-x z" ("repeat") no longer works correctly with M-x Date: Sat, 02 Jun 2012 14:44:46 +0800 Message-ID: <8762ba8b6p.fsf@gnu.org> References: <87396ylx5m.fsf@catnip.gol.com> <87pq9ndq0n.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1338619502 11467 80.91.229.3 (2 Jun 2012 06:45:02 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 2 Jun 2012 06:45:02 +0000 (UTC) Cc: emacs-devel@gnu.org, Miles Bader To: "Aaron S. Hawley" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jun 02 08:45:01 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Sai56-0006DB-37 for ged-emacs-devel@m.gmane.org; Sat, 02 Jun 2012 08:45:00 +0200 Original-Received: from localhost ([::1]:47126 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sai55-0001IH-Tr for ged-emacs-devel@m.gmane.org; Sat, 02 Jun 2012 02:44:59 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:55547) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sai53-0001I7-59 for emacs-devel@gnu.org; Sat, 02 Jun 2012 02:44:58 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sai51-0004VX-De for emacs-devel@gnu.org; Sat, 02 Jun 2012 02:44:56 -0400 Original-Received: from fencepost.gnu.org ([208.118.235.10]:37949) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sai51-0004VS-AJ for emacs-devel@gnu.org; Sat, 02 Jun 2012 02:44:55 -0400 Original-Received: from [155.69.16.75] (port=51319 helo=ulysses) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1Sai4y-0003eB-GS; Sat, 02 Jun 2012 02:44:53 -0400 In-Reply-To: (Aaron S. Hawley's message of "Tue, 29 May 2012 14:45:48 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.10 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:150722 Archived-At: "Aaron S. Hawley" writes: > I had given a more literal translation of the C command to the > gnu-emacs-sources mailing list back in March. Stefan and I discussed > it but hadn't run across this issue with repeat. He later made some > modifications to my submission and committed it in May. I have only > now run it and can confirm this bug with repeat. I'm not sure what's > causing it though, but found the following fixes it. Again, I'm not > sure why. Nor am I sure if it's a wholly appropriate fix. No, tweaking the interactive spec does not really fix the problem. The problem is that the old execute-extended-command sets the real_this_command internal variable, which causes the Emacs command loop to record the command that was actually executed into real-last-command and last-repeatable-command. In other words, it's not just the fact that `C-x z' doesn't work properly. Moving execute-extended-command to Lisp produces a backward-incompatible change in the values of the real-last-command and last-repeatable-command variables for M-x. I suspect this may break things other than `C-x z'. I guess we could fix this by exposing real_this_command to Lisp too, but that kinda defeats the point of that variable... Is there a strong rationale for moving execute-extended-command to Lisp, other than the general principle that we want as much functionality implemented Lisp as possible? If not, it may not be worth making this change, at least in Emacs 24.2, due to the risk of gratuitous incompatibilities.