changeset 111048:3c2bab829253

Decouple C-d and delete, so that the former does not delete the region. * lisp/bindings.el (global-map): Bind C-d to delete-char and deletechar to delete-forward-char. * lisp/simple.el (normal-erase-is-backspace-mode): Remap delete to deletechar, and hence delete-forward-char. * src/cmds.c (Fdelete_char): Doc fix.
author Chong Yidong <cyd@stupidchicken.com>
date Tue, 19 Oct 2010 11:43:27 -0400
parents 1e7d8f405703
children bd12e9f7bf79
files lisp/ChangeLog lisp/bindings.el lisp/simple.el src/ChangeLog src/cmds.c
diffstat 5 files changed, 16 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Tue Oct 19 13:44:07 2010 +0200
+++ b/lisp/ChangeLog	Tue Oct 19 11:43:27 2010 -0400
@@ -1,3 +1,11 @@
+2010-10-19  Chong Yidong  <cyd@stupidchicken.com>
+
+	* bindings.el (global-map): Bind C-d to delete-char and deletechar
+	to delete-forward-char.
+
+	* simple.el (normal-erase-is-backspace-mode): Remap delete to
+	deletechar, and hence delete-forward-char.
+
 2010-10-19  Stefan Monnier  <monnier@iro.umontreal.ca>
 
 	* repeat.el (repeat): Use read-key (bug#6256).
--- a/lisp/bindings.el	Tue Oct 19 13:44:07 2010 +0200
+++ b/lisp/bindings.el	Tue Oct 19 11:43:27 2010 -0400
@@ -824,7 +824,7 @@
 (define-key global-map [?\C-\M--] 'negative-argument)
 
 (define-key global-map "\177" 'delete-backward-char)
-(define-key global-map "\C-d" 'delete-forward-char)
+(define-key global-map "\C-d" 'delete-char)
 
 (define-key global-map "\C-k" 'kill-line)
 (define-key global-map "\C-w" 'kill-region)
@@ -933,7 +933,7 @@
 ;; (define-key global-map [clearline]	'function-key-error)
 (define-key global-map [insertline]	'open-line)
 (define-key global-map [deleteline]	'kill-line)
-(define-key global-map [deletechar]	'delete-char)
+(define-key global-map [deletechar]	'delete-forward-char)
 ;; (define-key global-map [backtab]	'function-key-error)
 ;; (define-key global-map [f1]		'function-key-error)
 ;; (define-key global-map [f2]		'function-key-error)
--- a/lisp/simple.el	Tue Oct 19 13:44:07 2010 +0200
+++ b/lisp/simple.el	Tue Oct 19 11:43:27 2010 -0400
@@ -6628,7 +6628,7 @@
 
 	     (if enabled
 		 (progn
-		   (define-key local-function-key-map [delete] [?\C-d])
+		   (define-key local-function-key-map [delete] [deletechar])
 		   (define-key local-function-key-map [kp-delete] [?\C-d])
 		   (define-key local-function-key-map [backspace] [?\C-?])
                    (dolist (b bindings)
--- a/src/ChangeLog	Tue Oct 19 13:44:07 2010 +0200
+++ b/src/ChangeLog	Tue Oct 19 11:43:27 2010 -0400
@@ -1,3 +1,7 @@
+2010-10-19  Chong Yidong  <cyd@stupidchicken.com>
+
+	* cmds.c (Fdelete_char): Doc fix.
+
 2010-10-19  Ken Brown  <kbrown@cornell.edu>
 
 	* s/cygwin.h (SIGNALS_VIA_CHARACTERS): New define (bug#7225).
--- a/src/cmds.c	Tue Oct 19 13:44:07 2010 +0200
+++ b/src/cmds.c	Tue Oct 19 11:43:27 2010 -0400
@@ -230,7 +230,7 @@
 Interactively, N is the prefix arg, and KILLFLAG is set if
 N was explicitly specified.
 
-The command `delete-forward' is preferable for interactive use.  */)
+The command `delete-forward-char' is preferable for interactive use.  */)
   (Lisp_Object n, Lisp_Object killflag)
 {
   EMACS_INT pos;