diff options
| author | Chong Yidong | 2010-10-19 11:43:27 -0400 |
|---|---|---|
| committer | Chong Yidong | 2010-10-19 11:43:27 -0400 |
| commit | b8a47412d30e73a12c1919d0109f9272096e9ce6 (patch) | |
| tree | 19176307be6aa97e800de77ec195da34514adc19 | |
| parent | ca3fa30248b923c17c021c0fcdb945271d14e8c2 (diff) | |
| download | emacs-b8a47412d30e73a12c1919d0109f9272096e9ce6.tar.gz emacs-b8a47412d30e73a12c1919d0109f9272096e9ce6.zip | |
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.
| -rw-r--r-- | lisp/ChangeLog | 8 | ||||
| -rw-r--r-- | lisp/bindings.el | 4 | ||||
| -rw-r--r-- | lisp/simple.el | 2 | ||||
| -rw-r--r-- | src/ChangeLog | 4 | ||||
| -rw-r--r-- | src/cmds.c | 2 |
5 files changed, 16 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8d9a1a46bf6..394cfdd61d7 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,11 @@ | |||
| 1 | 2010-10-19 Chong Yidong <cyd@stupidchicken.com> | ||
| 2 | |||
| 3 | * bindings.el (global-map): Bind C-d to delete-char and deletechar | ||
| 4 | to delete-forward-char. | ||
| 5 | |||
| 6 | * simple.el (normal-erase-is-backspace-mode): Remap delete to | ||
| 7 | deletechar, and hence delete-forward-char. | ||
| 8 | |||
| 1 | 2010-10-19 Stefan Monnier <monnier@iro.umontreal.ca> | 9 | 2010-10-19 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 10 | ||
| 3 | * repeat.el (repeat): Use read-key (bug#6256). | 11 | * repeat.el (repeat): Use read-key (bug#6256). |
diff --git a/lisp/bindings.el b/lisp/bindings.el index d19db2c779e..9c802e53a56 100644 --- a/lisp/bindings.el +++ b/lisp/bindings.el | |||
| @@ -824,7 +824,7 @@ if `inhibit-field-text-motion' is non-nil." | |||
| 824 | (define-key global-map [?\C-\M--] 'negative-argument) | 824 | (define-key global-map [?\C-\M--] 'negative-argument) |
| 825 | 825 | ||
| 826 | (define-key global-map "\177" 'delete-backward-char) | 826 | (define-key global-map "\177" 'delete-backward-char) |
| 827 | (define-key global-map "\C-d" 'delete-forward-char) | 827 | (define-key global-map "\C-d" 'delete-char) |
| 828 | 828 | ||
| 829 | (define-key global-map "\C-k" 'kill-line) | 829 | (define-key global-map "\C-k" 'kill-line) |
| 830 | (define-key global-map "\C-w" 'kill-region) | 830 | (define-key global-map "\C-w" 'kill-region) |
| @@ -933,7 +933,7 @@ if `inhibit-field-text-motion' is non-nil." | |||
| 933 | ;; (define-key global-map [clearline] 'function-key-error) | 933 | ;; (define-key global-map [clearline] 'function-key-error) |
| 934 | (define-key global-map [insertline] 'open-line) | 934 | (define-key global-map [insertline] 'open-line) |
| 935 | (define-key global-map [deleteline] 'kill-line) | 935 | (define-key global-map [deleteline] 'kill-line) |
| 936 | (define-key global-map [deletechar] 'delete-char) | 936 | (define-key global-map [deletechar] 'delete-forward-char) |
| 937 | ;; (define-key global-map [backtab] 'function-key-error) | 937 | ;; (define-key global-map [backtab] 'function-key-error) |
| 938 | ;; (define-key global-map [f1] 'function-key-error) | 938 | ;; (define-key global-map [f1] 'function-key-error) |
| 939 | ;; (define-key global-map [f2] 'function-key-error) | 939 | ;; (define-key global-map [f2] 'function-key-error) |
diff --git a/lisp/simple.el b/lisp/simple.el index 5c0615e08c4..3ecfaa26e83 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -6628,7 +6628,7 @@ See also `normal-erase-is-backspace'." | |||
| 6628 | 6628 | ||
| 6629 | (if enabled | 6629 | (if enabled |
| 6630 | (progn | 6630 | (progn |
| 6631 | (define-key local-function-key-map [delete] [?\C-d]) | 6631 | (define-key local-function-key-map [delete] [deletechar]) |
| 6632 | (define-key local-function-key-map [kp-delete] [?\C-d]) | 6632 | (define-key local-function-key-map [kp-delete] [?\C-d]) |
| 6633 | (define-key local-function-key-map [backspace] [?\C-?]) | 6633 | (define-key local-function-key-map [backspace] [?\C-?]) |
| 6634 | (dolist (b bindings) | 6634 | (dolist (b bindings) |
diff --git a/src/ChangeLog b/src/ChangeLog index c9d0e80c12f..d09fab7ca85 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2010-10-19 Chong Yidong <cyd@stupidchicken.com> | ||
| 2 | |||
| 3 | * cmds.c (Fdelete_char): Doc fix. | ||
| 4 | |||
| 1 | 2010-10-19 Ken Brown <kbrown@cornell.edu> | 5 | 2010-10-19 Ken Brown <kbrown@cornell.edu> |
| 2 | 6 | ||
| 3 | * s/cygwin.h (SIGNALS_VIA_CHARACTERS): New define (bug#7225). | 7 | * s/cygwin.h (SIGNALS_VIA_CHARACTERS): New define (bug#7225). |
diff --git a/src/cmds.c b/src/cmds.c index e12d7c370d9..19eca771941 100644 --- a/src/cmds.c +++ b/src/cmds.c | |||
| @@ -230,7 +230,7 @@ Optional second arg KILLFLAG non-nil means kill instead (save in kill ring). | |||
| 230 | Interactively, N is the prefix arg, and KILLFLAG is set if | 230 | Interactively, N is the prefix arg, and KILLFLAG is set if |
| 231 | N was explicitly specified. | 231 | N was explicitly specified. |
| 232 | 232 | ||
| 233 | The command `delete-forward' is preferable for interactive use. */) | 233 | The command `delete-forward-char' is preferable for interactive use. */) |
| 234 | (Lisp_Object n, Lisp_Object killflag) | 234 | (Lisp_Object n, Lisp_Object killflag) |
| 235 | { | 235 | { |
| 236 | EMACS_INT pos; | 236 | EMACS_INT pos; |