Subject: bug#16109: 24.3.50; <kp-delete> doesn't delete region in delete-selection-mode

From: Juri Linkov <[email-masked]>
Date: Thu, 12 Dec 2013 02:07:35 +0200

>>> Shouldn't `kp-delete' be remapped to `delete'?
>> It is mapped to ?\C-d in local-function-key-map (if
>> normal-erase-is-backspace).
>
> Oh, right, now I remember: we don't apply function-key-map repeatedly so
> if we have a remapping from kp-delete to delete, it's not combined with
> the mapping from delete to deletechar.

Thanks.  I discovered another case: in delete-selection-mode it's handy
to select the region of unnecessary shell output and delete with <delete>
(without putting to the kill ring).  But now neither <delete> nor <kp-delete>
delete the active region in shell.  comint.el has these lines:

    ;; The following two are standardly aliased to C-d,
    ;; but they should never do EOF, just delete.
    (define-key map [delete] 	  'delete-char)
    (define-key map [kp-delete]	  'delete-char)

It seems `delete-char' needs to be replaced with `delete-forward-char'
like in their global bindings?  The comment is also wrong because
globally [delete] and [kp-delete] are not aliased to C-d now.