GNU bug report logs - #16109
24.3.50; <kp-delete> doesn't delete region in delete-selection-mode

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> jurta.org>

Date: Wed, 11 Dec 2013 01:33:01 UTC

Severity: normal

Found in version 24.3.50

Done: Stefan Monnier <monnier <at> IRO.UMontreal.CA>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Juri Linkov <juri <at> jurta.org>
Subject: bug#16109: closed (Re: bug#16109: 24.3.50; <kp-delete> doesn't
 delete region in delete-selection-mode)
Date: Wed, 11 Dec 2013 14:24:03 +0000
[Message part 1 (text/plain, inline)]
Your bug report

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

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 16109 <at> debbugs.gnu.org.

-- 
16109: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16109
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Andreas Schwab <schwab <at> suse.de>
Cc: Juri Linkov <juri <at> jurta.org>, 16109-done <at> debbugs.gnu.org
Subject: Re: bug#16109: 24.3.50;
 <kp-delete> doesn't delete region in delete-selection-mode
Date: Wed, 11 Dec 2013 09:23:32 -0500
>> 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.

I installed the patch below instead which should fix the problem.


        Stefan


--- lisp/simple.el	2013-12-03 01:19:24 +0000
+++ lisp/simple.el	2013-12-11 14:20:27 +0000
@@ -7435,7 +7435,7 @@
 	     (if enabled
 		 (progn
 		   (define-key local-function-key-map [delete] [deletechar])
-		   (define-key local-function-key-map [kp-delete] [?\C-d])
+		   (define-key local-function-key-map [kp-delete] [deletechar])
 		   (define-key local-function-key-map [backspace] [?\C-?])
                    (dolist (b bindings)
                      ;; Not sure if input-decode-map is really right, but


[Message part 3 (message/rfc822, inline)]
From: Juri Linkov <juri <at> jurta.org>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3.50; <kp-delete> doesn't delete region in delete-selection-mode
Date: Wed, 11 Dec 2013 03:28:57 +0200
In delete-selection-mode, <delete> deletes the region, but
its keypad counterpart <kp-delete> doesn't delete the region.

This is what `C-h k <delete>' displays:

    <deletechar> (translated from <delete>) runs the command
    delete-forward-char, which is an interactive compiled Lisp function in
    `simple.el'.

And this is displayed by `C-h k <kp-delete>':

    C-d (translated from <kp-delete>) runs the command
    delete-char, which is an interactive built-in function in
    `cmds.c'.

What could be done:

1. Change `delete-char' to delete the active region (might need a poll
since I recall some disagreements about this default).

2. Bind <kp-delete> to the same command `delete-forward-char'
as for <delete>.

3. Add `delete-char' back to delsel.el since typing `C-d' is handy
anyway to delete the region.



This bug report was last modified 11 years and 164 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.