annotate etc/edt-user.doc @ 30075:39e2dae95929 raeburn-tag-4-for-export

Add support for `bootstrap' and related targets.
author Andrew Innes <andrewi@gnu.org>
date Wed, 05 Jul 2000 17:32:43 +0000
parents e96ffe544684
children 19818763d299
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
25853
Dave Love <fx@gnu.org>
parents:
diff changeset
1 File: edt-user.doc --- EDT Emulation User Instructions
Dave Love <fx@gnu.org>
parents:
diff changeset
2
Dave Love <fx@gnu.org>
parents:
diff changeset
3 For GNU Emacs 19
Dave Love <fx@gnu.org>
parents:
diff changeset
4
Dave Love <fx@gnu.org>
parents:
diff changeset
5 Copyright (C) 1986, 1992, 1994, 1995, 1999 Free Software Foundation, Inc.
Dave Love <fx@gnu.org>
parents:
diff changeset
6
Dave Love <fx@gnu.org>
parents:
diff changeset
7 Author: Kevin Gallagher <kevingal@onramp.net>
Dave Love <fx@gnu.org>
parents:
diff changeset
8 Maintainer: Kevin Gallagher <kevingal@onramp.net>
Dave Love <fx@gnu.org>
parents:
diff changeset
9 Keywords: emulations
Dave Love <fx@gnu.org>
parents:
diff changeset
10
Dave Love <fx@gnu.org>
parents:
diff changeset
11 This file is part of GNU Emacs.
Dave Love <fx@gnu.org>
parents:
diff changeset
12
Dave Love <fx@gnu.org>
parents:
diff changeset
13 GNU Emacs is free software; you can redistribute it and/or modify
Dave Love <fx@gnu.org>
parents:
diff changeset
14 it under the terms of the GNU General Public License as published by
Dave Love <fx@gnu.org>
parents:
diff changeset
15 the Free Software Foundation; either version 2, or (at your option)
Dave Love <fx@gnu.org>
parents:
diff changeset
16 any later version.
Dave Love <fx@gnu.org>
parents:
diff changeset
17
Dave Love <fx@gnu.org>
parents:
diff changeset
18 GNU Emacs is distributed in the hope that it will be useful,
Dave Love <fx@gnu.org>
parents:
diff changeset
19 but WITHOUT ANY WARRANTY; without even the implied warranty of
Dave Love <fx@gnu.org>
parents:
diff changeset
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
Dave Love <fx@gnu.org>
parents:
diff changeset
21 GNU General Public License for more details.
Dave Love <fx@gnu.org>
parents:
diff changeset
22
Dave Love <fx@gnu.org>
parents:
diff changeset
23 You should have received a copy of the GNU General Public License
Dave Love <fx@gnu.org>
parents:
diff changeset
24 along with GNU Emacs; see the file COPYING. If not, write to the
Dave Love <fx@gnu.org>
parents:
diff changeset
25 Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Dave Love <fx@gnu.org>
parents:
diff changeset
26 Boston, MA 02111-1307, USA.
Dave Love <fx@gnu.org>
parents:
diff changeset
27
Dave Love <fx@gnu.org>
parents:
diff changeset
28 ============================================================================
Dave Love <fx@gnu.org>
parents:
diff changeset
29
Dave Love <fx@gnu.org>
parents:
diff changeset
30 I. OVERVIEW:
Dave Love <fx@gnu.org>
parents:
diff changeset
31
Dave Love <fx@gnu.org>
parents:
diff changeset
32 This version of the EDT emulation package for GNU Emacs is a substantially
Dave Love <fx@gnu.org>
parents:
diff changeset
33 enhanced version of the original. A large part of the original can still be
Dave Love <fx@gnu.org>
parents:
diff changeset
34 found here, of course, but much of it has been modified and quite a bit is
Dave Love <fx@gnu.org>
parents:
diff changeset
35 new. Many of the ideas found here are borrowed from others. In particular,
Dave Love <fx@gnu.org>
parents:
diff changeset
36 some of the code found here was drawn from an earlier re-write of the EDT
Dave Love <fx@gnu.org>
parents:
diff changeset
37 package done at DSC in 1989 by Matthew Frohman.
Dave Love <fx@gnu.org>
parents:
diff changeset
38
Dave Love <fx@gnu.org>
parents:
diff changeset
39 Send bug fixes, suggestions for enhancements, and corrections to this
Dave Love <fx@gnu.org>
parents:
diff changeset
40 documentation to Kevin Gallagher (kevingal@onramp.net).
Dave Love <fx@gnu.org>
parents:
diff changeset
41
Dave Love <fx@gnu.org>
parents:
diff changeset
42 The EDT emulation consists of the following files:
Dave Love <fx@gnu.org>
parents:
diff changeset
43
Dave Love <fx@gnu.org>
parents:
diff changeset
44 edt-user.doc - User instructions (which you are reading now)
Dave Love <fx@gnu.org>
parents:
diff changeset
45 edt.el - EDT Emulation Functions and Default Configuration
Dave Love <fx@gnu.org>
parents:
diff changeset
46 edt-lk201.el - Support for DEC LK-201 Keyboards
Dave Love <fx@gnu.org>
parents:
diff changeset
47 edt-vt100.el - Support for DEC VT-100 (and above) terminals
Dave Love <fx@gnu.org>
parents:
diff changeset
48 edt-mapper.el - Support for Keyboards used under X Windows
Dave Love <fx@gnu.org>
parents:
diff changeset
49 edt-pc.el - Support for the PC AT Keyboard under MS-DOS
Dave Love <fx@gnu.org>
parents:
diff changeset
50
Dave Love <fx@gnu.org>
parents:
diff changeset
51 Several goals were kept in mind when making this version:
Dave Love <fx@gnu.org>
parents:
diff changeset
52
Dave Love <fx@gnu.org>
parents:
diff changeset
53 1. Emulate EDT Keypad Mode commands closely so that current
Dave Love <fx@gnu.org>
parents:
diff changeset
54 EDT users will find that it easy and comfortable to use
Dave Love <fx@gnu.org>
parents:
diff changeset
55 GNU Emacs with a small learning curve;
Dave Love <fx@gnu.org>
parents:
diff changeset
56
Dave Love <fx@gnu.org>
parents:
diff changeset
57 2. Make it easy for a user to customize EDT emulation key
Dave Love <fx@gnu.org>
parents:
diff changeset
58 bindings without knowing much about Emacs Lisp;
Dave Love <fx@gnu.org>
parents:
diff changeset
59
Dave Love <fx@gnu.org>
parents:
diff changeset
60 3. Make it easy to switch between the original EDT default bindings
Dave Love <fx@gnu.org>
parents:
diff changeset
61 and the user's customized bindings, without having to exit Emacs.
Dave Love <fx@gnu.org>
parents:
diff changeset
62
Dave Love <fx@gnu.org>
parents:
diff changeset
63 4. Provide support for some TPU/EVE functions not supported in
Dave Love <fx@gnu.org>
parents:
diff changeset
64 EDT.
Dave Love <fx@gnu.org>
parents:
diff changeset
65
Dave Love <fx@gnu.org>
parents:
diff changeset
66 5. Provide an easy way to restore ALL original Emacs key bindings,
Dave Love <fx@gnu.org>
parents:
diff changeset
67 just as they existed before the EDT emulation was first invoked.
Dave Love <fx@gnu.org>
parents:
diff changeset
68
Dave Love <fx@gnu.org>
parents:
diff changeset
69 6. Support GNU Emacs 19. (Support for GNU Emacs 18 has been dropped.
Dave Love <fx@gnu.org>
parents:
diff changeset
70 Also, although there is some code designed to support Xemacs 19
Dave Love <fx@gnu.org>
parents:
diff changeset
71 (formerly Lucid Emacs), this is not fully implemented at this
Dave Love <fx@gnu.org>
parents:
diff changeset
72 time.
Dave Love <fx@gnu.org>
parents:
diff changeset
73
Dave Love <fx@gnu.org>
parents:
diff changeset
74 7. When running under X, support highlighting of marked text.
Dave Love <fx@gnu.org>
parents:
diff changeset
75
Dave Love <fx@gnu.org>
parents:
diff changeset
76 8. Handle terminal configuration under X interactively when the
Dave Love <fx@gnu.org>
parents:
diff changeset
77 emulation is invoked for the first time.
Dave Love <fx@gnu.org>
parents:
diff changeset
78
Dave Love <fx@gnu.org>
parents:
diff changeset
79 9. Support a PC AT keyboard under MS-DOS.
Dave Love <fx@gnu.org>
parents:
diff changeset
80
Dave Love <fx@gnu.org>
parents:
diff changeset
81 II. TERMINALS/KEYBOARDS SUPPORTED:
Dave Love <fx@gnu.org>
parents:
diff changeset
82
Dave Love <fx@gnu.org>
parents:
diff changeset
83 Keyboards used under X Windows are supported via the edt-mapper function. The
Dave Love <fx@gnu.org>
parents:
diff changeset
84 first time you invoke the emulation under X, the edt-mapper function is run
Dave Love <fx@gnu.org>
parents:
diff changeset
85 automatically and the user is prompted to identify which keys the emulation is
Dave Love <fx@gnu.org>
parents:
diff changeset
86 to use for the standard keypad and function keys EDT expects (e.g., PF1, PF2,
Dave Love <fx@gnu.org>
parents:
diff changeset
87 etc.). This configuration is saved to disk read each time the emulation is
Dave Love <fx@gnu.org>
parents:
diff changeset
88 invoked.
Dave Love <fx@gnu.org>
parents:
diff changeset
89
Dave Love <fx@gnu.org>
parents:
diff changeset
90 In character oriented connections not running a window manager, the following
Dave Love <fx@gnu.org>
parents:
diff changeset
91 terminals/keyboards are supported. (1) DEC VT-100 series and higher. This
Dave Love <fx@gnu.org>
parents:
diff changeset
92 includes well behaved VT clones and emulators. If you are using a VT series
Dave Love <fx@gnu.org>
parents:
diff changeset
93 terminal, be sure that the term environment variable is set properly before
Dave Love <fx@gnu.org>
parents:
diff changeset
94 invoking emacs. (2) PC AT keyboard under MS-DOS.
Dave Love <fx@gnu.org>
parents:
diff changeset
95
Dave Love <fx@gnu.org>
parents:
diff changeset
96 Be sure to read the SPECIAL NOTES FOR SOME PLATFORMS sections to see if those
Dave Love <fx@gnu.org>
parents:
diff changeset
97 notes apply to you.
Dave Love <fx@gnu.org>
parents:
diff changeset
98
Dave Love <fx@gnu.org>
parents:
diff changeset
99
Dave Love <fx@gnu.org>
parents:
diff changeset
100 III. STARTING THE EDT EMULATION:
Dave Love <fx@gnu.org>
parents:
diff changeset
101
Dave Love <fx@gnu.org>
parents:
diff changeset
102 Start up GNU Emacs and enter "M-x edt-emulation-on" to begin the emulation.
Dave Love <fx@gnu.org>
parents:
diff changeset
103 After initialization is complete, the following message will appear below the
Dave Love <fx@gnu.org>
parents:
diff changeset
104 status line informing you that the emulation has been enabled:
Dave Love <fx@gnu.org>
parents:
diff changeset
105
Dave Love <fx@gnu.org>
parents:
diff changeset
106 Default EDT keymap active
Dave Love <fx@gnu.org>
parents:
diff changeset
107
Dave Love <fx@gnu.org>
parents:
diff changeset
108 You can have the EDT Emulation start up automatically, each time you initiate
Dave Love <fx@gnu.org>
parents:
diff changeset
109 a GNU Emacs session, by adding the following line to your .emacs file:
Dave Love <fx@gnu.org>
parents:
diff changeset
110
Dave Love <fx@gnu.org>
parents:
diff changeset
111 (setq term-setup-hook 'edt-emulation-on)
Dave Love <fx@gnu.org>
parents:
diff changeset
112
Dave Love <fx@gnu.org>
parents:
diff changeset
113 A reference sheet is included (later on) listing the default EDT Emulation key
Dave Love <fx@gnu.org>
parents:
diff changeset
114 bindings. This sheet is also accessible on line from within Emacs by pressing
Dave Love <fx@gnu.org>
parents:
diff changeset
115 PF2, GOLD H, or HELP (when in the EDT Default Mode).
Dave Love <fx@gnu.org>
parents:
diff changeset
116
Dave Love <fx@gnu.org>
parents:
diff changeset
117 It is easy to customize key bindings in the EDT Emulation. (See CUSTOMIZING
Dave Love <fx@gnu.org>
parents:
diff changeset
118 section, below.) Customizations are placed in a file called edt-user.el. (A
Dave Love <fx@gnu.org>
parents:
diff changeset
119 sample edt-user.el file can be found in the CUSTOMIZING section.) If
Dave Love <fx@gnu.org>
parents:
diff changeset
120 edt-user.el is found in your GNU Emacs load path during EDT Emulation
Dave Love <fx@gnu.org>
parents:
diff changeset
121 initialization, then the following message will appear below the status line
Dave Love <fx@gnu.org>
parents:
diff changeset
122 indicating that the emulation has been enabled, enhanced by your own
Dave Love <fx@gnu.org>
parents:
diff changeset
123 customizations:
Dave Love <fx@gnu.org>
parents:
diff changeset
124
Dave Love <fx@gnu.org>
parents:
diff changeset
125 User EDT custom keymap active
Dave Love <fx@gnu.org>
parents:
diff changeset
126
Dave Love <fx@gnu.org>
parents:
diff changeset
127 Once enabled, it is easy to switch back and forth between your customized EDT
Dave Love <fx@gnu.org>
parents:
diff changeset
128 Emulation key bindings and the default EDT Emulation key bindings. It is also
Dave Love <fx@gnu.org>
parents:
diff changeset
129 easy to turn off the emulation. Doing so completely restores the original key
Dave Love <fx@gnu.org>
parents:
diff changeset
130 bindings in effect just prior to invoking the emulation.
Dave Love <fx@gnu.org>
parents:
diff changeset
131
Dave Love <fx@gnu.org>
parents:
diff changeset
132 Where EDT key bindings and GNU Emacs key bindings conflict, the default GNU
Dave Love <fx@gnu.org>
parents:
diff changeset
133 Emacs key bindings are retained by the EDT emulation by default. If you are a
Dave Love <fx@gnu.org>
parents:
diff changeset
134 diehard EDT user you may not like this. The CUSTOMIZING section explains how
Dave Love <fx@gnu.org>
parents:
diff changeset
135 to change this default.
Dave Love <fx@gnu.org>
parents:
diff changeset
136
Dave Love <fx@gnu.org>
parents:
diff changeset
137
Dave Love <fx@gnu.org>
parents:
diff changeset
138 IV. SPECIAL NOTES FOR SOME PLATFORMS:
Dave Love <fx@gnu.org>
parents:
diff changeset
139
Dave Love <fx@gnu.org>
parents:
diff changeset
140 Sun Workstations running X:
Dave Love <fx@gnu.org>
parents:
diff changeset
141
Dave Love <fx@gnu.org>
parents:
diff changeset
142 Some earlier Sun keyboards do not have arrow keys separate from the
Dave Love <fx@gnu.org>
parents:
diff changeset
143 keypad keys. It is difficult to emulate the full EDT keypad and still
Dave Love <fx@gnu.org>
parents:
diff changeset
144 retain use of the arrow keys on such keyboards.
Dave Love <fx@gnu.org>
parents:
diff changeset
145
Dave Love <fx@gnu.org>
parents:
diff changeset
146 The Sun Type 5 keyboard, however, does have separate arrow keys. This
Dave Love <fx@gnu.org>
parents:
diff changeset
147 makes it a candidate for setting up a reasonable EDT keypad emulation.
Dave Love <fx@gnu.org>
parents:
diff changeset
148 Unfortunately, Sun's default X keynames for the keypad keys don't permit
Dave Love <fx@gnu.org>
parents:
diff changeset
149 GNU Emacs to interpret the keypad 2, 4, 6, and 8 keys as something other
Dave Love <fx@gnu.org>
parents:
diff changeset
150 than arrow keys, nor use all the top row of keys for PF1 thru PF4 keys.
Dave Love <fx@gnu.org>
parents:
diff changeset
151 Here's the contents of an .xmodmaprc file which corrects this problem for
Dave Love <fx@gnu.org>
parents:
diff changeset
152 Sun Type 5 keyboards:
Dave Love <fx@gnu.org>
parents:
diff changeset
153
Dave Love <fx@gnu.org>
parents:
diff changeset
154 ! File: .xmodmaprc
Dave Love <fx@gnu.org>
parents:
diff changeset
155 !
Dave Love <fx@gnu.org>
parents:
diff changeset
156 ! Set up Sun Type 5 keypad for use with the GNU Emacs EDT Emulation
Dave Love <fx@gnu.org>
parents:
diff changeset
157 !
Dave Love <fx@gnu.org>
parents:
diff changeset
158 keycode 53 = KP_Divide
Dave Love <fx@gnu.org>
parents:
diff changeset
159 keycode 54 = KP_Multiply
Dave Love <fx@gnu.org>
parents:
diff changeset
160 keycode 57 = KP_Decimal
Dave Love <fx@gnu.org>
parents:
diff changeset
161 keycode 75 = KP_7
Dave Love <fx@gnu.org>
parents:
diff changeset
162 keycode 76 = KP_8
Dave Love <fx@gnu.org>
parents:
diff changeset
163 keycode 77 = KP_9
Dave Love <fx@gnu.org>
parents:
diff changeset
164 keycode 78 = KP_Subtract
Dave Love <fx@gnu.org>
parents:
diff changeset
165 keycode 97 = KP_Enter
Dave Love <fx@gnu.org>
parents:
diff changeset
166 keycode 98 = KP_4
Dave Love <fx@gnu.org>
parents:
diff changeset
167 keycode 99 = KP_5
Dave Love <fx@gnu.org>
parents:
diff changeset
168 keycode 100 = KP_6
Dave Love <fx@gnu.org>
parents:
diff changeset
169 keycode 101 = KP_0
Dave Love <fx@gnu.org>
parents:
diff changeset
170 keycode 105 = F24
Dave Love <fx@gnu.org>
parents:
diff changeset
171 keycode 119 = KP_1
Dave Love <fx@gnu.org>
parents:
diff changeset
172 keycode 120 = KP_2
Dave Love <fx@gnu.org>
parents:
diff changeset
173 keycode 121 = KP_3
Dave Love <fx@gnu.org>
parents:
diff changeset
174 keycode 132 = KP_Add
Dave Love <fx@gnu.org>
parents:
diff changeset
175
Dave Love <fx@gnu.org>
parents:
diff changeset
176 Feed .xmodmaprc to the xmodmap command and all the Sun Type 5 keypad keys
Dave Love <fx@gnu.org>
parents:
diff changeset
177 will now be configurable for the emulation of an LK-201 keypad (less the
Dave Love <fx@gnu.org>
parents:
diff changeset
178 comma key). The line
Dave Love <fx@gnu.org>
parents:
diff changeset
179
Dave Love <fx@gnu.org>
parents:
diff changeset
180 keycode 105 = F24
Dave Love <fx@gnu.org>
parents:
diff changeset
181
Dave Love <fx@gnu.org>
parents:
diff changeset
182 modifies the NumLock key to be the F24 key which can then be configured
Dave Love <fx@gnu.org>
parents:
diff changeset
183 to behave as the PF1 (Gold) key. In doing so, you will no longer
Dave Love <fx@gnu.org>
parents:
diff changeset
184 have a NumLock key. If you are using other software under X
Dave Love <fx@gnu.org>
parents:
diff changeset
185 which requires a NumLock key, then examine your keyboard and look
Dave Love <fx@gnu.org>
parents:
diff changeset
186 for one you don't use and redefine it to be the NumLock key.
Dave Love <fx@gnu.org>
parents:
diff changeset
187 Basically, you need to clear the NumLock key from being assigned
Dave Love <fx@gnu.org>
parents:
diff changeset
188 as a modifier, assign it to the key of your choice, and then add
Dave Love <fx@gnu.org>
parents:
diff changeset
189 it back as a modifier. (See the "General Notes on Using NumLock
Dave Love <fx@gnu.org>
parents:
diff changeset
190 for the PF1 Key on a Unix System" section below for further help
Dave Love <fx@gnu.org>
parents:
diff changeset
191 on how to do this.)
Dave Love <fx@gnu.org>
parents:
diff changeset
192
Dave Love <fx@gnu.org>
parents:
diff changeset
193 PC users running MS-DOS:
Dave Love <fx@gnu.org>
parents:
diff changeset
194
Dave Love <fx@gnu.org>
parents:
diff changeset
195 By default, F1 is configured to emulate the PF1 (GOLD) key. But NumLock
Dave Love <fx@gnu.org>
parents:
diff changeset
196 can be used instead if you load a freeware TSR distributed with
Dave Love <fx@gnu.org>
parents:
diff changeset
197 MS-Kermit, call gold.com. It is distributed in a file called gold22.zip
Dave Love <fx@gnu.org>
parents:
diff changeset
198 and comes with the source code as well as a loadable binary image.
Dave Love <fx@gnu.org>
parents:
diff changeset
199 (See edt-pc.el for more information.)
Dave Love <fx@gnu.org>
parents:
diff changeset
200
Dave Love <fx@gnu.org>
parents:
diff changeset
201 PC users running GNU/Linux:
Dave Love <fx@gnu.org>
parents:
diff changeset
202
Dave Love <fx@gnu.org>
parents:
diff changeset
203 The default X server configuration of three keys PC AT keyboard keys
Dave Love <fx@gnu.org>
parents:
diff changeset
204 needs to be modified to permit the PC keyboard to emulate an LK-201
Dave Love <fx@gnu.org>
parents:
diff changeset
205 keyboard properly. Here's the contents of an .xmodmaprc file which makes
Dave Love <fx@gnu.org>
parents:
diff changeset
206 these changes for your:
Dave Love <fx@gnu.org>
parents:
diff changeset
207
Dave Love <fx@gnu.org>
parents:
diff changeset
208 ! File: .xmodmaprc
Dave Love <fx@gnu.org>
parents:
diff changeset
209 !
Dave Love <fx@gnu.org>
parents:
diff changeset
210 ! Set up PC keypad under GNU/Linux for the GNU Emacs EDT Emulation
Dave Love <fx@gnu.org>
parents:
diff changeset
211 !
Dave Love <fx@gnu.org>
parents:
diff changeset
212 clear mod2
Dave Love <fx@gnu.org>
parents:
diff changeset
213 keycode 77 = F12
Dave Love <fx@gnu.org>
parents:
diff changeset
214 keycode 96 = Num_Lock Pointer_EnableKeys
Dave Love <fx@gnu.org>
parents:
diff changeset
215 add mod2 = Num_Lock
Dave Love <fx@gnu.org>
parents:
diff changeset
216
Dave Love <fx@gnu.org>
parents:
diff changeset
217 Feed the file to the xmodmap command and the PC NumLock keypad
Dave Love <fx@gnu.org>
parents:
diff changeset
218 key will now be configurable for the emulation of the PF1 key.
Dave Love <fx@gnu.org>
parents:
diff changeset
219 The PC keypad can now emulate an LK-201 keypad (less the comma
Dave Love <fx@gnu.org>
parents:
diff changeset
220 key), the standard keyboard supplied with DEC terminals VT-200 and above.
Dave Love <fx@gnu.org>
parents:
diff changeset
221 This .xmodmaprc file switches the role of the F12 and NumLock
Dave Love <fx@gnu.org>
parents:
diff changeset
222 keys. It has been tested on RedHat GNU/Linux 5.2. Other
Dave Love <fx@gnu.org>
parents:
diff changeset
223 versions of GNU/Linux may require different keycodes. (See the
Dave Love <fx@gnu.org>
parents:
diff changeset
224 "General Notes on Using NumLock for the PF1 Key on a Unix System"
Dave Love <fx@gnu.org>
parents:
diff changeset
225 section below for further help on how to do this.)
Dave Love <fx@gnu.org>
parents:
diff changeset
226
Dave Love <fx@gnu.org>
parents:
diff changeset
227 NOTE: It is necessary to have NumLock ON for the PC keypad to emulate the
Dave Love <fx@gnu.org>
parents:
diff changeset
228 LK-201 keypad properly.
Dave Love <fx@gnu.org>
parents:
diff changeset
229
Dave Love <fx@gnu.org>
parents:
diff changeset
230 General Notes on Using NumLock for the PF1 Key on a Unix System:
Dave Love <fx@gnu.org>
parents:
diff changeset
231
Dave Love <fx@gnu.org>
parents:
diff changeset
232 Making the physical NumLock key available for use in the EDT
Dave Love <fx@gnu.org>
parents:
diff changeset
233 Emulation requires some modification to the default X Window
Dave Love <fx@gnu.org>
parents:
diff changeset
234 settings. Since the keycode assignments vary from system to
Dave Love <fx@gnu.org>
parents:
diff changeset
235 system, some investigation is needed to see how to do this on
Dave Love <fx@gnu.org>
parents:
diff changeset
236 a particular system.
Dave Love <fx@gnu.org>
parents:
diff changeset
237
Dave Love <fx@gnu.org>
parents:
diff changeset
238 The following commands should be run and the output examined.
Dave Love <fx@gnu.org>
parents:
diff changeset
239 On RedHat GNU/Linux 5.2 on a PC, we get the following output when
Dave Love <fx@gnu.org>
parents:
diff changeset
240 running xmodmap.
Dave Love <fx@gnu.org>
parents:
diff changeset
241
Dave Love <fx@gnu.org>
parents:
diff changeset
242 "xmodmap -pm" yields:
Dave Love <fx@gnu.org>
parents:
diff changeset
243
Dave Love <fx@gnu.org>
parents:
diff changeset
244 xmodmap: up to 2 keys per modifier, (keycodes in parentheses):
Dave Love <fx@gnu.org>
parents:
diff changeset
245
Dave Love <fx@gnu.org>
parents:
diff changeset
246 shift Shift_L (0x32), Shift_R (0x3e)
Dave Love <fx@gnu.org>
parents:
diff changeset
247 lock Caps_Lock (0x42)
Dave Love <fx@gnu.org>
parents:
diff changeset
248 control Control_L (0x25), Control_R (0x6d)
Dave Love <fx@gnu.org>
parents:
diff changeset
249 mod1 Alt_L (0x40), Alt_R (0x71)
Dave Love <fx@gnu.org>
parents:
diff changeset
250 mod2 Num_Lock (0x4d)
Dave Love <fx@gnu.org>
parents:
diff changeset
251 mod3
Dave Love <fx@gnu.org>
parents:
diff changeset
252 mod4
Dave Love <fx@gnu.org>
parents:
diff changeset
253 mod5 Scroll_Lock (0x4e)
Dave Love <fx@gnu.org>
parents:
diff changeset
254
Dave Love <fx@gnu.org>
parents:
diff changeset
255
Dave Love <fx@gnu.org>
parents:
diff changeset
256 Note that Num_Lock is assigned to the modifier mod2. This is
Dave Love <fx@gnu.org>
parents:
diff changeset
257 what hides Num_Lock from being seen by Emacs.
Dave Love <fx@gnu.org>
parents:
diff changeset
258
Dave Love <fx@gnu.org>
parents:
diff changeset
259 Now, "xmodmap -pke" yields:
Dave Love <fx@gnu.org>
parents:
diff changeset
260
Dave Love <fx@gnu.org>
parents:
diff changeset
261 .
Dave Love <fx@gnu.org>
parents:
diff changeset
262 .
Dave Love <fx@gnu.org>
parents:
diff changeset
263 .
Dave Love <fx@gnu.org>
parents:
diff changeset
264 keycode 77 = Num_Lock Pointer_EnableKeys
Dave Love <fx@gnu.org>
parents:
diff changeset
265 .
Dave Love <fx@gnu.org>
parents:
diff changeset
266 .
Dave Love <fx@gnu.org>
parents:
diff changeset
267 .
Dave Love <fx@gnu.org>
parents:
diff changeset
268 keycode 96 = F12
Dave Love <fx@gnu.org>
parents:
diff changeset
269 .
Dave Love <fx@gnu.org>
parents:
diff changeset
270 .
Dave Love <fx@gnu.org>
parents:
diff changeset
271 .
Dave Love <fx@gnu.org>
parents:
diff changeset
272
Dave Love <fx@gnu.org>
parents:
diff changeset
273 So, in RedHat GNU/Linux 5.2 on a PC, Num_Lock generates keycode
Dave Love <fx@gnu.org>
parents:
diff changeset
274 77. The following steps are taken:
Dave Love <fx@gnu.org>
parents:
diff changeset
275
Dave Love <fx@gnu.org>
parents:
diff changeset
276 1. clear the assignment of Num_Lock to mod2;
Dave Love <fx@gnu.org>
parents:
diff changeset
277 2. swap the keycodes assigned to F12 and Num_Lock;
Dave Love <fx@gnu.org>
parents:
diff changeset
278 3. assign Num_Lock back to mod2.
Dave Love <fx@gnu.org>
parents:
diff changeset
279
Dave Love <fx@gnu.org>
parents:
diff changeset
280 The .xmodmaprc file looks like this:
Dave Love <fx@gnu.org>
parents:
diff changeset
281
Dave Love <fx@gnu.org>
parents:
diff changeset
282 ! File: .xmodmaprc
Dave Love <fx@gnu.org>
parents:
diff changeset
283 !
Dave Love <fx@gnu.org>
parents:
diff changeset
284 ! Set up PC keypad under GNU/Linux for the GNU Emacs EDT Emulation
Dave Love <fx@gnu.org>
parents:
diff changeset
285 !
Dave Love <fx@gnu.org>
parents:
diff changeset
286 clear mod2
Dave Love <fx@gnu.org>
parents:
diff changeset
287 keycode 77 = F12
Dave Love <fx@gnu.org>
parents:
diff changeset
288 keycode 96 = Num_Lock Pointer_EnableKeys
Dave Love <fx@gnu.org>
parents:
diff changeset
289 add mod2 = Num_Lock
Dave Love <fx@gnu.org>
parents:
diff changeset
290
Dave Love <fx@gnu.org>
parents:
diff changeset
291 So, after executing "xmodmap .xmodmaprc", a press of the physical
Dave Love <fx@gnu.org>
parents:
diff changeset
292 F12 key looks like a Num_Lock keypress to X. Also, a press of the
Dave Love <fx@gnu.org>
parents:
diff changeset
293 physical NumLock key looks like a press of the F12 key to X.
Dave Love <fx@gnu.org>
parents:
diff changeset
294
Dave Love <fx@gnu.org>
parents:
diff changeset
295 Now, edt-mapper.el will see "f12" when the physical NumLock key
Dave Love <fx@gnu.org>
parents:
diff changeset
296 is pressed, allowing the NumLock key to be used as the EDT PF1
Dave Love <fx@gnu.org>
parents:
diff changeset
297 (Gold) key.
Dave Love <fx@gnu.org>
parents:
diff changeset
298
Dave Love <fx@gnu.org>
parents:
diff changeset
299 V. HOW DOES THIS EDT EMULATION DIFFER FROM REAL EDT?:
Dave Love <fx@gnu.org>
parents:
diff changeset
300
Dave Love <fx@gnu.org>
parents:
diff changeset
301 In general, you will find that this emulation of EDT replicates most, but not
Dave Love <fx@gnu.org>
parents:
diff changeset
302 all, of EDT's most used Keypad Mode editing functions and behavior. It is not
Dave Love <fx@gnu.org>
parents:
diff changeset
303 perfect, but most EDT users who have tried the emulation agree that it is
Dave Love <fx@gnu.org>
parents:
diff changeset
304 quite good enough to make it easy for die-hard EDT users to move over to using
Dave Love <fx@gnu.org>
parents:
diff changeset
305 GNU Emacs.
Dave Love <fx@gnu.org>
parents:
diff changeset
306
Dave Love <fx@gnu.org>
parents:
diff changeset
307 Here's a list of the most important differences between EDT and this GNU Emacs
Dave Love <fx@gnu.org>
parents:
diff changeset
308 EDT Emulation. The list is short but you must be aware of these differences
Dave Love <fx@gnu.org>
parents:
diff changeset
309 if you are to use the EDT Emulation effectively.
Dave Love <fx@gnu.org>
parents:
diff changeset
310
Dave Love <fx@gnu.org>
parents:
diff changeset
311 1. Entering repeat counts works a little differently than in EDT.
Dave Love <fx@gnu.org>
parents:
diff changeset
312
Dave Love <fx@gnu.org>
parents:
diff changeset
313 EDT allows users to enter a repeat count before entering a command that
Dave Love <fx@gnu.org>
parents:
diff changeset
314 accepts repeat counts. For example, when in EDT, pressing these three
Dave Love <fx@gnu.org>
parents:
diff changeset
315 keys in sequence, GOLD 5 KP1, will move the cursor in the current
Dave Love <fx@gnu.org>
parents:
diff changeset
316 direction 5 words.
Dave Love <fx@gnu.org>
parents:
diff changeset
317
Dave Love <fx@gnu.org>
parents:
diff changeset
318 Emacs provides two ways to enter repeat counts, though neither involves
Dave Love <fx@gnu.org>
parents:
diff changeset
319 using the GOLD key. In Emacs, repeat counts can be entered by using the
Dave Love <fx@gnu.org>
parents:
diff changeset
320 ESC key. For example, pressing these keys in sequence, ESC 1 0 KP1, will
Dave Love <fx@gnu.org>
parents:
diff changeset
321 move the cursor in the current direction 10 words.
Dave Love <fx@gnu.org>
parents:
diff changeset
322
Dave Love <fx@gnu.org>
parents:
diff changeset
323 Emacs provides another command called universal-argument that can do the
Dave Love <fx@gnu.org>
parents:
diff changeset
324 same thing, plus a few other things. Normally, Emacs has this bound to
Dave Love <fx@gnu.org>
parents:
diff changeset
325 C-u.
Dave Love <fx@gnu.org>
parents:
diff changeset
326
Dave Love <fx@gnu.org>
parents:
diff changeset
327 2. The EDT SUBS command, bound to GOLD ENTER, is NOT supported. The built-in
Dave Love <fx@gnu.org>
parents:
diff changeset
328 Emacs query-replace command has been bound to GOLD ENTER, instead. It is
Dave Love <fx@gnu.org>
parents:
diff changeset
329 much more convenient to use than SUBS.
Dave Love <fx@gnu.org>
parents:
diff changeset
330
Dave Love <fx@gnu.org>
parents:
diff changeset
331 3. EDT's line mode commands and nokeypad mode commands are NOT supported
Dave Love <fx@gnu.org>
parents:
diff changeset
332 (with one important exception; see item 8 in the Highlights section
Dave Love <fx@gnu.org>
parents:
diff changeset
333 below). Although, at first, this may seem like a big omission, the set of
Dave Love <fx@gnu.org>
parents:
diff changeset
334 built-in Emacs commands provides a much richer set of capabilities which
Dave Love <fx@gnu.org>
parents:
diff changeset
335 more than make up for this omission.
Dave Love <fx@gnu.org>
parents:
diff changeset
336
Dave Love <fx@gnu.org>
parents:
diff changeset
337 To enter Emacs commands not bound to keys, you can press GOLD KP7 or the
Dave Love <fx@gnu.org>
parents:
diff changeset
338 DO key. Emacs will display its own command prompt called Meta-x (M-x).
Dave Love <fx@gnu.org>
parents:
diff changeset
339 You can also invoke this prompt the normal Emacs way by entering ESC x.
Dave Love <fx@gnu.org>
parents:
diff changeset
340
Dave Love <fx@gnu.org>
parents:
diff changeset
341 4. Selected text is highlighted ONLY when running under X Windows. Gnu Emacs
Dave Love <fx@gnu.org>
parents:
diff changeset
342 19 does not support highlighting of text on VT series terminals, at this
Dave Love <fx@gnu.org>
parents:
diff changeset
343 time.
Dave Love <fx@gnu.org>
parents:
diff changeset
344
Dave Love <fx@gnu.org>
parents:
diff changeset
345 5. Just like TPU/EVE, The ENTER key is NOT used to terminate input when the
Dave Love <fx@gnu.org>
parents:
diff changeset
346 editor prompts you for input. The RETURN key is used, instead. (KP4 and
Dave Love <fx@gnu.org>
parents:
diff changeset
347 KP5 do terminate input for the FIND command, just like in EDT, however.)
Dave Love <fx@gnu.org>
parents:
diff changeset
348
Dave Love <fx@gnu.org>
parents:
diff changeset
349
Dave Love <fx@gnu.org>
parents:
diff changeset
350
Dave Love <fx@gnu.org>
parents:
diff changeset
351
Dave Love <fx@gnu.org>
parents:
diff changeset
352 VI. SOME HIGHLIGHTS IN THIS EDT EMULATION, AND SOME COMPARISONS TO THE
Dave Love <fx@gnu.org>
parents:
diff changeset
353 ORIGINAL GNU EMACS EDT EMULATION:
Dave Love <fx@gnu.org>
parents:
diff changeset
354
Dave Love <fx@gnu.org>
parents:
diff changeset
355 1. The EDT define key command is supported (edt-define-key) and is bound to
Dave Love <fx@gnu.org>
parents:
diff changeset
356 C-k in the default EDT mode when EDT control sequence bindings are enabled
Dave Love <fx@gnu.org>
parents:
diff changeset
357 or one of the sample edt-user.el customization files is used. The TPU/EVE
Dave Love <fx@gnu.org>
parents:
diff changeset
358 learn command is supported but not bound to a key in the default EDT mode
Dave Love <fx@gnu.org>
parents:
diff changeset
359 but is bound in the sample edt-user.el files.
Dave Love <fx@gnu.org>
parents:
diff changeset
360
Dave Love <fx@gnu.org>
parents:
diff changeset
361 Unlike the TPU/EVE learn command, which uses one key to begin the learn
Dave Love <fx@gnu.org>
parents:
diff changeset
362 sequence, C-l, and another command to remember the sequence, C-r, this
Dave Love <fx@gnu.org>
parents:
diff changeset
363 version of the learn command (edt-learn) serves as a toggle to both begin
Dave Love <fx@gnu.org>
parents:
diff changeset
364 and to remember the learn sequence.
Dave Love <fx@gnu.org>
parents:
diff changeset
365
Dave Love <fx@gnu.org>
parents:
diff changeset
366 Many users who change the meaning of a key with the define key and the
Dave Love <fx@gnu.org>
parents:
diff changeset
367 learn commands, would like to be able to restore the original key binding
Dave Love <fx@gnu.org>
parents:
diff changeset
368 without having to quit and restart emacs. So a restore key command is
Dave Love <fx@gnu.org>
parents:
diff changeset
369 provided to do just that. When invoked, it prompts you to press the key
Dave Love <fx@gnu.org>
parents:
diff changeset
370 to which you wish the last replaced key definition restored. It is bound
Dave Love <fx@gnu.org>
parents:
diff changeset
371 to GOLD C-k in the default EDT mode when EDT control sequence bindings are
Dave Love <fx@gnu.org>
parents:
diff changeset
372 enabled or one of the sample edt-user.el customization files is used.
Dave Love <fx@gnu.org>
parents:
diff changeset
373
Dave Love <fx@gnu.org>
parents:
diff changeset
374 2. Direction support is fully supported. It is no longer accomplished by
Dave Love <fx@gnu.org>
parents:
diff changeset
375 re-defining keys each time the direction is changed. Thus, commands
Dave Love <fx@gnu.org>
parents:
diff changeset
376 sensitive to the current direction setting may be bound easily to any key.
Dave Love <fx@gnu.org>
parents:
diff changeset
377
Dave Love <fx@gnu.org>
parents:
diff changeset
378 3. All original emacs bindings are fully restored when EDT emulation is
Dave Love <fx@gnu.org>
parents:
diff changeset
379 turned off.
Dave Love <fx@gnu.org>
parents:
diff changeset
380
Dave Love <fx@gnu.org>
parents:
diff changeset
381 4. User custom EDT bindings are kept separate from the default EDT bindings.
Dave Love <fx@gnu.org>
parents:
diff changeset
382 One can toggle back and forth between the custom EDT bindings and default
Dave Love <fx@gnu.org>
parents:
diff changeset
383 EDT bindings.
Dave Love <fx@gnu.org>
parents:
diff changeset
384
Dave Love <fx@gnu.org>
parents:
diff changeset
385 5. The Emacs functions in edt.el attempt to emulate, where practical, the
Dave Love <fx@gnu.org>
parents:
diff changeset
386 exact behavior of the corresponding EDT keypad mode commands. In a few
Dave Love <fx@gnu.org>
parents:
diff changeset
387 cases, the emulation is not exact, but we hope you will agree it is close
Dave Love <fx@gnu.org>
parents:
diff changeset
388 enough. In a very few cases, we chose to use the Emacs way of handling
Dave Love <fx@gnu.org>
parents:
diff changeset
389 things. As mentioned earlier, we do not emulate the EDT SUBS command.
Dave Love <fx@gnu.org>
parents:
diff changeset
390 Instead, we chose to use the Emacs query-replace function, which we find
Dave Love <fx@gnu.org>
parents:
diff changeset
391 to be easier to use.
Dave Love <fx@gnu.org>
parents:
diff changeset
392
Dave Love <fx@gnu.org>
parents:
diff changeset
393 6. Emacs uses the regexp assigned to page-delimiter to determine what marks a
Dave Love <fx@gnu.org>
parents:
diff changeset
394 page break. This is normally "^\f", which causes the edt-page command to
Dave Love <fx@gnu.org>
parents:
diff changeset
395 ignore form feeds not located at the beginning of a line. To emulate the
Dave Love <fx@gnu.org>
parents:
diff changeset
396 EDT PAGE command exactly, page-delimiter is set to "\f" when EDT emulation
Dave Love <fx@gnu.org>
parents:
diff changeset
397 is turned on, and restored to "^\f" when EDT emulation is turned off.
Dave Love <fx@gnu.org>
parents:
diff changeset
398 But, since some users prefer the Emacs definition of a page break, or may
Dave Love <fx@gnu.org>
parents:
diff changeset
399 wish to preserve a customized definition of page break, one can override
Dave Love <fx@gnu.org>
parents:
diff changeset
400 the EDT definition by placing
Dave Love <fx@gnu.org>
parents:
diff changeset
401
Dave Love <fx@gnu.org>
parents:
diff changeset
402 (setq edt-keep-current-page-delimiter t)
Dave Love <fx@gnu.org>
parents:
diff changeset
403
Dave Love <fx@gnu.org>
parents:
diff changeset
404 in your .emacs file.
Dave Love <fx@gnu.org>
parents:
diff changeset
405
Dave Love <fx@gnu.org>
parents:
diff changeset
406 7. The EDT definition of a section of a terminal window is hardwired to be 16
Dave Love <fx@gnu.org>
parents:
diff changeset
407 lines of its one-and-only 24-line window (the EDT SECT command bound to
Dave Love <fx@gnu.org>
parents:
diff changeset
408 KP8). That's two-thirds of the window at a time. Since Emacs, like
Dave Love <fx@gnu.org>
parents:
diff changeset
409 TPU/EVE, can handle multiple windows of sizes of other than 24 lines, the
Dave Love <fx@gnu.org>
parents:
diff changeset
410 definition of section used here has been modified to two-thirds of the
Dave Love <fx@gnu.org>
parents:
diff changeset
411 current window. (There is also an edt-scroll-window function which you
Dave Love <fx@gnu.org>
parents:
diff changeset
412 may prefer over the SECT emulation.)
Dave Love <fx@gnu.org>
parents:
diff changeset
413
Dave Love <fx@gnu.org>
parents:
diff changeset
414 8. Cursor movement and deletion involving word entities is identical to EDT.
Dave Love <fx@gnu.org>
parents:
diff changeset
415 This, above all else, gives the die-hard EDT user a sense of being at
Dave Love <fx@gnu.org>
parents:
diff changeset
416 home. Also, an emulation of EDT's SET ENTITY WORD command is provided,
Dave Love <fx@gnu.org>
parents:
diff changeset
417 for those users who like to customize movement by a word at a time to
Dave Love <fx@gnu.org>
parents:
diff changeset
418 their own liking.
Dave Love <fx@gnu.org>
parents:
diff changeset
419
Dave Love <fx@gnu.org>
parents:
diff changeset
420 9. EDT's FIND and FNDNXT are supported.
Dave Love <fx@gnu.org>
parents:
diff changeset
421
Dave Love <fx@gnu.org>
parents:
diff changeset
422 10. EDT's APPEND and REPLACE commands are supported.
Dave Love <fx@gnu.org>
parents:
diff changeset
423
Dave Love <fx@gnu.org>
parents:
diff changeset
424 11. CHNGCASE is supported. It works on individual characters or selected
Dave Love <fx@gnu.org>
parents:
diff changeset
425 text, if SELECT is active. In addition, two new commands are provided:
Dave Love <fx@gnu.org>
parents:
diff changeset
426 edt-lowercase and edt-uppercase. They work on individual WORDS or
Dave Love <fx@gnu.org>
parents:
diff changeset
427 selected text, if SELECT is active.
Dave Love <fx@gnu.org>
parents:
diff changeset
428
Dave Love <fx@gnu.org>
parents:
diff changeset
429 12. Form feed and tab insert commands are supported.
Dave Love <fx@gnu.org>
parents:
diff changeset
430
Dave Love <fx@gnu.org>
parents:
diff changeset
431 13. A new command, edt-duplicate-word, is provided. If you experiment with
Dave Love <fx@gnu.org>
parents:
diff changeset
432 it, you might find it to be surprisingly useful and may wonder how you
Dave Love <fx@gnu.org>
parents:
diff changeset
433 ever got along without it! It is assigned to C-j in the sample
Dave Love <fx@gnu.org>
parents:
diff changeset
434 edt-user.el customization files.
Dave Love <fx@gnu.org>
parents:
diff changeset
435
Dave Love <fx@gnu.org>
parents:
diff changeset
436 14. TPU/EVE's Rectangular Cut and Paste functions (originally from the EVE-Plus
Dave Love <fx@gnu.org>
parents:
diff changeset
437 package) are supported. But unlike the TPU/EVE versions, these here
Dave Love <fx@gnu.org>
parents:
diff changeset
438 support both insert and overwrite modes. The seven rectangular functions
Dave Love <fx@gnu.org>
parents:
diff changeset
439 are bound to F7, F8, GOLD-F8, F9, GOLD-F9, F10, and GOLD-F10 in the
Dave Love <fx@gnu.org>
parents:
diff changeset
440 default EDT mode.
Dave Love <fx@gnu.org>
parents:
diff changeset
441
Dave Love <fx@gnu.org>
parents:
diff changeset
442 15. The original EDT emulation package set up many default regular and GOLD
Dave Love <fx@gnu.org>
parents:
diff changeset
443 bindings. We tried to preserve most (but not all!) of these, so users of
Dave Love <fx@gnu.org>
parents:
diff changeset
444 the original emulation package will feel more at home.
Dave Love <fx@gnu.org>
parents:
diff changeset
445
Dave Love <fx@gnu.org>
parents:
diff changeset
446 Nevertheless, there are still many GOLD key sequences which are not bound
Dave Love <fx@gnu.org>
parents:
diff changeset
447 to any functions. These are prime candidates to use for your own
Dave Love <fx@gnu.org>
parents:
diff changeset
448 customizations.
Dave Love <fx@gnu.org>
parents:
diff changeset
449
Dave Love <fx@gnu.org>
parents:
diff changeset
450 Also, there are several commands in edt.el not bound to any key. So, you
Dave Love <fx@gnu.org>
parents:
diff changeset
451 will find it worthwhile to look through edt.el for functions you may wish
Dave Love <fx@gnu.org>
parents:
diff changeset
452 to add to your personal customized bindings.
Dave Love <fx@gnu.org>
parents:
diff changeset
453
Dave Love <fx@gnu.org>
parents:
diff changeset
454 16. The VT200/VT300 series terminals steal the function keys F1 to F5 for
Dave Love <fx@gnu.org>
parents:
diff changeset
455 their own use. These do not generate signals which are sent to the host.
Dave Love <fx@gnu.org>
parents:
diff changeset
456 So, edt.el does not assign any default bindings to F1 through F5.
Dave Love <fx@gnu.org>
parents:
diff changeset
457
Dave Love <fx@gnu.org>
parents:
diff changeset
458 In addition, our VT220 terminals generate an interrupt when the F6 key is
Dave Love <fx@gnu.org>
parents:
diff changeset
459 pressed (^C or ^Y, can't remember which) and not the character sequence
Dave Love <fx@gnu.org>
parents:
diff changeset
460 documented in the manual. So, binding emacs commands to F6 will not work
Dave Love <fx@gnu.org>
parents:
diff changeset
461 if your terminal behaves the same way.
Dave Love <fx@gnu.org>
parents:
diff changeset
462
Dave Love <fx@gnu.org>
parents:
diff changeset
463 17. The VT220 terminal has no ESC, BS, nor LF keys, as does a VT100. So the
Dave Love <fx@gnu.org>
parents:
diff changeset
464 default EDT bindings adopt the standard DEC convention of having the F11,
Dave Love <fx@gnu.org>
parents:
diff changeset
465 F12, and F13 keys, on a VT200 series (and above) terminal, assigned to the
Dave Love <fx@gnu.org>
parents:
diff changeset
466 same EDT functions that are bound to ESC, BS, and LF on a VT100 terminal.
Dave Love <fx@gnu.org>
parents:
diff changeset
467
Dave Love <fx@gnu.org>
parents:
diff changeset
468 18. Each user, through the use of a private edt-user.el file, can customize,
Dave Love <fx@gnu.org>
parents:
diff changeset
469 very easily, personal EDT emulation bindings.
Dave Love <fx@gnu.org>
parents:
diff changeset
470
Dave Love <fx@gnu.org>
parents:
diff changeset
471 19. The EDT SELECT and RESET functions are supported. However, unlike EDT,
Dave Love <fx@gnu.org>
parents:
diff changeset
472 pressing RESET to cancel text selection does NOT reset the existing
Dave Love <fx@gnu.org>
parents:
diff changeset
473 setting of the current direction.
Dave Love <fx@gnu.org>
parents:
diff changeset
474
Dave Love <fx@gnu.org>
parents:
diff changeset
475 We also provide a TPU/EVE like version of the single SELECT/RESET
Dave Love <fx@gnu.org>
parents:
diff changeset
476 function, called edt-toggle-select, which makes the EDT SELECT function
Dave Love <fx@gnu.org>
parents:
diff changeset
477 into a toggle on/off switch. That is, if selection is ON, pressing SELECT
Dave Love <fx@gnu.org>
parents:
diff changeset
478 again turns selection off (cancels selection). This function is used in
Dave Love <fx@gnu.org>
parents:
diff changeset
479 the sample edt-user.el customization files.
Dave Love <fx@gnu.org>
parents:
diff changeset
480
Dave Love <fx@gnu.org>
parents:
diff changeset
481
Dave Love <fx@gnu.org>
parents:
diff changeset
482 VII. CUSTOMIZING:
Dave Love <fx@gnu.org>
parents:
diff changeset
483
Dave Love <fx@gnu.org>
parents:
diff changeset
484 Most EDT users, at one time or another, make some custom key bindings, or
Dave Love <fx@gnu.org>
parents:
diff changeset
485 use someone else's custom key bindings, which they come to depend upon just as
Dave Love <fx@gnu.org>
parents:
diff changeset
486 if they were built-in bindings. This EDT Emulation for GNU Emacs is designed
Dave Love <fx@gnu.org>
parents:
diff changeset
487 to make it easy to customize bindings.
Dave Love <fx@gnu.org>
parents:
diff changeset
488
Dave Love <fx@gnu.org>
parents:
diff changeset
489 If you wish to customize the EDT Emulation to use some of your own key
Dave Love <fx@gnu.org>
parents:
diff changeset
490 bindings, you need to make a private version of edt-user.el in your own
Dave Love <fx@gnu.org>
parents:
diff changeset
491 private lisp directory. There are two sample files edt-user.el1 and
Dave Love <fx@gnu.org>
parents:
diff changeset
492 edt-user.el2 for you to use as templates and for ideas. Look at
Dave Love <fx@gnu.org>
parents:
diff changeset
493 edt-user.el1 first. Unless you will be using two or more very different
Dave Love <fx@gnu.org>
parents:
diff changeset
494 types of terminals on the same system, you need not look at edt-user.el2.
Dave Love <fx@gnu.org>
parents:
diff changeset
495
Dave Love <fx@gnu.org>
parents:
diff changeset
496 First, you need to have your own private lisp directory, say ~/lisp, and
Dave Love <fx@gnu.org>
parents:
diff changeset
497 you should add it to the GNU Emacs load path.
Dave Love <fx@gnu.org>
parents:
diff changeset
498
Dave Love <fx@gnu.org>
parents:
diff changeset
499 NOTE: A few sites have different load-path requirements, so the above
Dave Love <fx@gnu.org>
parents:
diff changeset
500 directions may need some modification if your site has such special
Dave Love <fx@gnu.org>
parents:
diff changeset
501 needs.
Dave Love <fx@gnu.org>
parents:
diff changeset
502
Dave Love <fx@gnu.org>
parents:
diff changeset
503
Dave Love <fx@gnu.org>
parents:
diff changeset
504 Creating your own edt-user.el file:
Dave Love <fx@gnu.org>
parents:
diff changeset
505
Dave Love <fx@gnu.org>
parents:
diff changeset
506 A sample edt-user.el file is attached to the end of this user documentation.
Dave Love <fx@gnu.org>
parents:
diff changeset
507 You should use it as a guide to learn how you can customize EDT emulation
Dave Love <fx@gnu.org>
parents:
diff changeset
508 bindings to your own liking. Names used to identify the set of LK-201
Dave Love <fx@gnu.org>
parents:
diff changeset
509 keypad and function keys are:
Dave Love <fx@gnu.org>
parents:
diff changeset
510
Dave Love <fx@gnu.org>
parents:
diff changeset
511 Keypad Keys:
Dave Love <fx@gnu.org>
parents:
diff changeset
512 PF1 PF2 PF3 PF4
Dave Love <fx@gnu.org>
parents:
diff changeset
513 KP7 KP8 KP9 KP-
Dave Love <fx@gnu.org>
parents:
diff changeset
514 KP4 KP5 KP6 KP,
Dave Love <fx@gnu.org>
parents:
diff changeset
515 KP1 KP2 KP3
Dave Love <fx@gnu.org>
parents:
diff changeset
516 KP0 KPP KPE
Dave Love <fx@gnu.org>
parents:
diff changeset
517
Dave Love <fx@gnu.org>
parents:
diff changeset
518 Arrow Keys:
Dave Love <fx@gnu.org>
parents:
diff changeset
519 LEFT RIGHT DOWN UP
Dave Love <fx@gnu.org>
parents:
diff changeset
520
Dave Love <fx@gnu.org>
parents:
diff changeset
521 Function Keys:
Dave Love <fx@gnu.org>
parents:
diff changeset
522 F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 F13 F14
Dave Love <fx@gnu.org>
parents:
diff changeset
523 HELP DO F17 F18 F19 F20
Dave Love <fx@gnu.org>
parents:
diff changeset
524
Dave Love <fx@gnu.org>
parents:
diff changeset
525 FIND INSERT REMOVE
Dave Love <fx@gnu.org>
parents:
diff changeset
526 SELECT PREVIOUS NEXT
Dave Love <fx@gnu.org>
parents:
diff changeset
527
Dave Love <fx@gnu.org>
parents:
diff changeset
528 Note:
Dave Love <fx@gnu.org>
parents:
diff changeset
529 Many VT-200 terminals, and above, steal function keys F1 thru
Dave Love <fx@gnu.org>
parents:
diff changeset
530 F5 for terminal setup control and don't send anything to the
Dave Love <fx@gnu.org>
parents:
diff changeset
531 host if pressed. So customizing bindings to these keys may
Dave Love <fx@gnu.org>
parents:
diff changeset
532 not work for you.
Dave Love <fx@gnu.org>
parents:
diff changeset
533
Dave Love <fx@gnu.org>
parents:
diff changeset
534 There are three basic functions that do the EDT emulation bindings:
Dave Love <fx@gnu.org>
parents:
diff changeset
535 edt-bind-standard-key, edt-bind-gold-key, and edt-bind-function-key.
Dave Love <fx@gnu.org>
parents:
diff changeset
536
Dave Love <fx@gnu.org>
parents:
diff changeset
537 The first two are for binding functions to keys which are standard across most
Dave Love <fx@gnu.org>
parents:
diff changeset
538 keyboards. This makes them keyboard independent, making it possible to define
Dave Love <fx@gnu.org>
parents:
diff changeset
539 these key bindings for all terminals in the file edt.el.
Dave Love <fx@gnu.org>
parents:
diff changeset
540
Dave Love <fx@gnu.org>
parents:
diff changeset
541 The first, edt-bind-standard-key, is used typically to bind emacs commands to
Dave Love <fx@gnu.org>
parents:
diff changeset
542 control keys, although some people use it to bind commands to other keys, as
Dave Love <fx@gnu.org>
parents:
diff changeset
543 well. (For example, some people use it to bind the VT200 seldom used
Dave Love <fx@gnu.org>
parents:
diff changeset
544 back-tick key (`) to the function "ESC-prefix" so it will behave like an ESC
Dave Love <fx@gnu.org>
parents:
diff changeset
545 key.) The second function, edt-bind-gold-key, is used to bind emacs commands
Dave Love <fx@gnu.org>
parents:
diff changeset
546 to gold key sequences involving alpha-numeric keys, special character keys,
Dave Love <fx@gnu.org>
parents:
diff changeset
547 and control keys.
Dave Love <fx@gnu.org>
parents:
diff changeset
548
Dave Love <fx@gnu.org>
parents:
diff changeset
549 The third function, edt-bind-function-key, is terminal dependent and is
Dave Love <fx@gnu.org>
parents:
diff changeset
550 defined in a terminal specific file (see edt-vt100.el for example). It is
Dave Love <fx@gnu.org>
parents:
diff changeset
551 used to bind emacs commands to function keys, to keypad keys, and to gold
Dave Love <fx@gnu.org>
parents:
diff changeset
552 sequences of those keys.
Dave Love <fx@gnu.org>
parents:
diff changeset
553
Dave Love <fx@gnu.org>
parents:
diff changeset
554 WARNING: Each of the three functions, edt-bind-function-key,
Dave Love <fx@gnu.org>
parents:
diff changeset
555 edt-bind-gold-key, and edt-bind-standard-key, has an optional
Dave Love <fx@gnu.org>
parents:
diff changeset
556 last argument. The optional argument should NOT be used in
Dave Love <fx@gnu.org>
parents:
diff changeset
557 edt-user.el! When the optional argument is missing, each
Dave Love <fx@gnu.org>
parents:
diff changeset
558 function knows to make the key binding part of the user's EDT
Dave Love <fx@gnu.org>
parents:
diff changeset
559 custom bindings, which is what you want to do in edt-user.el!
Dave Love <fx@gnu.org>
parents:
diff changeset
560
Dave Love <fx@gnu.org>
parents:
diff changeset
561 The EDT default bindings are set up in edt.el by calling these
Dave Love <fx@gnu.org>
parents:
diff changeset
562 same functions with the optional last argument set to "t". So, if
Dave Love <fx@gnu.org>
parents:
diff changeset
563 you decide to copy such function calls from edt.el to edt-user.el
Dave Love <fx@gnu.org>
parents:
diff changeset
564 for subsequent modification, BE SURE TO DELETE THE "t" AT THE END
Dave Love <fx@gnu.org>
parents:
diff changeset
565 OF EACH PARAMETER LIST!
Dave Love <fx@gnu.org>
parents:
diff changeset
566
Dave Love <fx@gnu.org>
parents:
diff changeset
567
Dave Love <fx@gnu.org>
parents:
diff changeset
568 SPECIFYING WORD ENTITIES:
Dave Love <fx@gnu.org>
parents:
diff changeset
569
Dave Love <fx@gnu.org>
parents:
diff changeset
570 The variable edt-word-entities is used to emulate EDT's SET ENTITY WORD
Dave Love <fx@gnu.org>
parents:
diff changeset
571 command. It contains a list of characters to be treated as words in
Dave Love <fx@gnu.org>
parents:
diff changeset
572 themselves. If the user does not define edt-word-entities in his/her .emacs
Dave Love <fx@gnu.org>
parents:
diff changeset
573 file, then it is set up with the EDT default containing only TAB.
Dave Love <fx@gnu.org>
parents:
diff changeset
574
Dave Love <fx@gnu.org>
parents:
diff changeset
575 The characters are stored in the list by their numerical values, not as
Dave Love <fx@gnu.org>
parents:
diff changeset
576 strings. Emacs supports several ways to specify the numerical value of a
Dave Love <fx@gnu.org>
parents:
diff changeset
577 character. One method is to use the question mark: ?A means the numerical
Dave Love <fx@gnu.org>
parents:
diff changeset
578 value for A, ?/ means the numerical value for /, and so on. Several
Dave Love <fx@gnu.org>
parents:
diff changeset
579 unprintable characters have special representations:
Dave Love <fx@gnu.org>
parents:
diff changeset
580
Dave Love <fx@gnu.org>
parents:
diff changeset
581 ?\b specifies BS, C-h
Dave Love <fx@gnu.org>
parents:
diff changeset
582 ?\t specifies TAB, C-i
Dave Love <fx@gnu.org>
parents:
diff changeset
583 ?\n specifies LFD, C-j
Dave Love <fx@gnu.org>
parents:
diff changeset
584 ?\v specifies VTAB, C-k
Dave Love <fx@gnu.org>
parents:
diff changeset
585 ?\f specifies FF, C-l
Dave Love <fx@gnu.org>
parents:
diff changeset
586 ?\r specifies CR, C-m
Dave Love <fx@gnu.org>
parents:
diff changeset
587 ?\e specifies ESC, C-[
Dave Love <fx@gnu.org>
parents:
diff changeset
588 ?\\ specifies \
Dave Love <fx@gnu.org>
parents:
diff changeset
589
Dave Love <fx@gnu.org>
parents:
diff changeset
590 Here are some examples:
Dave Love <fx@gnu.org>
parents:
diff changeset
591
Dave Love <fx@gnu.org>
parents:
diff changeset
592 (setq edt-word-entities '(?\t ?- ?/)) ;; Specifies TAB, - , and /
Dave Love <fx@gnu.org>
parents:
diff changeset
593 (setq edt-word-entities '(?\t) ;; Specifies TAB, the default
Dave Love <fx@gnu.org>
parents:
diff changeset
594
Dave Love <fx@gnu.org>
parents:
diff changeset
595 You can also specify characters by their decimal ascii values:
Dave Love <fx@gnu.org>
parents:
diff changeset
596
Dave Love <fx@gnu.org>
parents:
diff changeset
597 (setq edt-word-entities '(9 45 47)) ;; Specifies TAB, - , and /
Dave Love <fx@gnu.org>
parents:
diff changeset
598
Dave Love <fx@gnu.org>
parents:
diff changeset
599
Dave Love <fx@gnu.org>
parents:
diff changeset
600 ENABLING EDT CONTROL KEY SEQUENCE BINDINGS:
Dave Love <fx@gnu.org>
parents:
diff changeset
601
Dave Love <fx@gnu.org>
parents:
diff changeset
602 Where EDT key bindings and GNU Emacs key bindings conflict, the default GNU
Dave Love <fx@gnu.org>
parents:
diff changeset
603 Emacs key bindings are retained by default. Some diehard EDT users may not
Dave Love <fx@gnu.org>
parents:
diff changeset
604 like this. So, if the variable edt-use-EDT-control-key-bindings is set to
Dave Love <fx@gnu.org>
parents:
diff changeset
605 true in a user's .emacs file, then the default EDT Emulation mode will enable
Dave Love <fx@gnu.org>
parents:
diff changeset
606 most of the original EDT control key sequence bindings. If you wish to do
Dave Love <fx@gnu.org>
parents:
diff changeset
607 this, add the following line to your .emacs file:
Dave Love <fx@gnu.org>
parents:
diff changeset
608
Dave Love <fx@gnu.org>
parents:
diff changeset
609 (setq edt-use-EDT-control-key-bindings t)
Dave Love <fx@gnu.org>
parents:
diff changeset
610
Dave Love <fx@gnu.org>
parents:
diff changeset
611
Dave Love <fx@gnu.org>
parents:
diff changeset
612 DEFAULT EDT Keypad
Dave Love <fx@gnu.org>
parents:
diff changeset
613
Dave Love <fx@gnu.org>
parents:
diff changeset
614 F7: Copy Rectangle +----------+----------+----------+----------+
Dave Love <fx@gnu.org>
parents:
diff changeset
615 F8: Cut Rect Overstrike |Prev Line |Next Line |Bkwd Char |Frwd Char |
Dave Love <fx@gnu.org>
parents:
diff changeset
616 G-F8: Paste Rect Overstrike | (UP) | (DOWN) | (LEFT) | (RIGHT) |
Dave Love <fx@gnu.org>
parents:
diff changeset
617 F9: Cut Rect Insert |Window Top|Window Bot|Bkwd Sent |Frwd Sent |
Dave Love <fx@gnu.org>
parents:
diff changeset
618 G-F9: Paste Rect Insert +----------+----------+----------+----------+
Dave Love <fx@gnu.org>
parents:
diff changeset
619 F10: Cut Rectangle
Dave Love <fx@gnu.org>
parents:
diff changeset
620 G-F10: Paste Rectangle
Dave Love <fx@gnu.org>
parents:
diff changeset
621 F11: ESC
Dave Love <fx@gnu.org>
parents:
diff changeset
622 F12: Begining of Line +----------+----------+----------+----------+
Dave Love <fx@gnu.org>
parents:
diff changeset
623 G-F12: Delete Other Windows | GOLD | HELP | FNDNXT | DEL L |
Dave Love <fx@gnu.org>
parents:
diff changeset
624 F13: Delete to Begin of Word | (PF1) | (PF2) | (PF3) | (PF4) |
Dave Love <fx@gnu.org>
parents:
diff changeset
625 HELP: Keypad Help |Mark Wisel|Desc Funct| FIND | UND L |
Dave Love <fx@gnu.org>
parents:
diff changeset
626 DO: Execute extended command +----------+----------+----------+----------+
Dave Love <fx@gnu.org>
parents:
diff changeset
627 | PAGE | SECT | APPEND | DEL W |
Dave Love <fx@gnu.org>
parents:
diff changeset
628 C-g: Keyboard Quit | (7) | (8) | (9) | (-) |
Dave Love <fx@gnu.org>
parents:
diff changeset
629 G-C-g: Keyboard Quit |Ex Ext Cmd|Fill Regio| REPLACE | UND W |
Dave Love <fx@gnu.org>
parents:
diff changeset
630 C-h: Beginning of Line +----------+----------+----------+----------+
Dave Love <fx@gnu.org>
parents:
diff changeset
631 G-C-h: Emacs Help | ADVANCE | BACKUP | CUT | DEL C |
Dave Love <fx@gnu.org>
parents:
diff changeset
632 C-i: Tab Insert | (4) | (5) | (6) | (,) |
Dave Love <fx@gnu.org>
parents:
diff changeset
633 C-j: Delete to Begin of Word | BOTTOM | TOP | Yank | UND C |
Dave Love <fx@gnu.org>
parents:
diff changeset
634 C-k: Define Key +----------+----------+----------+----------+
Dave Love <fx@gnu.org>
parents:
diff changeset
635 G-C-k: Restore Key | WORD | EOL | CHAR | Next |
Dave Love <fx@gnu.org>
parents:
diff changeset
636 C-l: Form Feed Insert | (1) | (2) | (3) | Window |
Dave Love <fx@gnu.org>
parents:
diff changeset
637 C-n: Set Screen Width 80 | CHNGCASE | DEL EOL |Quoted Ins| !
Dave Love <fx@gnu.org>
parents:
diff changeset
638 C-r: Isearch Backward +---------------------+----------+ (ENTER) |
Dave Love <fx@gnu.org>
parents:
diff changeset
639 C-s: Isearch Forward | LINE | SELECT | !
Dave Love <fx@gnu.org>
parents:
diff changeset
640 C-t: Display the Time | (0) | (.) | Query |
Dave Love <fx@gnu.org>
parents:
diff changeset
641 C-u: Delete to Begin of Line | Open Line | RESET | Replace |
Dave Love <fx@gnu.org>
parents:
diff changeset
642 C-v: Redraw Display +---------------------+----------+----------+
Dave Love <fx@gnu.org>
parents:
diff changeset
643 C-w: Set Screen Width 132
Dave Love <fx@gnu.org>
parents:
diff changeset
644 C-z: Suspend Emacs +----------+----------+----------+
Dave Love <fx@gnu.org>
parents:
diff changeset
645 G-C-\: Split Window | FNDNXT | Yank | CUT |
Dave Love <fx@gnu.org>
parents:
diff changeset
646 | (FIND) | (INSERT) | (REMOVE) |
Dave Love <fx@gnu.org>
parents:
diff changeset
647 G-b: Buffer Menu | FIND | | COPY |
Dave Love <fx@gnu.org>
parents:
diff changeset
648 G-c: Compile +----------+----------+----------+
Dave Love <fx@gnu.org>
parents:
diff changeset
649 G-d: Delete Window |SELECT/RES|SECT BACKW|SECT FORWA|
Dave Love <fx@gnu.org>
parents:
diff changeset
650 G-e: Exit | (SELECT) |(PREVIOUS)| (NEXT) |
Dave Love <fx@gnu.org>
parents:
diff changeset
651 G-f: Find File | | | |
Dave Love <fx@gnu.org>
parents:
diff changeset
652 G-g: Find File Other Window +----------+----------+----------+
Dave Love <fx@gnu.org>
parents:
diff changeset
653 G-h: Keypad Help
Dave Love <fx@gnu.org>
parents:
diff changeset
654 G-i: Insert File
Dave Love <fx@gnu.org>
parents:
diff changeset
655 G-k: Toggle Capitalization Word
Dave Love <fx@gnu.org>
parents:
diff changeset
656 G-l: Lowercase Word or Region
Dave Love <fx@gnu.org>
parents:
diff changeset
657 G-m: Save Some Buffers
Dave Love <fx@gnu.org>
parents:
diff changeset
658 G-n: Next Error
Dave Love <fx@gnu.org>
parents:
diff changeset
659 G-o: Switch to Next Window
Dave Love <fx@gnu.org>
parents:
diff changeset
660 G-q: Quit
Dave Love <fx@gnu.org>
parents:
diff changeset
661 G-r: Revert File
Dave Love <fx@gnu.org>
parents:
diff changeset
662 G-s: Save Buffer
Dave Love <fx@gnu.org>
parents:
diff changeset
663 G-u: Uppercase Word or Region
Dave Love <fx@gnu.org>
parents:
diff changeset
664 G-v: Find File Other Window
Dave Love <fx@gnu.org>
parents:
diff changeset
665 G-w: Write file
Dave Love <fx@gnu.org>
parents:
diff changeset
666 G-y: EDT Emulation OFF
Dave Love <fx@gnu.org>
parents:
diff changeset
667 G-z: Switch to User EDT Key Bindings
Dave Love <fx@gnu.org>
parents:
diff changeset
668 G-1: Delete Other Windows
Dave Love <fx@gnu.org>
parents:
diff changeset
669 G-2: Split Window
Dave Love <fx@gnu.org>
parents:
diff changeset
670 G-%: Go to Percentage
Dave Love <fx@gnu.org>
parents:
diff changeset
671 G- : Undo (GOLD Spacebar)
Dave Love <fx@gnu.org>
parents:
diff changeset
672 G-=: Go to Line
Dave Love <fx@gnu.org>
parents:
diff changeset
673 G-`: What line
Dave Love <fx@gnu.org>
parents:
diff changeset
674
Dave Love <fx@gnu.org>
parents:
diff changeset
675 ;;; File: edt-user.el --- Sample User Customizations for the Enhanced
Dave Love <fx@gnu.org>
parents:
diff changeset
676 ;;; EDT Keypad Mode Emulation
Dave Love <fx@gnu.org>
parents:
diff changeset
677 ;;;
Dave Love <fx@gnu.org>
parents:
diff changeset
678 ;;; For GNU Emacs 19
Dave Love <fx@gnu.org>
parents:
diff changeset
679 ;;;
Dave Love <fx@gnu.org>
parents:
diff changeset
680 ;; Copyright (C) 1986, 1992, 1993 Free Software Foundation, Inc.
Dave Love <fx@gnu.org>
parents:
diff changeset
681
Dave Love <fx@gnu.org>
parents:
diff changeset
682 ;; Author: Kevin Gallagher <kevingal@onramp.net>
Dave Love <fx@gnu.org>
parents:
diff changeset
683 ;; Maintainer: Kevin Gallagher <kevingal@onramp.net>
Dave Love <fx@gnu.org>
parents:
diff changeset
684 ;; Keywords: emulations
Dave Love <fx@gnu.org>
parents:
diff changeset
685
Dave Love <fx@gnu.org>
parents:
diff changeset
686 ;; GNU Emacs is free software; you can redistribute it and/or modify
Dave Love <fx@gnu.org>
parents:
diff changeset
687 ;; it under the terms of the GNU General Public License as published by
Dave Love <fx@gnu.org>
parents:
diff changeset
688 ;; the Free Software Foundation; either version 2, or (at your option)
Dave Love <fx@gnu.org>
parents:
diff changeset
689 ;; any later version.
Dave Love <fx@gnu.org>
parents:
diff changeset
690
Dave Love <fx@gnu.org>
parents:
diff changeset
691 ;; GNU Emacs is distributed in the hope that it will be useful,
Dave Love <fx@gnu.org>
parents:
diff changeset
692 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
Dave Love <fx@gnu.org>
parents:
diff changeset
693 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
Dave Love <fx@gnu.org>
parents:
diff changeset
694 ;; GNU General Public License for more details.
Dave Love <fx@gnu.org>
parents:
diff changeset
695
Dave Love <fx@gnu.org>
parents:
diff changeset
696 ;; You should have received a copy of the GNU General Public License
Dave Love <fx@gnu.org>
parents:
diff changeset
697 ;; along with GNU Emacs; see the file COPYING. If not, write to the
Dave Love <fx@gnu.org>
parents:
diff changeset
698 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Dave Love <fx@gnu.org>
parents:
diff changeset
699 ;; Boston, MA 02111-1307, USA.
Dave Love <fx@gnu.org>
parents:
diff changeset
700
Dave Love <fx@gnu.org>
parents:
diff changeset
701 ;;; Commentary:
Dave Love <fx@gnu.org>
parents:
diff changeset
702
Dave Love <fx@gnu.org>
parents:
diff changeset
703 ;; This file contains GNU Emacs User Custom EDT bindings and functions. In
Dave Love <fx@gnu.org>
parents:
diff changeset
704 ;; this example file, there is no special test for the type of terminal being
Dave Love <fx@gnu.org>
parents:
diff changeset
705 ;; used. The assumption is that all key bindings here apply to all terminals
Dave Love <fx@gnu.org>
parents:
diff changeset
706 ;; that may be used. (In fact, it was written by an individual who uses only
Dave Love <fx@gnu.org>
parents:
diff changeset
707 ;; VT series terminals when logging into a VAX.)
Dave Love <fx@gnu.org>
parents:
diff changeset
708 ;;
Dave Love <fx@gnu.org>
parents:
diff changeset
709 ;; WARNING: Each of the three functions, edt-bind-function-key,
Dave Love <fx@gnu.org>
parents:
diff changeset
710 ;; edt-bind-gold-key, and edt-bind-standard-key, has an optional
Dave Love <fx@gnu.org>
parents:
diff changeset
711 ;; last argument. The optional argument should NOT be used in
Dave Love <fx@gnu.org>
parents:
diff changeset
712 ;; edt-user.el! When the optional argument is missing, each
Dave Love <fx@gnu.org>
parents:
diff changeset
713 ;; function knows to make the key binding part of the user's EDT
Dave Love <fx@gnu.org>
parents:
diff changeset
714 ;; custom bindings, which is what you want to do in edt-user.el!
Dave Love <fx@gnu.org>
parents:
diff changeset
715 ;;
Dave Love <fx@gnu.org>
parents:
diff changeset
716 ;; The EDT default bindings are set up in edt.el by calling these
Dave Love <fx@gnu.org>
parents:
diff changeset
717 ;; same functions with the optional last argument set to "t". So, if
Dave Love <fx@gnu.org>
parents:
diff changeset
718 ;; you decide to copy such function calls from edt.el to edt-user.el
Dave Love <fx@gnu.org>
parents:
diff changeset
719 ;; for subsequent modification, BE SURE TO DELETE THE "t" AT THE END
Dave Love <fx@gnu.org>
parents:
diff changeset
720 ;; OF EACH PARAMETER LIST!
Dave Love <fx@gnu.org>
parents:
diff changeset
721 ;;
Dave Love <fx@gnu.org>
parents:
diff changeset
722
Dave Love <fx@gnu.org>
parents:
diff changeset
723 ;;; Usage:
Dave Love <fx@gnu.org>
parents:
diff changeset
724
Dave Love <fx@gnu.org>
parents:
diff changeset
725 ;; See edt-user.doc in the emacs etc directory.
Dave Love <fx@gnu.org>
parents:
diff changeset
726
Dave Love <fx@gnu.org>
parents:
diff changeset
727 ;; ====================================================================
Dave Love <fx@gnu.org>
parents:
diff changeset
728
Dave Love <fx@gnu.org>
parents:
diff changeset
729 ;;;;
Dave Love <fx@gnu.org>
parents:
diff changeset
730 ;;;; Setup user custom EDT key bindings.
Dave Love <fx@gnu.org>
parents:
diff changeset
731 ;;;;
Dave Love <fx@gnu.org>
parents:
diff changeset
732
Dave Love <fx@gnu.org>
parents:
diff changeset
733 (defun edt-setup-user-bindings ()
Dave Love <fx@gnu.org>
parents:
diff changeset
734 "Assigns user custom EDT Emulation keyboard bindings."
Dave Love <fx@gnu.org>
parents:
diff changeset
735
Dave Love <fx@gnu.org>
parents:
diff changeset
736 ;; PF1 (GOLD), PF2, PF3, PF4
Dave Love <fx@gnu.org>
parents:
diff changeset
737 ;;
Dave Love <fx@gnu.org>
parents:
diff changeset
738 ;; This file MUST contain a binding of PF1 to edt-user-gold-map. So
Dave Love <fx@gnu.org>
parents:
diff changeset
739 ;; DON'T CHANGE OR DELETE THE REGULAR KEY BINDING OF PF1 BELOW!
Dave Love <fx@gnu.org>
parents:
diff changeset
740 ;; (However, you may change the GOLD-PF1 binding, if you wish.)
Dave Love <fx@gnu.org>
parents:
diff changeset
741 (edt-bind-function-key "PF1" 'edt-user-gold-map 'edt-mark-section-wisely)
Dave Love <fx@gnu.org>
parents:
diff changeset
742 (edt-bind-function-key "PF2" 'query-replace 'other-window)
Dave Love <fx@gnu.org>
parents:
diff changeset
743 (edt-bind-function-key "PF4" 'edt-delete-entire-line 'edt-undelete-line)
Dave Love <fx@gnu.org>
parents:
diff changeset
744
Dave Love <fx@gnu.org>
parents:
diff changeset
745 ;; EDT Keypad Keys
Dave Love <fx@gnu.org>
parents:
diff changeset
746 (edt-bind-function-key "KP1" 'edt-word-forward 'edt-change-case)
Dave Love <fx@gnu.org>
parents:
diff changeset
747 (edt-bind-function-key "KP3" 'edt-word-backward 'edt-copy)
Dave Love <fx@gnu.org>
parents:
diff changeset
748 (edt-bind-function-key "KP6" 'edt-cut-or-copy 'yank)
Dave Love <fx@gnu.org>
parents:
diff changeset
749 (edt-bind-function-key "KP8" 'edt-scroll-window 'fill-paragraph)
Dave Love <fx@gnu.org>
parents:
diff changeset
750 (edt-bind-function-key "KP9" 'open-line 'edt-eliminate-all-tabs)
Dave Love <fx@gnu.org>
parents:
diff changeset
751 (edt-bind-function-key "KPP"
Dave Love <fx@gnu.org>
parents:
diff changeset
752 'edt-toggle-select 'edt-line-to-middle-of-window)
Dave Love <fx@gnu.org>
parents:
diff changeset
753 (edt-bind-function-key "KPE" 'edt-change-direction 'overwrite-mode)
Dave Love <fx@gnu.org>
parents:
diff changeset
754
Dave Love <fx@gnu.org>
parents:
diff changeset
755 ;; GOLD bindings for regular keys.
Dave Love <fx@gnu.org>
parents:
diff changeset
756 (edt-bind-gold-key "a" 'edt-append)
Dave Love <fx@gnu.org>
parents:
diff changeset
757 (edt-bind-gold-key "A" 'edt-append)
Dave Love <fx@gnu.org>
parents:
diff changeset
758 (edt-bind-gold-key "h" 'edt-electric-user-keypad-help)
Dave Love <fx@gnu.org>
parents:
diff changeset
759 (edt-bind-gold-key "H" 'edt-electric-user-keypad-help)
Dave Love <fx@gnu.org>
parents:
diff changeset
760
Dave Love <fx@gnu.org>
parents:
diff changeset
761 ;; Control bindings for regular keys.
Dave Love <fx@gnu.org>
parents:
diff changeset
762 ;;; Leave binding of C-c as original prefix key.
Dave Love <fx@gnu.org>
parents:
diff changeset
763 (edt-bind-standard-key "\C-j" 'edt-duplicate-word)
Dave Love <fx@gnu.org>
parents:
diff changeset
764 (edt-bind-standard-key "\C-k" 'edt-define-key)
Dave Love <fx@gnu.org>
parents:
diff changeset
765 (edt-bind-gold-key "\C-k" 'edt-restore-key)
Dave Love <fx@gnu.org>
parents:
diff changeset
766 (edt-bind-standard-key "\C-l" 'edt-learn)
Dave Love <fx@gnu.org>
parents:
diff changeset
767 ;;; Leave binding of C-m to newline.
Dave Love <fx@gnu.org>
parents:
diff changeset
768 (edt-bind-standard-key "\C-n" 'edt-set-screen-width-80)
Dave Love <fx@gnu.org>
parents:
diff changeset
769 (edt-bind-standard-key "\C-o" 'open-line)
Dave Love <fx@gnu.org>
parents:
diff changeset
770 (edt-bind-standard-key "\C-p" 'fill-paragraph)
Dave Love <fx@gnu.org>
parents:
diff changeset
771 ;;; Leave binding of C-r to isearch-backward.
Dave Love <fx@gnu.org>
parents:
diff changeset
772 ;;; Leave binding of C-s to isearch-forward.
Dave Love <fx@gnu.org>
parents:
diff changeset
773 (edt-bind-standard-key "\C-t" 'edt-display-the-time)
Dave Love <fx@gnu.org>
parents:
diff changeset
774 (edt-bind-standard-key "\C-v" 'redraw-display)
Dave Love <fx@gnu.org>
parents:
diff changeset
775 (edt-bind-standard-key "\C-w" 'edt-set-screen-width-132)
Dave Love <fx@gnu.org>
parents:
diff changeset
776 ;;; Leave binding of C-x as original prefix key.
Dave Love <fx@gnu.org>
parents:
diff changeset
777 )
Dave Love <fx@gnu.org>
parents:
diff changeset
778
Dave Love <fx@gnu.org>
parents:
diff changeset
779 ;;;
Dave Love <fx@gnu.org>
parents:
diff changeset
780 ;;; LK-201 KEYBOARD USER EDT KEYPAD HELP
Dave Love <fx@gnu.org>
parents:
diff changeset
781 ;;;
Dave Love <fx@gnu.org>
parents:
diff changeset
782
Dave Love <fx@gnu.org>
parents:
diff changeset
783 (defun edt-user-keypad-help ()
Dave Love <fx@gnu.org>
parents:
diff changeset
784 "
Dave Love <fx@gnu.org>
parents:
diff changeset
785 USER EDT Keypad Active
Dave Love <fx@gnu.org>
parents:
diff changeset
786
Dave Love <fx@gnu.org>
parents:
diff changeset
787 +----------+----------+----------+----------+
Dave Love <fx@gnu.org>
parents:
diff changeset
788 F7: Copy Rectangle |Prev Line |Next Line |Bkwd Char |Frwd Char |
Dave Love <fx@gnu.org>
parents:
diff changeset
789 F8: Cut Rect Overstrike | (UP) | (DOWN) | (LEFT) | (RIGHT) |
Dave Love <fx@gnu.org>
parents:
diff changeset
790 G-F8: Paste Rect Overstrike |Window Top|Window Bot|Bkwd Sent |Frwd Sent |
Dave Love <fx@gnu.org>
parents:
diff changeset
791 F9: Cut Rect Insert +----------+----------+----------+----------+
Dave Love <fx@gnu.org>
parents:
diff changeset
792 G-F9: Paste Rect Insert
Dave Love <fx@gnu.org>
parents:
diff changeset
793 F10: Cut Rectangle
Dave Love <fx@gnu.org>
parents:
diff changeset
794 G-F10: Paste Rectangle
Dave Love <fx@gnu.org>
parents:
diff changeset
795 F11: ESC +----------+----------+----------+----------+
Dave Love <fx@gnu.org>
parents:
diff changeset
796 F12: Begining of Line | GOLD |Query Repl| FNDNXT |Del Ent L |
Dave Love <fx@gnu.org>
parents:
diff changeset
797 G-F12: Delete Other Windows | (PF1) | (PF2) | (PF3) | (PF4) |
Dave Love <fx@gnu.org>
parents:
diff changeset
798 F13: Delete to Begin of Word |Mark Wisel|Other Wind| FIND | UND L |
Dave Love <fx@gnu.org>
parents:
diff changeset
799 HELP: Keypad Help +----------+----------+----------+----------+
Dave Love <fx@gnu.org>
parents:
diff changeset
800 DO: Execute extended command | PAGE |Scroll Win|Open Line | DEL W |
Dave Love <fx@gnu.org>
parents:
diff changeset
801 | (7) | (8) | (9) | (-) |
Dave Love <fx@gnu.org>
parents:
diff changeset
802 C-a: Beginning of Line |Ex Ext Cmd|Fill Parag|Elim Tabs | UND W |
Dave Love <fx@gnu.org>
parents:
diff changeset
803 C-b: Switch to Buffer +----------+----------+----------+----------+
Dave Love <fx@gnu.org>
parents:
diff changeset
804 C-d: Delete Character | ADVANCE | BACKUP | CUT/COPY | DEL C |
Dave Love <fx@gnu.org>
parents:
diff changeset
805 C-e: End of Line | (4) | (5) | (6) | (,) |
Dave Love <fx@gnu.org>
parents:
diff changeset
806 C-f: Forward Character | BOTTOM | TOP | Yank | UND C |
Dave Love <fx@gnu.org>
parents:
diff changeset
807 C-g: Keyboard Quit +----------+----------+----------+----------+
Dave Love <fx@gnu.org>
parents:
diff changeset
808 G-C-g: Keyboard Quit | Fwd Word | EOL | Bwd Word | Change |
Dave Love <fx@gnu.org>
parents:
diff changeset
809 C-h: Electric Emacs Help | (1) | (2) | (3) | Direction|
Dave Love <fx@gnu.org>
parents:
diff changeset
810 G-C-h: Emacs Help | CHNGCASE | DEL EOL | COPY | |
Dave Love <fx@gnu.org>
parents:
diff changeset
811 C-i: Indent for Tab +---------------------+----------+ (ENTER) |
Dave Love <fx@gnu.org>
parents:
diff changeset
812 C-j: Duplicate Word | LINE |SELECT/RES| |
Dave Love <fx@gnu.org>
parents:
diff changeset
813 C-k: Define Key | (0) | (.) | Toggle |
Dave Love <fx@gnu.org>
parents:
diff changeset
814 G-C-k: Restore Key | Open Line |Center Lin|Insrt/Over|
Dave Love <fx@gnu.org>
parents:
diff changeset
815 C-l: Learn +---------------------+----------+----------+
Dave Love <fx@gnu.org>
parents:
diff changeset
816 C-n: Set Screen Width 80
Dave Love <fx@gnu.org>
parents:
diff changeset
817 C-o: Open Line +----------+----------+----------+
Dave Love <fx@gnu.org>
parents:
diff changeset
818 C-p: Fill Paragraph | FNDNXT | Yank | CUT |
Dave Love <fx@gnu.org>
parents:
diff changeset
819 C-q: Quoted Insert | (FIND)) | (INSERT) | (REMOVE) |
Dave Love <fx@gnu.org>
parents:
diff changeset
820 C-r: Isearch Backward | FIND | | COPY |
Dave Love <fx@gnu.org>
parents:
diff changeset
821 C-s: Isearch Forward +----------+----------+----------+
Dave Love <fx@gnu.org>
parents:
diff changeset
822 C-t: Display the Time |SELECT/RES|SECT BACKW|SECT FORWA|
Dave Love <fx@gnu.org>
parents:
diff changeset
823 C-u: Universal Argument | (SELECT) |(PREVIOUS)| (NEXT) |
Dave Love <fx@gnu.org>
parents:
diff changeset
824 C-v: Redraw Display | | | |
Dave Love <fx@gnu.org>
parents:
diff changeset
825 C-w: Set Screen Width 132 +----------+----------+----------+
Dave Love <fx@gnu.org>
parents:
diff changeset
826 C-z: Suspend Emacs
Dave Love <fx@gnu.org>
parents:
diff changeset
827 G-C-\\: Split Window
Dave Love <fx@gnu.org>
parents:
diff changeset
828
Dave Love <fx@gnu.org>
parents:
diff changeset
829 G-a: Append to Kill Buffer
Dave Love <fx@gnu.org>
parents:
diff changeset
830 G-b: Buffer Menu
Dave Love <fx@gnu.org>
parents:
diff changeset
831 G-c: Compile
Dave Love <fx@gnu.org>
parents:
diff changeset
832 G-d: Delete Window
Dave Love <fx@gnu.org>
parents:
diff changeset
833 G-e: Exit
Dave Love <fx@gnu.org>
parents:
diff changeset
834 G-f: Find File
Dave Love <fx@gnu.org>
parents:
diff changeset
835 G-g: Find File Other Window
Dave Love <fx@gnu.org>
parents:
diff changeset
836 G-h: Keypad Help
Dave Love <fx@gnu.org>
parents:
diff changeset
837 G-i: Insert File
Dave Love <fx@gnu.org>
parents:
diff changeset
838 G-k: Toggle Capitalization Word
Dave Love <fx@gnu.org>
parents:
diff changeset
839 G-l: Lowercase Word or Region
Dave Love <fx@gnu.org>
parents:
diff changeset
840 G-m: Save Some Buffers
Dave Love <fx@gnu.org>
parents:
diff changeset
841 G-n: Next Error
Dave Love <fx@gnu.org>
parents:
diff changeset
842 G-o: Switch Windows
Dave Love <fx@gnu.org>
parents:
diff changeset
843 G-q: Quit
Dave Love <fx@gnu.org>
parents:
diff changeset
844 G-r: Revert File
Dave Love <fx@gnu.org>
parents:
diff changeset
845 G-s: Save Buffer
Dave Love <fx@gnu.org>
parents:
diff changeset
846 G-u: Uppercase Word or Region
Dave Love <fx@gnu.org>
parents:
diff changeset
847 G-v: Find File Other Window
Dave Love <fx@gnu.org>
parents:
diff changeset
848 G-w: Write file
Dave Love <fx@gnu.org>
parents:
diff changeset
849 G-y: EDT Emulation OFF
Dave Love <fx@gnu.org>
parents:
diff changeset
850 G-z: Switch to Default EDT Key Bindings
Dave Love <fx@gnu.org>
parents:
diff changeset
851 G-2: Split Window
Dave Love <fx@gnu.org>
parents:
diff changeset
852 G-%: Go to Percentage
Dave Love <fx@gnu.org>
parents:
diff changeset
853 G- : Undo (GOLD Spacebar)
Dave Love <fx@gnu.org>
parents:
diff changeset
854 G-=: Go to Line
Dave Love <fx@gnu.org>
parents:
diff changeset
855 G-`: What line"
Dave Love <fx@gnu.org>
parents:
diff changeset
856
Dave Love <fx@gnu.org>
parents:
diff changeset
857 (interactive)
Dave Love <fx@gnu.org>
parents:
diff changeset
858 (describe-function 'edt-user-keypad-help))