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: last-command-other-than-handle-switch-frame? Date: Sat, 5 Jan 2008 15:24:00 -0800 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1199575494 26653 80.91.229.12 (5 Jan 2008 23:24:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 5 Jan 2008 23:24:54 +0000 (UTC) To: "Emacs-Devel" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jan 06 00:25:14 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 1JBINx-0004xi-H2 for ged-emacs-devel@m.gmane.org; Sun, 06 Jan 2008 00:25:08 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JBINW-0001m0-AC for ged-emacs-devel@m.gmane.org; Sat, 05 Jan 2008 18:24:34 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JBINS-0001lN-JS for emacs-devel@gnu.org; Sat, 05 Jan 2008 18:24:30 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JBINN-0001gB-7J for emacs-devel@gnu.org; Sat, 05 Jan 2008 18:24:30 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JBINN-0001g3-4I for emacs-devel@gnu.org; Sat, 05 Jan 2008 18:24:25 -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 1JBINL-0005tJ-Lt for emacs-devel@gnu.org; Sat, 05 Jan 2008 18:24:25 -0500 Original-Received: from agmgw1.us.oracle.com (agmgw1.us.oracle.com [152.68.180.212]) by rgminet01.oracle.com (Switch-3.2.4/Switch-3.1.6) with ESMTP id m05NO51q019343 for ; Sat, 5 Jan 2008 16:24:05 -0700 Original-Received: from rcsmt251.oracle.com (rcsmt251.oracle.com [148.87.90.196]) by agmgw1.us.oracle.com (Switch-3.2.0/Switch-3.2.0) with ESMTP id m05MxZ21015223 for ; Sat, 5 Jan 2008 16:24:04 -0700 Original-Received: from 141.144.88.62 by acsmt351.oracle.com with ESMTP id 3479207751199575440; Sat, 05 Jan 2008 15:24:00 -0800 X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) 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:86257 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"? Anyway, I'm not questioning that design here - so be it. For some time now, I've been coding ugly hacks like this: (if (memq last-command '(foo handle-switch-frame))... when all I really wanted was to know whether the last user command was `foo'. And such code doesn't actually test whether the command prior to `handle-switch-frame' was `foo'. Does this nuisance ring a bell for anyone else? Shouldn't there be another variable, in addition to `last-command' and `real-last-command' - something that gives us the last command other than `handle-switch-frame'? What I'm asking for, I guess, is a `last-user-command' variable, something free from pollution by pseudo-commands (or generated commands or whatever they are) such as `handle-switch-frame'. (I presume, based on its doc, that `real-last-command' does not filter out `handle-switch-frame'.) See also this 2006 thread, where I mentioned the same problem: http://lists.gnu.org/archive/html/emacs-devel/2006-07/msg00165.html