diff options
| author | Eli Zaretskii | 2001-03-08 08:58:57 +0000 |
|---|---|---|
| committer | Eli Zaretskii | 2001-03-08 08:58:57 +0000 |
| commit | 4933bc0254852b19e1d7c5e36a8993d30c9aa811 (patch) | |
| tree | 9e021e085fb62b665dd21e6a0ff3bf3fd385e161 | |
| parent | 7f3c9b308e3bce489051a75b5ef0089e998c942c (diff) | |
| download | emacs-4933bc0254852b19e1d7c5e36a8993d30c9aa811.tar.gz emacs-4933bc0254852b19e1d7c5e36a8993d30c9aa811.zip | |
(Deletion): Mention the Delete vs Backspace keys. Document
delete-key-deletes-forward-mode.
| -rw-r--r-- | man/killing.texi | 42 |
1 files changed, 40 insertions, 2 deletions
diff --git a/man/killing.texi b/man/killing.texi index ec14dc87d7e..683b32c0653 100644 --- a/man/killing.texi +++ b/man/killing.texi | |||
| @@ -82,9 +82,15 @@ mode (@pxref{Transient Mark}). | |||
| 82 | 82 | ||
| 83 | @table @kbd | 83 | @table @kbd |
| 84 | @item C-d | 84 | @item C-d |
| 85 | Delete next character (@code{delete-char}). | 85 | @itemx @key{Delete} |
| 86 | Delete next character (@code{delete-char}). If your keyboard has a | ||
| 87 | @key{Delete} function key (usually located in the edit keypad), Emacs | ||
| 88 | binds it to @code{delete-char} as well. | ||
| 86 | @item @key{DEL} | 89 | @item @key{DEL} |
| 87 | Delete previous character (@code{delete-backward-char}). | 90 | @itemx @key{BS} |
| 91 | Delete previous character (@code{delete-backward-char}). Some keyboards | ||
| 92 | refer to this key as a ``backspace key'' and label it with a left arrow: | ||
| 93 | @key{<-}. | ||
| 88 | @item M-\ | 94 | @item M-\ |
| 89 | Delete spaces and tabs around point (@code{delete-horizontal-space}). | 95 | Delete spaces and tabs around point (@code{delete-horizontal-space}). |
| 90 | @item M-@key{SPC} | 96 | @item M-@key{SPC} |
| @@ -106,6 +112,38 @@ in the buffer; deleting a newline joins two lines. Actually, @kbd{C-d} | |||
| 106 | and @key{DEL} aren't always delete commands; when given arguments, they | 112 | and @key{DEL} aren't always delete commands; when given arguments, they |
| 107 | kill instead, since they can erase more than one character this way. | 113 | kill instead, since they can erase more than one character this way. |
| 108 | 114 | ||
| 115 | @findex delete-key-deletes-forward-mode | ||
| 116 | Some keyboards have both @key{Delete} and @key{DEL} keys, while others | ||
| 117 | have just @key{DEL}. (The former variety usually labels the @key{DEL} | ||
| 118 | key as @key{BS} or @key{<-} and refers to it as a ``backspace key''.) | ||
| 119 | When Emacs starts, it tries to detect keyboards with both @key{BS} and | ||
| 120 | @key{Delete} keys, and if so, binds them to the commands users expect: | ||
| 121 | @key{Delete} deletes forward, like @kbd{C-d} does, and @key{BS} deletes | ||
| 122 | backwards. However, some systems don't report the keyboard | ||
| 123 | configuration. If your keyboard has these two keys, and if they are | ||
| 124 | both reported to Emacs, but Emacs is unable to establish that, you can | ||
| 125 | use the @code{delete-key-deletes-forward-mode} command to force Emacs to | ||
| 126 | treat @key{BS} and @key{Delete} differently. Either type @kbd{C-u 1 M-x | ||
| 127 | delete-key-deletes-forward-mode @key{RET}} or put the following line | ||
| 128 | into your @file{.emacs} init file (@pxref{Init File}): | ||
| 129 | |||
| 130 | @lisp | ||
| 131 | (delete-key-deletes-forward-mode 1) | ||
| 132 | @end lisp | ||
| 133 | |||
| 134 | @noindent | ||
| 135 | @vindex delete-key-deletes-forward | ||
| 136 | The variable @code{delete-key-deletes-forward}, if set to @code{t}, | ||
| 137 | tells Emacs that the @key{Delete} key deletes the character after the | ||
| 138 | cursor. | ||
| 139 | |||
| 140 | @noindent | ||
| 141 | To find out whether the @key{BS} and @key{Delete} keys are reported to | ||
| 142 | Emacs, type @kbd{C-h c @key{BS} C-h c @key{Delete}}, and then type | ||
| 143 | @kbd{C-h l}. If the text in the window popped up by Emacs after the | ||
| 144 | last command includes ``C-h c backspace'' and ``C-h c delete'', you know | ||
| 145 | that these keys are reported to Emacs. | ||
| 146 | |||
| 109 | @kindex M-\ | 147 | @kindex M-\ |
| 110 | @findex delete-horizontal-space | 148 | @findex delete-horizontal-space |
| 111 | @kindex M-SPC | 149 | @kindex M-SPC |