can't bind control-z in 21.5, but in 21.4 I can
Stephen J. Turnbull
stephen at xemacs.org
Sun Jun 19 13:32:00 EDT 2011
Uwe Brauer writes:
>
> Neither of the following binding
> (global-set-key [(control z)] 'suspend-emacs-or-iconify-frame)
> (global-set-key "\C-z" 'suspend-emacs-or-iconify-frame)
> works,
>
> Why?
Because that binding is in `global-map', which is shadowed by the
binding in `global-tty-map', in 21.5.
Use
(define-key global-tty-map [(control z)] 'suspend-emacs-or-iconify-frame)
I don't know the rationale for this change, but sometimes it's useful
to have different bindings depending on console type. Personally I
think the shadowing keymap approach is preferable to rewriting the
global function to check whether it was invoked from a TTY or not.
It's possible that it would make sense to have global-set-key work on
global-tty-map as well as global-map, but that looks like a delicate
question at first glance.
More information about the XEmacs-Beta
mailing list