[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: last-command-other-than-handle-switch-frame?
From: |
Drew Adams |
Subject: |
RE: last-command-other-than-handle-switch-frame? |
Date: |
Sun, 6 Jan 2008 11:41:28 -0800 |
> 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.