diff options
| author | Karoly Lorentey | 2006-04-01 13:36:08 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2006-04-01 13:36:08 +0000 |
| commit | b97a79c4f5c17abca8cb66e52927d524c5e1ef62 (patch) | |
| tree | 24a67aeac1f9eeed9ae8f822123e9d9a8b5a1bec | |
| parent | 10a0e6fe87378d0dafb5ce257aa60c8a1b25c708 (diff) | |
| download | emacs-b97a79c4f5c17abca8cb66e52927d524c5e1ef62.tar.gz emacs-b97a79c4f5c17abca8cb66e52927d524c5e1ef62.zip | |
Fix delete key after C-x 5 2 on X. (Catched by Dan Nicolaescu.)
* lisp/term/x-win.el (x-setup-function-keys): Protect against multiple
calls on the same terminal.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-543
| -rw-r--r-- | lisp/term/x-win.el | 40 |
1 files changed, 22 insertions, 18 deletions
diff --git a/lisp/term/x-win.el b/lisp/term/x-win.el index db31dc36684..9e3de496b69 100644 --- a/lisp/term/x-win.el +++ b/lisp/term/x-win.el | |||
| @@ -1171,24 +1171,28 @@ XConsortium: rgb.txt,v 10.41 94/02/20 18:39:36 rws Exp") | |||
| 1171 | 1171 | ||
| 1172 | (defun x-setup-function-keys (frame) | 1172 | (defun x-setup-function-keys (frame) |
| 1173 | "Set up `function-key-map' on FRAME for the X window system." | 1173 | "Set up `function-key-map' on FRAME for the X window system." |
| 1174 | ;; Map certain keypad keys into ASCII characters that people usually expect. | 1174 | ;; Don't do this twice on the same display, or it would break |
| 1175 | (with-selected-frame frame | 1175 | ;; normal-erase-is-backspace-mode. |
| 1176 | (define-key local-function-key-map [backspace] [127]) | 1176 | (unless (terminal-parameter frame 'x-setup-function-keys) |
| 1177 | (define-key local-function-key-map [delete] [127]) | 1177 | ;; Map certain keypad keys into ASCII characters that people usually expect. |
| 1178 | (define-key local-function-key-map [tab] [?\t]) | 1178 | (with-selected-frame frame |
| 1179 | (define-key local-function-key-map [linefeed] [?\n]) | 1179 | (define-key local-function-key-map [backspace] [127]) |
| 1180 | (define-key local-function-key-map [clear] [?\C-l]) | 1180 | (define-key local-function-key-map [delete] [127]) |
| 1181 | (define-key local-function-key-map [return] [?\C-m]) | 1181 | (define-key local-function-key-map [tab] [?\t]) |
| 1182 | (define-key local-function-key-map [escape] [?\e]) | 1182 | (define-key local-function-key-map [linefeed] [?\n]) |
| 1183 | (define-key local-function-key-map [M-backspace] [?\M-\d]) | 1183 | (define-key local-function-key-map [clear] [?\C-l]) |
| 1184 | (define-key local-function-key-map [M-delete] [?\M-\d]) | 1184 | (define-key local-function-key-map [return] [?\C-m]) |
| 1185 | (define-key local-function-key-map [M-tab] [?\M-\t]) | 1185 | (define-key local-function-key-map [escape] [?\e]) |
| 1186 | (define-key local-function-key-map [M-linefeed] [?\M-\n]) | 1186 | (define-key local-function-key-map [M-backspace] [?\M-\d]) |
| 1187 | (define-key local-function-key-map [M-clear] [?\M-\C-l]) | 1187 | (define-key local-function-key-map [M-delete] [?\M-\d]) |
| 1188 | (define-key local-function-key-map [M-return] [?\M-\C-m]) | 1188 | (define-key local-function-key-map [M-tab] [?\M-\t]) |
| 1189 | (define-key local-function-key-map [M-escape] [?\M-\e]) | 1189 | (define-key local-function-key-map [M-linefeed] [?\M-\n]) |
| 1190 | (define-key local-function-key-map [iso-lefttab] [backtab]) | 1190 | (define-key local-function-key-map [M-clear] [?\M-\C-l]) |
| 1191 | (define-key local-function-key-map [S-iso-lefttab] [backtab]))) | 1191 | (define-key local-function-key-map [M-return] [?\M-\C-m]) |
| 1192 | (define-key local-function-key-map [M-escape] [?\M-\e]) | ||
| 1193 | (define-key local-function-key-map [iso-lefttab] [backtab]) | ||
| 1194 | (define-key local-function-key-map [S-iso-lefttab] [backtab])) | ||
| 1195 | (set-terminal-parameter frame 'x-setup-function-keys t))) | ||
| 1192 | 1196 | ||
| 1193 | ;; These tell read-char how to convert | 1197 | ;; These tell read-char how to convert |
| 1194 | ;; these special chars to ASCII. | 1198 | ;; these special chars to ASCII. |