annotate lisp/term/wyse50.el @ 1181:5897b220ad8e

*** empty log message ***
author Richard M. Stallman <rms@gnu.org>
date Sun, 20 Sep 1992 22:45:13 +0000
parents c2dbf1fe0506
children 67773a6ede4e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
502
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
1 ;;;; Terminal mode for Wyse 50
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
2 ;;;; Should work well for Televideo TVI 925 although it's overkill
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
3 ;;;; Author Daniel Pfieffer (pfieffer@cix.cict.fr) January 1991
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
4 ;;;; Rewritten for Emacs 19 by Jim Blandy (jimb@occs.cs.oberlin.edu)
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
5 ;;;; January 1992
166
4c0d89aec359 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
6
502
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
7
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
8 ;;; Functions especially for this terminal.
166
4c0d89aec359 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
9
502
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
10 (defun wyse-50-insert-line ()
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
11 "Insert an empty line."
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
12 (interactive)
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
13 (beginning-of-line)
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
14 (open-line 1))
166
4c0d89aec359 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
15
502
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
16 (defun wyse-50-delete-line ()
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
17 "Delete all of the current line."
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
18 (interactive)
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
19 (beginning-of-line)
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
20 (kill-line 1))
166
4c0d89aec359 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
21
502
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
22 (defun wyse-50-insert-char ()
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
23 "Insert a space, even in overwrite mode."
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
24 (interactive)
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
25 (insert ? ))
166
4c0d89aec359 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
26
502
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
27 (defun wyse-50-print-buffer ()
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
28 "Like ``print-buffer'', but verifies before printing.
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
29 The `print' key is easy to hit on a Wyse 50."
166
4c0d89aec359 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
30 (interactive)
502
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
31 (if (y-or-n-p
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
32 (concat "Print buffer "
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
33 (buffer-name) "? "))
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
34 (print-buffer)))
166
4c0d89aec359 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
35
502
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
36 (defun wyse-50-top-of-window (n)
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
37 "Move point to the top line of the current window.
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
38 With an argument N, move to the Nth line of the window."
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
39 (interactive "p")
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
40 (move-to-window-line (1- n)))
166
4c0d89aec359 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
41
502
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
42 (defun wyse-50-bottom-of-window (n)
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
43 "Move point to the last line of the current window.
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
44 With an argument N, move to the Nth line from the bottom of the window."
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
45 (interactive "p")
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
46 (move-to-window-line (- n)))
166
4c0d89aec359 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
47
502
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
48 (defun wyse-50-toggle-screen-width ()
166
4c0d89aec359 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
49 "Alternate between 80 and 132 columns."
4c0d89aec359 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
50 (interactive)
779
c2dbf1fe0506 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 502
diff changeset
51 (if (<= (frame-width) 80)
166
4c0d89aec359 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
52 (progn
4c0d89aec359 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
53 (send-string-to-terminal "\e`;")
779
c2dbf1fe0506 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 502
diff changeset
54 (set-frame-width 131))
166
4c0d89aec359 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
55 (send-string-to-terminal "\e`:")
779
c2dbf1fe0506 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 502
diff changeset
56 (set-frame-width 79)))
166
4c0d89aec359 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
57
502
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
58
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
59 ;;; Define the escape sequences for the function keys.
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
60 (define-key function-key-map "\C-a" (make-keymap))
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
61 (mapcar (function (lambda (key-definition)
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
62 (define-key function-key-map
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
63 (car key-definition) (nth 1 key-definition))))
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
64 '(("\eI" [S-tab])
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
65 ("\eJ" [S-prior])
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
66 ("\eK" [next])
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
67 ("\eY" [clear])
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
68 ("\eT" [clear-eol])
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
69 ("\^^" [home])
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
70 ("\e\^^" [home-down])
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
71 ("\eQ" [insert])
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
72 ("\eE" [insertline])
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
73 ("\eW" [?\C-?])
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
74 ("\eR" [deleteline])
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
75 ("\eP" [print])
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
76 ("\C-k" [up])
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
77 ("\C-j" [down])
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
78 ("\C-l" [right])
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
79 ("\C-h" [left])
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
80 ("\C-a\C-k\C-m" [funct-up])
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
81 ("\C-a\C-j\C-m" [funct-down])
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
82 ("\C-a\C-l\C-m" [funct-right])
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
83 ("\C-a\C-h\C-m" [funct-left])
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
84 ("\er" [replace])
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
85 ("\^a\^m\^m" [funct-return])
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
86 ("\^a\^i\^m" [funct-tab])
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
87 ("\^a@\^m" [f1])
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
88 ("\^a`\^m" [S-f1])
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
89 ("\^aA\^m" [f2])
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
90 ("\^aa\^m" [S-f2])
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
91 ("\^aB\^m" [f3])
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
92 ("\^ab\^m" [S-f3])
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
93 ("\^aC\^m" [f4])
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
94 ("\^ac\^m" [S-f4])
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
95 ("\^aD\^m" [f5])
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
96 ("\^ad\^m" [S-f5])
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
97 ("\^aE\^m" [f6])
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
98 ("\^ae\^m" [S-f6])
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
99 ("\^aF\^m" [f7])
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
100 ("\^af\^m" [S-f7])
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
101 ("\^aG\^m" [f8])
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
102 ("\^ag\^m" [S-f8])
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
103 ("\^aH\^m" [f9])
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
104 ("\^ah\^m" [S-f9])
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
105 ("\^aI\^m" [f10])
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
106 ("\^ai\^m" [S-f10])
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
107 ("\^aJ\^m" [f11])
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
108 ("\^aj\^m" [S-f11])
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
109 ("\^aK\^m" [f12])
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
110 ("\^ak\^m" [S-f12])
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
111 ("\^aL\^m" [f13])
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
112 ("\^al\^m" [S-f13])
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
113 ("\^aM\^m" [f14])
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
114 ("\^am\^m" [S-f14])
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
115 ("\^aN\^m" [f15])
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
116 ("\^an\^m" [S-f15])
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
117 ("\^aO\^m" [f16])
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
118 ("\^ao\^m" [S-f16])))
166
4c0d89aec359 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
119
502
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
120
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
121 ;;; Define some of the function keys.
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
122 (mapcar (function (lambda (key-definition)
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
123 (global-set-key (car key-definition)
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
124 (nth 1 key-definition))))
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
125 '(([insertline] wyse-50-insert-line)
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
126 ([clear] recenter)
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
127 ([clear-eol] kill-line)
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
128 ([home] execute-extended-command)
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
129 ([home-down] shell-command)
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
130 ([insert] wyse-50-insert-char)
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
131 ([deleteline] wyse-50-delete-line)
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
132 ([replace] overwrite-mode)
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
133 ([print] wyse-50-print-buffer)
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
134 ([funct-up] wyse-50-top-of-window)
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
135 ([funct-down] wyse-50-bottom-of-window)
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
136 ([funct-left] beginning-of-line)
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
137 ([funct-right] end-of-line)
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
138 ([f5] shell)
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
139 ([f6] dired)
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
140 ([f7] rnews)
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
141 ([f8] rmail)
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
142 ([f9] delete-othe-windows)
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
143 ([f10] other-window)
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
144 ([f11] split-window-vertically)
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
145 ([f13] help-for-help)
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
146 ([f14] wyse-50-toggle-screen-width)
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
147 ([f15] global-set-key)
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
148 ("\M-?" help-for-help)))
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
149
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
150
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
151 ;;; Miscellaneous hacks
166
4c0d89aec359 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
152
502
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
153 ;;; This is an ugly hack for a nasty problem:
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
154 ;;; Wyse 50 takes one character cell to store video attributes (which seems to
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
155 ;;; explain width 79 rather than 80, column 1 is not used!!!).
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
156 ;;; On killing (C-x C-c) the end inverse code (on column 1 of line 24)
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
157 ;;; of the mode line is overwritten AFTER all the y-or-n questions.
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
158 ;;; This causes the attribute to remain in effect until the mode line has
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
159 ;;; scrolled of the screen. Suspending (C-z) does not cause this problem.
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
160 ;;; On such terminals, Emacs should sacrifice the first and last character of
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
161 ;;; each mode line, rather than a whole screen column!
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
162 (setq kill-emacs-hook
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
163 (function (lambda () (interactive)
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
164 (send-string-to-terminal
779
c2dbf1fe0506 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 502
diff changeset
165 (concat "\ea23R" (1+ (frame-width)) "C\eG0")))))
166
4c0d89aec359 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
166
502
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
167 (defun enable-arrow-keys ()
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
168 "To be called by term-setup-hook. Overrides 6 Emacs standard keys
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
169 whose functions are then typed as follows:
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
170 C-a Funct Left-arrow
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
171 C-h M-?
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
172 LFD Funct Return, some modes override down-arrow via LFD
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
173 C-k CLR Line
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
174 C-l Scrn CLR
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
175 M-r M-x move-to-window-line, Funct up-arrow or down-arrow are similar
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
176 All special keys except Send, Shift Ins, Shift Home and shifted functions keys
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
177 are assigned some hopefully useful meaning."
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
178 (interactive)
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
179 (mapcar (function (lambda (key-definition)
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
180 (global-set-key (car key-definition)
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
181 (nth 1 key-definition))))
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
182 ;; By unsetting C-a and then binding it to a prefix, we
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
183 ;; allow the rest of the function keys which start with C-a
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
184 ;; to be recognized.
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
185 '(("\C-a" nil)
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
186 ("\C-a\C-a" beginning-of-line)
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
187 ("\C-k" nil)
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
188 ("\C-j" nil)
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
189 ("\C-l" nil)
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
190 ("\C-h" nil)
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
191 ("\er" nil)))
078fa30e9292 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 173
diff changeset
192 (fset 'enable-arrow-keys nil))