[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Bikeshedding go! Why is <M-f4> unbound?

From: Drew Adams
Subject: RE: Bikeshedding go! Why is <M-f4> unbound?
Date: Mon, 17 Jan 2011 17:20:18 -0800

> But it is not an error. It is just a message. You can't grab it with
> condition-case as you said you would.

I was mistaken.  You are right.

> > d>  (a) let users bind `M-f4' in Emacs, but if unbound
> > d>  (b) look it up in `w32-passthrough-events' and
> > d>      if there pass it to Windows, or if not there
> > d>  (c) raise an unbound error.
> There is no "unbound error".

Right.  So change (c) to "show message saying that the key
is unbound".  Any key that is not bound in Emacs and is not listed in
`w32-passthrough-events' would not be passed to Windows but would be handled by
Emacs showing that message.

If you as a user don't want Alt-F4 to go to Windows, and you don't have any
special use for it, you can remove it from `w32-passthrough-event's (if there).
In that case, you should see the message.

> If there is no "unbound error" then you are simply suggesting that we
> should rather tell the user that Emacs have not bound the key than
> passing it on to the operating system that knows how to handle it.

Yes, if `w32-passthrough-event's does not say to pass it to Windows.  

But I was indeed mistaken in thinking that the message was an error message.  So
no, there is little possibility of Lisp doing anything with this case.

The important thing, from my point of view, is that users be able to affect the
pass-through behavior (e.g. by changing `w32-passthrough-event').

Least surprise also means that Emacs tells users what's happening.  My own
preference would be to not bind the key by default and give users a new command
to bind it to, to pass it through to Windows.

That's what Emacs users expect, even if it's not what Windows users might
expect: _a key does nothing in Emacs unless you bind it_.  That you can bind it
to a command that gives it over to Windows would be fine.  Binding keys to
commands is more standard in Emacs than having an option that governs their
behavior (e.g. `w32-passthrough-events').

But as I say, that's just my preference.  I'm happy as long as users have a way
to prevent the key from going to Windows.  `w32-passthrough-events' sounds fine
to me.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]