Red Hat Bugzilla – Bug 10648
backspace/delete issues with emacs under X
Last modified: 2008-05-01 11:37:55 EDT
Under X, both backspace and delete are mapped to keycode 127. Hence, both
will delete the character immediately before the cursor. This is the
expected behavior for backspace, but for delete, it should delete the
character in front of the cursor.
The solution is to change the file from:
... [backspace]  [delete]  [tab]  ...
... [backspace]  [delete] [deletechar] [tab]  ...
This is on line 44 of the file.
(I believe that this is not the original source for this file, so the
proper fix is to change it elsewhere and regenerate this file)
No need to do that - just add this
(global-set-key [delete] 'delete-char)
to your .emacs. I think I'll add it to the global one, too.
Actually, we already do that in the default $HOME/.emacs in 6.2
I wouldn't rely on the configuation of ~/.emacs; it isn't always set up by Red
Hat (or even any Linux distribution for that matter). In my case, user
directories are NFS mounted, based on a Solaris setup. This is probably not
terribly unusual in the corporate world. As long as it works with any ~/.emacs
(or even with no ~/.emacs), then there's no problem (regardless of which of the
Eighty Million Alternate Configuration Strategies you choose).