The Python electric deleting feature is totally broken wrt
`delete-key-deletes-forward'. I have `delete-key-deletes-forward',
but my backspace key generates delete, and I have no backspace key on
my keyboard. The standard XEmacs way of recognizing this can look
like this:
(defsubst delete-forward-p ()
(and delete-key-deletes-forward
(or (not (eq (device-type) 'x))
(x-keysym-on-keyboard-sans-modifiers-p 'backspace))))
This is hard to explain and harder to understand, but that's what
compliant code has to do in order to respect the current
`delete-key-deletes-forward' mess.