diff options
| author | Michal Nazarewicz | 2014-03-03 22:14:11 -0500 |
|---|---|---|
| committer | Stefan Monnier | 2014-03-03 22:14:11 -0500 |
| commit | 5b87d0d9cd65911aca0b99a44bc5f79c44938753 (patch) | |
| tree | f9acca1539bc7143620f5588c1c0da13f51d89fc /lisp | |
| parent | 757c70af04476ffdaf24cee8d0d2ecd175635aeb (diff) | |
| download | emacs-5b87d0d9cd65911aca0b99a44bc5f79c44938753.tar.gz emacs-5b87d0d9cd65911aca0b99a44bc5f79c44938753.zip | |
* binding.el: Add comment describing why C-d binds to `delete-char'.
* lisp/simple.el (delete-forward-char): Mark as interactive-only.
* src/cmds.c (delete-char): Update docstring pointing out that the
function ignores `delete-active-region' and `overwrite-mode'.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/bindings.el | 5 | ||||
| -rw-r--r-- | lisp/simple.el | 1 |
3 files changed, 11 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 82115af1cd5..a5232e431ee 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2014-03-04 Michal Nazarewicz <mina86@mina86.com> | ||
| 2 | |||
| 3 | * binding.el: Add comment describing why C-d binds to `delete-char'. | ||
| 4 | * simple.el (delete-forward-char): Mark as interactive-only. | ||
| 5 | |||
| 1 | 2014-03-03 Juanma Barranquero <lekktu@gmail.com> | 6 | 2014-03-03 Juanma Barranquero <lekktu@gmail.com> |
| 2 | 7 | ||
| 3 | * icomplete.el (icomplete-completions): | 8 | * icomplete.el (icomplete-completions): |
diff --git a/lisp/bindings.el b/lisp/bindings.el index 416f6337d64..fac34ed4106 100644 --- a/lisp/bindings.el +++ b/lisp/bindings.el | |||
| @@ -873,6 +873,11 @@ if `inhibit-field-text-motion' is non-nil." | |||
| 873 | 873 | ||
| 874 | ;; Update tutorial--default-keys if you change these. | 874 | ;; Update tutorial--default-keys if you change these. |
| 875 | (define-key global-map "\177" 'delete-backward-char) | 875 | (define-key global-map "\177" 'delete-backward-char) |
| 876 | ;; We explicitly want C-d to use `delete-char' instead of | ||
| 877 | ;; `delete-forward-char' so that it ignores `delete-active-region': | ||
| 878 | ;; Most C-d users are old-timers who don't expect | ||
| 879 | ;; `delete-active-region' here, while newer users who expect | ||
| 880 | ;; `delete-active-region' use C-d much less. | ||
| 876 | (define-key global-map "\C-d" 'delete-char) | 881 | (define-key global-map "\C-d" 'delete-char) |
| 877 | 882 | ||
| 878 | (define-key global-map "\C-k" 'kill-line) | 883 | (define-key global-map "\C-k" 'kill-line) |
diff --git a/lisp/simple.el b/lisp/simple.el index 18448331ff0..200e86596d7 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -1008,6 +1008,7 @@ KILLFLAG is set if N was explicitly specified." | |||
| 1008 | 1008 | ||
| 1009 | ;; Otherwise, do simple deletion. | 1009 | ;; Otherwise, do simple deletion. |
| 1010 | (t (delete-char n killflag)))) | 1010 | (t (delete-char n killflag)))) |
| 1011 | (put 'delete-forward-char 'interactive-only 'delete-char) | ||
| 1011 | 1012 | ||
| 1012 | (defun mark-whole-buffer () | 1013 | (defun mark-whole-buffer () |
| 1013 | "Put point at beginning and mark at end of buffer. | 1014 | "Put point at beginning and mark at end of buffer. |