[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#26366: emacs doesn't handle the delete key properly under X



Brian White <bcwhite@verisim.com> writes:

This is minor as policy issues go, but I thought that having a few
others consider this before I do anything might be a good idea.

> Now that X has been updated to properly distinguish between the backspace
> key and the delete key, both work properly when emacs is run in an xterm
> or on a console window.
> 
> However, when emacs is run so it opens its own window under X, the backspace
> key and the delete key behave identically -- they both remove the character
> before the cursor.  The delete key should remove the character under the
> cursor.

OK, I've investigated.  Under 20.3 at least, emacs treats (under X)
the delete and backspace keys as function keys named delete and
backspace.  At startup they are both assigned the same low-level code,
DEL, in the function-key-map, but that assignment only applies if
there are no other subsequent, more specific assignments.

Given that, you can get delete to delete the character under the
cursor like this:

  (global-set-key [delete] 'delete-char)

Now the only question is, should I make this the default Debian
configuration?

-- 
Rob Browning <rlb@cs.utexas.edu> PGP=E80E0D04F521A094 532B97F5D64E3930


Reply to: