aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2001-03-08 08:58:57 +0000
committerEli Zaretskii2001-03-08 08:58:57 +0000
commit4933bc0254852b19e1d7c5e36a8993d30c9aa811 (patch)
tree9e021e085fb62b665dd21e6a0ff3bf3fd385e161
parent7f3c9b308e3bce489051a75b5ef0089e998c942c (diff)
downloademacs-4933bc0254852b19e1d7c5e36a8993d30c9aa811.tar.gz
emacs-4933bc0254852b19e1d7c5e36a8993d30c9aa811.zip
(Deletion): Mention the Delete vs Backspace keys. Document
delete-key-deletes-forward-mode.
-rw-r--r--man/killing.texi42
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
85Delete next character (@code{delete-char}). 85@itemx @key{Delete}
86Delete next character (@code{delete-char}). If your keyboard has a
87@key{Delete} function key (usually located in the edit keypad), Emacs
88binds it to @code{delete-char} as well.
86@item @key{DEL} 89@item @key{DEL}
87Delete previous character (@code{delete-backward-char}). 90@itemx @key{BS}
91Delete previous character (@code{delete-backward-char}). Some keyboards
92refer to this key as a ``backspace key'' and label it with a left arrow:
93@key{<-}.
88@item M-\ 94@item M-\
89Delete spaces and tabs around point (@code{delete-horizontal-space}). 95Delete 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}
106and @key{DEL} aren't always delete commands; when given arguments, they 112and @key{DEL} aren't always delete commands; when given arguments, they
107kill instead, since they can erase more than one character this way. 113kill 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
117have just @key{DEL}. (The former variety usually labels the @key{DEL}
118key as @key{BS} or @key{<-} and refers to it as a ``backspace key''.)
119When 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
122backwards. However, some systems don't report the keyboard
123configuration. If your keyboard has these two keys, and if they are
124both reported to Emacs, but Emacs is unable to establish that, you can
125use the @code{delete-key-deletes-forward-mode} command to force Emacs to
126treat @key{BS} and @key{Delete} differently. Either type @kbd{C-u 1 M-x
127delete-key-deletes-forward-mode @key{RET}} or put the following line
128into 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
136The variable @code{delete-key-deletes-forward}, if set to @code{t},
137tells Emacs that the @key{Delete} key deletes the character after the
138cursor.
139
140@noindent
141To find out whether the @key{BS} and @key{Delete} keys are reported to
142Emacs, 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
144last command includes ``C-h c backspace'' and ``C-h c delete'', you know
145that 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