From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: RE: last-command-other-than-handle-switch-frame? Date: Sun, 6 Jan 2008 11:41:28 -0800 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-15" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1199648511 16977 80.91.229.12 (6 Jan 2008 19:41:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 6 Jan 2008 19:41:51 +0000 (UTC) Cc: emacs-devel@gnu.org To: Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jan 06 20:42:11 2008 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.50) id 1JBbNl-0000s0-29 for ged-emacs-devel@m.gmane.org; Sun, 06 Jan 2008 20:42:05 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JBbNO-0000LQ-AW for ged-emacs-devel@m.gmane.org; Sun, 06 Jan 2008 14:41:42 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JBbNL-0000LH-8E for emacs-devel@gnu.org; Sun, 06 Jan 2008 14:41:39 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JBbNJ-0000Kx-EO for emacs-devel@gnu.org; Sun, 06 Jan 2008 14:41:38 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JBbNJ-0000Ku-BX for emacs-devel@gnu.org; Sun, 06 Jan 2008 14:41:37 -0500 Original-Received: from rgminet01.oracle.com ([148.87.113.118]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JBbNF-0006IL-EM; Sun, 06 Jan 2008 14:41:33 -0500 Original-Received: from rgmgw1.us.oracle.com (rgmgw1.us.oracle.com [138.1.186.110]) by rgminet01.oracle.com (Switch-3.2.4/Switch-3.1.6) with ESMTP id m06JfVg0019537; Sun, 6 Jan 2008 12:41:31 -0700 Original-Received: from acsmt350.oracle.com (acsmt350.oracle.com [141.146.40.150]) by rgmgw1.us.oracle.com (Switch-3.2.4/Switch-3.2.4) with ESMTP id m06InuDt030523; Sun, 6 Jan 2008 12:41:30 -0700 Original-Received: from 141.144.88.62 by acsmt350.oracle.com with ESMTP id 3476420441199648486; Sun, 06 Jan 2008 11:41:26 -0800 X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 Importance: Normal X-Brightmail-Tracker: AAAAAQAAAAI= X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-Whitelist: TRUE X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 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:86373 Archived-At: > I use non-nil pop-up-frames, so lots of `handle-switch-frame' > commands get executed behind the scene. Why that is needed I've > never quite understood - why should a focus event be treated as > a "command"? > > The reason to make it generate an event is to make the command loop > check for the new frame's buffer's keymaps. > > What does "treated as a command" mean? Set `last-command' to it. Again, if that is unavoidable, then how about also having a `last-user-command' variable, which gets only user commands, not pseudo-commands such as `handle-switch-frame'. > For some time now, I've been coding ugly hacks like this: > > (if (memq last-command '(foo handle-switch-frame))... > > Does "treated as a command" mean that it goes into last-command? Yes. That is what the annoyance is. > I don't see any specific reason for doing so. > Maybe we should change that. That would be great. > We cannot handle them thru special-event-map because they they would > not cause the command loop to recheck the keymaps. But we could give > it a definition that sets this-command to last-command, or something > else with similar effect. I would appreciate such a fix.