diff options
| author | Richard M. Stallman | 2001-03-14 01:30:20 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2001-03-14 01:30:20 +0000 |
| commit | 7be352a8cd6268f9a65e5100be525aa1c92c7f8d (patch) | |
| tree | 2d57591b8281bc76b0d700e4e813f07071af1890 | |
| parent | 83eceec0d117dc65cd7a86145e3b71f4158fb87f (diff) | |
| download | emacs-7be352a8cd6268f9a65e5100be525aa1c92c7f8d.tar.gz emacs-7be352a8cd6268f9a65e5100be525aa1c92c7f8d.zip | |
DEL Gets Help: Complete rewrite to deal with automatic
discrimination on window terminals.
| -rw-r--r-- | man/trouble.texi | 56 |
1 files changed, 52 insertions, 4 deletions
diff --git a/man/trouble.texi b/man/trouble.texi index 6afe228eb65..a1e52ffdab7 100644 --- a/man/trouble.texi +++ b/man/trouble.texi | |||
| @@ -137,11 +137,59 @@ normally, and how to recognize them and correct them. | |||
| 137 | 137 | ||
| 138 | @node DEL Gets Help | 138 | @node DEL Gets Help |
| 139 | @subsection If @key{DEL} Fails to Delete | 139 | @subsection If @key{DEL} Fails to Delete |
| 140 | @cindex @key{DEL} vs @key{BACKSPACE} | ||
| 141 | @cindex @key{BACKSPACE} vs @key{DEL} | ||
| 142 | |||
| 143 | Every keyboard has a large key, a little ways above the @key{RET} | ||
| 144 | or @key{ENTER} key, which you normally use outside Emacs to erase | ||
| 145 | the last character that you typed. We call this key @key{DEL}. | ||
| 146 | |||
| 147 | When Emacs starts up using a window system, it determines | ||
| 148 | automatically which key should be @key{DEL}. In some unusual cases | ||
| 149 | Emacs gets the wrong information from the system. If the @key{DEL} | ||
| 150 | key deletes forwards instead of backwards, that is probably what | ||
| 151 | happened---Emacs ought to be treating the @key{DELETE} key as | ||
| 152 | @key{DEL}, but it isn't. | ||
| 153 | |||
| 154 | With a window system, if the @key{DEL} key says @key{BACKSPACE} and | ||
| 155 | there is a @key{DELETE} key elsewhere, but the @key{DELETE} key | ||
| 156 | deletes backward instead of forward, that too suggests Emacs got the | ||
| 157 | wrong information---but in the opposite sense. It ought to be | ||
| 158 | treating the @key{BACKSPACE} key as @key{DEL}, but it isn't. | ||
| 159 | |||
| 160 | On a text-only terminal, if you find the @key{DEL} key prompts for a | ||
| 161 | Help command like @kbd{Control-h}, instead of deleting a character, it | ||
| 162 | means that key is actually sending the @key{BS} character. Emacs | ||
| 163 | ought to be treating @key{BS} as @key{DEL}, but it isn't. | ||
| 164 | |||
| 165 | In all of those cases, the immediate remedy is the same: use the | ||
| 166 | command @kbd{M-x normal-erase-is-backspace-mode}. That should make | ||
| 167 | the proper @key{DEL} key work. On a text-only terminal, if you do | ||
| 168 | want to ask for help, use @key{F1} or @kbd{C-?}. | ||
| 169 | |||
| 170 | @findex normal-erase-is-backspace-mode | ||
| 171 | To fix the problem automatically for every Emacs session, you can | ||
| 172 | put one of the following lines into your @file{.emacs} file | ||
| 173 | (@pxref{Init File}). For the first case above, where @key{DEL} | ||
| 174 | deletes forwards instead of backwards, use this line: | ||
| 175 | |||
| 176 | @lisp | ||
| 177 | (normal-erase-is-backspace-mode 0) | ||
| 178 | @end lisp | ||
| 140 | 179 | ||
| 141 | If you find that @key{DEL} enters Help like @kbd{Control-h} instead of | 180 | @noindent |
| 142 | deleting a character, your terminal is sending the wrong code for | 181 | For the other two cases, use this line: |
| 143 | @key{DEL}. You can work around this problem by changing the keyboard | 182 | |
| 144 | translation table (@pxref{Keyboard Translations}). | 183 | @lisp |
| 184 | (normal-erase-is-backspace-mode 1) | ||
| 185 | @end lisp | ||
| 186 | |||
| 187 | @vindex normal-erase-is-backspace | ||
| 188 | Another way to fix the problem for every Emacs session is to | ||
| 189 | customize the variable @code{normal-erase-is-backspace}: the value | ||
| 190 | @code{t} specifies the mode where @key{BS} or @key{BACKSPACE} is | ||
| 191 | @key{DEL}, and @code{nil} specifies the other mode. @xref{Easy | ||
| 192 | Customization}. | ||
| 145 | 193 | ||
| 146 | @node Stuck Recursive | 194 | @node Stuck Recursive |
| 147 | @subsection Recursive Editing Levels | 195 | @subsection Recursive Editing Levels |