Mercurial > emacs
changeset 36789:f71fe44b07ea
Simplify the discussion of DEL. Refer to `DEL Gets Help' node
for fixing problems.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Wed, 14 Mar 2001 01:23:52 +0000 |
parents | c005d537d3cc |
children | d91ec7a1c11e |
files | man/basic.texi man/killing.texi |
diffstat | 2 files changed, 24 insertions(+), 35 deletions(-) [+] |
line wrap: on
line diff
--- a/man/basic.texi Wed Mar 14 00:09:55 2001 +0000 +++ b/man/basic.texi Wed Mar 14 01:23:52 2001 +0000 @@ -46,15 +46,22 @@ To @dfn{delete} text you have just inserted, use the large key labeled @key{DEL}, @key{BACKSPACE} or @key{DELETE} which is a short distance above the @key{RET} or @key{ENTER} key. This is the key you -normally use for erasing the last character that you typed. -Regardless of the actual name on the key, Emacs always thinks of it as -@key{DEL}, and that's what we call it in the manual. +normally use, outside Emacs, for erasing the last character that you +typed. Regardless of the label on that key, Emacs always thinks of it +as @key{DEL}, and that's what we call it in this manual. The @key{DEL} key deletes the character @emph{before} the cursor. As a consequence, the cursor and all the characters after it move backwards. If you type a printing character and then type @key{DEL}, they cancel out. + On most computers, Emacs recognizes automatically which key ought to +be @key{DEL}, and sets it up that way. But in some cases, especially +with text-only terminals, you will need to tell Emacs which key to use +for that purpose. If the large key not far above the @key{RET} or +@key{ENTER} key doesn't delete backwards, you need to do this. +@xref{DEL Gets Help}. + Many keyboards have both a @key{BACKSPACE} key a short ways above @key{RET} or @key{ENTER}, and a @key{DELETE} key elsewhere. In that case, the @key{BACKSPACE} key is @key{DEL}, and the @key{DELETE} key @@ -62,12 +69,6 @@ after point, the one underneath the cursor, like @kbd{C-d} (see below). - On a text-only terminal, Emacs cannot automatically tell which keys -it has and where they are located. If the convenient key for deletion -is @key{BACKSPACE}, you must type @kbd{M-x -delete-key-deletes-forward-mode @key{RET}} to make that key behave as -@key{DEL}. @xref{Deletion}, for more explanation of this. - @kindex RET @cindex newline To end a line and start typing a new one, type @key{RET}. This
--- a/man/killing.texi Wed Mar 14 00:09:55 2001 +0000 +++ b/man/killing.texi Wed Mar 14 01:23:52 2001 +0000 @@ -118,7 +118,7 @@ Every keyboard has a large key, labeled @key{DEL}, @key{BACKSPACE}, @key{BS} or @key{DELETE}, which is a short distance above the @key{RET} or @key{ENTER} key and is normally used for erasing what you -have typed. Regardless of the actual name on the key, it is +have typed. Regardless of the actual name on the key, in Emacs it is equivalent to @key{DEL}---or it should be. Many keyboards have a @key{BACKSPACE} key a short ways above @@ -126,34 +126,22 @@ case, the @key{BACKSPACE} key is @key{DEL}, and the @key{DELETE} key is equivalent to @kbd{C-d}---or it should be. -@findex delete-key-deletes-forward-mode Why do we say ``or it should be''? When Emacs starts up using a -window system, it determines automatically which key should be +window system, it determines automatically which key or keys should be equivalent to @key{DEL}. So the @key{BACKSPACE} and/or @key{DELETE} -keys will almost surely do the right things. But on text-only -terminals, Emacs cannot tell which key is where; it has to make an -assumption, which can be wrong. +keys normally do the right things. But in some unusual cases Emacs +gets the wrong information from the system. If these keys don't do +what they ought to do, you should tell Emacs which key to use for +@key{DEL}. @xref{DEL Gets Help}. - If the usual key for text erasure does not behave as @key{DEL}, -probably that means it is really a @key{BACKSPACE} key. You can use -the command @kbd{M-x delete-key-deletes-forward-mode} to swap the -meanings of @key{BACKSPACE} and @key{DEL}, so that the convenient key -for deletion actually does deletion. To do this for every Emacs -session, put the following line into your @file{.emacs} init file -(@pxref{Init File}): - -@lisp -(delete-key-deletes-forward-mode 1) -@end lisp - -@noindent -This also makes the @key{DELETE} key, if there is one, delete the -character after the cursor. - -@vindex delete-key-deletes-forward -The variable @code{delete-key-deletes-forward} is @code{t} in the mode -where the @key{DELETE} key deletes forwards, @code{nil} if -@key{DELETE} is equivalent to @key{DEL} and deletes backwards. +@findex normal-erase-is-backspace-mode + On text-only terminals, Emacs cannot tell which key is where, so it +follows a uniform plan which may or may not fit your keyboard. The +uniform plan is that the ASCII @key{DEL} character deletes, and the +ASCII @key{BS} (backspace) character asks for help (it is the same as +@kbd{C-h}). If this is not right for your keyboard, if you find that +the key which ought to delete backwards enters Help instead, see +@ref{DEL Gets Help}. @kindex M-\ @findex delete-horizontal-space