]> git.eshelyaron.com Git - emacs.git/commitdiff
Decouple C-d and delete, so that the former does not delete the region.
authorChong Yidong <cyd@stupidchicken.com>
Tue, 19 Oct 2010 15:43:27 +0000 (11:43 -0400)
committerChong Yidong <cyd@stupidchicken.com>
Tue, 19 Oct 2010 15:43:27 +0000 (11:43 -0400)
* 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.

lisp/ChangeLog
lisp/bindings.el
lisp/simple.el
src/ChangeLog
src/cmds.c

index 8d9a1a46bf624ecb65f94512e32cdc44fd78b718..394cfdd61d7d55e61182919852f8b0f1caa34dc5 100644 (file)
@@ -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).
index d19db2c779e8aa1707f47249525588b5c302eea0..9c802e53a56b8693efdf533b839648948ccbce36 100644 (file)
@@ -824,7 +824,7 @@ if `inhibit-field-text-motion' is non-nil."
 (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 @@ if `inhibit-field-text-motion' is non-nil."
 ;; (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)
index 5c0615e08c49a727f2986fb59f0318229ec59539..3ecfaa26e83f25c05be6ceb4681884b2c49383e6 100644 (file)
@@ -6628,7 +6628,7 @@ See also `normal-erase-is-backspace'."
 
             (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)
index c9d0e80c12f5c622789857bdc28a25aadabf1332..d09fab7ca8569a2939907a66a9f43bd93df20362 100644 (file)
@@ -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).
index e12d7c370d97f37ccdff7938c4bb70592a0ff666..19eca771941bf4d5f66e7e8bca8c432fcca8b59e 100644 (file)
@@ -230,7 +230,7 @@ Optional second arg KILLFLAG non-nil means kill instead (save in kill ring).
 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;