aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2001-03-12 03:31:14 +0000
committerRichard M. Stallman2001-03-12 03:31:14 +0000
commit2155102b4bd68d3f3d076a83eb8ac492a7e4015f (patch)
treef0aac3128b70438c7ed45c0204669bd61251daf1
parent06a97e7d078d1ae82083f2743d2e8a93e7c54fee (diff)
downloademacs-2155102b4bd68d3f3d076a83eb8ac492a7e4015f.tar.gz
emacs-2155102b4bd68d3f3d076a83eb8ac492a7e4015f.zip
Clarify the text for BACKSPACE vs DELETE.
-rw-r--r--man/killing.texi64
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
103indentation following it (@code{delete-indentation}). 101indentation 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
108character after point, the one the cursor is ``on top of.'' This 108character 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}
112and @key{DEL} aren't always delete commands; when given arguments, they 112and @key{DEL} aren't always delete commands; when given arguments, they
113kill instead, since they can erase more than one character this way. 113kill 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
121have typed. Regardless of the actual name on the key, it is
122equivalent 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
126case, the @key{BACKSPACE} key is @key{DEL}, and the @key{DELETE} key
127is 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
117have just @key{DEL}. (The former variety usually labels the @key{DEL} 131window system, it determines automatically which key should be
118key as @key{BS} or @key{<-} and refers to it as a ``backspace key''.) 132equivalent to @key{DEL}. So the @key{BACKSPACE} and/or @key{DELETE}
119When Emacs starts, it tries to detect keyboards with both @key{BS} and 133keys 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 134terminals, Emacs cannot tell which key is where; it has to make an
121binds them to the commands users expect: @key{Delete} deletes forward, 135assumption, which can be wrong.
122like @kbd{C-d} does, and @key{BS} deletes backwards. However, some 136
123systems don't report the keyboard configuration. If your keyboard has 137 If the usual key for text erasure does not behave as @key{DEL},
124these two keys, and if they are both reported to Emacs, but Emacs is 138probably that means it is really a @key{BACKSPACE} key. You can use
125unable to establish that, you can use the 139the 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 140meanings 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 141for deletion actually does deletion. To do this for every Emacs
128delete-key-deletes-forward-mode @key{RET}} or put the following line 142session, put the following line into your @file{.emacs} init file
129into 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 150This also makes the @key{DELETE} key, if there is one, delete the
137The variable @code{delete-key-deletes-forward}, if set to @code{t}, 151character after the cursor.
138tells Emacs that the @key{Delete} key deletes the character after the
139cursor.
140 152
141@noindent 153@vindex delete-key-deletes-forward
142To find out whether the @key{BS} and @key{Delete} keys are reported to 154The variable @code{delete-key-deletes-forward} is @code{t} in the mode
143Emacs, type @kbd{C-h c @key{BS} C-h c @key{Delete}}, and then type 155where 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.
145last command includes ``C-h c backspace'' and ``C-h c delete'', you know
146that these keys are reported to Emacs.
147 157
148@kindex M-\ 158@kindex M-\
149@findex delete-horizontal-space 159@findex delete-horizontal-space