diff options
| author | Richard M. Stallman | 2001-03-12 03:31:14 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2001-03-12 03:31:14 +0000 |
| commit | 2155102b4bd68d3f3d076a83eb8ac492a7e4015f (patch) | |
| tree | f0aac3128b70438c7ed45c0204669bd61251daf1 | |
| parent | 06a97e7d078d1ae82083f2743d2e8a93e7c54fee (diff) | |
| download | emacs-2155102b4bd68d3f3d076a83eb8ac492a7e4015f.tar.gz emacs-2155102b4bd68d3f3d076a83eb8ac492a7e4015f.zip | |
Clarify the text for BACKSPACE vs DELETE.
| -rw-r--r-- | man/killing.texi | 64 |
1 files changed, 37 insertions, 27 deletions
diff --git a/man/killing.texi b/man/killing.texi index 5d61588f1d6..e041426a695 100644 --- a/man/killing.texi +++ b/man/killing.texi | |||
| @@ -77,8 +77,6 @@ mode (@pxref{Transient Mark}). | |||
| 77 | @c ??? Should be backward-delete-char | 77 | @c ??? Should be backward-delete-char |
| 78 | @findex delete-backward-char | 78 | @findex delete-backward-char |
| 79 | @findex delete-char | 79 | @findex delete-char |
| 80 | @kindex DEL | ||
| 81 | @kindex C-d | ||
| 82 | 80 | ||
| 83 | @table @kbd | 81 | @table @kbd |
| 84 | @item C-d | 82 | @item C-d |
| @@ -103,6 +101,8 @@ Join two lines by deleting the intervening newline, along with any | |||
| 103 | indentation following it (@code{delete-indentation}). | 101 | indentation following it (@code{delete-indentation}). |
| 104 | @end table | 102 | @end table |
| 105 | 103 | ||
| 104 | @kindex DEL | ||
| 105 | @kindex C-d | ||
| 106 | The most basic delete commands are @kbd{C-d} (@code{delete-char}) and | 106 | The most basic delete commands are @kbd{C-d} (@code{delete-char}) and |
| 107 | @key{DEL} (@code{delete-backward-char}). @kbd{C-d} deletes the | 107 | @key{DEL} (@code{delete-backward-char}). @kbd{C-d} deletes the |
| 108 | character after point, the one the cursor is ``on top of.'' This | 108 | character after point, the one the cursor is ``on top of.'' This |
| @@ -112,38 +112,48 @@ in the buffer; deleting a newline joins two lines. Actually, @kbd{C-d} | |||
| 112 | 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 |
| 113 | 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. |
| 114 | 114 | ||
| 115 | @kindex BACKSPACE | ||
| 116 | @kindex BS | ||
| 117 | @kindex DELETE | ||
| 118 | Every keyboard has a large key, labeled @key{DEL}, @key{BACKSPACE}, | ||
| 119 | @key{BS} or @key{DELETE}, which is a short distance above the | ||
| 120 | @key{RET} or @key{ENTER} key and is normally used for erasing what you | ||
| 121 | have typed. Regardless of the actual name on the key, it is | ||
| 122 | equivalent to @key{DEL}---or it should be. | ||
| 123 | |||
| 124 | Many keyboards have a @key{BACKSPACE} key a short ways above | ||
| 125 | @key{RET} or @key{ENTER}, and a @key{DELETE} key elsewhere. In that | ||
| 126 | case, the @key{BACKSPACE} key is @key{DEL}, and the @key{DELETE} key | ||
| 127 | is equivalent to @kbd{C-d}---or it should be. | ||
| 128 | |||
| 115 | @findex delete-key-deletes-forward-mode | 129 | @findex delete-key-deletes-forward-mode |
| 116 | Some keyboards have both @key{Delete} and @key{DEL} keys, while others | 130 | Why do we say ``or it should be''? When Emacs starts up using a |
| 117 | have just @key{DEL}. (The former variety usually labels the @key{DEL} | 131 | window system, it determines automatically which key should be |
| 118 | key as @key{BS} or @key{<-} and refers to it as a ``backspace key''.) | 132 | equivalent to @key{DEL}. So the @key{BACKSPACE} and/or @key{DELETE} |
| 119 | When Emacs starts, it tries to detect keyboards with both @key{BS} and | 133 | keys will almost surely do the right things. But on text-only |
| 120 | @key{Delete} keys, and if it finds your keyboard to have both keys, it | 134 | terminals, Emacs cannot tell which key is where; it has to make an |
| 121 | binds them to the commands users expect: @key{Delete} deletes forward, | 135 | assumption, which can be wrong. |
| 122 | like @kbd{C-d} does, and @key{BS} deletes backwards. However, some | 136 | |
| 123 | systems don't report the keyboard configuration. If your keyboard has | 137 | If the usual key for text erasure does not behave as @key{DEL}, |
| 124 | these two keys, and if they are both reported to Emacs, but Emacs is | 138 | probably that means it is really a @key{BACKSPACE} key. You can use |
| 125 | unable to establish that, you can use the | 139 | the command @kbd{M-x delete-key-deletes-forward-mode} to swap the |
| 126 | @code{delete-key-deletes-forward-mode} command to force Emacs to treat | 140 | meanings of @key{BACKSPACE} and @key{DEL}, so that the convenient key |
| 127 | @key{BS} and @key{Delete} differently. Either type @kbd{C-u 1 M-x | 141 | for deletion actually does deletion. To do this for every Emacs |
| 128 | delete-key-deletes-forward-mode @key{RET}} or put the following line | 142 | session, put the following line into your @file{.emacs} init file |
| 129 | into your @file{.emacs} init file (@pxref{Init File}): | 143 | (@pxref{Init File}): |
| 130 | 144 | ||
| 131 | @lisp | 145 | @lisp |
| 132 | (delete-key-deletes-forward-mode 1) | 146 | (delete-key-deletes-forward-mode 1) |
| 133 | @end lisp | 147 | @end lisp |
| 134 | 148 | ||
| 135 | @noindent | 149 | @noindent |
| 136 | @vindex delete-key-deletes-forward | 150 | This also makes the @key{DELETE} key, if there is one, delete the |
| 137 | The variable @code{delete-key-deletes-forward}, if set to @code{t}, | 151 | character after the cursor. |
| 138 | tells Emacs that the @key{Delete} key deletes the character after the | ||
| 139 | cursor. | ||
| 140 | 152 | ||
| 141 | @noindent | 153 | @vindex delete-key-deletes-forward |
| 142 | To find out whether the @key{BS} and @key{Delete} keys are reported to | 154 | The variable @code{delete-key-deletes-forward} is @code{t} in the mode |
| 143 | Emacs, type @kbd{C-h c @key{BS} C-h c @key{Delete}}, and then type | 155 | where the @key{DELETE} key deletes forwards, @code{nil} if |
| 144 | @kbd{C-h l}. If the text in the window popped up by Emacs after the | 156 | @key{DELETE} is equivalent to @key{DEL} and deletes backwards. |
| 145 | last command includes ``C-h c backspace'' and ``C-h c delete'', you know | ||
| 146 | that these keys are reported to Emacs. | ||
| 147 | 157 | ||
| 148 | @kindex M-\ | 158 | @kindex M-\ |
| 149 | @findex delete-horizontal-space | 159 | @findex delete-horizontal-space |