"Stephen J. Turnbull" <turnbull(a)sk.tsukuba.ac.jp> writes:
Mandrake enforces its keyboard policy (and other policies) by
hacking application internals. The reason the behavior changed is
that the Mandrake version of XEmacs is deliberately broken (by the
patch above) to exhibit the behavior you are used to.
And yet I wonder why they felt compelled to do this. XEmacs is really
quite reasonable about Alt/Meta detection. It uses Meta when it is
available, Alt when it's not.
From src/event-Xt.c:
/* X bogusly doesn't define the interpretations of any bits besides
ModControl, ModShift, and ModLock; so the Interclient Communication
Conventions Manual says that we have to bend over backwards to figure
out what the other modifier bits mean. According to ICCCM:
- Any keycode which is assigned ModControl is a "control" key.
- Any modifier bit which is assigned to a keycode which generates Meta_L
or Meta_R is the modifier bit meaning "meta". Likewise for Super, Hyper,
etc.
- Any keypress event which contains ModControl in its state should be
interpreted as a "control" character.
- Any keypress event which contains a modifier bit in its state which is
generated by a keycode whose corresponding keysym is Meta_L or Meta_R
should be interpreted as a "meta" character. Likewise for Super, Hyper,
etc.
- It is illegal for a keysym to be associated with more than one modifier
bit.
This means that the only thing that emacs can reasonably interpret as a
"meta" key is a key whose keysym is Meta_L or Meta_R, and which generates
one of the modifier bits Mod1-Mod5.
Unfortunately, many keyboards don't have Meta keys in their default
configuration. So, if there are no Meta keys, but there are "Alt" keys,
emacs will interpret Alt as Meta. If there are both Meta and Alt keys,
then the Meta keys mean "Meta", and the Alt keys mean "Alt" (it
used to
mean "Symbol," but that just confused the hell out of way too many people).
This works with the default configurations of the 19 keyboard-types I've
checked.
Emacs detects keyboard configurations which violate the above rules, and
prints an error message (...) */