diff options
| author | Jim Blandy | 1991-12-20 07:15:37 +0000 |
|---|---|---|
| committer | Jim Blandy | 1991-12-20 07:15:37 +0000 |
| commit | cc0a8174baf4c25d69545fe5cd6cabddba6b1d2c (patch) | |
| tree | 571d3cff4372149149e4ddd84e484f97e3ab846f /lisp/term | |
| parent | 6367dc09a13bb1944db02f9f76ab25e4ccb159d6 (diff) | |
| download | emacs-cc0a8174baf4c25d69545fe5cd6cabddba6b1d2c.tar.gz emacs-cc0a8174baf4c25d69545fe5cd6cabddba6b1d2c.zip | |
*** empty log message ***
Diffstat (limited to 'lisp/term')
| -rw-r--r-- | lisp/term/news.el | 100 |
1 files changed, 35 insertions, 65 deletions
diff --git a/lisp/term/news.el b/lisp/term/news.el index 16b79e291c9..9a755000298 100644 --- a/lisp/term/news.el +++ b/lisp/term/news.el | |||
| @@ -18,68 +18,38 @@ | |||
| 18 | ;; file named COPYING. Among other things, the copyright notice | 18 | ;; file named COPYING. Among other things, the copyright notice |
| 19 | ;; and this notice must be preserved on all copies. | 19 | ;; and this notice must be preserved on all copies. |
| 20 | 20 | ||
| 21 | ;; This file effects a mapping from the raw escape sequences of various | 21 | ;; This file places entries in function-key-map for the raw escape |
| 22 | ;; keypad and function keys to the symbols used by emacs to represent | 22 | ;; sequences of various keypad and function keys, binding them to |
| 23 | ;; those keys. The mapping from key symbol to the function performed | 23 | ;; their symbolic forms. |
| 24 | ;; when that key is pressed is handled keyboard-independently by the file | 24 | |
| 25 | ;; ../keypad.el. | 25 | (define-prefix-command 'news-fkey-prefix 'news-fkey-map) |
| 26 | 26 | (define-key function-key-map "\eO" 'news-fkey-prefix) | |
| 27 | ;; Note that his file is also used under X11. For this to work, the variable | 27 | |
| 28 | ;; names must not change from keyboard file to keyboard file, nor can the | 28 | (define-key news-fkey-map "P" [f1]) |
| 29 | ;; structure of keypad-maps change. | 29 | (define-key news-fkey-map "Q" [f2]) |
| 30 | 30 | (define-key news-fkey-map "R" [f3]) | |
| 31 | (require 'keypad) | 31 | (define-key news-fkey-map "S" [f4]) |
| 32 | 32 | (define-key news-fkey-map "T" [f5]) | |
| 33 | (defvar keypads nil | 33 | (define-key news-fkey-map "U" [f6]) |
| 34 | "Keypad and function keys keymap for Sony News machine.") | 34 | (define-key news-fkey-map "V" [f7]) |
| 35 | 35 | (define-key news-fkey-map "W" [f8]) | |
| 36 | (defvar keypad-maps nil | 36 | (define-key news-fkey-map "X" [f9]) |
| 37 | "A list of strings sent by the keypad and function keys on the Sony News. | 37 | (define-key news-fkey-map "Y" [f10]) |
| 38 | There is an element for each unique prefix. Each element is of the form | 38 | (define-key news-fkey-map "m" [kp-subtract]) |
| 39 | (PREFIX map map ...), each map being (string . symbol).") | 39 | (define-key news-fkey-map "k" [kp-add]) |
| 40 | 40 | (define-key news-fkey-map "l" [kp-separator]) | |
| 41 | (setq keypad-maps '(("\eO" | 41 | (define-key news-fkey-map "n" [kp-period]) |
| 42 | ("P" . function-1) | 42 | (define-key news-fkey-map "M" [kp-enter]) |
| 43 | ("Q" . function-2) | 43 | (define-key news-fkey-map "p" [kp-0]) |
| 44 | ("R" . function-3) | 44 | (define-key news-fkey-map "q" [kp-1]) |
| 45 | ("S" . function-4) | 45 | (define-key news-fkey-map "r" [kp-2]) |
| 46 | ("T" . function-5) | 46 | (define-key news-fkey-map "s" [kp-3]) |
| 47 | ("U" . function-6) | 47 | (define-key news-fkey-map "t" [kp-4]) |
| 48 | ("V" . function-7) | 48 | (define-key news-fkey-map "u" [kp-5]) |
| 49 | ("W" . function-8) | 49 | (define-key news-fkey-map "v" [kp-6]) |
| 50 | ("X" . function-9) | 50 | (define-key news-fkey-map "w" [kp-7]) |
| 51 | ("Y" . function-10) | 51 | (define-key news-fkey-map "x" [kp-8]) |
| 52 | 52 | (define-key news-fkey-map "y" [kp-9]) | |
| 53 | ("m" . keypad-subtract) | 53 | (define-key news-fkey-map "a" [execute]) |
| 54 | ("k" . keypad-add) | 54 | (define-key news-fkey-map "b" [select]) |
| 55 | ("l" . keypad-comma) | 55 | (define-key news-fkey-map "c" [cancel]) |
| 56 | ("n" . keypad-period) | ||
| 57 | ("M" . keypad-enter) | ||
| 58 | |||
| 59 | ("p" . keypad-0) | ||
| 60 | ("q" . keypad-1) | ||
| 61 | ("r" . keypad-2) | ||
| 62 | ("s" . keypad-3) | ||
| 63 | ("t" . keypad-4) | ||
| 64 | ("u" . keypad-5) | ||
| 65 | ("v" . keypad-6) | ||
| 66 | ("w" . keypad-7) | ||
| 67 | ("x" . keypad-8) | ||
| 68 | ("y" . keypad-9) | ||
| 69 | |||
| 70 | ; These three strings are just made up. | ||
| 71 | ("a" . execute) ; enter | ||
| 72 | ("b" . select) ; nfer | ||
| 73 | ("c" . cancel)))) ; xfer | ||
| 74 | |||
| 75 | (let ((pads keypad-maps)) | ||
| 76 | (while pads | ||
| 77 | (unwind-protect | ||
| 78 | (let* ((prefix (car (car pads))) | ||
| 79 | (stringmap (cdr (car pads))) | ||
| 80 | (padmap (if (lookup-key global-map prefix) | ||
| 81 | (error "Keymap entry for keypad prefix already exisists") | ||
| 82 | (make-sparse-keymap)))) | ||
| 83 | (define-key global-map prefix padmap) | ||
| 84 | (setup-terminal-keymap padmap stringmap)) | ||
| 85 | (setq pads (cdr pads))))) | ||