Michael Sperber [Mr. Preprocessor] wrote:
>> All excellent answers. (Thanks, Jan!) They still
doesn't answer the
>> basic question why I can't rebind this key inside XEmacs, when I can
>> rebind every other key.
Glynn> Why you can't rebind what key? 'backspace or [(control ?h)]?
Well,
(global-set-key 'backspace 'delete-backward-char)
doesn't cut the mustard. Despite "stty erase ^?".
But does your backspace key generate \177?
However,
(global-set-key "\C-h" 'delete-backward-char)
works.
Which it probably shouldn't if your backspace key generates \177.
Does 'backspace correspond to the event generated by the erase
character?
character_to_event translates the code which matches tty-erase-char to
'backspace, provided that the do_backspace_mapping parameter is true
(note that this is always the case when called from
Fcharacter_to_event). tty-erase-char should be initalised to the
terminal's erase setting.
The default mapping (if tty-erase-char is nil) is that \177 is mapped
to 'delete and \010 is mapped to [(control ?h)]. IOW, nothing will
generate 'backspace.
You can determine what is coming out of character_to_event using
M-: (next-event)
--
Glynn Clements <glynn(a)sensei.co.uk>