Mercurial > emacs
comparison lisp/term/sun.el @ 64651:af1c58687bdd
* 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.
author | Dan Nicolaescu <dann@ics.uci.edu> |
---|---|
date | Wed, 27 Jul 2005 18:02:08 +0000 |
parents | a8fa7c632ee4 |
children | 34bd8e434dd7 890cc78a5a24 |
comparison
equal
deleted
inserted
replaced
64650:82d9ac62ed1d | 64651:af1c58687bdd |
---|---|
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 |
7 | 7 |
8 ;; This file is part of GNU Emacs. | 8 ;; This file is part of GNU Emacs. |
91 ;; sunview picks up expose and open on the way UP, | 91 ;; sunview picks up expose and open on the way UP, |
92 ;; so we ignore them on the way down | 92 ;; so we ignore them on the way down |
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. |
151 | 99 |
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 | |
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 | 102 |
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} |
165 ;; | 106 ;; |
186 ;; Note: al, el and gl are trapped by EmacsTool, so they never make it here. | 127 ;; Note: al, el and gl are trapped by EmacsTool, so they never make it here. |
187 | 128 |
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. |
232 | 135 |
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. |
246 ;; | 142 ;; |
247 ;; First mouse blip is a clue that we are in emacstool. | 143 ;; First mouse blip is a clue that we are in emacstool. |
248 ;; | 144 ;; |
249 ;; C-x C-@ is the mouse command prefix. | 145 ;; C-x C-@ is the mouse command prefix. |
250 | 146 |
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) |
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)) | |
253 | 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. |
257 (require 'sun-fns) | 262 (require 'sun-fns) |
270 (defun sun-mouse-once () | 275 (defun sun-mouse-once () |
271 "Converts to emacstool and sun-mouse-handler on first mouse hit." | 276 "Converts to emacstool and sun-mouse-handler on first mouse hit." |
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 |