diff options
| author | Dan Nicolaescu | 2005-07-27 18:02:08 +0000 |
|---|---|---|
| committer | Dan Nicolaescu | 2005-07-27 18:02:08 +0000 |
| commit | 4f0c9ba732c47b273fdb409f258570eae51b94e9 (patch) | |
| tree | 2b2f23fe3a7a598dd1ec0d82edf35bc9ef3ed808 | |
| parent | e890842c416274d634b715defeab4528cd260373 (diff) | |
| download | emacs-4f0c9ba732c47b273fdb409f258570eae51b94e9.tar.gz emacs-4f0c9ba732c47b273fdb409f258570eae51b94e9.zip | |
* term/apollo.el (terminal-init-apollo): New function containing
all former top level forms in the file.
* term/bobcat.el (terminal-init-bobcat):
* term/cygwin.el (terminal-init-cygwin):
* term/iris-ansi.el (terminal-init-iris-ansi):
* term/linux.el (terminal-init-linux):
* term/news.el (terminal-init-news):
* term/rxvt.el (terminal-init-rxvt):
* term/sun.el (terminal-init-sun):
* term/tvi970.el (terminal-init-tvi970):
* term/vt100.el (terminal-init-vt100):
* term/vt102.el (terminal-init-vt102):
* term/vt125.el (terminal-init-vt125):
* term/vt200.el (terminal-init-vt200):
* term/vt201.el (terminal-init-vt201):
* term/vt220.el (terminal-init-vt220):
* term/vt240.el (terminal-init-vt240):
* term/vt300.el (terminal-init-vt300):
* term/vt320.el (terminal-init-vt320):
* term/vt400.el (terminal-init-vt400):
* term/vt420.el (terminal-init-vt420):
* term/wyse50.el (terminal-init-wyse50):
* term/xterm.el (terminal-init-xterm): Likewise.
* term/README: Describe the terminal-init-* functionality.
* startup.el (command-line): After loading the terminal
initialization file call the corresponding terminal initialization
function.
| -rw-r--r-- | lisp/ChangeLog | 32 | ||||
| -rw-r--r-- | lisp/startup.el | 8 | ||||
| -rw-r--r-- | lisp/term/README | 7 | ||||
| -rw-r--r-- | lisp/term/apollo.el | 5 | ||||
| -rw-r--r-- | lisp/term/bobcat.el | 9 | ||||
| -rw-r--r-- | lisp/term/cygwin.el | 5 | ||||
| -rw-r--r-- | lisp/term/iris-ansi.el | 594 | ||||
| -rw-r--r-- | lisp/term/linux.el | 22 | ||||
| -rw-r--r-- | lisp/term/news.el | 80 | ||||
| -rw-r--r-- | lisp/term/rxvt.el | 274 | ||||
| -rw-r--r-- | lisp/term/sun.el | 216 | ||||
| -rw-r--r-- | lisp/term/tvi970.el | 149 | ||||
| -rw-r--r-- | lisp/term/vt100.el | 6 | ||||
| -rw-r--r-- | lisp/term/vt102.el | 4 | ||||
| -rw-r--r-- | lisp/term/vt125.el | 4 | ||||
| -rw-r--r-- | lisp/term/vt200.el | 8 | ||||
| -rw-r--r-- | lisp/term/vt201.el | 9 | ||||
| -rw-r--r-- | lisp/term/vt220.el | 9 | ||||
| -rw-r--r-- | lisp/term/vt240.el | 9 | ||||
| -rw-r--r-- | lisp/term/vt300.el | 9 | ||||
| -rw-r--r-- | lisp/term/vt320.el | 9 | ||||
| -rw-r--r-- | lisp/term/vt400.el | 9 | ||||
| -rw-r--r-- | lisp/term/vt420.el | 9 | ||||
| -rw-r--r-- | lisp/term/wyse50.el | 173 | ||||
| -rw-r--r-- | lisp/term/xterm.el | 461 |
25 files changed, 1103 insertions, 1017 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0deea9eb612..ead88578764 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,35 @@ | |||
| 1 | 2005-07-27 Dan Nicolaescu <dann@ics.uci.edu> | ||
| 2 | |||
| 3 | * term/apollo.el (terminal-init-apollo): New function containing | ||
| 4 | all former top level forms in the file. | ||
| 5 | * term/bobcat.el (terminal-init-bobcat): | ||
| 6 | * term/cygwin.el (terminal-init-cygwin): | ||
| 7 | * term/iris-ansi.el (terminal-init-iris-ansi): | ||
| 8 | * term/linux.el (terminal-init-linux): | ||
| 9 | * term/news.el (terminal-init-news): | ||
| 10 | * term/rxvt.el (terminal-init-rxvt): | ||
| 11 | * term/sun.el (terminal-init-sun): | ||
| 12 | * term/tvi970.el (terminal-init-tvi970): | ||
| 13 | * term/vt100.el (terminal-init-vt100): | ||
| 14 | * term/vt102.el (terminal-init-vt102): | ||
| 15 | * term/vt125.el (terminal-init-vt125): | ||
| 16 | * term/vt200.el (terminal-init-vt200): | ||
| 17 | * term/vt201.el (terminal-init-vt201): | ||
| 18 | * term/vt220.el (terminal-init-vt220): | ||
| 19 | * term/vt240.el (terminal-init-vt240): | ||
| 20 | * term/vt300.el (terminal-init-vt300): | ||
| 21 | * term/vt320.el (terminal-init-vt320): | ||
| 22 | * term/vt400.el (terminal-init-vt400): | ||
| 23 | * term/vt420.el (terminal-init-vt420): | ||
| 24 | * term/wyse50.el (terminal-init-wyse50): | ||
| 25 | * term/xterm.el (terminal-init-xterm): Likewise. | ||
| 26 | |||
| 27 | * term/README: Describe the terminal-init-* functionality. | ||
| 28 | |||
| 29 | * startup.el (command-line): After loading the terminal | ||
| 30 | initialization file call the corresponding terminal initialization | ||
| 31 | function. | ||
| 32 | |||
| 1 | 2005-07-27 Kenichi Handa <handa@m17n.org> | 33 | 2005-07-27 Kenichi Handa <handa@m17n.org> |
| 2 | 34 | ||
| 3 | * ps-bdf.el (bdf-read-font-info): Ignore glyphs whose ENCODING is | 35 | * ps-bdf.el (bdf-read-font-info): Ignore glyphs whose ENCODING is |
diff --git a/lisp/startup.el b/lisp/startup.el index da05912d92f..b2afdb744c1 100644 --- a/lisp/startup.el +++ b/lisp/startup.el | |||
| @@ -984,7 +984,13 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'." | |||
| 984 | (setq term | 984 | (setq term |
| 985 | (if (setq hyphend (string-match "[-_][^-_]+$" term)) | 985 | (if (setq hyphend (string-match "[-_][^-_]+$" term)) |
| 986 | (substring term 0 hyphend) | 986 | (substring term 0 hyphend) |
| 987 | nil))))) | 987 | nil))) |
| 988 | (when term | ||
| 989 | ;; The terminal file has been loaded, now call the terminal | ||
| 990 | ;; specific initialization function. | ||
| 991 | (let ((term-init-func (intern (concat "terminal-init-" term)))) | ||
| 992 | (when (fboundp term-init-func) | ||
| 993 | (funcall term-init-func)))))) | ||
| 988 | 994 | ||
| 989 | ;; Update the out-of-memory error message based on user's key bindings | 995 | ;; Update the out-of-memory error message based on user's key bindings |
| 990 | ;; for save-some-buffers. | 996 | ;; for save-some-buffers. |
diff --git a/lisp/term/README b/lisp/term/README index 76c64435af1..581f321d3ba 100644 --- a/lisp/term/README +++ b/lisp/term/README | |||
| @@ -8,7 +8,12 @@ that exists, the last hyphen and what follows it is stripped. If that doesn't | |||
| 8 | yield a file that exists, the previous hyphen is stripped, and so on until all | 8 | yield a file that exists, the previous hyphen is stripped, and so on until all |
| 9 | hyphens are gone. For example, if the terminal type is `aaa-48-foo', Emacs | 9 | hyphens are gone. For example, if the terminal type is `aaa-48-foo', Emacs |
| 10 | will try first `term/aaa-48-foo.el', then `term/aaa-48.el' and finally | 10 | will try first `term/aaa-48-foo.el', then `term/aaa-48.el' and finally |
| 11 | `term/aaa.el'. | 11 | `term/aaa.el'. Each terminal specific file should contain a function |
| 12 | named terminal-init-TERMINALNAME (eg terminal-init-aaa-48 for | ||
| 13 | term/aaa-48.el) that Emacs will call in order to initialize the | ||
| 14 | terminal. The terminal files should not contain any top level forms | ||
| 15 | that are executed when the file is loaded, all the initialization | ||
| 16 | actions are performed by the terminal-init-TERMINALNAME functions. | ||
| 12 | 17 | ||
| 13 | When writing terminal packages, there are some things it is good to keep in | 18 | When writing terminal packages, there are some things it is good to keep in |
| 14 | mind. | 19 | mind. |
diff --git a/lisp/term/apollo.el b/lisp/term/apollo.el index 1d04fd35245..749ff85a0a6 100644 --- a/lisp/term/apollo.el +++ b/lisp/term/apollo.el | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | ;; -*- no-byte-compile: t -*- | 1 | ;; -*- no-byte-compile: t -*- |
| 2 | 2 | (defun terminal-init-apollo () | |
| 3 | (load "term/vt100" nil t) | 3 | "Terminal initialization function for apollo." |
| 4 | (load "term/vt100" nil t)) | ||
| 4 | 5 | ||
| 5 | ;;; arch-tag: c72f446f-e6b7-4749-90a4-bd68632adacf | 6 | ;;; arch-tag: c72f446f-e6b7-4749-90a4-bd68632adacf |
| 6 | ;;; apollo.el ends here | 7 | ;;; apollo.el ends here |
diff --git a/lisp/term/bobcat.el b/lisp/term/bobcat.el index b11a4ff8309..82401f7bf71 100644 --- a/lisp/term/bobcat.el +++ b/lisp/term/bobcat.el | |||
| @@ -1,7 +1,10 @@ | |||
| 1 | ;; -*- no-byte-compile: t -*- | 1 | ;; -*- no-byte-compile: t -*- |
| 2 | ;;; HP terminals usually encourage using ^H as the rubout character | 2 | |
| 3 | (keyboard-translate ?\177 ?\^h) | 3 | (defun terminal-init-bobcat () |
| 4 | (keyboard-translate ?\^h ?\177) | 4 | "Terminal initialization function for bobcat." |
| 5 | ;; HP terminals usually encourage using ^H as the rubout character | ||
| 6 | (keyboard-translate ?\177 ?\^h) | ||
| 7 | (keyboard-translate ?\^h ?\177)) | ||
| 5 | 8 | ||
| 6 | ;;; arch-tag: 754e4520-0a3e-4e6e-8ca5-9481b1f85cf7 | 9 | ;;; arch-tag: 754e4520-0a3e-4e6e-8ca5-9481b1f85cf7 |
| 7 | ;;; bobcat.el ends here | 10 | ;;; bobcat.el ends here |
diff --git a/lisp/term/cygwin.el b/lisp/term/cygwin.el index d604e0207a0..3bdd5d3aa05 100644 --- a/lisp/term/cygwin.el +++ b/lisp/term/cygwin.el | |||
| @@ -1,7 +1,10 @@ | |||
| 1 | ;;; cygwin.el --- support for the Cygwin terminal -*- no-byte-compile: t -*- | 1 | ;;; cygwin.el --- support for the Cygwin terminal -*- no-byte-compile: t -*- |
| 2 | 2 | ||
| 3 | ;;; The Cygwin terminal can't really display underlines. | 3 | ;;; The Cygwin terminal can't really display underlines. |
| 4 | (tty-no-underline) | 4 | |
| 5 | (defun terminal-init-cygwin () | ||
| 6 | "Terminal initialization function for cygwin." | ||
| 7 | (tty-no-underline)) | ||
| 5 | 8 | ||
| 6 | ;; arch-tag: ca81ce67-3c41-4883-a29b-4c3d64a21191 | 9 | ;; arch-tag: ca81ce67-3c41-4883-a29b-4c3d64a21191 |
| 7 | ;;; cygwin.el ends here | 10 | ;;; cygwin.el ends here |
diff --git a/lisp/term/iris-ansi.el b/lisp/term/iris-ansi.el index eae2f419378..ef59860b606 100644 --- a/lisp/term/iris-ansi.el +++ b/lisp/term/iris-ansi.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; iris-ansi.el --- configure Emacs for SGI xwsh and winterm apps -*- no-byte-compile: t -*- | 1 | ;;; iris-ansi.el --- configure Emacs for SGI xwsh and winterm apps -*- no-byte-compile: t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1997 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1997, 2005 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Dan Nicolaescu <dann@ics.uci.edu> | 5 | ;; Author: Dan Nicolaescu <dann@ics.uci.edu> |
| 6 | 6 | ||
| @@ -25,302 +25,306 @@ | |||
| 25 | 25 | ||
| 26 | ;;; Code: | 26 | ;;; Code: |
| 27 | 27 | ||
| 28 | (define-key function-key-map "\e[120q" [S-escape]) | 28 | (defun iris-ansi-initialize-terminal () |
| 29 | (define-key function-key-map "\e[121q" [C-escape]) | 29 | "Terminal initialization function for iris-ansi." |
| 30 | 30 | (define-key function-key-map "\e[120q" [S-escape]) | |
| 31 | (define-key function-key-map "\e[001q" [f1]) | 31 | (define-key function-key-map "\e[121q" [C-escape]) |
| 32 | (define-key function-key-map "\e[013q" [S-f1]) | 32 | |
| 33 | (define-key function-key-map "\e[025q" [C-f1]) | 33 | (define-key function-key-map "\e[001q" [f1]) |
| 34 | 34 | (define-key function-key-map "\e[013q" [S-f1]) | |
| 35 | 35 | (define-key function-key-map "\e[025q" [C-f1]) | |
| 36 | (define-key function-key-map "\e[002q" [f2]) | 36 | |
| 37 | (define-key function-key-map "\e[014q" [S-f2]) | 37 | |
| 38 | (define-key function-key-map "\e[026q" [C-f2]) | 38 | (define-key function-key-map "\e[002q" [f2]) |
| 39 | (define-key function-key-map "\e[038q" [M-f2]) | 39 | (define-key function-key-map "\e[014q" [S-f2]) |
| 40 | 40 | (define-key function-key-map "\e[026q" [C-f2]) | |
| 41 | (define-key function-key-map "\e[003q" [f3]) | 41 | (define-key function-key-map "\e[038q" [M-f2]) |
| 42 | (define-key function-key-map "\e[015q" [S-f3]) | 42 | |
| 43 | (define-key function-key-map "\e[027q" [C-f3]) | 43 | (define-key function-key-map "\e[003q" [f3]) |
| 44 | 44 | (define-key function-key-map "\e[015q" [S-f3]) | |
| 45 | 45 | (define-key function-key-map "\e[027q" [C-f3]) | |
| 46 | (define-key function-key-map "\e[004q" [f4]) | 46 | |
| 47 | (define-key function-key-map "\e[016q" [S-f4]) | 47 | |
| 48 | (define-key function-key-map "\e[028q" [C-f4]) | 48 | (define-key function-key-map "\e[004q" [f4]) |
| 49 | 49 | (define-key function-key-map "\e[016q" [S-f4]) | |
| 50 | 50 | (define-key function-key-map "\e[028q" [C-f4]) | |
| 51 | (define-key function-key-map "\e[005q" [f5]) | 51 | |
| 52 | (define-key function-key-map "\e[017q" [S-f5]) | 52 | |
| 53 | (define-key function-key-map "\e[029q" [C-f5]) | 53 | (define-key function-key-map "\e[005q" [f5]) |
| 54 | 54 | (define-key function-key-map "\e[017q" [S-f5]) | |
| 55 | 55 | (define-key function-key-map "\e[029q" [C-f5]) | |
| 56 | (define-key function-key-map "\e[006q" [f6]) | 56 | |
| 57 | (define-key function-key-map "\e[018q" [S-f6]) | 57 | |
| 58 | (define-key function-key-map "\e[030q" [C-f6]) | 58 | (define-key function-key-map "\e[006q" [f6]) |
| 59 | 59 | (define-key function-key-map "\e[018q" [S-f6]) | |
| 60 | 60 | (define-key function-key-map "\e[030q" [C-f6]) | |
| 61 | (define-key function-key-map "\e[007q" [f7]) | 61 | |
| 62 | (define-key function-key-map "\e[019q" [S-f7]) | 62 | |
| 63 | (define-key function-key-map "\e[031q" [C-f7]) | 63 | (define-key function-key-map "\e[007q" [f7]) |
| 64 | 64 | (define-key function-key-map "\e[019q" [S-f7]) | |
| 65 | 65 | (define-key function-key-map "\e[031q" [C-f7]) | |
| 66 | (define-key function-key-map "\e[008q" [f8]) | 66 | |
| 67 | (define-key function-key-map "\e[020q" [S-f8]) | 67 | |
| 68 | (define-key function-key-map "\e[032q" [C-f8]) | 68 | (define-key function-key-map "\e[008q" [f8]) |
| 69 | 69 | (define-key function-key-map "\e[020q" [S-f8]) | |
| 70 | 70 | (define-key function-key-map "\e[032q" [C-f8]) | |
| 71 | (define-key function-key-map "\e[009q" [f9]) | 71 | |
| 72 | (define-key function-key-map "\e[021q" [S-f9]) | 72 | |
| 73 | (define-key function-key-map "\e[033q" [C-f9]) | 73 | (define-key function-key-map "\e[009q" [f9]) |
| 74 | 74 | (define-key function-key-map "\e[021q" [S-f9]) | |
| 75 | 75 | (define-key function-key-map "\e[033q" [C-f9]) | |
| 76 | (define-key function-key-map "\e[010q" [f10]) | 76 | |
| 77 | (define-key function-key-map "\e[022q" [S-f10]) | 77 | |
| 78 | (define-key function-key-map "\e[034q" [C-f10]) | 78 | (define-key function-key-map "\e[010q" [f10]) |
| 79 | 79 | (define-key function-key-map "\e[022q" [S-f10]) | |
| 80 | 80 | (define-key function-key-map "\e[034q" [C-f10]) | |
| 81 | (define-key function-key-map "\e[011q" [f11]) | 81 | |
| 82 | (define-key function-key-map "\e[023q" [S-f11]) | 82 | |
| 83 | (define-key function-key-map "\e[035q" [C-f11]) | 83 | (define-key function-key-map "\e[011q" [f11]) |
| 84 | (define-key function-key-map "\e[047q" [M-f11]) | 84 | (define-key function-key-map "\e[023q" [S-f11]) |
| 85 | 85 | (define-key function-key-map "\e[035q" [C-f11]) | |
| 86 | (define-key function-key-map "\e[012q" [f12]) | 86 | (define-key function-key-map "\e[047q" [M-f11]) |
| 87 | (define-key function-key-map "\e[024q" [S-f12]) | 87 | |
| 88 | (define-key function-key-map "\e[036q" [C-f12]) | 88 | (define-key function-key-map "\e[012q" [f12]) |
| 89 | (define-key function-key-map "\e[048q" [M-f12]) | 89 | (define-key function-key-map "\e[024q" [S-f12]) |
| 90 | 90 | (define-key function-key-map "\e[036q" [C-f12]) | |
| 91 | 91 | (define-key function-key-map "\e[048q" [M-f12]) | |
| 92 | (define-key function-key-map "\e[057q" [C-`]) | 92 | |
| 93 | (define-key function-key-map "\e[115q" [M-`]) | 93 | |
| 94 | 94 | (define-key function-key-map "\e[057q" [?\C-`]) | |
| 95 | (define-key function-key-map "\e[049q" [?\C-1]) | 95 | (define-key function-key-map "\e[115q" [?\M-`]) |
| 96 | (define-key function-key-map "\e[058q" [?\M-1]) | 96 | |
| 97 | 97 | (define-key function-key-map "\e[049q" [?\C-1]) | |
| 98 | 98 | (define-key function-key-map "\e[058q" [?\M-1]) | |
| 99 | (define-key function-key-map "\e[059q" [?\M-2]) | 99 | |
| 100 | 100 | ||
| 101 | (define-key function-key-map "\e[050q" [?\C-3]) | 101 | (define-key function-key-map "\e[059q" [?\M-2]) |
| 102 | (define-key function-key-map "\e[060q" [?\M-3]) | 102 | |
| 103 | 103 | (define-key function-key-map "\e[050q" [?\C-3]) | |
| 104 | (define-key function-key-map "\e[051q" [?\C-4]) | 104 | (define-key function-key-map "\e[060q" [?\M-3]) |
| 105 | (define-key function-key-map "\e[061q" [?\M-4]) | 105 | |
| 106 | 106 | (define-key function-key-map "\e[051q" [?\C-4]) | |
| 107 | (define-key function-key-map "\e[052q" [?\C-5]) | 107 | (define-key function-key-map "\e[061q" [?\M-4]) |
| 108 | (define-key function-key-map "\e[062q" [?\M-5]) | 108 | |
| 109 | 109 | (define-key function-key-map "\e[052q" [?\C-5]) | |
| 110 | 110 | (define-key function-key-map "\e[062q" [?\M-5]) | |
| 111 | (define-key function-key-map "\e[063q" [?\M-6]) | 111 | |
| 112 | 112 | ||
| 113 | (define-key function-key-map "\e[053q" [?\C-7]) | 113 | (define-key function-key-map "\e[063q" [?\M-6]) |
| 114 | (define-key function-key-map "\e[064q" [?\M-7]) | 114 | |
| 115 | 115 | (define-key function-key-map "\e[053q" [?\C-7]) | |
| 116 | (define-key function-key-map "\e[054q" [?\C-8]) | 116 | (define-key function-key-map "\e[064q" [?\M-7]) |
| 117 | (define-key function-key-map "\e[065q" [?\M-8]) | 117 | |
| 118 | 118 | (define-key function-key-map "\e[054q" [?\C-8]) | |
| 119 | (define-key function-key-map "\e[055q" [?\C-9]) | 119 | (define-key function-key-map "\e[065q" [?\M-8]) |
| 120 | (define-key function-key-map "\e[066q" [?\M-9]) | 120 | |
| 121 | 121 | (define-key function-key-map "\e[055q" [?\C-9]) | |
| 122 | (define-key function-key-map "\e[056q" [?\C-0]) | 122 | (define-key function-key-map "\e[066q" [?\M-9]) |
| 123 | (define-key function-key-map "\e[067q" [?\M-0]) | 123 | |
| 124 | 124 | (define-key function-key-map "\e[056q" [?\C-0]) | |
| 125 | (define-key function-key-map "\e[068q" [?\M--]) | 125 | (define-key function-key-map "\e[067q" [?\M-0]) |
| 126 | 126 | ||
| 127 | (define-key function-key-map "\e[069q" [?\C-=]) | 127 | (define-key function-key-map "\e[068q" [?\M--]) |
| 128 | (define-key function-key-map "\e[070q" [?\M-=]) | 128 | |
| 129 | 129 | (define-key function-key-map "\e[069q" [?\C-=]) | |
| 130 | ;; I don't know what to do with those. | 130 | (define-key function-key-map "\e[070q" [?\M-=]) |
| 131 | ;(define-key function-key-map "^H" [<del>]) | 131 | |
| 132 | ;(define-key function-key-map "^H" [S-<del>]) | 132 | ;; I don't know what to do with those. |
| 133 | ;(define-key function-key-map "\177" [C-<del>]) | 133 | ;;(define-key function-key-map "^H" [<del>]) |
| 134 | ;(define-key function-key-map "\e[071q" [M-<del>]) | 134 | ;;(define-key function-key-map "^H" [S-<del>]) |
| 135 | 135 | ;;(define-key function-key-map "\177" [C-<del>]) | |
| 136 | (define-key function-key-map "\e[Z" [?\S-\t]) | 136 | ;;(define-key function-key-map "\e[071q" [M-<del>]) |
| 137 | (define-key function-key-map "\e[072q" [?\C-\t]) | 137 | |
| 138 | ;; This only works if you remove the M-TAB keybing from the system.4Dwmrc | 138 | (define-key function-key-map "\e[Z" [?\S-\t]) |
| 139 | ;; our your ~/.4Dwmrc, if you use the 4Dwm window manager. | 139 | (define-key function-key-map "\e[072q" [?\C-\t]) |
| 140 | (define-key function-key-map "\e[073q" [?\M-\t]) | 140 | ;; This only works if you remove the M-TAB keybing from the system.4Dwmrc |
| 141 | 141 | ;; our your ~/.4Dwmrc, if you use the 4Dwm window manager. | |
| 142 | (define-key function-key-map "\e[074q" [?\M-q]) | 142 | (define-key function-key-map "\e[073q" [?\M-\t]) |
| 143 | 143 | ||
| 144 | (define-key function-key-map "\e[075q" [?\M-w]) | 144 | (define-key function-key-map "\e[074q" [?\M-q]) |
| 145 | 145 | ||
| 146 | (define-key function-key-map "\e[076q" [?\M-e]) | 146 | (define-key function-key-map "\e[075q" [?\M-w]) |
| 147 | 147 | ||
| 148 | (define-key function-key-map "\e[077q" [?\M-r]) | 148 | (define-key function-key-map "\e[076q" [?\M-e]) |
| 149 | 149 | ||
| 150 | (define-key function-key-map "\e[078q" [?\M-t]) | 150 | (define-key function-key-map "\e[077q" [?\M-r]) |
| 151 | 151 | ||
| 152 | (define-key function-key-map "\e[079q" [?\M-y]) | 152 | (define-key function-key-map "\e[078q" [?\M-t]) |
| 153 | 153 | ||
| 154 | (define-key function-key-map "\e[080q" [?\M-u]) | 154 | (define-key function-key-map "\e[079q" [?\M-y]) |
| 155 | 155 | ||
| 156 | (define-key function-key-map "\e[081q" [?\M-i]) | 156 | (define-key function-key-map "\e[080q" [?\M-u]) |
| 157 | 157 | ||
| 158 | (define-key function-key-map "\e[082q" [?\M-o]) | 158 | (define-key function-key-map "\e[081q" [?\M-i]) |
| 159 | 159 | ||
| 160 | (define-key function-key-map "\e[083q" [?\M-p]) | 160 | (define-key function-key-map "\e[082q" [?\M-o]) |
| 161 | 161 | ||
| 162 | (define-key function-key-map "\e[084q" [?\M-\[]) | 162 | (define-key function-key-map "\e[083q" [?\M-p]) |
| 163 | 163 | ||
| 164 | (define-key function-key-map "\e[085q" [?\M-\]]) | 164 | (define-key function-key-map "\e[084q" [?\M-\[]) |
| 165 | 165 | ||
| 166 | (define-key function-key-map "\e[086q" [?\M-\\]) | 166 | (define-key function-key-map "\e[085q" [?\M-\]]) |
| 167 | 167 | ||
| 168 | (define-key function-key-map "\e[087q" [?\M-a]) | 168 | (define-key function-key-map "\e[086q" [?\M-\\]) |
| 169 | 169 | ||
| 170 | (define-key function-key-map "\e[088q" [?\M-s]) | 170 | (define-key function-key-map "\e[087q" [?\M-a]) |
| 171 | 171 | ||
| 172 | (define-key function-key-map "\e[089q" [?\M-d]) | 172 | (define-key function-key-map "\e[088q" [?\M-s]) |
| 173 | 173 | ||
| 174 | (define-key function-key-map "\e[090q" [?\M-f]) | 174 | (define-key function-key-map "\e[089q" [?\M-d]) |
| 175 | 175 | ||
| 176 | (define-key function-key-map "\e[091q" [?\M-g]) | 176 | (define-key function-key-map "\e[090q" [?\M-f]) |
| 177 | 177 | ||
| 178 | (define-key function-key-map "\e[092q" [?\M-h]) | 178 | (define-key function-key-map "\e[091q" [?\M-g]) |
| 179 | 179 | ||
| 180 | (define-key function-key-map "\e[093q" [?\M-j]) | 180 | (define-key function-key-map "\e[092q" [?\M-h]) |
| 181 | 181 | ||
| 182 | (define-key function-key-map "\e[094q" [?\M-k]) | 182 | (define-key function-key-map "\e[093q" [?\M-j]) |
| 183 | 183 | ||
| 184 | (define-key function-key-map "\e[095q" [?\M-l]) | 184 | (define-key function-key-map "\e[094q" [?\M-k]) |
| 185 | 185 | ||
| 186 | (define-key function-key-map "\e[096q" [?\C-\;]) | 186 | (define-key function-key-map "\e[095q" [?\M-l]) |
| 187 | (define-key function-key-map "\e[097q" [?\M-:]) ;; we are cheating | 187 | |
| 188 | ;; here, this is realy | 188 | (define-key function-key-map "\e[096q" [?\C-\;]) |
| 189 | ;; M-;, but M-: | 189 | (define-key function-key-map "\e[097q" [?\M-:]) ;; we are cheating |
| 190 | ;; generates the same | 190 | ;; here, this is |
| 191 | ;; string and is more | 191 | ;; realy M-;, but |
| 192 | ;; usefull. | 192 | ;; M-: generates the |
| 193 | 193 | ;; same string and | |
| 194 | (define-key function-key-map "\e[098q" [?\C-']) | 194 | ;; is more usefull. |
| 195 | (define-key function-key-map "\e[099q" [?\M-']) | 195 | |
| 196 | 196 | (define-key function-key-map "\e[098q" [?\C-']) | |
| 197 | (define-key function-key-map "\e[100q" [?\M-\n]) | 197 | (define-key function-key-map "\e[099q" [?\M-']) |
| 198 | 198 | ||
| 199 | (define-key function-key-map "\e[101q" [?\M-z]) | 199 | (define-key function-key-map "\e[100q" [?\M-\n]) |
| 200 | 200 | ||
| 201 | (define-key function-key-map "\e[102q" [?\M-x]) | 201 | (define-key function-key-map "\e[101q" [?\M-z]) |
| 202 | 202 | ||
| 203 | (define-key function-key-map "\e[103q" [?\M-c]) | 203 | (define-key function-key-map "\e[102q" [?\M-x]) |
| 204 | 204 | ||
| 205 | (define-key function-key-map "\e[104q" [?\M-v]) | 205 | (define-key function-key-map "\e[103q" [?\M-c]) |
| 206 | 206 | ||
| 207 | (define-key function-key-map "\e[105q" [?\M-b]) | 207 | (define-key function-key-map "\e[104q" [?\M-v]) |
| 208 | 208 | ||
| 209 | (define-key function-key-map "\e[106q" [M-n]) | 209 | (define-key function-key-map "\e[105q" [?\M-b]) |
| 210 | 210 | ||
| 211 | (define-key function-key-map "\e[107q" [M-m]) | 211 | (define-key function-key-map "\e[106q" [M-n]) |
| 212 | 212 | ||
| 213 | (define-key function-key-map "\e[108q" [?\C-,]) | 213 | (define-key function-key-map "\e[107q" [M-m]) |
| 214 | (define-key function-key-map "\e[109q" [?\M-,]) | 214 | |
| 215 | 215 | (define-key function-key-map "\e[108q" [?\C-,]) | |
| 216 | (define-key function-key-map "\e[110q" [?\C-.]) | 216 | (define-key function-key-map "\e[109q" [?\M-,]) |
| 217 | (define-key function-key-map "\e[111q" [?\M-.]) | 217 | |
| 218 | 218 | (define-key function-key-map "\e[110q" [?\C-.]) | |
| 219 | (define-key function-key-map "\e[112q" [?\C-/]) | 219 | (define-key function-key-map "\e[111q" [?\M-.]) |
| 220 | (define-key function-key-map "\e[113q" [?\M-/]) | 220 | |
| 221 | 221 | (define-key function-key-map "\e[112q" [?\C-/]) | |
| 222 | (define-key function-key-map "\e[139q" [insert]) | 222 | (define-key function-key-map "\e[113q" [?\M-/]) |
| 223 | (define-key function-key-map "\e[139q" [S-insert]) | 223 | |
| 224 | (define-key function-key-map "\e[140q" [C-insert]) | 224 | (define-key function-key-map "\e[139q" [insert]) |
| 225 | (define-key function-key-map "\e[141q" [M-insert]) | 225 | (define-key function-key-map "\e[139q" [S-insert]) |
| 226 | 226 | (define-key function-key-map "\e[140q" [C-insert]) | |
| 227 | (define-key function-key-map "\e[H" [home]) | 227 | (define-key function-key-map "\e[141q" [M-insert]) |
| 228 | (define-key function-key-map "\e[143q" [S-home]) | 228 | |
| 229 | (define-key function-key-map "\e[144q" [C-home]) | 229 | (define-key function-key-map "\e[H" [home]) |
| 230 | 230 | (define-key function-key-map "\e[143q" [S-home]) | |
| 231 | 231 | (define-key function-key-map "\e[144q" [C-home]) | |
| 232 | (define-key function-key-map "\e[150q" [prior]) | 232 | |
| 233 | (define-key function-key-map "\e[151q" [S-prior]) ;; those don't seem | 233 | |
| 234 | (define-key function-key-map "\e[150q" [prior]) | ||
| 235 | (define-key function-key-map "\e[151q" [S-prior]) ;; those don't | ||
| 236 | ;; seem to | ||
| 237 | ;; generate | ||
| 238 | ;; anything | ||
| 239 | (define-key function-key-map "\e[152q" [C-prior]) | ||
| 240 | |||
| 241 | |||
| 242 | ;; (define-key function-key-map "^?" [delete]) | ||
| 243 | (define-key function-key-map "\e[P" [S-delete]) | ||
| 244 | (define-key function-key-map "\e[142q" [C-delete]) | ||
| 245 | (define-key function-key-map "\e[M" [M-delete]) | ||
| 246 | |||
| 247 | (define-key function-key-map "\e[146q" [end]) | ||
| 248 | (define-key function-key-map "\e[147q" [S-end]) ;; those don't seem | ||
| 234 | ;; to generate | 249 | ;; to generate |
| 235 | ;; anything | 250 | ;; anything |
| 236 | (define-key function-key-map "\e[152q" [C-prior]) | 251 | (define-key function-key-map "\e[148q" [C-end]) |
| 237 | 252 | ||
| 238 | 253 | (define-key function-key-map "\e[154q" [next]) | |
| 239 | ;; (define-key function-key-map "^?" [delete]) ?? something else seems to take care of this. | 254 | (define-key function-key-map "\e[155q" [S-next]) |
| 240 | (define-key function-key-map "\e[P" [S-delete]) | 255 | (define-key function-key-map "\e[156q" [C-next]) |
| 241 | (define-key function-key-map "\e[142q" [C-delete]) | 256 | |
| 242 | (define-key function-key-map "\e[M" [M-delete]) | 257 | |
| 243 | 258 | (define-key function-key-map "\e[161q" [S-up]) | |
| 244 | (define-key function-key-map "\e[146q" [end]) | 259 | (define-key function-key-map "\e[162q" [C-up]) |
| 245 | (define-key function-key-map "\e[147q" [S-end]) ;; those don't seem to | 260 | (define-key function-key-map "\e[163q" [M-up]) |
| 246 | ;; generate anything | 261 | |
| 247 | (define-key function-key-map "\e[148q" [C-end]) | 262 | (define-key function-key-map "\e[158q" [S-left]) |
| 248 | 263 | (define-key function-key-map "\e[159q" [C-left]) | |
| 249 | (define-key function-key-map "\e[154q" [next]) | 264 | (define-key function-key-map "\e[160q" [M-left]) |
| 250 | (define-key function-key-map "\e[155q" [S-next]) | 265 | |
| 251 | (define-key function-key-map "\e[156q" [C-next]) | 266 | (define-key function-key-map "\e[164q" [S-down]) |
| 252 | 267 | (define-key function-key-map "\e[165q" [C-down]) | |
| 253 | 268 | (define-key function-key-map "\e[166q" [M-down]) | |
| 254 | (define-key function-key-map "\e[161q" [S-up]) | 269 | |
| 255 | (define-key function-key-map "\e[162q" [C-up]) | 270 | (define-key function-key-map "\e[167q" [S-right]) |
| 256 | (define-key function-key-map "\e[163q" [M-up]) | 271 | (define-key function-key-map "\e[168q" [C-right]) |
| 257 | 272 | (define-key function-key-map "\e[169q" [M-right]) | |
| 258 | (define-key function-key-map "\e[158q" [S-left]) | 273 | |
| 259 | (define-key function-key-map "\e[159q" [C-left]) | 274 | ;; Keypad functions, most of those are untested. |
| 260 | (define-key function-key-map "\e[160q" [M-left]) | 275 | (define-key function-key-map "\e[179q" [?\C-/]) |
| 261 | 276 | (define-key function-key-map "\e[180q" [?\M-/]) | |
| 262 | (define-key function-key-map "\e[164q" [S-down]) | 277 | |
| 263 | (define-key function-key-map "\e[165q" [C-down]) | 278 | (define-key function-key-map "\e[187q" [?\C-*]) |
| 264 | (define-key function-key-map "\e[166q" [M-down]) | 279 | (define-key function-key-map "\e[188q" [?\M-*]) |
| 265 | 280 | ||
| 266 | (define-key function-key-map "\e[167q" [S-right]) | 281 | (define-key function-key-map "\e[198q" [?\C--]) |
| 267 | (define-key function-key-map "\e[168q" [C-right]) | 282 | (define-key function-key-map "\e[199q" [?\M--]) |
| 268 | (define-key function-key-map "\e[169q" [M-right]) | 283 | |
| 269 | 284 | ;; Something else takes care of home, up, prior, down, left, right, next | |
| 270 | ;; Keypad functions, most of those are untested. | 285 | ;;(define-key function-key-map "\e[H" [home]) |
| 271 | (define-key function-key-map "\e[179q" [?\C-/]) | 286 | (define-key function-key-map "\e[172q" [C-home]) |
| 272 | (define-key function-key-map "\e[180q" [?\M-/]) | 287 | |
| 273 | 288 | ;;(define-key function-key-map "\e[A" [up]) | |
| 274 | (define-key function-key-map "\e[187q" [?\C-*]) | 289 | (define-key function-key-map "\e[182q" [C-up]) |
| 275 | (define-key function-key-map "\e[188q" [?\M-*]) | 290 | |
| 276 | 291 | ||
| 277 | (define-key function-key-map "\e[198q" [?\C--]) | 292 | ;;(define-key function-key-map "\e[150q" [prior]) |
| 278 | (define-key function-key-map "\e[199q" [?\M--]) | 293 | (define-key function-key-map "\e[190q" [C-prior]) |
| 279 | 294 | ||
| 280 | ;; Something else takes care of home, up, prior, down, left, right, next | 295 | |
| 281 | ;(define-key function-key-map "\e[H" [home]) | 296 | (define-key function-key-map "\e[200q" [?\C-+]) |
| 282 | (define-key function-key-map "\e[172q" [C-home]) | 297 | (define-key function-key-map "\e[201q" [?\M-+]) |
| 283 | 298 | ||
| 284 | ;(define-key function-key-map "\e[A" [up]) | 299 | ;;(define-key function-key-map "\e[D" [left]) |
| 285 | (define-key function-key-map "\e[182q" [C-up]) | 300 | (define-key function-key-map "\e[174q" [C-left]) |
| 286 | 301 | ||
| 287 | 302 | ||
| 288 | ;(define-key function-key-map "\e[150q" [prior]) | 303 | (define-key function-key-map "\e[000q" [begin]) |
| 289 | (define-key function-key-map "\e[190q" [C-prior]) | 304 | (define-key function-key-map "\e[184q" [C-begin]) |
| 290 | 305 | ||
| 291 | 306 | ||
| 292 | (define-key function-key-map "\e[200q" [?\C-+]) | 307 | ;;(define-key function-key-map "\e[C" [right]) |
| 293 | (define-key function-key-map "\e[201q" [?\M-+]) | 308 | (define-key function-key-map "\e[192q" [C-right]) |
| 294 | 309 | ||
| 295 | ;(define-key function-key-map "\e[D" [left]) | 310 | ;;(define-key function-key-map "\e[146q" [end]) |
| 296 | (define-key function-key-map "\e[174q" [C-left]) | 311 | (define-key function-key-map "\e[176q" [C-end]) |
| 297 | 312 | ||
| 298 | 313 | ;;(define-key function-key-map "\e[B" [down]) | |
| 299 | (define-key function-key-map "\e[000q" [begin]) | 314 | (define-key function-key-map "\e[186q" [C-down]) |
| 300 | (define-key function-key-map "\e[184q" [C-begin]) | 315 | |
| 301 | 316 | ;;(define-key function-key-map "\e[154q" [next]) | |
| 302 | 317 | (define-key function-key-map "\e[194q" [C-next]) | |
| 303 | ;(define-key function-key-map "\e[C" [right]) | 318 | |
| 304 | (define-key function-key-map "\e[192q" [C-right]) | 319 | |
| 305 | 320 | (define-key function-key-map "\e[100q" [M-enter]) | |
| 306 | ;(define-key function-key-map "\e[146q" [end]) | 321 | |
| 307 | (define-key function-key-map "\e[176q" [C-end]) | 322 | (define-key function-key-map "\e[139q" [insert]) |
| 308 | 323 | (define-key function-key-map "\e[178q" [C-inset]) | |
| 309 | ;(define-key function-key-map "\e[B" [down]) | 324 | |
| 310 | (define-key function-key-map "\e[186q" [C-down]) | 325 | (define-key function-key-map "\e[P" [delete]) |
| 311 | 326 | (define-key function-key-map "\e[196q" [C-delete]) | |
| 312 | ;(define-key function-key-map "\e[154q" [next]) | 327 | (define-key function-key-map "\e[197q" [M-delete])) |
| 313 | (define-key function-key-map "\e[194q" [C-next]) | ||
| 314 | |||
| 315 | |||
| 316 | (define-key function-key-map "\e[100q" [M-enter]) | ||
| 317 | |||
| 318 | (define-key function-key-map "\e[139q" [insert]) | ||
| 319 | (define-key function-key-map "\e[178q" [C-inset]) | ||
| 320 | |||
| 321 | (define-key function-key-map "\e[P" [delete]) | ||
| 322 | (define-key function-key-map "\e[196q" [C-delete]) | ||
| 323 | (define-key function-key-map "\e[197q" [M-delete]) | ||
| 324 | 328 | ||
| 325 | ;;; arch-tag: b1d0e73a-bb7d-47be-9fb2-6fb126469a1b | 329 | ;;; arch-tag: b1d0e73a-bb7d-47be-9fb2-6fb126469a1b |
| 326 | ;;; iris-ansi.el ends here | 330 | ;;; iris-ansi.el ends here |
diff --git a/lisp/term/linux.el b/lisp/term/linux.el index 71b9e0d4bcf..7fa9a96e9bd 100644 --- a/lisp/term/linux.el +++ b/lisp/term/linux.el | |||
| @@ -1,19 +1,21 @@ | |||
| 1 | ;; -*- no-byte-compile: t -*- | 1 | ;; -*- no-byte-compile: t -*- |
| 2 | ;; The Linux console handles Latin-1 by default. | 2 | ;; The Linux console handles Latin-1 by default. |
| 3 | 3 | ||
| 4 | (unless (terminal-coding-system) | 4 | (defun terminal-init-linux () |
| 5 | (set-terminal-coding-system 'iso-latin-1)) | 5 | "Terminal initialization function for linux." |
| 6 | (unless (terminal-coding-system) | ||
| 7 | (set-terminal-coding-system 'iso-latin-1)) | ||
| 6 | 8 | ||
| 7 | ;; It can't really display underlines. | 9 | ;; It can't really display underlines. |
| 8 | (tty-no-underline) | 10 | (tty-no-underline) |
| 9 | 11 | ||
| 10 | ;; Make Latin-1 input characters work, too. | 12 | ;; Make Latin-1 input characters work, too. |
| 11 | ;; Meta will continue to work, because the kernel | 13 | ;; Meta will continue to work, because the kernel |
| 12 | ;; turns that into Escape. | 14 | ;; turns that into Escape. |
| 13 | 15 | ||
| 14 | (let ((value (current-input-mode))) | 16 | (let ((value (current-input-mode))) |
| 15 | ;; The third arg only matters in that it is not t or nil. | 17 | ;; The third arg only matters in that it is not t or nil. |
| 16 | (set-input-mode (nth 0 value) (nth 1 value) 'iso-latin-1 (nth 3 value))) | 18 | (set-input-mode (nth 0 value) (nth 1 value) 'iso-latin-1 (nth 3 value)))) |
| 17 | 19 | ||
| 18 | ;;; arch-tag: 5d0c4f63-739b-4862-abf3-041fe42adb8f | 20 | ;;; arch-tag: 5d0c4f63-739b-4862-abf3-041fe42adb8f |
| 19 | ;;; linux.el ends here | 21 | ;;; linux.el ends here |
diff --git a/lisp/term/news.el b/lisp/term/news.el index 7a24eaf5a0c..f8a4934f8bc 100644 --- a/lisp/term/news.el +++ b/lisp/term/news.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; news.el --- keypad and function key bindings for the Sony NEWS keyboard -*- no-byte-compile: t -*- | 1 | ;;; news.el --- keypad and function key bindings for the Sony NEWS keyboard -*- no-byte-compile: t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1989, 1993 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1989, 1993, 2005 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: FSF | 5 | ;; Author: FSF |
| 6 | ;; Keywords: terminals | 6 | ;; Keywords: terminals |
| @@ -28,47 +28,49 @@ | |||
| 28 | 28 | ||
| 29 | ;;; Code: | 29 | ;;; Code: |
| 30 | 30 | ||
| 31 | (if (boundp 'news-fkey-prefix) | 31 | (defun terminal-init-news () |
| 32 | nil | 32 | "Terminal initialization function for news." |
| 33 | ;; The terminal initialization should already have set up some keys | 33 | (if (boundp 'news-fkey-prefix) |
| 34 | (setq news-fkey-prefix (lookup-key function-key-map "\eO")) | 34 | nil |
| 35 | (if (not (keymapp news-fkey-prefix)) | 35 | ;; The terminal initialization should already have set up some keys |
| 36 | (error "What? Your news termcap/terminfo has no keycaps in it")) | 36 | (setq news-fkey-prefix (lookup-key function-key-map "\eO")) |
| 37 | (if (not (keymapp news-fkey-prefix)) | ||
| 38 | (error "What? Your news termcap/terminfo has no keycaps in it")) | ||
| 37 | 39 | ||
| 38 | ;; Termcap or terminfo will set these | 40 | ;; Termcap or terminfo will set these |
| 39 | ;; (define-key news-fkey-prefix "P" [f1]) | 41 | ;; (define-key news-fkey-prefix "P" [f1]) |
| 40 | ;; (define-key news-fkey-prefix "Q" [f2]) | 42 | ;; (define-key news-fkey-prefix "Q" [f2]) |
| 41 | ;; (define-key news-fkey-prefix "R" [f3]) | 43 | ;; (define-key news-fkey-prefix "R" [f3]) |
| 42 | ;; (define-key news-fkey-prefix "S" [f4]) | 44 | ;; (define-key news-fkey-prefix "S" [f4]) |
| 43 | ;; (define-key news-fkey-prefix "T" [f5]) | 45 | ;; (define-key news-fkey-prefix "T" [f5]) |
| 44 | ;; (define-key news-fkey-prefix "U" [f6]) | 46 | ;; (define-key news-fkey-prefix "U" [f6]) |
| 45 | ;; (define-key news-fkey-prefix "V" [f7]) | 47 | ;; (define-key news-fkey-prefix "V" [f7]) |
| 46 | ;; (define-key news-fkey-prefix "W" [f8]) | 48 | ;; (define-key news-fkey-prefix "W" [f8]) |
| 47 | ;; (define-key news-fkey-prefix "X" [f9]) | 49 | ;; (define-key news-fkey-prefix "X" [f9]) |
| 48 | ;; (define-key news-fkey-prefix "Y" [f10]) | 50 | ;; (define-key news-fkey-prefix "Y" [f10]) |
| 49 | 51 | ||
| 50 | ;; Terminfo will set these | 52 | ;; Terminfo will set these |
| 51 | (define-key news-fkey-prefix "a" [execute]) | 53 | (define-key news-fkey-prefix "a" [execute]) |
| 52 | (define-key news-fkey-prefix "b" [select]) | 54 | (define-key news-fkey-prefix "b" [select]) |
| 53 | (define-key news-fkey-prefix "c" [cancel]) | 55 | (define-key news-fkey-prefix "c" [cancel]) |
| 54 | (define-key news-fkey-prefix "M" [kp-enter]) | 56 | (define-key news-fkey-prefix "M" [kp-enter]) |
| 55 | (define-key news-fkey-prefix "q" [kp-1]) | 57 | (define-key news-fkey-prefix "q" [kp-1]) |
| 56 | (define-key news-fkey-prefix "s" [kp-3]) | 58 | (define-key news-fkey-prefix "s" [kp-3]) |
| 57 | (define-key news-fkey-prefix "u" [kp-5]) | 59 | (define-key news-fkey-prefix "u" [kp-5]) |
| 58 | (define-key news-fkey-prefix "w" [kp-7]) | 60 | (define-key news-fkey-prefix "w" [kp-7]) |
| 59 | (define-key news-fkey-prefix "y" [kp-9]) | 61 | (define-key news-fkey-prefix "y" [kp-9]) |
| 60 | 62 | ||
| 61 | ;; These aren't in either termcap or terminfo's repertoire | 63 | ;; These aren't in either termcap or terminfo's repertoire |
| 62 | (define-key news-fkey-prefix "m" [kp-subtract]) | 64 | (define-key news-fkey-prefix "m" [kp-subtract]) |
| 63 | (define-key news-fkey-prefix "k" [kp-add]) | 65 | (define-key news-fkey-prefix "k" [kp-add]) |
| 64 | (define-key news-fkey-prefix "l" [kp-separator]) | 66 | (define-key news-fkey-prefix "l" [kp-separator]) |
| 65 | (define-key news-fkey-prefix "n" [kp-decimal]) | 67 | (define-key news-fkey-prefix "n" [kp-decimal]) |
| 66 | (define-key news-fkey-prefix "p" [kp-0]) | 68 | (define-key news-fkey-prefix "p" [kp-0]) |
| 67 | (define-key news-fkey-prefix "r" [kp-2]) | 69 | (define-key news-fkey-prefix "r" [kp-2]) |
| 68 | (define-key news-fkey-prefix "t" [kp-4]) | 70 | (define-key news-fkey-prefix "t" [kp-4]) |
| 69 | (define-key news-fkey-prefix "v" [kp-6]) | 71 | (define-key news-fkey-prefix "v" [kp-6]) |
| 70 | (define-key news-fkey-prefix "x" [kp-8]) | 72 | (define-key news-fkey-prefix "x" [kp-8]) |
| 71 | ) | 73 | )) |
| 72 | 74 | ||
| 73 | ;;; arch-tag: bfe141a0-623b-4b42-b753-5d9353776c5e | 75 | ;;; arch-tag: bfe141a0-623b-4b42-b753-5d9353776c5e |
| 74 | ;;; news.el ends here | 76 | ;;; news.el ends here |
diff --git a/lisp/term/rxvt.el b/lisp/term/rxvt.el index 95742a1d34e..f0e9dd7b5b1 100644 --- a/lisp/term/rxvt.el +++ b/lisp/term/rxvt.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; rxvt.el --- define function key sequences and standard colors for rxvt | 1 | ;;; rxvt.el --- define function key sequences and standard colors for rxvt |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2002 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2002, 2005 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Eli Zaretskii | 5 | ;; Author: Eli Zaretskii |
| 6 | ;; Keywords: terminals | 6 | ;; Keywords: terminals |
| @@ -26,135 +26,143 @@ | |||
| 26 | 26 | ||
| 27 | ;;; Code: | 27 | ;;; Code: |
| 28 | 28 | ||
| 29 | ;;; The terminal intialization C code file might have initialized | 29 | (defun terminal-init-rxvt () |
| 30 | ;;; function keys F11->F42 from the termcap/terminfo information. On | 30 | "Terminal initialization function for rxvt." |
| 31 | ;;; a PC-style keyboard these keys correspond to | 31 | ;; The terminal intialization C code file might have initialized |
| 32 | ;;; MODIFIER-FUNCTION_KEY, where modifier is S-, C-, C-S-. The | 32 | ;; function keys F11->F42 from the termcap/terminfo information. On |
| 33 | ;;; code here subsitutes the corresponding defintions in | 33 | ;; a PC-style keyboard these keys correspond to |
| 34 | ;;; function-key-map. This substitution is needed because if a key | 34 | ;; MODIFIER-FUNCTION_KEY, where modifier is S-, C-, C-S-. The |
| 35 | ;;; definition if found in function-key-map, there are no further | 35 | ;; code here subsitutes the corresponding defintions in |
| 36 | ;;; lookups in other keymaps. | 36 | ;; function-key-map. This substitution is needed because if a key |
| 37 | (substitute-key-definition [f11] [S-f1] function-key-map) | 37 | ;; definition if found in function-key-map, there are no further |
| 38 | (substitute-key-definition [f12] [S-f2] function-key-map) | 38 | ;; lookups in other keymaps. |
| 39 | (substitute-key-definition [f13] [S-f3] function-key-map) | 39 | (substitute-key-definition [f11] [S-f1] function-key-map) |
| 40 | (substitute-key-definition [f14] [S-f4] function-key-map) | 40 | (substitute-key-definition [f12] [S-f2] function-key-map) |
| 41 | (substitute-key-definition [f15] [S-f5] function-key-map) | 41 | (substitute-key-definition [f13] [S-f3] function-key-map) |
| 42 | (substitute-key-definition [f16] [S-f6] function-key-map) | 42 | (substitute-key-definition [f14] [S-f4] function-key-map) |
| 43 | (substitute-key-definition [f17] [S-f7] function-key-map) | 43 | (substitute-key-definition [f15] [S-f5] function-key-map) |
| 44 | (substitute-key-definition [f18] [S-f8] function-key-map) | 44 | (substitute-key-definition [f16] [S-f6] function-key-map) |
| 45 | (substitute-key-definition [f19] [S-f9] function-key-map) | 45 | (substitute-key-definition [f17] [S-f7] function-key-map) |
| 46 | (substitute-key-definition [f20] [S-f10] function-key-map) | 46 | (substitute-key-definition [f18] [S-f8] function-key-map) |
| 47 | 47 | (substitute-key-definition [f19] [S-f9] function-key-map) | |
| 48 | (substitute-key-definition [f23] [C-f1] function-key-map) | 48 | (substitute-key-definition [f20] [S-f10] function-key-map) |
| 49 | (substitute-key-definition [f24] [C-f2] function-key-map) | 49 | |
| 50 | (substitute-key-definition [f25] [C-f3] function-key-map) | 50 | (substitute-key-definition [f23] [C-f1] function-key-map) |
| 51 | (substitute-key-definition [f26] [C-f4] function-key-map) | 51 | (substitute-key-definition [f24] [C-f2] function-key-map) |
| 52 | (substitute-key-definition [f27] [C-f5] function-key-map) | 52 | (substitute-key-definition [f25] [C-f3] function-key-map) |
| 53 | (substitute-key-definition [f28] [C-f6] function-key-map) | 53 | (substitute-key-definition [f26] [C-f4] function-key-map) |
| 54 | (substitute-key-definition [f29] [C-f7] function-key-map) | 54 | (substitute-key-definition [f27] [C-f5] function-key-map) |
| 55 | (substitute-key-definition [f30] [C-f8] function-key-map) | 55 | (substitute-key-definition [f28] [C-f6] function-key-map) |
| 56 | (substitute-key-definition [f31] [C-f9] function-key-map) | 56 | (substitute-key-definition [f29] [C-f7] function-key-map) |
| 57 | (substitute-key-definition [f32] [C-f10] function-key-map) | 57 | (substitute-key-definition [f30] [C-f8] function-key-map) |
| 58 | 58 | (substitute-key-definition [f31] [C-f9] function-key-map) | |
| 59 | (substitute-key-definition [f33] [C-S-f1] function-key-map) | 59 | (substitute-key-definition [f32] [C-f10] function-key-map) |
| 60 | (substitute-key-definition [f34] [C-S-f2] function-key-map) | 60 | |
| 61 | (substitute-key-definition [f35] [C-S-f3] function-key-map) | 61 | (substitute-key-definition [f33] [C-S-f1] function-key-map) |
| 62 | (substitute-key-definition [f36] [C-S-f4] function-key-map) | 62 | (substitute-key-definition [f34] [C-S-f2] function-key-map) |
| 63 | (substitute-key-definition [f37] [C-S-f5] function-key-map) | 63 | (substitute-key-definition [f35] [C-S-f3] function-key-map) |
| 64 | (substitute-key-definition [f38] [C-S-f6] function-key-map) | 64 | (substitute-key-definition [f36] [C-S-f4] function-key-map) |
| 65 | (substitute-key-definition [f39] [C-S-f7] function-key-map) | 65 | (substitute-key-definition [f37] [C-S-f5] function-key-map) |
| 66 | (substitute-key-definition [f40] [C-S-f8] function-key-map) | 66 | (substitute-key-definition [f38] [C-S-f6] function-key-map) |
| 67 | (substitute-key-definition [f41] [C-S-f9] function-key-map) | 67 | (substitute-key-definition [f39] [C-S-f7] function-key-map) |
| 68 | (substitute-key-definition [f42] [C-S-f10] function-key-map) | 68 | (substitute-key-definition [f40] [C-S-f8] function-key-map) |
| 69 | 69 | (substitute-key-definition [f41] [C-S-f9] function-key-map) | |
| 70 | ;; Set up function-key-map entries that termcap and terminfo don't know. | 70 | (substitute-key-definition [f42] [C-S-f10] function-key-map) |
| 71 | (let ((map (make-sparse-keymap))) | 71 | |
| 72 | (define-key map "\e[A" [up]) | 72 | ;; Set up function-key-map entries that termcap and terminfo don't know. |
| 73 | (define-key map "\e[B" [down]) | 73 | (let ((map (make-sparse-keymap))) |
| 74 | (define-key map "\e[C" [right]) | 74 | (define-key map "\e[A" [up]) |
| 75 | (define-key map "\e[D" [left]) | 75 | (define-key map "\e[B" [down]) |
| 76 | (define-key map "\e[7~" [home]) | 76 | (define-key map "\e[C" [right]) |
| 77 | (define-key map "\e[2~" [insert]) | 77 | (define-key map "\e[D" [left]) |
| 78 | (define-key map "\e[3~" [delete]) | 78 | (define-key map "\e[7~" [home]) |
| 79 | (define-key map "\e[4~" [select]) | 79 | (define-key map "\e[2~" [insert]) |
| 80 | (define-key map "\e[5~" [prior]) | 80 | (define-key map "\e[3~" [delete]) |
| 81 | (define-key map "\e[6~" [next]) | 81 | (define-key map "\e[4~" [select]) |
| 82 | (define-key map "\e[11~" [f1]) | 82 | (define-key map "\e[5~" [prior]) |
| 83 | (define-key map "\e[12~" [f2]) | 83 | (define-key map "\e[6~" [next]) |
| 84 | (define-key map "\e[13~" [f3]) | 84 | (define-key map "\e[11~" [f1]) |
| 85 | (define-key map "\e[14~" [f4]) | 85 | (define-key map "\e[12~" [f2]) |
| 86 | (define-key map "\e[15~" [f5]) | 86 | (define-key map "\e[13~" [f3]) |
| 87 | (define-key map "\e[17~" [f6]) | 87 | (define-key map "\e[14~" [f4]) |
| 88 | (define-key map "\e[18~" [f7]) | 88 | (define-key map "\e[15~" [f5]) |
| 89 | (define-key map "\e[19~" [f8]) | 89 | (define-key map "\e[17~" [f6]) |
| 90 | (define-key map "\e[20~" [f9]) | 90 | (define-key map "\e[18~" [f7]) |
| 91 | (define-key map "\e[21~" [f10]) | 91 | (define-key map "\e[19~" [f8]) |
| 92 | ;; The strings emitted by f11 and f12 are the same as the strings | 92 | (define-key map "\e[20~" [f9]) |
| 93 | ;; emitted by S-f1 and S-f2, so don't define f11 and f12. | 93 | (define-key map "\e[21~" [f10]) |
| 94 | ;; (define-key map "\e[23~" [f11]) | 94 | ;; The strings emitted by f11 and f12 are the same as the strings |
| 95 | ;; (define-key map "\e[24~" [f12]) | 95 | ;; emitted by S-f1 and S-f2, so don't define f11 and f12. |
| 96 | (define-key map "\e[29~" [print]) | 96 | ;; (define-key map "\e[23~" [f11]) |
| 97 | 97 | ;; (define-key map "\e[24~" [f12]) | |
| 98 | (define-key map "\e[11^" [C-f1]) | 98 | (define-key map "\e[29~" [print]) |
| 99 | (define-key map "\e[12^" [C-f2]) | 99 | |
| 100 | (define-key map "\e[13^" [C-f3]) | 100 | (define-key map "\e[11^" [C-f1]) |
| 101 | (define-key map "\e[14^" [C-f4]) | 101 | (define-key map "\e[12^" [C-f2]) |
| 102 | (define-key map "\e[15^" [C-f5]) | 102 | (define-key map "\e[13^" [C-f3]) |
| 103 | (define-key map "\e[17^" [C-f6]) | 103 | (define-key map "\e[14^" [C-f4]) |
| 104 | (define-key map "\e[18^" [C-f7]) | 104 | (define-key map "\e[15^" [C-f5]) |
| 105 | (define-key map "\e[19^" [C-f8]) | 105 | (define-key map "\e[17^" [C-f6]) |
| 106 | (define-key map "\e[20^" [C-f9]) | 106 | (define-key map "\e[18^" [C-f7]) |
| 107 | (define-key map "\e[21^" [C-f10]) | 107 | (define-key map "\e[19^" [C-f8]) |
| 108 | 108 | (define-key map "\e[20^" [C-f9]) | |
| 109 | (define-key map "\e[23~" [S-f1]) | 109 | (define-key map "\e[21^" [C-f10]) |
| 110 | (define-key map "\e[24~" [S-f2]) | 110 | |
| 111 | (define-key map "\e[25~" [S-f3]) | 111 | (define-key map "\e[23~" [S-f1]) |
| 112 | (define-key map "\e[26~" [S-f4]) | 112 | (define-key map "\e[24~" [S-f2]) |
| 113 | (define-key map "\e[28~" [S-f5]) | 113 | (define-key map "\e[25~" [S-f3]) |
| 114 | (define-key map "\e[29~" [S-f6]) | 114 | (define-key map "\e[26~" [S-f4]) |
| 115 | (define-key map "\e[31~" [S-f7]) | 115 | (define-key map "\e[28~" [S-f5]) |
| 116 | (define-key map "\e[32~" [S-f8]) | 116 | (define-key map "\e[29~" [S-f6]) |
| 117 | (define-key map "\e[33~" [S-f9]) | 117 | (define-key map "\e[31~" [S-f7]) |
| 118 | (define-key map "\e[34~" [S-f10]) | 118 | (define-key map "\e[32~" [S-f8]) |
| 119 | 119 | (define-key map "\e[33~" [S-f9]) | |
| 120 | (define-key map "\e[23^" [C-S-f1]) | 120 | (define-key map "\e[34~" [S-f10]) |
| 121 | (define-key map "\e[24^" [C-S-f2]) | 121 | |
| 122 | (define-key map "\e[25^" [C-S-f3]) | 122 | (define-key map "\e[23^" [C-S-f1]) |
| 123 | (define-key map "\e[26^" [C-S-f4]) | 123 | (define-key map "\e[24^" [C-S-f2]) |
| 124 | (define-key map "\e[28^" [C-S-f5]) | 124 | (define-key map "\e[25^" [C-S-f3]) |
| 125 | (define-key map "\e[29^" [C-S-f6]) | 125 | (define-key map "\e[26^" [C-S-f4]) |
| 126 | (define-key map "\e[31^" [C-S-f7]) | 126 | (define-key map "\e[28^" [C-S-f5]) |
| 127 | (define-key map "\e[32^" [C-S-f8]) | 127 | (define-key map "\e[29^" [C-S-f6]) |
| 128 | (define-key map "\e[33^" [C-S-f9]) | 128 | (define-key map "\e[31^" [C-S-f7]) |
| 129 | (define-key map "\e[34^" [C-S-f10]) | 129 | (define-key map "\e[32^" [C-S-f8]) |
| 130 | 130 | (define-key map "\e[33^" [C-S-f9]) | |
| 131 | (define-key map "\e[2^" [C-insert]) | 131 | (define-key map "\e[34^" [C-S-f10]) |
| 132 | (define-key map "\e[3^" [C-delete]) | 132 | |
| 133 | (define-key map "\e[5^" [C-prior]) | 133 | (define-key map "\e[2^" [C-insert]) |
| 134 | (define-key map "\e[6^" [C-next]) | 134 | (define-key map "\e[3^" [C-delete]) |
| 135 | (define-key map "\e[7^" [C-home]) | 135 | (define-key map "\e[5^" [C-prior]) |
| 136 | (define-key map "\e[8^" [C-end]) | 136 | (define-key map "\e[6^" [C-next]) |
| 137 | (define-key map "\eOd" [C-left]) | 137 | (define-key map "\e[7^" [C-home]) |
| 138 | (define-key map "\eOc" [C-right]) | 138 | (define-key map "\e[8^" [C-end]) |
| 139 | (define-key map "\eOa" [C-up]) | 139 | (define-key map "\eOd" [C-left]) |
| 140 | (define-key map "\eOb" [C-down]) | 140 | (define-key map "\eOc" [C-right]) |
| 141 | 141 | (define-key map "\eOa" [C-up]) | |
| 142 | (define-key map "\e[2;2~" [S-insert]) | 142 | (define-key map "\eOb" [C-down]) |
| 143 | (define-key map "\e[3$" [S-delete]) | 143 | |
| 144 | (define-key map "\e[5$" [S-prior]) | 144 | (define-key map "\e[2;2~" [S-insert]) |
| 145 | (define-key map "\e[6$" [S-next]) | 145 | (define-key map "\e[3$" [S-delete]) |
| 146 | (define-key map "\e[8$" [S-end]) | 146 | (define-key map "\e[5$" [S-prior]) |
| 147 | (define-key map "\e[7$" [S-home]) | 147 | (define-key map "\e[6$" [S-next]) |
| 148 | (define-key map "\e[d" [S-left]) | 148 | (define-key map "\e[8$" [S-end]) |
| 149 | (define-key map "\e[c" [S-right]) | 149 | (define-key map "\e[7$" [S-home]) |
| 150 | (define-key map "\e[a" [S-up]) | 150 | (define-key map "\e[d" [S-left]) |
| 151 | (define-key map "\e[b" [S-down]) | 151 | (define-key map "\e[c" [S-right]) |
| 152 | 152 | (define-key map "\e[a" [S-up]) | |
| 153 | ;; Use inheritance to let the main keymap override those defaults. | 153 | (define-key map "\e[b" [S-down]) |
| 154 | ;; This way we don't override terminfo-derived settings or settings | 154 | |
| 155 | ;; made in the .emacs file. | 155 | ;; Use inheritance to let the main keymap override those defaults. |
| 156 | (set-keymap-parent map (keymap-parent function-key-map)) | 156 | ;; This way we don't override terminfo-derived settings or settings |
| 157 | (set-keymap-parent function-key-map map)) | 157 | ;; made in the .emacs file. |
| 158 | (set-keymap-parent map (keymap-parent function-key-map)) | ||
| 159 | (set-keymap-parent function-key-map map)) | ||
| 160 | |||
| 161 | ;; Initialize colors and background mode. | ||
| 162 | (rxvt-register-default-colors) | ||
| 163 | (rxvt-set-background-mode) | ||
| 164 | ;; This recomputes all the default faces given the colors we've just set up. | ||
| 165 | (tty-set-up-initial-frame-faces)) | ||
| 158 | 166 | ||
| 159 | ;; Set up colors, for those versions of rxvt that support it. | 167 | ;; Set up colors, for those versions of rxvt that support it. |
| 160 | (defvar rxvt-standard-colors | 168 | (defvar rxvt-standard-colors |
| @@ -228,11 +236,5 @@ for the currently selected frame." | |||
| 228 | (setq default-frame-background-mode 'dark))) | 236 | (setq default-frame-background-mode 'dark))) |
| 229 | (frame-set-background-mode (selected-frame)))) | 237 | (frame-set-background-mode (selected-frame)))) |
| 230 | 238 | ||
| 231 | ;; Do it! | ||
| 232 | (rxvt-register-default-colors) | ||
| 233 | (rxvt-set-background-mode) | ||
| 234 | ;; This recomputes all the default faces given the colors we've just set up. | ||
| 235 | (tty-set-up-initial-frame-faces) | ||
| 236 | |||
| 237 | ;;; arch-tag: 20cf2fb6-6318-4bab-9dbf-1d15048f2257 | 239 | ;;; arch-tag: 20cf2fb6-6318-4bab-9dbf-1d15048f2257 |
| 238 | ;;; rxvt.el ends here | 240 | ;;; rxvt.el ends here |
diff --git a/lisp/term/sun.el b/lisp/term/sun.el index 18010e0b343..7d857ca1266 100644 --- a/lisp/term/sun.el +++ b/lisp/term/sun.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; sun.el --- keybinding for standard default sunterm keys | 1 | ;;; sun.el --- keybinding for standard default sunterm keys |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1987, 2001 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1987, 2001, 2005 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Jeff Peck <peck@sun.com> | 5 | ;; Author: Jeff Peck <peck@sun.com> |
| 6 | ;; Keywords: terminals | 6 | ;; Keywords: terminals |
| @@ -93,58 +93,6 @@ | |||
| 93 | ;; | 93 | ;; |
| 94 | 94 | ||
| 95 | (defvar sun-raw-prefix (make-sparse-keymap)) | 95 | (defvar sun-raw-prefix (make-sparse-keymap)) |
| 96 | (define-key function-key-map "\e[" sun-raw-prefix) | ||
| 97 | |||
| 98 | (define-key sun-raw-prefix "210z" [r3]) | ||
| 99 | (define-key sun-raw-prefix "213z" [r6]) | ||
| 100 | (define-key sun-raw-prefix "214z" [r7]) | ||
| 101 | (define-key sun-raw-prefix "216z" [r9]) | ||
| 102 | (define-key sun-raw-prefix "218z" [r11]) | ||
| 103 | (define-key sun-raw-prefix "220z" [r13]) | ||
| 104 | (define-key sun-raw-prefix "222z" [r15]) | ||
| 105 | (define-key sun-raw-prefix "193z" [redo]) | ||
| 106 | (define-key sun-raw-prefix "194z" [props]) | ||
| 107 | (define-key sun-raw-prefix "195z" [undo]) | ||
| 108 | ;; (define-key sun-raw-prefix "196z" 'ignore) ; Expose-down | ||
| 109 | ;; (define-key sun-raw-prefix "197z" [put]) | ||
| 110 | ;; (define-key sun-raw-prefix "198z" 'ignore) ; Open-down | ||
| 111 | ;; (define-key sun-raw-prefix "199z" [get]) | ||
| 112 | (define-key sun-raw-prefix "200z" [find]) | ||
| 113 | ;; (define-key sun-raw-prefix "201z" 'kill-region-and-unmark) ; Delete | ||
| 114 | (define-key sun-raw-prefix "224z" [f1]) | ||
| 115 | (define-key sun-raw-prefix "225z" [f2]) | ||
| 116 | (define-key sun-raw-prefix "226z" [f3]) | ||
| 117 | (define-key sun-raw-prefix "227z" [f4]) | ||
| 118 | (define-key sun-raw-prefix "228z" [f5]) | ||
| 119 | (define-key sun-raw-prefix "229z" [f6]) | ||
| 120 | (define-key sun-raw-prefix "230z" [f7]) | ||
| 121 | (define-key sun-raw-prefix "231z" [f8]) | ||
| 122 | (define-key sun-raw-prefix "232z" [f9]) | ||
| 123 | (define-key sun-raw-prefix "233z" [f10]) | ||
| 124 | (define-key sun-raw-prefix "234z" [f11]) | ||
| 125 | (define-key sun-raw-prefix "235z" [f12]) | ||
| 126 | (define-key sun-raw-prefix "A" [up]) ; R8 | ||
| 127 | (define-key sun-raw-prefix "B" [down]) ; R14 | ||
| 128 | (define-key sun-raw-prefix "C" [right]) ; R12 | ||
| 129 | (define-key sun-raw-prefix "D" [left]) ; R10 | ||
| 130 | |||
| 131 | (global-set-key [r3] 'backward-page) | ||
| 132 | (global-set-key [r6] 'forward-page) | ||
| 133 | (global-set-key [r7] 'beginning-of-buffer) | ||
| 134 | (global-set-key [r9] 'scroll-down) | ||
| 135 | (global-set-key [r11] 'recenter) | ||
| 136 | (global-set-key [r13] 'end-of-buffer) | ||
| 137 | (global-set-key [r15] 'scroll-up) | ||
| 138 | (global-set-key [redo] 'redraw-display) ;FIXME: collides with default. | ||
| 139 | (global-set-key [props] 'list-buffers) | ||
| 140 | (global-set-key [put] 'sun-select-region) | ||
| 141 | (global-set-key [get] 'sun-yank-selection) | ||
| 142 | (global-set-key [find] 'exchange-point-and-mark) | ||
| 143 | (global-set-key [f3] 'scroll-down-in-place) | ||
| 144 | (global-set-key [f4] 'scroll-up-in-place) | ||
| 145 | (global-set-key [f6] 'shrink-window) | ||
| 146 | (global-set-key [f7] 'enlarge-window) | ||
| 147 | |||
| 148 | 96 | ||
| 149 | ;; Since .emacs gets loaded before this file, a hook is supplied | 97 | ;; Since .emacs gets loaded before this file, a hook is supplied |
| 150 | ;; for you to put your own bindings in. | 98 | ;; for you to put your own bindings in. |
| @@ -152,13 +100,6 @@ | |||
| 152 | (defvar sun-raw-prefix-hooks nil | 100 | (defvar sun-raw-prefix-hooks nil |
| 153 | "List of forms to evaluate after setting sun-raw-prefix.") | 101 | "List of forms to evaluate after setting sun-raw-prefix.") |
| 154 | 102 | ||
| 155 | (when sun-raw-prefix-hooks | ||
| 156 | (message "sun-raw-prefix-hooks is obsolete! Use term-setup-hook instead!") | ||
| 157 | (let ((hooks sun-raw-prefix-hooks)) | ||
| 158 | (while hooks | ||
| 159 | (eval (car hooks)) | ||
| 160 | (setq hooks (cdr hooks))))) | ||
| 161 | |||
| 162 | 103 | ||
| 163 | ;;; This section adds definitions for the emacstool users | 104 | ;;; This section adds definitions for the emacstool users |
| 164 | ;; emacstool event filter converts function keys to C-x*{c}{lrt} | 105 | ;; emacstool event filter converts function keys to C-x*{c}{lrt} |
| @@ -188,44 +129,6 @@ | |||
| 188 | (defvar suntool-map (make-sparse-keymap) | 129 | (defvar suntool-map (make-sparse-keymap) |
| 189 | "*Keymap for Emacstool bindings.") | 130 | "*Keymap for Emacstool bindings.") |
| 190 | 131 | ||
| 191 | (define-key suntool-map "gr" 'beginning-of-buffer) ; r7 | ||
| 192 | (define-key suntool-map "iR" 'backward-page) ; R9 | ||
| 193 | (define-key suntool-map "ir" 'scroll-down) ; r9 | ||
| 194 | (define-key suntool-map "kr" 'recenter) ; r11 | ||
| 195 | (define-key suntool-map "mr" 'end-of-buffer) ; r13 | ||
| 196 | (define-key suntool-map "oR" 'forward-page) ; R15 | ||
| 197 | (define-key suntool-map "or" 'scroll-up) ; r15 | ||
| 198 | (define-key suntool-map "b\M-L" 'rerun-prev-command) ; M-AGAIN | ||
| 199 | (define-key suntool-map "b\M-l" 'prev-complex-command) ; M-Again | ||
| 200 | (define-key suntool-map "bl" 'redraw-display) ; Again | ||
| 201 | (define-key suntool-map "cl" 'list-buffers) ; Props | ||
| 202 | (define-key suntool-map "dl" 'undo) ; Undo | ||
| 203 | (define-key suntool-map "el" 'ignore) ; Expose-Open | ||
| 204 | (define-key suntool-map "fl" 'sun-select-region) ; Put | ||
| 205 | (define-key suntool-map "f," 'copy-region-as-kill) ; C-Put | ||
| 206 | (define-key suntool-map "gl" 'ignore) ; Open-Open | ||
| 207 | (define-key suntool-map "hl" 'sun-yank-selection) ; Get | ||
| 208 | (define-key suntool-map "h," 'yank) ; C-Get | ||
| 209 | (define-key suntool-map "il" 'research-forward) ; Find | ||
| 210 | (define-key suntool-map "i," 're-search-forward) ; C-Find | ||
| 211 | (define-key suntool-map "i\M-l" 'research-backward) ; M-Find | ||
| 212 | (define-key suntool-map "i\M-," 're-search-backward) ; C-M-Find | ||
| 213 | |||
| 214 | (define-key suntool-map "jL" 'yank) ; DELETE | ||
| 215 | (define-key suntool-map "jl" 'kill-region-and-unmark) ; Delete | ||
| 216 | (define-key suntool-map "j\M-l" 'exchange-point-and-mark); M-Delete | ||
| 217 | (define-key suntool-map "j," | ||
| 218 | (lambda () (interactive) (pop-mark))) ; C-Delete | ||
| 219 | |||
| 220 | (define-key suntool-map "fT" 'shrink-window-horizontally) ; T6 | ||
| 221 | (define-key suntool-map "gT" 'enlarge-window-horizontally) ; T7 | ||
| 222 | (define-key suntool-map "ft" 'shrink-window) ; t6 | ||
| 223 | (define-key suntool-map "gt" 'enlarge-window) ; t7 | ||
| 224 | (define-key suntool-map "cT" (lambda (n) (interactive "p") (scroll-down n))) | ||
| 225 | (define-key suntool-map "dT" (lambda (n) (interactive "p") (scroll-up n))) | ||
| 226 | (define-key suntool-map "ct" 'scroll-down-in-place) ; t3 | ||
| 227 | (define-key suntool-map "dt" 'scroll-up-in-place) ; t4 | ||
| 228 | (define-key ctl-x-map "*" suntool-map) | ||
| 229 | 132 | ||
| 230 | ;; Since .emacs gets loaded before this file, a hook is supplied | 133 | ;; Since .emacs gets loaded before this file, a hook is supplied |
| 231 | ;; for you to put your own bindings in. | 134 | ;; for you to put your own bindings in. |
| @@ -233,13 +136,6 @@ | |||
| 233 | (defvar suntool-map-hooks nil | 136 | (defvar suntool-map-hooks nil |
| 234 | "List of forms to evaluate after setting suntool-map.") | 137 | "List of forms to evaluate after setting suntool-map.") |
| 235 | 138 | ||
| 236 | (when suntool-map-hooks | ||
| 237 | (message "suntool-map-hooks is obsolete! Use term-setup-hook instead!") | ||
| 238 | (let ((hooks suntool-map-hooks)) | ||
| 239 | (while hooks | ||
| 240 | (eval (car hooks)) | ||
| 241 | (setq hooks (cdr hooks))))) | ||
| 242 | |||
| 243 | ;; | 139 | ;; |
| 244 | ;; If running under emacstool, arrange to call suspend-emacstool | 140 | ;; If running under emacstool, arrange to call suspend-emacstool |
| 245 | ;; instead of suspend-emacs. | 141 | ;; instead of suspend-emacs. |
| @@ -251,6 +147,115 @@ | |||
| 251 | (autoload 'sun-mouse-handler "sun-mouse" | 147 | (autoload 'sun-mouse-handler "sun-mouse" |
| 252 | "Sun Emacstool handler for mouse blips (not loaded)." t) | 148 | "Sun Emacstool handler for mouse blips (not loaded)." t) |
| 253 | 149 | ||
| 150 | (defun terminal-init-sun () | ||
| 151 | "Terminal initialization function for sun." | ||
| 152 | (define-key function-key-map "\e[" sun-raw-prefix) | ||
| 153 | |||
| 154 | (define-key sun-raw-prefix "210z" [r3]) | ||
| 155 | (define-key sun-raw-prefix "213z" [r6]) | ||
| 156 | (define-key sun-raw-prefix "214z" [r7]) | ||
| 157 | (define-key sun-raw-prefix "216z" [r9]) | ||
| 158 | (define-key sun-raw-prefix "218z" [r11]) | ||
| 159 | (define-key sun-raw-prefix "220z" [r13]) | ||
| 160 | (define-key sun-raw-prefix "222z" [r15]) | ||
| 161 | (define-key sun-raw-prefix "193z" [redo]) | ||
| 162 | (define-key sun-raw-prefix "194z" [props]) | ||
| 163 | (define-key sun-raw-prefix "195z" [undo]) | ||
| 164 | ;; (define-key sun-raw-prefix "196z" 'ignore) ; Expose-down | ||
| 165 | ;; (define-key sun-raw-prefix "197z" [put]) | ||
| 166 | ;; (define-key sun-raw-prefix "198z" 'ignore) ; Open-down | ||
| 167 | ;; (define-key sun-raw-prefix "199z" [get]) | ||
| 168 | (define-key sun-raw-prefix "200z" [find]) | ||
| 169 | ;; (define-key sun-raw-prefix "201z" 'kill-region-and-unmark) ; Delete | ||
| 170 | (define-key sun-raw-prefix "224z" [f1]) | ||
| 171 | (define-key sun-raw-prefix "225z" [f2]) | ||
| 172 | (define-key sun-raw-prefix "226z" [f3]) | ||
| 173 | (define-key sun-raw-prefix "227z" [f4]) | ||
| 174 | (define-key sun-raw-prefix "228z" [f5]) | ||
| 175 | (define-key sun-raw-prefix "229z" [f6]) | ||
| 176 | (define-key sun-raw-prefix "230z" [f7]) | ||
| 177 | (define-key sun-raw-prefix "231z" [f8]) | ||
| 178 | (define-key sun-raw-prefix "232z" [f9]) | ||
| 179 | (define-key sun-raw-prefix "233z" [f10]) | ||
| 180 | (define-key sun-raw-prefix "234z" [f11]) | ||
| 181 | (define-key sun-raw-prefix "235z" [f12]) | ||
| 182 | (define-key sun-raw-prefix "A" [up]) ; R8 | ||
| 183 | (define-key sun-raw-prefix "B" [down]) ; R14 | ||
| 184 | (define-key sun-raw-prefix "C" [right]) ; R12 | ||
| 185 | (define-key sun-raw-prefix "D" [left]) ; R10 | ||
| 186 | |||
| 187 | (global-set-key [r3] 'backward-page) | ||
| 188 | (global-set-key [r6] 'forward-page) | ||
| 189 | (global-set-key [r7] 'beginning-of-buffer) | ||
| 190 | (global-set-key [r9] 'scroll-down) | ||
| 191 | (global-set-key [r11] 'recenter) | ||
| 192 | (global-set-key [r13] 'end-of-buffer) | ||
| 193 | (global-set-key [r15] 'scroll-up) | ||
| 194 | (global-set-key [redo] 'redraw-display) ;FIXME: collides with default. | ||
| 195 | (global-set-key [props] 'list-buffers) | ||
| 196 | (global-set-key [put] 'sun-select-region) | ||
| 197 | (global-set-key [get] 'sun-yank-selection) | ||
| 198 | (global-set-key [find] 'exchange-point-and-mark) | ||
| 199 | (global-set-key [f3] 'scroll-down-in-place) | ||
| 200 | (global-set-key [f4] 'scroll-up-in-place) | ||
| 201 | (global-set-key [f6] 'shrink-window) | ||
| 202 | (global-set-key [f7] 'enlarge-window) | ||
| 203 | |||
| 204 | (when sun-raw-prefix-hooks | ||
| 205 | (message "sun-raw-prefix-hooks is obsolete! Use term-setup-hook instead!") | ||
| 206 | (let ((hooks sun-raw-prefix-hooks)) | ||
| 207 | (while hooks | ||
| 208 | (eval (car hooks)) | ||
| 209 | (setq hooks (cdr hooks))))) | ||
| 210 | |||
| 211 | (define-key suntool-map "gr" 'beginning-of-buffer) ; r7 | ||
| 212 | (define-key suntool-map "iR" 'backward-page) ; R9 | ||
| 213 | (define-key suntool-map "ir" 'scroll-down) ; r9 | ||
| 214 | (define-key suntool-map "kr" 'recenter) ; r11 | ||
| 215 | (define-key suntool-map "mr" 'end-of-buffer) ; r13 | ||
| 216 | (define-key suntool-map "oR" 'forward-page) ; R15 | ||
| 217 | (define-key suntool-map "or" 'scroll-up) ; r15 | ||
| 218 | (define-key suntool-map "b\M-L" 'rerun-prev-command) ; M-AGAIN | ||
| 219 | (define-key suntool-map "b\M-l" 'prev-complex-command) ; M-Again | ||
| 220 | (define-key suntool-map "bl" 'redraw-display) ; Again | ||
| 221 | (define-key suntool-map "cl" 'list-buffers) ; Props | ||
| 222 | (define-key suntool-map "dl" 'undo) ; Undo | ||
| 223 | (define-key suntool-map "el" 'ignore) ; Expose-Open | ||
| 224 | (define-key suntool-map "fl" 'sun-select-region) ; Put | ||
| 225 | (define-key suntool-map "f," 'copy-region-as-kill) ; C-Put | ||
| 226 | (define-key suntool-map "gl" 'ignore) ; Open-Open | ||
| 227 | (define-key suntool-map "hl" 'sun-yank-selection) ; Get | ||
| 228 | (define-key suntool-map "h," 'yank) ; C-Get | ||
| 229 | (define-key suntool-map "il" 'research-forward) ; Find | ||
| 230 | (define-key suntool-map "i," 're-search-forward) ; C-Find | ||
| 231 | (define-key suntool-map "i\M-l" 'research-backward) ; M-Find | ||
| 232 | (define-key suntool-map "i\M-," 're-search-backward) ; C-M-Find | ||
| 233 | |||
| 234 | (define-key suntool-map "jL" 'yank) ; DELETE | ||
| 235 | (define-key suntool-map "jl" 'kill-region-and-unmark) ; Delete | ||
| 236 | (define-key suntool-map "j\M-l" 'exchange-point-and-mark) ; M-Delete | ||
| 237 | (define-key suntool-map "j," | ||
| 238 | (lambda () (interactive) (pop-mark))) ; C-Delete | ||
| 239 | |||
| 240 | (define-key suntool-map "fT" 'shrink-window-horizontally) ; T6 | ||
| 241 | (define-key suntool-map "gT" 'enlarge-window-horizontally) ; T7 | ||
| 242 | (define-key suntool-map "ft" 'shrink-window) ; t6 | ||
| 243 | (define-key suntool-map "gt" 'enlarge-window) ; t7 | ||
| 244 | (define-key suntool-map "cT" (lambda (n) (interactive "p") (scroll-down n))) | ||
| 245 | (define-key suntool-map "dT" (lambda (n) (interactive "p") (scroll-up n))) | ||
| 246 | (define-key suntool-map "ct" 'scroll-down-in-place) ; t3 | ||
| 247 | (define-key suntool-map "dt" 'scroll-up-in-place) ; t4 | ||
| 248 | (define-key ctl-x-map "*" suntool-map) | ||
| 249 | |||
| 250 | (when suntool-map-hooks | ||
| 251 | (message "suntool-map-hooks is obsolete! Use term-setup-hook instead!") | ||
| 252 | (let ((hooks suntool-map-hooks)) | ||
| 253 | (while hooks | ||
| 254 | (eval (car hooks)) | ||
| 255 | (setq hooks (cdr hooks))))) | ||
| 256 | |||
| 257 | (define-key ctl-x-map "\C-@" 'sun-mouse-once)) | ||
| 258 | |||
| 254 | (defun emacstool-init () | 259 | (defun emacstool-init () |
| 255 | "Set up Emacstool window, if you know you are in an emacstool." | 260 | "Set up Emacstool window, if you know you are in an emacstool." |
| 256 | ;; Make sure sun-mouse and sun-fns are loaded. | 261 | ;; Make sure sun-mouse and sun-fns are loaded. |
| @@ -272,7 +277,6 @@ | |||
| 272 | (interactive) | 277 | (interactive) |
| 273 | (emacstool-init) | 278 | (emacstool-init) |
| 274 | (sun-mouse-handler)) ; Now, execute this mouse blip. | 279 | (sun-mouse-handler)) ; Now, execute this mouse blip. |
| 275 | (define-key ctl-x-map "\C-@" 'sun-mouse-once) | ||
| 276 | 280 | ||
| 277 | ;;; arch-tag: db761d47-fd7d-42b4-aae1-04fa116b6ba6 | 281 | ;;; arch-tag: db761d47-fd7d-42b4-aae1-04fa116b6ba6 |
| 278 | ;;; sun.el ends here | 282 | ;;; sun.el ends here |
diff --git a/lisp/term/tvi970.el b/lisp/term/tvi970.el index c24464fbbd5..f7bc8c852a9 100644 --- a/lisp/term/tvi970.el +++ b/lisp/term/tvi970.el | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | ;; Author: Jim Blandy <jimb@occs.cs.oberlin.edu>, January 1992 | 3 | ;; Author: Jim Blandy <jimb@occs.cs.oberlin.edu>, January 1992 |
| 4 | ;; Keywords: terminals | 4 | ;; Keywords: terminals |
| 5 | 5 | ||
| 6 | ;; Copyright (C) 1992 Free Software Foundation, Inc. | 6 | ;; Copyright (C) 1992, 2005 Free Software Foundation, Inc. |
| 7 | 7 | ||
| 8 | ;; This file is part of GNU Emacs. | 8 | ;; This file is part of GNU Emacs. |
| 9 | 9 | ||
| @@ -28,77 +28,80 @@ | |||
| 28 | 28 | ||
| 29 | ;;; Code: | 29 | ;;; Code: |
| 30 | 30 | ||
| 31 | (or (lookup-key function-key-map "\e[") | 31 | (defun terminal-init-tvi970 () |
| 32 | (define-key function-key-map "\e[" (make-keymap))) | 32 | "Terminal initialization function for tvi970." |
| 33 | ;; (or (lookup-key function-key-map "\eO") | 33 | (or (lookup-key function-key-map "\e[") |
| 34 | ;; (define-key function-key-map "\eO" (make-keymap))) | 34 | (define-key function-key-map "\e[" (make-keymap))) |
| 35 | 35 | ;; (or (lookup-key function-key-map "\eO") | |
| 36 | ;; Miscellaneous keys | 36 | ;; (define-key function-key-map "\eO" (make-keymap))) |
| 37 | (mapcar (function (lambda (key-binding) | 37 | |
| 38 | (define-key function-key-map | 38 | ;; Miscellaneous keys |
| 39 | (car key-binding) (nth 1 key-binding)))) | 39 | (mapcar (function (lambda (key-binding) |
| 40 | '( | 40 | (define-key function-key-map |
| 41 | ;; These are set up by termcap or terminfo | 41 | (car key-binding) (nth 1 key-binding)))) |
| 42 | ;; ("\eOP" [kp-f1]) | 42 | '( |
| 43 | ;; ("\eOQ" [kp-f2]) | 43 | ;; These are set up by termcap or terminfo |
| 44 | ;; ("\eOR" [kp-f3]) | 44 | ;; ("\eOP" [kp-f1]) |
| 45 | ;; ("\eOS" [kp-f4]) | 45 | ;; ("\eOQ" [kp-f2]) |
| 46 | 46 | ;; ("\eOR" [kp-f3]) | |
| 47 | ;; These might br set by terminfo | 47 | ;; ("\eOS" [kp-f4]) |
| 48 | ("\e[H" [home]) | 48 | |
| 49 | ("\e[Z" [backtab]) | 49 | ;; These might br set by terminfo |
| 50 | ("\e[i" [print]) | 50 | ("\e[H" [home]) |
| 51 | ("\e[@" [insert]) | 51 | ("\e[Z" [backtab]) |
| 52 | ("\e[L" [insertline]) | 52 | ("\e[i" [print]) |
| 53 | ("\e[M" [deleteline]) | 53 | ("\e[@" [insert]) |
| 54 | ("\e[U" [next]) ;; actually the `page' key | 54 | ("\e[L" [insertline]) |
| 55 | 55 | ("\e[M" [deleteline]) | |
| 56 | ;; These won't be set up by either | 56 | ("\e[U" [next]) ;; actually the `page' key |
| 57 | ("\eOm" [kp-subtract]) | 57 | |
| 58 | ("\eOl" [kp-separator]) | 58 | ;; These won't be set up by either |
| 59 | ("\eOn" [kp-decimal]) | 59 | ("\eOm" [kp-subtract]) |
| 60 | ("\eOM" [kp-enter]) | 60 | ("\eOl" [kp-separator]) |
| 61 | 61 | ("\eOn" [kp-decimal]) | |
| 62 | ;; These won't be set up by either either | 62 | ("\eOM" [kp-enter]) |
| 63 | ("\e[K" [key_eol]) ;; Not an X keysym | 63 | |
| 64 | ("\e[J" [key_eos]) ;; Not an X keysym | 64 | ;; These won't be set up by either either |
| 65 | ("\e[2J" [key_clear]) ;; Not an X keysym | 65 | ("\e[K" [key_eol]) ;; Not an X keysym |
| 66 | ("\e[P" [key_dc]) ;; Not an X keysym | 66 | ("\e[J" [key_eos]) ;; Not an X keysym |
| 67 | ("\e[g" [S-tab]) ;; Not an X keysym | 67 | ("\e[2J" [key_clear]) ;; Not an X keysym |
| 68 | ("\e[2N" [clearentry]) ;; Not an X keysym | 68 | ("\e[P" [key_dc]) ;; Not an X keysym |
| 69 | ("\e[2K" [S-clearentry]) ;; Not an X keysym | 69 | ("\e[g" [S-tab]) ;; Not an X keysym |
| 70 | ("\e[E" [?\C-j]) ;; Not an X keysym | 70 | ("\e[2N" [clearentry]) ;; Not an X keysym |
| 71 | ("\e[g" [S-backtab]) ;; Not an X keysym | 71 | ("\e[2K" [S-clearentry]) ;; Not an X keysym |
| 72 | ("\e[?1i" [key_sprint]) ;; Not an X keysym | 72 | ("\e[E" [?\C-j]) ;; Not an X keysym |
| 73 | ("\e[4h" [key_sic]) ;; Not an X keysym | 73 | ("\e[g" [S-backtab]) ;; Not an X keysym |
| 74 | ("\e[4l" [S-delete]) ;; Not an X keysym | 74 | ("\e[?1i" [key_sprint]) ;; Not an X keysym |
| 75 | ("\e[Q" [S-insertline]) ;; Not an X keysym | 75 | ("\e[4h" [key_sic]) ;; Not an X keysym |
| 76 | ("\e[1Q" [key_sdl]) ;; Not an X keysym | 76 | ("\e[4l" [S-delete]) ;; Not an X keysym |
| 77 | ("\e[19l" [key_seol]) ;; Not an X keysym | 77 | ("\e[Q" [S-insertline]) ;; Not an X keysym |
| 78 | ("\e[19h" [S-erasepage]) ;; Not an X keysym | 78 | ("\e[1Q" [key_sdl]) ;; Not an X keysym |
| 79 | ("\e[V" [S-page]) ;; Not an X keysym | 79 | ("\e[19l" [key_seol]) ;; Not an X keysym |
| 80 | ("\eS" [send]) ;; Not an X keysym | 80 | ("\e[19h" [S-erasepage]) ;; Not an X keysym |
| 81 | ("\e5" [S-send]) ;; Not an X keysym | 81 | ("\e[V" [S-page]) ;; Not an X keysym |
| 82 | )) | 82 | ("\eS" [send]) ;; Not an X keysym |
| 83 | 83 | ("\e5" [S-send]) ;; Not an X keysym | |
| 84 | ;; The numeric keypad keys. | 84 | )) |
| 85 | (let ((i 0)) | 85 | |
| 86 | (while (< i 10) | 86 | ;; The numeric keypad keys. |
| 87 | (define-key function-key-map | 87 | (let ((i 0)) |
| 88 | (format "\eO%c" (+ i ?p)) | 88 | (while (< i 10) |
| 89 | (vector (intern (format "kp-%d" i)))) | 89 | (define-key function-key-map |
| 90 | (setq i (1+ i)))) | 90 | (format "\eO%c" (+ i ?p)) |
| 91 | ;; The numbered function keys. | 91 | (vector (intern (format "kp-%d" i)))) |
| 92 | (let ((i 0)) | 92 | (setq i (1+ i)))) |
| 93 | (while (< i 16) | 93 | ;; The numbered function keys. |
| 94 | (define-key function-key-map | 94 | (let ((i 0)) |
| 95 | (format "\e?%c" (+ i ?a)) | 95 | (while (< i 16) |
| 96 | (vector (intern (format "f%d" (1+ i))))) | 96 | (define-key function-key-map |
| 97 | (define-key function-key-map | 97 | (format "\e?%c" (+ i ?a)) |
| 98 | (format "\e?%c" (+ i ?A)) | 98 | (vector (intern (format "f%d" (1+ i))))) |
| 99 | (vector (intern (format "S-f%d" (1+ i))))) | 99 | (define-key function-key-map |
| 100 | (setq i (1+ i)))) | 100 | (format "\e?%c" (+ i ?A)) |
| 101 | 101 | (vector (intern (format "S-f%d" (1+ i))))) | |
| 102 | (setq i (1+ i)))) | ||
| 103 | |||
| 104 | (tvi970-set-keypad-mode 1)) | ||
| 102 | 105 | ||
| 103 | ;;; Should keypad numbers send ordinary digits or distinct escape sequences? | 106 | ;;; Should keypad numbers send ordinary digits or distinct escape sequences? |
| 104 | (defvar tvi970-keypad-numeric nil | 107 | (defvar tvi970-keypad-numeric nil |
| @@ -121,7 +124,5 @@ With a negative argument, select numeric keypad mode." | |||
| 121 | (> (prefix-numeric-value arg) 0))) | 124 | (> (prefix-numeric-value arg) 0))) |
| 122 | (send-string-to-terminal (if tvi970-keypad-numeric "\e=" "\e>"))) | 125 | (send-string-to-terminal (if tvi970-keypad-numeric "\e=" "\e>"))) |
| 123 | 126 | ||
| 124 | (tvi970-set-keypad-mode 1) | ||
| 125 | |||
| 126 | ;;; arch-tag: c1334cf0-1462-41c3-a963-c077d175f8f0 | 127 | ;;; arch-tag: c1334cf0-1462-41c3-a963-c077d175f8f0 |
| 127 | ;;; tvi970.el ends here | 128 | ;;; tvi970.el ends here |
diff --git a/lisp/term/vt100.el b/lisp/term/vt100.el index dfe011c0f6e..6b44e941813 100644 --- a/lisp/term/vt100.el +++ b/lisp/term/vt100.el | |||
| @@ -36,8 +36,12 @@ | |||
| 36 | ;;; Code: | 36 | ;;; Code: |
| 37 | 37 | ||
| 38 | ;; Set up function-key-map entries that termcap and terminfo don't know. | 38 | ;; Set up function-key-map entries that termcap and terminfo don't know. |
| 39 | (load "term/lk201" nil t) | ||
| 40 | 39 | ||
| 40 | |||
| 41 | (defun terminal-init-vt100 () | ||
| 42 | "Terminal initialization function for vt100." | ||
| 43 | (load "term/lk201" nil t)) | ||
| 44 | |||
| 41 | ;;; Controlling the screen width. | 45 | ;;; Controlling the screen width. |
| 42 | (defvar vt100-wide-mode (= (frame-width) 132) | 46 | (defvar vt100-wide-mode (= (frame-width) 132) |
| 43 | "t if vt100 is in 132-column mode.") | 47 | "t if vt100 is in 132-column mode.") |
diff --git a/lisp/term/vt102.el b/lisp/term/vt102.el index 887f63837eb..ad780ed5081 100644 --- a/lisp/term/vt102.el +++ b/lisp/term/vt102.el | |||
| @@ -1,6 +1,8 @@ | |||
| 1 | ;; -*- no-byte-compile: t -*- | 1 | ;; -*- no-byte-compile: t -*- |
| 2 | 2 | ||
| 3 | (load "term/vt100" nil t) | 3 | (defun terminal-init-vt102 () |
| 4 | "Terminal initialization function for vt102." | ||
| 5 | (load "term/vt100" nil t)) | ||
| 4 | 6 | ||
| 5 | ;;; arch-tag: 6e839cfc-125a-4574-82f1-c23a51f7c50f | 7 | ;;; arch-tag: 6e839cfc-125a-4574-82f1-c23a51f7c50f |
| 6 | ;;; vt102.el ends here | 8 | ;;; vt102.el ends here |
diff --git a/lisp/term/vt125.el b/lisp/term/vt125.el index 458e0dafc22..2221e597aed 100644 --- a/lisp/term/vt125.el +++ b/lisp/term/vt125.el | |||
| @@ -1,6 +1,8 @@ | |||
| 1 | ;; -*- no-byte-compile: t -*- | 1 | ;; -*- no-byte-compile: t -*- |
| 2 | 2 | ||
| 3 | (load "term/vt100" nil t) | 3 | (defun terminal-init-vt125 () |
| 4 | "Terminal initialization function for vt125." | ||
| 5 | (load "term/vt100" nil t)) | ||
| 4 | 6 | ||
| 5 | ;;; arch-tag: 1d92d70f-dd55-4a1d-9088-e215a4883801 | 7 | ;;; arch-tag: 1d92d70f-dd55-4a1d-9088-e215a4883801 |
| 6 | ;;; vt125.el ends here | 8 | ;;; vt125.el ends here |
diff --git a/lisp/term/vt200.el b/lisp/term/vt200.el index 0ff0a30f567..e1215d15023 100644 --- a/lisp/term/vt200.el +++ b/lisp/term/vt200.el | |||
| @@ -1,10 +1,12 @@ | |||
| 1 | ;; -*- no-byte-compile: t -*- | 1 | ;; -*- no-byte-compile: t -*- |
| 2 | ;; For our purposes we can treat the vt200 and vt100 almost alike. | 2 | ;; For our purposes we can treat the vt200 and vt100 almost alike. |
| 3 | ;; Most differences are handled by the termcap entry. | 3 | ;; Most differences are handled by the termcap entry. |
| 4 | (load "term/vt100" nil t) | ||
| 5 | 4 | ||
| 6 | ;; Make F11 an escape key. | 5 | (defun terminal-init-vt200 () |
| 7 | (define-key function-key-map "\e[23~" [?\e]) | 6 | "Terminal initialization function for vt200." |
| 7 | (load "term/vt100" nil t) | ||
| 8 | ;; Make F11 an escape key. | ||
| 9 | (define-key function-key-map "\e[23~" [?\e])) | ||
| 8 | 10 | ||
| 9 | ;;; arch-tag: 0f78f583-9f32-4237-b106-28bcfff21d89 | 11 | ;;; arch-tag: 0f78f583-9f32-4237-b106-28bcfff21d89 |
| 10 | ;;; vt200.el ends here | 12 | ;;; vt200.el ends here |
diff --git a/lisp/term/vt201.el b/lisp/term/vt201.el index d7deeaf11c7..315030ab687 100644 --- a/lisp/term/vt201.el +++ b/lisp/term/vt201.el | |||
| @@ -1,10 +1,11 @@ | |||
| 1 | ;; -*- no-byte-compile: t -*- | 1 | ;; -*- no-byte-compile: t -*- |
| 2 | ;; For our purposes we can treat the vt200 and vt100 almost alike. | 2 | ;; For our purposes we can treat the vt200 and vt100 almost alike. |
| 3 | ;; Most differences are handled by the termcap entry. | 3 | ;; Most differences are handled by the termcap entry. |
| 4 | (load "term/vt100" nil t) | 4 | (defun terminal-init-vt201 () |
| 5 | 5 | "Terminal initialization function for vt201." | |
| 6 | ;; Make F11 an escape key. | 6 | (load "term/vt100" nil t) |
| 7 | (define-key function-key-map "\e[23~" [?\e]) | 7 | ;; Make F11 an escape key. |
| 8 | (define-key function-key-map "\e[23~" [?\e])) | ||
| 8 | 9 | ||
| 9 | ;;; arch-tag: a6abb38f-60ea-449e-a9e9-3fb8572c52ae | 10 | ;;; arch-tag: a6abb38f-60ea-449e-a9e9-3fb8572c52ae |
| 10 | ;;; vt201.el ends here | 11 | ;;; vt201.el ends here |
diff --git a/lisp/term/vt220.el b/lisp/term/vt220.el index 7ea1e3b57fa..cccd2a6dfb7 100644 --- a/lisp/term/vt220.el +++ b/lisp/term/vt220.el | |||
| @@ -1,10 +1,11 @@ | |||
| 1 | ;; -*- no-byte-compile: t -*- | 1 | ;; -*- no-byte-compile: t -*- |
| 2 | ;; For our purposes we can treat the vt200 and vt100 almost alike. | 2 | ;; For our purposes we can treat the vt200 and vt100 almost alike. |
| 3 | ;; Most differences are handled by the termcap entry. | 3 | ;; Most differences are handled by the termcap entry. |
| 4 | (load "term/vt100" nil t) | 4 | (defun terminal-init-vt220 () |
| 5 | 5 | "Terminal initialization function for vt220." | |
| 6 | ;; Make F11 an escape key. | 6 | (load "term/vt100" nil t) |
| 7 | (define-key function-key-map "\e[23~" [?\e]) | 7 | ;; Make F11 an escape key. |
| 8 | (define-key function-key-map "\e[23~" [?\e])) | ||
| 8 | 9 | ||
| 9 | ;;; arch-tag: 98fc4867-a20d-46a1-a276-d7be31e49871 | 10 | ;;; arch-tag: 98fc4867-a20d-46a1-a276-d7be31e49871 |
| 10 | ;;; vt220.el ends here | 11 | ;;; vt220.el ends here |
diff --git a/lisp/term/vt240.el b/lisp/term/vt240.el index 05f0bebe50f..bb3931edac8 100644 --- a/lisp/term/vt240.el +++ b/lisp/term/vt240.el | |||
| @@ -1,10 +1,11 @@ | |||
| 1 | ;; -*- no-byte-compile: t -*- | 1 | ;; -*- no-byte-compile: t -*- |
| 2 | ;; For our purposes we can treat the vt200 and vt100 almost alike. | 2 | ;; For our purposes we can treat the vt200 and vt100 almost alike. |
| 3 | ;; Most differences are handled by the termcap entry. | 3 | ;; Most differences are handled by the termcap entry. |
| 4 | (load "term/vt100" nil t) | 4 | (defun terminal-init-vt240 () |
| 5 | 5 | "Terminal initialization function for vt240." | |
| 6 | ;; Make F11 an escape key. | 6 | (load "term/vt100" nil t) |
| 7 | (define-key function-key-map "\e[23~" [?\e]) | 7 | ;; Make F11 an escape key. |
| 8 | (define-key function-key-map "\e[23~" [?\e])) | ||
| 8 | 9 | ||
| 9 | ;;; arch-tag: d9f88e9c-02dc-49ff-871c-a415f08e4eb7 | 10 | ;;; arch-tag: d9f88e9c-02dc-49ff-871c-a415f08e4eb7 |
| 10 | ;;; vt240.el ends here | 11 | ;;; vt240.el ends here |
diff --git a/lisp/term/vt300.el b/lisp/term/vt300.el index 871ed234bc6..ff600f47a1e 100644 --- a/lisp/term/vt300.el +++ b/lisp/term/vt300.el | |||
| @@ -1,8 +1,9 @@ | |||
| 1 | ;; -*- no-byte-compile: t -*- | 1 | ;; -*- no-byte-compile: t -*- |
| 2 | (load "term/vt100" nil t) | 2 | (defun terminal-init-vt300 () |
| 3 | 3 | "Terminal initialization function for vt300." | |
| 4 | ;; Make F11 an escape key. | 4 | (load "term/vt100" nil t) |
| 5 | (define-key function-key-map "\e[23~" [?\e]) | 5 | ;; Make F11 an escape key. |
| 6 | (define-key function-key-map "\e[23~" [?\e])) | ||
| 6 | 7 | ||
| 7 | ;;; arch-tag: 876831c9-a6f2-444a-b033-706e6fbc149f | 8 | ;;; arch-tag: 876831c9-a6f2-444a-b033-706e6fbc149f |
| 8 | ;;; vt300.el ends here | 9 | ;;; vt300.el ends here |
diff --git a/lisp/term/vt320.el b/lisp/term/vt320.el index c99b8672fc1..fb7772c7b5b 100644 --- a/lisp/term/vt320.el +++ b/lisp/term/vt320.el | |||
| @@ -1,8 +1,9 @@ | |||
| 1 | ;; -*- no-byte-compile: t -*- | 1 | ;; -*- no-byte-compile: t -*- |
| 2 | (load "term/vt100" nil t) | 2 | (defun terminal-init-vt320 () |
| 3 | 3 | "Terminal initialization function for vt320." | |
| 4 | ;; Make F11 an escape key. | 4 | (load "term/vt100" nil t) |
| 5 | (define-key function-key-map "\e[23~" [?\e]) | 5 | ;; Make F11 an escape key. |
| 6 | (define-key function-key-map "\e[23~" [?\e])) | ||
| 6 | 7 | ||
| 7 | ;;; arch-tag: f9f4c954-0b9e-45f9-b450-a320d32abd9c | 8 | ;;; arch-tag: f9f4c954-0b9e-45f9-b450-a320d32abd9c |
| 8 | ;;; vt320.el ends here | 9 | ;;; vt320.el ends here |
diff --git a/lisp/term/vt400.el b/lisp/term/vt400.el index 666266e2bf5..97c0c5d7372 100644 --- a/lisp/term/vt400.el +++ b/lisp/term/vt400.el | |||
| @@ -1,8 +1,9 @@ | |||
| 1 | ;; -*- no-byte-compile: t -*- | 1 | ;; -*- no-byte-compile: t -*- |
| 2 | (load "term/vt100" nil t) | 2 | (defun terminal-init-vt400 () |
| 3 | 3 | "Terminal initialization function for vt400." | |
| 4 | ;; Make F11 an escape key. | 4 | (load "term/vt100" nil t) |
| 5 | (define-key function-key-map "\e[23~" [?\e]) | 5 | ;; Make F11 an escape key. |
| 6 | (define-key function-key-map "\e[23~" [?\e])) | ||
| 6 | 7 | ||
| 7 | ;;; arch-tag: a70809c5-6b21-42cc-ba20-536683e5e7d5 | 8 | ;;; arch-tag: a70809c5-6b21-42cc-ba20-536683e5e7d5 |
| 8 | ;;; vt400.el ends here | 9 | ;;; vt400.el ends here |
diff --git a/lisp/term/vt420.el b/lisp/term/vt420.el index 9ed5fbe135b..65ffa759c17 100644 --- a/lisp/term/vt420.el +++ b/lisp/term/vt420.el | |||
| @@ -1,8 +1,9 @@ | |||
| 1 | ;; -*- no-byte-compile: t -*- | 1 | ;; -*- no-byte-compile: t -*- |
| 2 | (load "term/vt100" nil t) | 2 | (defun terminal-init-vt420 () |
| 3 | 3 | "Terminal initialization function for vt420." | |
| 4 | ;; Make F11 an escape key. | 4 | (load "term/vt100" nil t) |
| 5 | (define-key function-key-map "\e[23~" [?\e]) | 5 | ;; Make F11 an escape key. |
| 6 | (define-key function-key-map "\e[23~" [?\e])) | ||
| 6 | 7 | ||
| 7 | ;;; arch-tag: df2f897c-3a12-4b3c-9259-df089f96c160 | 8 | ;;; arch-tag: df2f897c-3a12-4b3c-9259-df089f96c160 |
| 8 | ;;; vt420.el ends here | 9 | ;;; vt420.el ends here |
diff --git a/lisp/term/wyse50.el b/lisp/term/wyse50.el index 562f5c728c0..64c489d7204 100644 --- a/lisp/term/wyse50.el +++ b/lisp/term/wyse50.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; wyse50.el --- terminal support code for Wyse 50 -*- no-byte-compile: t -*- | 1 | ;;; wyse50.el --- terminal support code for Wyse 50 -*- no-byte-compile: t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1989, 1993, 1994 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1989, 1993, 1994, 2005 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Daniel Pfeiffer <occitan@esperanto.org>, | 5 | ;; Author: Daniel Pfeiffer <occitan@esperanto.org>, |
| 6 | ;; Jim Blandy <jimb@occs.cs.oberlin.edu> | 6 | ;; Jim Blandy <jimb@occs.cs.oberlin.edu> |
| @@ -37,74 +37,92 @@ | |||
| 37 | 37 | ||
| 38 | ;;; Code: | 38 | ;;; Code: |
| 39 | 39 | ||
| 40 | (define-key function-key-map "\C-a" (make-keymap)) | 40 | (defun terminal-init-wyse50 () |
| 41 | (mapcar (function (lambda (key-definition) | 41 | "Terminal initialization function for wyse50." |
| 42 | (define-key function-key-map | 42 | (define-key function-key-map "\C-a" (make-keymap)) |
| 43 | (car key-definition) (nth 1 key-definition)))) | 43 | (mapcar (function (lambda (key-definition) |
| 44 | '( | 44 | (define-key function-key-map |
| 45 | ;; These might be set up by termcap and terminfo | 45 | (car key-definition) (nth 1 key-definition)))) |
| 46 | ("\C-k" [up]) | 46 | '( |
| 47 | ("\C-j" [down]) | 47 | ;; These might be set up by termcap and terminfo |
| 48 | ("\C-l" [right]) | 48 | ("\C-k" [up]) |
| 49 | ("\C-h" [left]) | 49 | ("\C-j" [down]) |
| 50 | ("\^a@\^m" [f1]) | 50 | ("\C-l" [right]) |
| 51 | ("\^aA\^m" [f2]) | 51 | ("\C-h" [left]) |
| 52 | ("\^aB\^m" [f3]) | 52 | ("\^a@\^m" [f1]) |
| 53 | ("\^aC\^m" [f4]) | 53 | ("\^aA\^m" [f2]) |
| 54 | ("\^aD\^m" [f5]) | 54 | ("\^aB\^m" [f3]) |
| 55 | ("\^aE\^m" [f6]) | 55 | ("\^aC\^m" [f4]) |
| 56 | ("\^aF\^m" [f7]) | 56 | ("\^aD\^m" [f5]) |
| 57 | ("\^aG\^m" [f8]) | 57 | ("\^aE\^m" [f6]) |
| 58 | ("\^aH\^m" [f9]) | 58 | ("\^aF\^m" [f7]) |
| 59 | 59 | ("\^aG\^m" [f8]) | |
| 60 | ;; These might be set up by terminfo | 60 | ("\^aH\^m" [f9]) |
| 61 | ("\eK" [next]) | 61 | |
| 62 | ("\eT" [clearline]) | 62 | ;; These might be set up by terminfo |
| 63 | ("\^^" [home]) | 63 | ("\eK" [next]) |
| 64 | ("\e\^^" [end]) | 64 | ("\eT" [clearline]) |
| 65 | ("\eQ" [insert]) | 65 | ("\^^" [home]) |
| 66 | ("\eE" [insertline]) | 66 | ("\e\^^" [end]) |
| 67 | ("\eR" [deleteline]) | 67 | ("\eQ" [insert]) |
| 68 | ("\eP" [print]) | 68 | ("\eE" [insertline]) |
| 69 | ("\er" [replace]) | 69 | ("\eR" [deleteline]) |
| 70 | ("\^aI\^m" [f10]) | 70 | ("\eP" [print]) |
| 71 | ("\^aJ\^m" [f11]) | 71 | ("\er" [replace]) |
| 72 | ("\^aK\^m" [f12]) | 72 | ("\^aI\^m" [f10]) |
| 73 | ("\^aL\^m" [f13]) | 73 | ("\^aJ\^m" [f11]) |
| 74 | ("\^aM\^m" [f14]) | 74 | ("\^aK\^m" [f12]) |
| 75 | ("\^aN\^m" [f15]) | 75 | ("\^aL\^m" [f13]) |
| 76 | ("\^aO\^m" [f16]) | 76 | ("\^aM\^m" [f14]) |
| 77 | ("\^a`\^m" [f17]) | 77 | ("\^aN\^m" [f15]) |
| 78 | ("\^aa\^m" [f18]) | 78 | ("\^aO\^m" [f16]) |
| 79 | ("\^ab\^m" [f19]) | 79 | ("\^a`\^m" [f17]) |
| 80 | ("\^ac\^m" [f20]) | 80 | ("\^aa\^m" [f18]) |
| 81 | ("\^ad\^m" [f21]) | 81 | ("\^ab\^m" [f19]) |
| 82 | ("\^ae\^m" [f22]) | 82 | ("\^ac\^m" [f20]) |
| 83 | ("\^af\^m" [f23]) | 83 | ("\^ad\^m" [f21]) |
| 84 | ("\^ag\^m" [f24]) | 84 | ("\^ae\^m" [f22]) |
| 85 | ("\^ah\^m" [f25]) | 85 | ("\^af\^m" [f23]) |
| 86 | ("\^ai\^m" [f26]) | 86 | ("\^ag\^m" [f24]) |
| 87 | ("\^aj\^m" [f27]) | 87 | ("\^ah\^m" [f25]) |
| 88 | ("\^ak\^m" [f28]) | 88 | ("\^ai\^m" [f26]) |
| 89 | ("\^al\^m" [f29]) | 89 | ("\^aj\^m" [f27]) |
| 90 | ("\^am\^m" [f30]) | 90 | ("\^ak\^m" [f28]) |
| 91 | ("\^an\^m" [f31]) | 91 | ("\^al\^m" [f29]) |
| 92 | ("\^ao\^m" [f32]) | 92 | ("\^am\^m" [f30]) |
| 93 | 93 | ("\^an\^m" [f31]) | |
| 94 | ;; Terminfo may know about these, but X won't | 94 | ("\^ao\^m" [f32]) |
| 95 | ("\eI" [key-stab]) ;; Not an X keysym | 95 | |
| 96 | ("\eJ" [key-snext]) ;; Not an X keysym | 96 | ;; Terminfo may know about these, but X won't |
| 97 | ("\eY" [key-clear]) ;; Not an X keysym | 97 | ("\eI" [key-stab]) ;; Not an X keysym |
| 98 | 98 | ("\eJ" [key-snext]) ;; Not an X keysym | |
| 99 | ;; These are totally strange :-) | 99 | ("\eY" [key-clear]) ;; Not an X keysym |
| 100 | ("\eW" [?\C-?]) ;; Not an X keysym | 100 | |
| 101 | ("\^a\^k\^m" [funct-up]) ;; Not an X keysym | 101 | ;; These are totally strange :-) |
| 102 | ("\^a\^j\^m" [funct-down]) ;; Not an X keysym | 102 | ("\eW" [?\C-?]) ;; Not an X keysym |
| 103 | ("\^a\^l\^m" [funct-right]) ;; Not an X keysym | 103 | ("\^a\^k\^m" [funct-up]) ;; Not an X keysym |
| 104 | ("\^a\^h\^m" [funct-left]) ;; Not an X keysym | 104 | ("\^a\^j\^m" [funct-down]) ;; Not an X keysym |
| 105 | ("\^a\^m\^m" [funct-return]) ;; Not an X keysym | 105 | ("\^a\^l\^m" [funct-right]) ;; Not an X keysym |
| 106 | ("\^a\^i\^m" [funct-tab]) ;; Not an X keysym | 106 | ("\^a\^h\^m" [funct-left]) ;; Not an X keysym |
| 107 | )) | 107 | ("\^a\^m\^m" [funct-return]) ;; Not an X keysym |
| 108 | ("\^a\^i\^m" [funct-tab]) ;; Not an X keysym | ||
| 109 | )) | ||
| 110 | |||
| 111 | ;; Miscellaneous hacks | ||
| 112 | |||
| 113 | ;; This is an ugly hack for a nasty problem: | ||
| 114 | ;; Wyse 50 takes one character cell to store video attributes (which seems to | ||
| 115 | ;; explain width 79 rather than 80, column 1 is not used!!!). | ||
| 116 | ;; On killing (C-x C-c) the end inverse code (on column 1 of line 24) | ||
| 117 | ;; of the mode line is overwritten AFTER all the y-or-n questions. | ||
| 118 | ;; This causes the attribute to remain in effect until the mode line has | ||
| 119 | ;; scrolled of the screen. Suspending (C-z) does not cause this problem. | ||
| 120 | ;; On such terminals, Emacs should sacrifice the first and last character of | ||
| 121 | ;; each mode line, rather than a whole screen column! | ||
| 122 | (add-hook 'kill-emacs-hook | ||
| 123 | (function (lambda () (interactive) | ||
| 124 | (send-string-to-terminal | ||
| 125 | (concat "\ea23R" (1+ (frame-width)) "C\eG0")))))) | ||
| 108 | 126 | ||
| 109 | (defun enable-arrow-keys () | 127 | (defun enable-arrow-keys () |
| 110 | "To be called by term-setup-hook. Overrides 6 Emacs standard keys | 128 | "To be called by term-setup-hook. Overrides 6 Emacs standard keys |
| @@ -131,22 +149,5 @@ M-r M-x move-to-window-line, Funct up-arrow or down-arrow are similar | |||
| 131 | ("\er" nil))) | 149 | ("\er" nil))) |
| 132 | (fset 'enable-arrow-keys nil)) | 150 | (fset 'enable-arrow-keys nil)) |
| 133 | 151 | ||
| 134 | |||
| 135 | ;;; Miscellaneous hacks | ||
| 136 | |||
| 137 | ;;; This is an ugly hack for a nasty problem: | ||
| 138 | ;;; Wyse 50 takes one character cell to store video attributes (which seems to | ||
| 139 | ;;; explain width 79 rather than 80, column 1 is not used!!!). | ||
| 140 | ;;; On killing (C-x C-c) the end inverse code (on column 1 of line 24) | ||
| 141 | ;;; of the mode line is overwritten AFTER all the y-or-n questions. | ||
| 142 | ;;; This causes the attribute to remain in effect until the mode line has | ||
| 143 | ;;; scrolled of the screen. Suspending (C-z) does not cause this problem. | ||
| 144 | ;;; On such terminals, Emacs should sacrifice the first and last character of | ||
| 145 | ;;; each mode line, rather than a whole screen column! | ||
| 146 | (add-hook 'kill-emacs-hook | ||
| 147 | (function (lambda () (interactive) | ||
| 148 | (send-string-to-terminal | ||
| 149 | (concat "\ea23R" (1+ (frame-width)) "C\eG0"))))) | ||
| 150 | |||
| 151 | ;;; arch-tag: b6a05d37-eead-4cf6-b997-0f956c68881c | 152 | ;;; arch-tag: b6a05d37-eead-4cf6-b997-0f956c68881c |
| 152 | ;;; wyse50.el ends here | 153 | ;;; wyse50.el ends here |
diff --git a/lisp/term/xterm.el b/lisp/term/xterm.el index 1d700b727d3..d0c26aa4b94 100644 --- a/lisp/term/xterm.el +++ b/lisp/term/xterm.el | |||
| @@ -26,229 +26,238 @@ | |||
| 26 | 26 | ||
| 27 | ;;; Code: | 27 | ;;; Code: |
| 28 | 28 | ||
| 29 | ;;; rxvt terminals sometimes set the TERM variable to "xterm", but | 29 | (defun terminal-init-xterm () |
| 30 | ;;; rxvt's keybindings that are incompatible with xterm's. It is | 30 | "Terminal initialization function for xterm." |
| 31 | ;;; better in that case to load rxvt's terminal initialization file. | 31 | ;; rxvt terminals sometimes set the TERM variable to "xterm", but |
| 32 | (if (and (getenv "COLORTERM") | 32 | ;; rxvt's keybindings that are incompatible with xterm's. It is |
| 33 | (string-match "\\`rxvt" (getenv "COLORTERM"))) | 33 | ;; better in that case to use rxvt's initializion function. |
| 34 | (load "term/rxvt") | 34 | (if (and (getenv "COLORTERM") |
| 35 | 35 | (string-match "\\`rxvt" (getenv "COLORTERM"))) | |
| 36 | ;;; The terminal intialization C code file might have initialized | 36 | (progn |
| 37 | ;;; function keys F13->F60 from the termcap/terminfo information. On | 37 | (load "term/rxvt") |
| 38 | ;;; a PC-style keyboard these keys correspond to | 38 | (terminal-init-rxvt)) |
| 39 | ;;; MODIFIER-FUNCTION_KEY, where modifier is S-, C, A-, C-S-. The | 39 | |
| 40 | ;;; code here subsitutes the corresponding defintions in | 40 | ;; The terminal intialization C code file might have initialized |
| 41 | ;;; function-key-map. This substitution is needed because if a key | 41 | ;; function keys F13->F60 from the termcap/terminfo information. On |
| 42 | ;;; definition if found in function-key-map, there are no further | 42 | ;; a PC-style keyboard these keys correspond to |
| 43 | ;;; lookups in other keymaps. | 43 | ;; MODIFIER-FUNCTION_KEY, where modifier is S-, C, A-, C-S-. The |
| 44 | (substitute-key-definition [f13] [S-f1] function-key-map) | 44 | ;; code here subsitutes the corresponding defintions in |
| 45 | (substitute-key-definition [f14] [S-f2] function-key-map) | 45 | ;; function-key-map. This substitution is needed because if a key |
| 46 | (substitute-key-definition [f15] [S-f3] function-key-map) | 46 | ;; definition if found in function-key-map, there are no further |
| 47 | (substitute-key-definition [f16] [S-f4] function-key-map) | 47 | ;; lookups in other keymaps. |
| 48 | (substitute-key-definition [f17] [S-f5] function-key-map) | 48 | (substitute-key-definition [f13] [S-f1] function-key-map) |
| 49 | (substitute-key-definition [f18] [S-f6] function-key-map) | 49 | (substitute-key-definition [f14] [S-f2] function-key-map) |
| 50 | (substitute-key-definition [f19] [S-f7] function-key-map) | 50 | (substitute-key-definition [f15] [S-f3] function-key-map) |
| 51 | (substitute-key-definition [f20] [S-f8] function-key-map) | 51 | (substitute-key-definition [f16] [S-f4] function-key-map) |
| 52 | (substitute-key-definition [f21] [S-f9] function-key-map) | 52 | (substitute-key-definition [f17] [S-f5] function-key-map) |
| 53 | (substitute-key-definition [f22] [S-f10] function-key-map) | 53 | (substitute-key-definition [f18] [S-f6] function-key-map) |
| 54 | (substitute-key-definition [f23] [S-f11] function-key-map) | 54 | (substitute-key-definition [f19] [S-f7] function-key-map) |
| 55 | (substitute-key-definition [f24] [S-f12] function-key-map) | 55 | (substitute-key-definition [f20] [S-f8] function-key-map) |
| 56 | 56 | (substitute-key-definition [f21] [S-f9] function-key-map) | |
| 57 | (substitute-key-definition [f25] [C-f1] function-key-map) | 57 | (substitute-key-definition [f22] [S-f10] function-key-map) |
| 58 | (substitute-key-definition [f26] [C-f2] function-key-map) | 58 | (substitute-key-definition [f23] [S-f11] function-key-map) |
| 59 | (substitute-key-definition [f27] [C-f3] function-key-map) | 59 | (substitute-key-definition [f24] [S-f12] function-key-map) |
| 60 | (substitute-key-definition [f28] [C-f4] function-key-map) | 60 | |
| 61 | (substitute-key-definition [f29] [C-f5] function-key-map) | 61 | (substitute-key-definition [f25] [C-f1] function-key-map) |
| 62 | (substitute-key-definition [f30] [C-f6] function-key-map) | 62 | (substitute-key-definition [f26] [C-f2] function-key-map) |
| 63 | (substitute-key-definition [f31] [C-f7] function-key-map) | 63 | (substitute-key-definition [f27] [C-f3] function-key-map) |
| 64 | (substitute-key-definition [f32] [C-f8] function-key-map) | 64 | (substitute-key-definition [f28] [C-f4] function-key-map) |
| 65 | (substitute-key-definition [f33] [C-f9] function-key-map) | 65 | (substitute-key-definition [f29] [C-f5] function-key-map) |
| 66 | (substitute-key-definition [f34] [C-f10] function-key-map) | 66 | (substitute-key-definition [f30] [C-f6] function-key-map) |
| 67 | (substitute-key-definition [f35] [C-f11] function-key-map) | 67 | (substitute-key-definition [f31] [C-f7] function-key-map) |
| 68 | (substitute-key-definition [f36] [C-f12] function-key-map) | 68 | (substitute-key-definition [f32] [C-f8] function-key-map) |
| 69 | 69 | (substitute-key-definition [f33] [C-f9] function-key-map) | |
| 70 | (substitute-key-definition [f37] [C-S-f1] function-key-map) | 70 | (substitute-key-definition [f34] [C-f10] function-key-map) |
| 71 | (substitute-key-definition [f38] [C-S-f2] function-key-map) | 71 | (substitute-key-definition [f35] [C-f11] function-key-map) |
| 72 | (substitute-key-definition [f39] [C-S-f3] function-key-map) | 72 | (substitute-key-definition [f36] [C-f12] function-key-map) |
| 73 | (substitute-key-definition [f40] [C-S-f4] function-key-map) | 73 | |
| 74 | (substitute-key-definition [f41] [C-S-f5] function-key-map) | 74 | (substitute-key-definition [f37] [C-S-f1] function-key-map) |
| 75 | (substitute-key-definition [f42] [C-S-f6] function-key-map) | 75 | (substitute-key-definition [f38] [C-S-f2] function-key-map) |
| 76 | (substitute-key-definition [f43] [C-S-f7] function-key-map) | 76 | (substitute-key-definition [f39] [C-S-f3] function-key-map) |
| 77 | (substitute-key-definition [f44] [C-S-f8] function-key-map) | 77 | (substitute-key-definition [f40] [C-S-f4] function-key-map) |
| 78 | (substitute-key-definition [f45] [C-S-f9] function-key-map) | 78 | (substitute-key-definition [f41] [C-S-f5] function-key-map) |
| 79 | (substitute-key-definition [f46] [C-S-f10] function-key-map) | 79 | (substitute-key-definition [f42] [C-S-f6] function-key-map) |
| 80 | (substitute-key-definition [f47] [C-S-f11] function-key-map) | 80 | (substitute-key-definition [f43] [C-S-f7] function-key-map) |
| 81 | (substitute-key-definition [f48] [C-S-f12] function-key-map) | 81 | (substitute-key-definition [f44] [C-S-f8] function-key-map) |
| 82 | 82 | (substitute-key-definition [f45] [C-S-f9] function-key-map) | |
| 83 | (substitute-key-definition [f49] [A-f1] function-key-map) | 83 | (substitute-key-definition [f46] [C-S-f10] function-key-map) |
| 84 | (substitute-key-definition [f50] [A-f2] function-key-map) | 84 | (substitute-key-definition [f47] [C-S-f11] function-key-map) |
| 85 | (substitute-key-definition [f51] [A-f3] function-key-map) | 85 | (substitute-key-definition [f48] [C-S-f12] function-key-map) |
| 86 | (substitute-key-definition [f52] [A-f4] function-key-map) | 86 | |
| 87 | (substitute-key-definition [f53] [A-f5] function-key-map) | 87 | (substitute-key-definition [f49] [A-f1] function-key-map) |
| 88 | (substitute-key-definition [f54] [A-f6] function-key-map) | 88 | (substitute-key-definition [f50] [A-f2] function-key-map) |
| 89 | (substitute-key-definition [f55] [A-f7] function-key-map) | 89 | (substitute-key-definition [f51] [A-f3] function-key-map) |
| 90 | (substitute-key-definition [f56] [A-f8] function-key-map) | 90 | (substitute-key-definition [f52] [A-f4] function-key-map) |
| 91 | (substitute-key-definition [f57] [A-f9] function-key-map) | 91 | (substitute-key-definition [f53] [A-f5] function-key-map) |
| 92 | (substitute-key-definition [f58] [A-f10] function-key-map) | 92 | (substitute-key-definition [f54] [A-f6] function-key-map) |
| 93 | (substitute-key-definition [f59] [A-f11] function-key-map) | 93 | (substitute-key-definition [f55] [A-f7] function-key-map) |
| 94 | (substitute-key-definition [f60] [A-f12] function-key-map) | 94 | (substitute-key-definition [f56] [A-f8] function-key-map) |
| 95 | 95 | (substitute-key-definition [f57] [A-f9] function-key-map) | |
| 96 | (let ((map (make-sparse-keymap))) | 96 | (substitute-key-definition [f58] [A-f10] function-key-map) |
| 97 | (define-key map "\e[A" [up]) | 97 | (substitute-key-definition [f59] [A-f11] function-key-map) |
| 98 | (define-key map "\e[B" [down]) | 98 | (substitute-key-definition [f60] [A-f12] function-key-map) |
| 99 | (define-key map "\e[C" [right]) | 99 | |
| 100 | (define-key map "\e[D" [left]) | 100 | (let ((map (make-sparse-keymap))) |
| 101 | (define-key map "\e[1~" [home]) | 101 | (define-key map "\e[A" [up]) |
| 102 | (define-key map "\e[2~" [insert]) | 102 | (define-key map "\e[B" [down]) |
| 103 | (define-key map "\e[3~" [delete]) | 103 | (define-key map "\e[C" [right]) |
| 104 | (define-key map "\e[4~" [select]) | 104 | (define-key map "\e[D" [left]) |
| 105 | (define-key map "\e[5~" [prior]) | 105 | (define-key map "\e[1~" [home]) |
| 106 | (define-key map "\e[6~" [next]) | 106 | (define-key map "\e[2~" [insert]) |
| 107 | (define-key map "\e[11~" [f1]) | 107 | (define-key map "\e[3~" [delete]) |
| 108 | (define-key map "\e[12~" [f2]) | 108 | (define-key map "\e[4~" [select]) |
| 109 | (define-key map "\e[13~" [f3]) | 109 | (define-key map "\e[5~" [prior]) |
| 110 | (define-key map "\e[14~" [f4]) | 110 | (define-key map "\e[6~" [next]) |
| 111 | (define-key map "\e[15~" [f5]) | 111 | (define-key map "\e[11~" [f1]) |
| 112 | (define-key map "\e[17~" [f6]) | 112 | (define-key map "\e[12~" [f2]) |
| 113 | (define-key map "\e[18~" [f7]) | 113 | (define-key map "\e[13~" [f3]) |
| 114 | (define-key map "\e[19~" [f8]) | 114 | (define-key map "\e[14~" [f4]) |
| 115 | (define-key map "\e[20~" [f9]) | 115 | (define-key map "\e[15~" [f5]) |
| 116 | (define-key map "\e[21~" [f10]) | 116 | (define-key map "\e[17~" [f6]) |
| 117 | (define-key map "\e[23~" [f11]) | 117 | (define-key map "\e[18~" [f7]) |
| 118 | (define-key map "\e[24~" [f12]) | 118 | (define-key map "\e[19~" [f8]) |
| 119 | (define-key map "\e[29~" [print]) | 119 | (define-key map "\e[20~" [f9]) |
| 120 | 120 | (define-key map "\e[21~" [f10]) | |
| 121 | (define-key map "\eOP" [f1]) | 121 | (define-key map "\e[23~" [f11]) |
| 122 | (define-key map "\eOQ" [f2]) | 122 | (define-key map "\e[24~" [f12]) |
| 123 | (define-key map "\eOR" [f3]) | 123 | (define-key map "\e[29~" [print]) |
| 124 | (define-key map "\eOS" [f4]) | 124 | |
| 125 | 125 | (define-key map "\eOP" [f1]) | |
| 126 | (define-key map "\eO2P" [S-f1]) | 126 | (define-key map "\eOQ" [f2]) |
| 127 | (define-key map "\eO2Q" [S-f2]) | 127 | (define-key map "\eOR" [f3]) |
| 128 | (define-key map "\eO2R" [S-f3]) | 128 | (define-key map "\eOS" [f4]) |
| 129 | (define-key map "\eO2S" [S-f4]) | 129 | |
| 130 | (define-key map "\e[15;2~" [S-f5]) | 130 | (define-key map "\eO2P" [S-f1]) |
| 131 | (define-key map "\e[17;2~" [S-f6]) | 131 | (define-key map "\eO2Q" [S-f2]) |
| 132 | (define-key map "\e[18;2~" [S-f7]) | 132 | (define-key map "\eO2R" [S-f3]) |
| 133 | (define-key map "\e[19;2~" [S-f8]) | 133 | (define-key map "\eO2S" [S-f4]) |
| 134 | (define-key map "\e[20;2~" [S-f9]) | 134 | (define-key map "\e[15;2~" [S-f5]) |
| 135 | (define-key map "\e[21;2~" [S-f10]) | 135 | (define-key map "\e[17;2~" [S-f6]) |
| 136 | (define-key map "\e[23;2~" [S-f11]) | 136 | (define-key map "\e[18;2~" [S-f7]) |
| 137 | (define-key map "\e[24;2~" [S-f12]) | 137 | (define-key map "\e[19;2~" [S-f8]) |
| 138 | 138 | (define-key map "\e[20;2~" [S-f9]) | |
| 139 | (define-key map "\eO5P" [C-f1]) | 139 | (define-key map "\e[21;2~" [S-f10]) |
| 140 | (define-key map "\eO5Q" [C-f2]) | 140 | (define-key map "\e[23;2~" [S-f11]) |
| 141 | (define-key map "\eO5R" [C-f3]) | 141 | (define-key map "\e[24;2~" [S-f12]) |
| 142 | (define-key map "\eO5S" [C-f4]) | 142 | |
| 143 | (define-key map "\e[15;5~" [C-f5]) | 143 | (define-key map "\eO5P" [C-f1]) |
| 144 | (define-key map "\e[17;5~" [C-f6]) | 144 | (define-key map "\eO5Q" [C-f2]) |
| 145 | (define-key map "\e[18;5~" [C-f7]) | 145 | (define-key map "\eO5R" [C-f3]) |
| 146 | (define-key map "\e[19;5~" [C-f8]) | 146 | (define-key map "\eO5S" [C-f4]) |
| 147 | (define-key map "\e[20;5~" [C-f9]) | 147 | (define-key map "\e[15;5~" [C-f5]) |
| 148 | (define-key map "\e[21;5~" [C-f10]) | 148 | (define-key map "\e[17;5~" [C-f6]) |
| 149 | (define-key map "\e[23;5~" [C-f11]) | 149 | (define-key map "\e[18;5~" [C-f7]) |
| 150 | (define-key map "\e[24;5~" [C-f12]) | 150 | (define-key map "\e[19;5~" [C-f8]) |
| 151 | 151 | (define-key map "\e[20;5~" [C-f9]) | |
| 152 | (define-key map "\eO6P" [C-S-f1]) | 152 | (define-key map "\e[21;5~" [C-f10]) |
| 153 | (define-key map "\eO6Q" [C-S-f2]) | 153 | (define-key map "\e[23;5~" [C-f11]) |
| 154 | (define-key map "\eO6R" [C-S-f3]) | 154 | (define-key map "\e[24;5~" [C-f12]) |
| 155 | (define-key map "\eO6S" [C-S-f4]) | 155 | |
| 156 | (define-key map "\e[15;6~" [C-S-f5]) | 156 | (define-key map "\eO6P" [C-S-f1]) |
| 157 | (define-key map "\e[17;6~" [C-S-f6]) | 157 | (define-key map "\eO6Q" [C-S-f2]) |
| 158 | (define-key map "\e[18;6~" [C-S-f7]) | 158 | (define-key map "\eO6R" [C-S-f3]) |
| 159 | (define-key map "\e[19;6~" [C-S-f8]) | 159 | (define-key map "\eO6S" [C-S-f4]) |
| 160 | (define-key map "\e[20;6~" [C-S-f9]) | 160 | (define-key map "\e[15;6~" [C-S-f5]) |
| 161 | (define-key map "\e[21;6~" [C-S-f10]) | 161 | (define-key map "\e[17;6~" [C-S-f6]) |
| 162 | (define-key map "\e[23;6~" [C-S-f11]) | 162 | (define-key map "\e[18;6~" [C-S-f7]) |
| 163 | (define-key map "\e[24;6~" [C-S-f12]) | 163 | (define-key map "\e[19;6~" [C-S-f8]) |
| 164 | 164 | (define-key map "\e[20;6~" [C-S-f9]) | |
| 165 | (define-key map "\eO3P" [A-f1]) | 165 | (define-key map "\e[21;6~" [C-S-f10]) |
| 166 | (define-key map "\eO3Q" [A-f2]) | 166 | (define-key map "\e[23;6~" [C-S-f11]) |
| 167 | (define-key map "\eO3R" [A-f3]) | 167 | (define-key map "\e[24;6~" [C-S-f12]) |
| 168 | (define-key map "\eO3S" [A-f4]) | 168 | |
| 169 | (define-key map "\e[15;3~" [A-f5]) | 169 | (define-key map "\eO3P" [A-f1]) |
| 170 | (define-key map "\e[17;3~" [A-f6]) | 170 | (define-key map "\eO3Q" [A-f2]) |
| 171 | (define-key map "\e[18;3~" [A-f7]) | 171 | (define-key map "\eO3R" [A-f3]) |
| 172 | (define-key map "\e[19;3~" [A-f8]) | 172 | (define-key map "\eO3S" [A-f4]) |
| 173 | (define-key map "\e[20;3~" [A-f9]) | 173 | (define-key map "\e[15;3~" [A-f5]) |
| 174 | (define-key map "\e[21;3~" [A-f10]) | 174 | (define-key map "\e[17;3~" [A-f6]) |
| 175 | (define-key map "\e[23;3~" [A-f11]) | 175 | (define-key map "\e[18;3~" [A-f7]) |
| 176 | (define-key map "\e[24;3~" [A-f12]) | 176 | (define-key map "\e[19;3~" [A-f8]) |
| 177 | 177 | (define-key map "\e[20;3~" [A-f9]) | |
| 178 | (define-key map "\e[1;2A" [S-up]) | 178 | (define-key map "\e[21;3~" [A-f10]) |
| 179 | (define-key map "\e[1;2B" [S-down]) | 179 | (define-key map "\e[23;3~" [A-f11]) |
| 180 | (define-key map "\e[1;2C" [S-right]) | 180 | (define-key map "\e[24;3~" [A-f12]) |
| 181 | (define-key map "\e[1;2D" [S-left]) | 181 | |
| 182 | (define-key map "\e[1;2F" [S-end]) | 182 | (define-key map "\e[1;2A" [S-up]) |
| 183 | (define-key map "\e[1;2H" [S-home]) | 183 | (define-key map "\e[1;2B" [S-down]) |
| 184 | 184 | (define-key map "\e[1;2C" [S-right]) | |
| 185 | (define-key map "\e[1;5A" [C-up]) | 185 | (define-key map "\e[1;2D" [S-left]) |
| 186 | (define-key map "\e[1;5B" [C-down]) | 186 | (define-key map "\e[1;2F" [S-end]) |
| 187 | (define-key map "\e[1;5C" [C-right]) | 187 | (define-key map "\e[1;2H" [S-home]) |
| 188 | (define-key map "\e[1;5D" [C-left]) | 188 | |
| 189 | (define-key map "\e[1;5F" [C-end]) | 189 | (define-key map "\e[1;5A" [C-up]) |
| 190 | (define-key map "\e[1;5H" [C-home]) | 190 | (define-key map "\e[1;5B" [C-down]) |
| 191 | 191 | (define-key map "\e[1;5C" [C-right]) | |
| 192 | (define-key map "\e[1;6A" [C-S-up]) | 192 | (define-key map "\e[1;5D" [C-left]) |
| 193 | (define-key map "\e[1;6B" [C-S-down]) | 193 | (define-key map "\e[1;5F" [C-end]) |
| 194 | (define-key map "\e[1;6C" [C-S-right]) | 194 | (define-key map "\e[1;5H" [C-home]) |
| 195 | (define-key map "\e[1;6D" [C-S-left]) | 195 | |
| 196 | (define-key map "\e[1;6F" [C-S-end]) | 196 | (define-key map "\e[1;6A" [C-S-up]) |
| 197 | (define-key map "\e[1;6H" [C-S-home]) | 197 | (define-key map "\e[1;6B" [C-S-down]) |
| 198 | 198 | (define-key map "\e[1;6C" [C-S-right]) | |
| 199 | (define-key map "\e[1;3A" [A-up]) | 199 | (define-key map "\e[1;6D" [C-S-left]) |
| 200 | (define-key map "\e[1;3B" [A-down]) | 200 | (define-key map "\e[1;6F" [C-S-end]) |
| 201 | (define-key map "\e[1;3C" [A-right]) | 201 | (define-key map "\e[1;6H" [C-S-home]) |
| 202 | (define-key map "\e[1;3D" [A-left]) | 202 | |
| 203 | (define-key map "\e[1;3F" [A-end]) | 203 | (define-key map "\e[1;3A" [A-up]) |
| 204 | (define-key map "\e[1;3H" [A-home]) | 204 | (define-key map "\e[1;3B" [A-down]) |
| 205 | 205 | (define-key map "\e[1;3C" [A-right]) | |
| 206 | (define-key map "\e[2;2~" [S-insert]) | 206 | (define-key map "\e[1;3D" [A-left]) |
| 207 | (define-key map "\e[3;2~" [S-delete]) | 207 | (define-key map "\e[1;3F" [A-end]) |
| 208 | (define-key map "\e[5;2~" [S-prior]) | 208 | (define-key map "\e[1;3H" [A-home]) |
| 209 | (define-key map "\e[6;2~" [S-next]) | 209 | |
| 210 | 210 | (define-key map "\e[2;2~" [S-insert]) | |
| 211 | (define-key map "\e[2;5~" [C-insert]) | 211 | (define-key map "\e[3;2~" [S-delete]) |
| 212 | (define-key map "\e[3;5~" [C-delete]) | 212 | (define-key map "\e[5;2~" [S-prior]) |
| 213 | (define-key map "\e[5;5~" [C-prior]) | 213 | (define-key map "\e[6;2~" [S-next]) |
| 214 | (define-key map "\e[6;5~" [C-next]) | 214 | |
| 215 | 215 | (define-key map "\e[2;5~" [C-insert]) | |
| 216 | (define-key map "\e[2;6~" [C-S-insert]) | 216 | (define-key map "\e[3;5~" [C-delete]) |
| 217 | (define-key map "\e[3;6~" [C-S-delete]) | 217 | (define-key map "\e[5;5~" [C-prior]) |
| 218 | (define-key map "\e[5;6~" [C-S-prior]) | 218 | (define-key map "\e[6;5~" [C-next]) |
| 219 | (define-key map "\e[6;6~" [C-S-next]) | 219 | |
| 220 | 220 | (define-key map "\e[2;6~" [C-S-insert]) | |
| 221 | (define-key map "\e[2;3~" [A-insert]) | 221 | (define-key map "\e[3;6~" [C-S-delete]) |
| 222 | (define-key map "\e[3;3~" [A-delete]) | 222 | (define-key map "\e[5;6~" [C-S-prior]) |
| 223 | (define-key map "\e[5;3~" [A-prior]) | 223 | (define-key map "\e[6;6~" [C-S-next]) |
| 224 | (define-key map "\e[6;3~" [A-next]) | 224 | |
| 225 | 225 | (define-key map "\e[2;3~" [A-insert]) | |
| 226 | (define-key map "\eOA" [up]) | 226 | (define-key map "\e[3;3~" [A-delete]) |
| 227 | (define-key map "\eOB" [down]) | 227 | (define-key map "\e[5;3~" [A-prior]) |
| 228 | (define-key map "\eOC" [right]) | 228 | (define-key map "\e[6;3~" [A-next]) |
| 229 | (define-key map "\eOD" [left]) | 229 | |
| 230 | (define-key map "\eOF" [end]) | 230 | (define-key map "\eOA" [up]) |
| 231 | (define-key map "\eOH" [home]) | 231 | (define-key map "\eOB" [down]) |
| 232 | 232 | (define-key map "\eOC" [right]) | |
| 233 | (define-key map "\eO2A" [S-up]) | 233 | (define-key map "\eOD" [left]) |
| 234 | (define-key map "\eO2B" [S-down]) | 234 | (define-key map "\eOF" [end]) |
| 235 | (define-key map "\eO2C" [S-right]) | 235 | (define-key map "\eOH" [home]) |
| 236 | (define-key map "\eO2D" [S-left]) | 236 | |
| 237 | (define-key map "\eO2F" [S-end]) | 237 | (define-key map "\eO2A" [S-up]) |
| 238 | (define-key map "\eO2H" [S-home]) | 238 | (define-key map "\eO2B" [S-down]) |
| 239 | 239 | (define-key map "\eO2C" [S-right]) | |
| 240 | (define-key map "\eO5A" [C-up]) | 240 | (define-key map "\eO2D" [S-left]) |
| 241 | (define-key map "\eO5B" [C-down]) | 241 | (define-key map "\eO2F" [S-end]) |
| 242 | (define-key map "\eO5C" [C-right]) | 242 | (define-key map "\eO2H" [S-home]) |
| 243 | (define-key map "\eO5D" [C-left]) | 243 | |
| 244 | (define-key map "\eO5F" [C-end]) | 244 | (define-key map "\eO5A" [C-up]) |
| 245 | (define-key map "\eO5H" [C-home]) | 245 | (define-key map "\eO5B" [C-down]) |
| 246 | 246 | (define-key map "\eO5C" [C-right]) | |
| 247 | ;; Use inheritance to let the main keymap override those defaults. | 247 | (define-key map "\eO5D" [C-left]) |
| 248 | ;; This way we don't override terminfo-derived settings or settings | 248 | (define-key map "\eO5F" [C-end]) |
| 249 | ;; made in the .emacs file. | 249 | (define-key map "\eO5H" [C-home]) |
| 250 | (set-keymap-parent map (keymap-parent function-key-map)) | 250 | |
| 251 | (set-keymap-parent function-key-map map)) | 251 | ;; Use inheritance to let the main keymap override those defaults. |
| 252 | ;; This way we don't override terminfo-derived settings or settings | ||
| 253 | ;; made in the .emacs file. | ||
| 254 | (set-keymap-parent map (keymap-parent function-key-map)) | ||
| 255 | (set-keymap-parent function-key-map map)) | ||
| 256 | |||
| 257 | ;; Do it! | ||
| 258 | (xterm-register-default-colors) | ||
| 259 | ;; This recomputes all the default faces given the colors we've just set up. | ||
| 260 | (tty-set-up-initial-frame-faces))) | ||
| 252 | 261 | ||
| 253 | ;; Set up colors, for those versions of xterm that support it. | 262 | ;; Set up colors, for those versions of xterm that support it. |
| 254 | (defvar xterm-standard-colors | 263 | (defvar xterm-standard-colors |
| @@ -366,11 +375,5 @@ versions of xterm." | |||
| 366 | ;; right colors, so clear them. | 375 | ;; right colors, so clear them. |
| 367 | (clear-face-cache))) | 376 | (clear-face-cache))) |
| 368 | 377 | ||
| 369 | ;; Do it! | ||
| 370 | (xterm-register-default-colors) | ||
| 371 | ;; This recomputes all the default faces given the colors we've just set up. | ||
| 372 | (tty-set-up-initial-frame-faces) | ||
| 373 | |||
| 374 | ) | ||
| 375 | ;; arch-tag: 12e7ebdd-1e6c-4b25-b0f9-35ace25e855a | 378 | ;; arch-tag: 12e7ebdd-1e6c-4b25-b0f9-35ace25e855a |
| 376 | ;;; xterm.el ends here | 379 | ;;; xterm.el ends here |