How to fix emacs problems with Backspace or Delete
If your "delete" key on the terminal you're using isn't acting as you expect it to, it is likely that it is sending the "backspace" character instead of the "delete" character that is expected. This is a common problem with PC's and Macs. There are a few things you can do about this (in order of preference):
- see if you can tell your terminal emulator (the communications program
on your MAC or PC) to use "control-?" when you hit the "backspace" key.
- you tell athena what to expect for the backspace key. To do this, put
the following line in your .startup.tty file:
stty erase "^H"
or stty erase "^?"
depending on which of these you normally see when you hit your backspace
key.
That will give you backspace capabilities in everything but emacs. In
emacs, add the following lines to your .emacs file (create one if you
don't have one, as above):
(setq term-setup-hook
'(lambda ()
(setq keyboard-translate-table "\C-@\C-a\C-b\C-c\C-d\C-e\C-f\C-g\C-?")
(global-set-key "\M-h" 'help-for-help)))
That will fix the backspace key, and set "M-h" to give you help
(regularly c-h does that).