diff options
author | Eli Zaretskii <eliz@gnu.org> | 2001-03-08 08:58:57 +0000 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2001-03-08 08:58:57 +0000 |
commit | 4933bc0254852b19e1d7c5e36a8993d30c9aa811 (patch) | |
tree | 9e021e085fb62b665dd21e6a0ff3bf3fd385e161 /man/killing.texi | |
parent | 7f3c9b308e3bce489051a75b5ef0089e998c942c (diff) | |
download | emacs-4933bc0254852b19e1d7c5e36a8993d30c9aa811.tar.gz |
(Deletion): Mention the Delete vs Backspace keys. Document
delete-key-deletes-forward-mode.
Diffstat (limited to 'man/killing.texi')
-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}). @table @kbd @item C-d -Delete next character (@code{delete-char}). +@itemx @key{Delete} +Delete next character (@code{delete-char}). If your keyboard has a +@key{Delete} function key (usually located in the edit keypad), Emacs +binds it to @code{delete-char} as well. @item @key{DEL} -Delete previous character (@code{delete-backward-char}). +@itemx @key{BS} +Delete previous character (@code{delete-backward-char}). Some keyboards +refer to this key as a ``backspace key'' and label it with a left arrow: +@key{<-}. @item M-\ Delete spaces and tabs around point (@code{delete-horizontal-space}). @item M-@key{SPC} @@ -106,6 +112,38 @@ in the buffer; deleting a newline joins two lines. Actually, @kbd{C-d} and @key{DEL} aren't always delete commands; when given arguments, they kill instead, since they can erase more than one character this way. +@findex delete-key-deletes-forward-mode + Some keyboards have both @key{Delete} and @key{DEL} keys, while others +have just @key{DEL}. (The former variety usually labels the @key{DEL} +key as @key{BS} or @key{<-} and refers to it as a ``backspace key''.) +When Emacs starts, it tries to detect keyboards with both @key{BS} and +@key{Delete} keys, and if so, binds them to the commands users expect: +@key{Delete} deletes forward, like @kbd{C-d} does, and @key{BS} deletes +backwards. However, some systems don't report the keyboard +configuration. If your keyboard has these two keys, and if they are +both reported to Emacs, but Emacs is unable to establish that, you can +use the @code{delete-key-deletes-forward-mode} command to force Emacs to +treat @key{BS} and @key{Delete} differently. Either type @kbd{C-u 1 M-x +delete-key-deletes-forward-mode @key{RET}} or put the following line +into your @file{.emacs} init file (@pxref{Init File}): + +@lisp + (delete-key-deletes-forward-mode 1) +@end lisp + +@noindent +@vindex delete-key-deletes-forward +The variable @code{delete-key-deletes-forward}, if set to @code{t}, +tells Emacs that the @key{Delete} key deletes the character after the +cursor. + +@noindent +To find out whether the @key{BS} and @key{Delete} keys are reported to +Emacs, type @kbd{C-h c @key{BS} C-h c @key{Delete}}, and then type +@kbd{C-h l}. If the text in the window popped up by Emacs after the +last command includes ``C-h c backspace'' and ``C-h c delete'', you know +that these keys are reported to Emacs. + @kindex M-\ @findex delete-horizontal-space @kindex M-SPC |