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: last-command-other-than-handle-switch-frame? Date: Sun, 06 Jan 2008 13:09:03 -0500 Message-ID: References: Reply-To: rms@gnu.org NNTP-Posting-Host: lo.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: ger.gmane.org 1199643038 31822 80.91.229.12 (6 Jan 2008 18:10:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 6 Jan 2008 18:10:38 +0000 (UTC) Cc: emacs-devel@gnu.org To: "Drew Adams" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jan 06 19:10:59 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 1JBZxV-0000NR-5o for ged-emacs-devel@m.gmane.org; Sun, 06 Jan 2008 19:10:53 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JBZx8-0007EO-Bf for ged-emacs-devel@m.gmane.org; Sun, 06 Jan 2008 13:10:30 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JBZvm-0006K4-5n for emacs-devel@gnu.org; Sun, 06 Jan 2008 13:09:06 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JBZvl-0006J9-3G for emacs-devel@gnu.org; Sun, 06 Jan 2008 13:09:05 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JBZvk-0006Iu-NF for emacs-devel@gnu.org; Sun, 06 Jan 2008 13:09:04 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JBZvk-0000st-68 for emacs-devel@gnu.org; Sun, 06 Jan 2008 13:09:04 -0500 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.60) (envelope-from ) id 1JBZvj-0001lk-CX; Sun, 06 Jan 2008 13:09:03 -0500 In-reply-to: X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) 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:86356 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? 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? I don't see any specific reason for doing so. Maybe we should change that. 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.