aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2007-09-21 03:55:20 +0000
committerGlenn Morris2007-09-21 03:55:20 +0000
commitee7569157a1e29f78f4041b8e60b2cf68a1f533d (patch)
tree54d5541cf6fb61b6b601c8b027a72ec05b151615
parent4cefd10eead1587f788a99be537fa1300c47c9e5 (diff)
downloademacs-ee7569157a1e29f78f4041b8e60b2cf68a1f533d.tar.gz
emacs-ee7569157a1e29f78f4041b8e60b2cf68a1f533d.zip
Remove emacstool-related code.
-rw-r--r--lisp/term/sun.el117
1 files changed, 1 insertions, 116 deletions
diff --git a/lisp/term/sun.el b/lisp/term/sun.el
index 5743272d96a..ea7d9325f89 100644
--- a/lisp/term/sun.el
+++ b/lisp/term/sun.el
@@ -102,51 +102,6 @@
102 "List of forms to evaluate after setting sun-raw-prefix.") 102 "List of forms to evaluate after setting sun-raw-prefix.")
103 103
104 104
105;;; This section adds definitions for the emacstool users
106;; emacstool event filter converts function keys to C-x*{c}{lrt}
107;;
108;; for example the Open key (L7) would be encoded as "\C-x*gl"
109;; the control, meta, and shift keys modify the character {lrt}
110;; note that (unshifted) C-l is ",", C-r is "2", and C-t is "4"
111;;
112;; {c} is [a-j] for LEFT, [a-i] for TOP, [a-o] for RIGHT.
113;; A higher level insists on encoding {h,j,l,n}{r} (the arrow keys)
114;; as ANSI escape sequences. Use the shell command
115;; % setkeys noarrows
116;; if you want these to come through for emacstool.
117;;
118;; If you are not using EmacsTool,
119;; you can also use this by creating a .ttyswrc file to do the conversion.
120;; but it won't include the CONTROL, META, or SHIFT keys!
121;;
122;; Important to define SHIFTed sequence before matching unshifted sequence.
123;; (talk about bletcherous old uppercase terminal conventions!*$#@&%*&#$%)
124;; this is worse than C-S/C-Q flow control anyday!
125;; Do *YOU* run in capslock mode?
126;;
127
128;; Note: al, el and gl are trapped by EmacsTool, so they never make it here.
129
130(defvar suntool-map (make-sparse-keymap)
131 "*Keymap for Emacstool bindings.")
132
133
134;; Since .emacs gets loaded before this file, a hook is supplied
135;; for you to put your own bindings in.
136
137(defvar suntool-map-hooks nil
138 "List of forms to evaluate after setting suntool-map.")
139
140;;
141;; If running under emacstool, arrange to call suspend-emacstool
142;; instead of suspend-emacs.
143;;
144;; First mouse blip is a clue that we are in emacstool.
145;;
146;; C-x C-@ is the mouse command prefix.
147
148(autoload 'sun-mouse-handler "sun-mouse"
149 "Sun Emacstool handler for mouse blips (not loaded)." t)
150 105
151(defun terminal-init-sun () 106(defun terminal-init-sun ()
152 "Terminal initialization function for sun." 107 "Terminal initialization function for sun."
@@ -207,77 +162,7 @@
207 (let ((hooks sun-raw-prefix-hooks)) 162 (let ((hooks sun-raw-prefix-hooks))
208 (while hooks 163 (while hooks
209 (eval (car hooks)) 164 (eval (car hooks))
210 (setq hooks (cdr hooks))))) 165 (setq hooks (cdr hooks))))))
211
212 (define-key suntool-map "gr" 'beginning-of-buffer) ; r7
213 (define-key suntool-map "iR" 'backward-page) ; R9
214 (define-key suntool-map "ir" 'scroll-down) ; r9
215 (define-key suntool-map "kr" 'recenter) ; r11
216 (define-key suntool-map "mr" 'end-of-buffer) ; r13
217 (define-key suntool-map "oR" 'forward-page) ; R15
218 (define-key suntool-map "or" 'scroll-up) ; r15
219 (define-key suntool-map "b\M-L" 'rerun-prev-command) ; M-AGAIN
220 (define-key suntool-map "b\M-l" 'prev-complex-command) ; M-Again
221 (define-key suntool-map "bl" 'redraw-display) ; Again
222 (define-key suntool-map "cl" 'list-buffers) ; Props
223 (define-key suntool-map "dl" 'undo) ; Undo
224 (define-key suntool-map "el" 'ignore) ; Expose-Open
225 (define-key suntool-map "fl" 'sun-select-region) ; Put
226 (define-key suntool-map "f," 'copy-region-as-kill) ; C-Put
227 (define-key suntool-map "gl" 'ignore) ; Open-Open
228 (define-key suntool-map "hl" 'sun-yank-selection) ; Get
229 (define-key suntool-map "h," 'yank) ; C-Get
230 (define-key suntool-map "il" 'research-forward) ; Find
231 (define-key suntool-map "i," 're-search-forward) ; C-Find
232 (define-key suntool-map "i\M-l" 'research-backward) ; M-Find
233 (define-key suntool-map "i\M-," 're-search-backward) ; C-M-Find
234
235 (define-key suntool-map "jL" 'yank) ; DELETE
236 (define-key suntool-map "jl" 'kill-region-and-unmark) ; Delete
237 (define-key suntool-map "j\M-l" 'exchange-point-and-mark) ; M-Delete
238 (define-key suntool-map "j,"
239 (lambda () (interactive) (pop-mark))) ; C-Delete
240
241 (define-key suntool-map "fT" 'shrink-window-horizontally) ; T6
242 (define-key suntool-map "gT" 'enlarge-window-horizontally) ; T7
243 (define-key suntool-map "ft" 'shrink-window) ; t6
244 (define-key suntool-map "gt" 'enlarge-window) ; t7
245 (define-key suntool-map "cT" (lambda (n) (interactive "p") (scroll-down n)))
246 (define-key suntool-map "dT" (lambda (n) (interactive "p") (scroll-up n)))
247 (define-key suntool-map "ct" 'scroll-down-in-place) ; t3
248 (define-key suntool-map "dt" 'scroll-up-in-place) ; t4
249 (define-key ctl-x-map "*" suntool-map)
250
251 (when suntool-map-hooks
252 (message "suntool-map-hooks is obsolete! Use term-setup-hook instead!")
253 (let ((hooks suntool-map-hooks))
254 (while hooks
255 (eval (car hooks))
256 (setq hooks (cdr hooks)))))
257
258 (define-key ctl-x-map "\C-@" 'sun-mouse-once))
259
260(defun emacstool-init ()
261 "Set up Emacstool window, if you know you are in an emacstool."
262 ;; Make sure sun-mouse and sun-fns are loaded.
263 (require 'sun-fns)
264 (define-key ctl-x-map "\C-@" 'sun-mouse-handler)
265
266 ;; FIXME: this function does not seem to exist either. -stef'01
267 (if (< (sun-window-init) 0)
268 (message "Not a Sun Window")
269 (progn
270 (substitute-key-definition 'suspend-emacs 'suspend-emacstool global-map)
271 (substitute-key-definition 'suspend-emacs 'suspend-emacstool esc-map)
272 (substitute-key-definition 'suspend-emacs 'suspend-emacstool ctl-x-map))
273 (send-string-to-terminal
274 (concat "\033]lEmacstool - GNU Emacs " emacs-version "\033\\"))))
275
276(defun sun-mouse-once ()
277 "Converts to emacstool and sun-mouse-handler on first mouse hit."
278 (interactive)
279 (emacstool-init)
280 (sun-mouse-handler)) ; Now, execute this mouse blip.
281 166
282;;; arch-tag: db761d47-fd7d-42b4-aae1-04fa116b6ba6 167;;; arch-tag: db761d47-fd7d-42b4-aae1-04fa116b6ba6
283;;; sun.el ends here 168;;; sun.el ends here