unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* last-command-other-than-handle-switch-frame?
@ 2008-01-05 23:24 Drew Adams
  2008-01-06 18:09 ` last-command-other-than-handle-switch-frame? Richard Stallman
  0 siblings, 1 reply; 5+ messages in thread
From: Drew Adams @ 2008-01-05 23:24 UTC (permalink / raw)
  To: Emacs-Devel

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-01-14 19:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-05 23:24 last-command-other-than-handle-switch-frame? Drew Adams
2008-01-06 18:09 ` last-command-other-than-handle-switch-frame? Richard Stallman
2008-01-06 19:41   ` last-command-other-than-handle-switch-frame? Drew Adams
2008-01-07 11:31     ` last-command-other-than-handle-switch-frame? Richard Stallman
2008-01-14 19:13       ` last-command-other-than-handle-switch-frame? Drew Adams

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).