aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/emulation
diff options
context:
space:
mode:
authorMiles Bader2008-01-09 01:21:15 +0000
committerMiles Bader2008-01-09 01:21:15 +0000
commit430d2ee2919b2d4693780f2474ba40148442d206 (patch)
treeea4b697cc7403cfffa9f4dcad08c61345a1d31b0 /lisp/emulation
parentbcab78b72bd640d41c7b4268e05e9f3f9e2c69c1 (diff)
parent59ce725a3b68cbc324f01bc8dc5f9e07286431d1 (diff)
downloademacs-430d2ee2919b2d4693780f2474ba40148442d206.tar.gz
emacs-430d2ee2919b2d4693780f2474ba40148442d206.zip
Merge from emacs--devo--0
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-312
Diffstat (limited to 'lisp/emulation')
-rw-r--r--lisp/emulation/crisp.el2
-rw-r--r--lisp/emulation/cua-base.el2
-rw-r--r--lisp/emulation/cua-gmrk.el2
-rw-r--r--lisp/emulation/cua-rect.el2
-rw-r--r--lisp/emulation/edt-lk201.el2
-rw-r--r--lisp/emulation/edt-mapper.el2
-rw-r--r--lisp/emulation/edt-pc.el2
-rw-r--r--lisp/emulation/edt-vt100.el2
-rw-r--r--lisp/emulation/edt.el2
-rw-r--r--lisp/emulation/keypad.el2
-rw-r--r--lisp/emulation/pc-mode.el2
-rw-r--r--lisp/emulation/pc-select.el2
-rw-r--r--lisp/emulation/tpu-edt.el153
-rw-r--r--lisp/emulation/tpu-extras.el2
-rw-r--r--lisp/emulation/tpu-mapper.el426
-rw-r--r--lisp/emulation/vip.el2
-rw-r--r--lisp/emulation/viper-cmd.el2
-rw-r--r--lisp/emulation/viper-ex.el2
-rw-r--r--lisp/emulation/viper-init.el2
-rw-r--r--lisp/emulation/viper-keym.el2
-rw-r--r--lisp/emulation/viper-macs.el2
-rw-r--r--lisp/emulation/viper-mous.el2
-rw-r--r--lisp/emulation/viper-util.el2
-rw-r--r--lisp/emulation/viper.el2
-rw-r--r--lisp/emulation/ws-mode.el2
25 files changed, 300 insertions, 325 deletions
diff --git a/lisp/emulation/crisp.el b/lisp/emulation/crisp.el
index f267f6fa0ab..b5fd7ee602c 100644
--- a/lisp/emulation/crisp.el
+++ b/lisp/emulation/crisp.el
@@ -1,7 +1,7 @@
1;;; crisp.el --- CRiSP/Brief Emacs emulator 1;;; crisp.el --- CRiSP/Brief Emacs emulator
2 2
3;; Copyright (C) 1997, 1998, 1999, 2001, 2002, 2003, 2004, 3;; Copyright (C) 1997, 1998, 1999, 2001, 2002, 2003, 2004,
4;; 2005, 2006, 2007 Free Software Foundation, Inc. 4;; 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
5 5
6;; Author: Gary D. Foster <Gary.Foster@Corp.Sun.COM> 6;; Author: Gary D. Foster <Gary.Foster@Corp.Sun.COM>
7;; Keywords: emulations brief crisp 7;; Keywords: emulations brief crisp
diff --git a/lisp/emulation/cua-base.el b/lisp/emulation/cua-base.el
index 1f696788869..2bc37a9bc95 100644
--- a/lisp/emulation/cua-base.el
+++ b/lisp/emulation/cua-base.el
@@ -1,7 +1,7 @@
1;;; cua-base.el --- emulate CUA key bindings 1;;; cua-base.el --- emulate CUA key bindings
2 2
3;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 3;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4;; 2005, 2006, 2007 Free Software Foundation, Inc. 4;; 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
5 5
6;; Author: Kim F. Storm <storm@cua.dk> 6;; Author: Kim F. Storm <storm@cua.dk>
7;; Keywords: keyboard emulation convenience cua 7;; Keywords: keyboard emulation convenience cua
diff --git a/lisp/emulation/cua-gmrk.el b/lisp/emulation/cua-gmrk.el
index 6211a3c3154..be87804f196 100644
--- a/lisp/emulation/cua-gmrk.el
+++ b/lisp/emulation/cua-gmrk.el
@@ -1,7 +1,7 @@
1;;; cua-gmrk.el --- CUA unified global mark support 1;;; cua-gmrk.el --- CUA unified global mark support
2 2
3;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 3;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4;; 2005, 2006, 2007 Free Software Foundation, Inc. 4;; 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
5 5
6;; Author: Kim F. Storm <storm@cua.dk> 6;; Author: Kim F. Storm <storm@cua.dk>
7;; Keywords: keyboard emulations convenience cua mark 7;; Keywords: keyboard emulations convenience cua mark
diff --git a/lisp/emulation/cua-rect.el b/lisp/emulation/cua-rect.el
index f6b50336815..93709f7660c 100644
--- a/lisp/emulation/cua-rect.el
+++ b/lisp/emulation/cua-rect.el
@@ -1,7 +1,7 @@
1;;; cua-rect.el --- CUA unified rectangle support 1;;; cua-rect.el --- CUA unified rectangle support
2 2
3;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 3;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4;; 2005, 2006, 2007 Free Software Foundation, Inc. 4;; 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
5 5
6;; Author: Kim F. Storm <storm@cua.dk> 6;; Author: Kim F. Storm <storm@cua.dk>
7;; Keywords: keyboard emulations convenience CUA 7;; Keywords: keyboard emulations convenience CUA
diff --git a/lisp/emulation/edt-lk201.el b/lisp/emulation/edt-lk201.el
index 41ef7e86498..91db5bc70f9 100644
--- a/lisp/emulation/edt-lk201.el
+++ b/lisp/emulation/edt-lk201.el
@@ -1,7 +1,7 @@
1;;; edt-lk201.el --- enhanced EDT keypad mode emulation for LK-201 keyboards 1;;; edt-lk201.el --- enhanced EDT keypad mode emulation for LK-201 keyboards
2 2
3;; Copyright (C) 1986, 1992, 1993, 1995, 2001, 2002, 2003, 2004, 3;; Copyright (C) 1986, 1992, 1993, 1995, 2001, 2002, 2003, 2004,
4;; 2005, 2006, 2007 Free Software Foundation, Inc. 4;; 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
5 5
6;; Author: Kevin Gallagher <Kevin.Gallagher@boeing.com> 6;; Author: Kevin Gallagher <Kevin.Gallagher@boeing.com>
7;; Maintainer: Kevin Gallagher <Kevin.Gallagher@boeing.com> 7;; Maintainer: Kevin Gallagher <Kevin.Gallagher@boeing.com>
diff --git a/lisp/emulation/edt-mapper.el b/lisp/emulation/edt-mapper.el
index d26c88b751f..79dabcc7433 100644
--- a/lisp/emulation/edt-mapper.el
+++ b/lisp/emulation/edt-mapper.el
@@ -1,7 +1,7 @@
1;;; edt-mapper.el --- create an EDT LK-201 map file for X-Windows Emacs 1;;; edt-mapper.el --- create an EDT LK-201 map file for X-Windows Emacs
2 2
3;; Copyright (C) 1994, 1995, 2000, 2001, 2002, 2003, 2004, 3;; Copyright (C) 1994, 1995, 2000, 2001, 2002, 2003, 2004,
4;; 2005, 2006, 2007 Free Software Foundation, Inc. 4;; 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
5 5
6;; Author: Kevin Gallagher <Kevin.Gallagher@boeing.com> 6;; Author: Kevin Gallagher <Kevin.Gallagher@boeing.com>
7;; Maintainer: Kevin Gallagher <Kevin.Gallagher@boeing.com> 7;; Maintainer: Kevin Gallagher <Kevin.Gallagher@boeing.com>
diff --git a/lisp/emulation/edt-pc.el b/lisp/emulation/edt-pc.el
index 0d6a4964813..5bfaf828ea6 100644
--- a/lisp/emulation/edt-pc.el
+++ b/lisp/emulation/edt-pc.el
@@ -1,7 +1,7 @@
1;;; edt-pc.el --- enhanced EDT keypad mode emulation for PC 101 keyboards 1;;; edt-pc.el --- enhanced EDT keypad mode emulation for PC 101 keyboards
2 2
3;; Copyright (C) 1986, 1994, 1995, 2001, 2002, 2003, 2004, 3;; Copyright (C) 1986, 1994, 1995, 2001, 2002, 2003, 2004,
4;; 2005, 2006, 2007 Free Software Foundation, Inc. 4;; 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
5 5
6;; Author: Kevin Gallagher <Kevin.Gallagher@boeing.com> 6;; Author: Kevin Gallagher <Kevin.Gallagher@boeing.com>
7;; Maintainer: Kevin Gallagher <Kevin.Gallagher@boeing.com> 7;; Maintainer: Kevin Gallagher <Kevin.Gallagher@boeing.com>
diff --git a/lisp/emulation/edt-vt100.el b/lisp/emulation/edt-vt100.el
index fbe56c2c341..e534927adc2 100644
--- a/lisp/emulation/edt-vt100.el
+++ b/lisp/emulation/edt-vt100.el
@@ -1,7 +1,7 @@
1;;; edt-vt100.el --- enhanced EDT keypad mode emulation for VT series terminals 1;;; edt-vt100.el --- enhanced EDT keypad mode emulation for VT series terminals
2 2
3;; Copyright (C) 1986, 1992, 1993, 1995, 2002, 2003, 2004, 3;; Copyright (C) 1986, 1992, 1993, 1995, 2002, 2003, 2004,
4;; 2005, 2006, 2007 Free Software Foundation, Inc. 4;; 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
5 5
6;; Author: Kevin Gallagher <Kevin.Gallagher@boeing.com> 6;; Author: Kevin Gallagher <Kevin.Gallagher@boeing.com>
7;; Maintainer: Kevin Gallagher <Kevin.Gallagher@boeing.com> 7;; Maintainer: Kevin Gallagher <Kevin.Gallagher@boeing.com>
diff --git a/lisp/emulation/edt.el b/lisp/emulation/edt.el
index 1674e7a266b..eca3ce0f400 100644
--- a/lisp/emulation/edt.el
+++ b/lisp/emulation/edt.el
@@ -1,7 +1,7 @@
1;;; edt.el --- enhanced EDT keypad mode emulation for GNU Emacs 19 1;;; edt.el --- enhanced EDT keypad mode emulation for GNU Emacs 19
2 2
3;; Copyright (C) 1986, 1992, 1993, 1994, 1995, 2000, 2001, 2002, 2003, 3;; Copyright (C) 1986, 1992, 1993, 1994, 1995, 2000, 2001, 2002, 2003,
4;; 2004, 2005, 2006, 2007 Free Software Foundation, Inc. 4;; 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
5 5
6;; Author: Kevin Gallagher <Kevin.Gallagher@boeing.com> 6;; Author: Kevin Gallagher <Kevin.Gallagher@boeing.com>
7;; Maintainer: Kevin Gallagher <Kevin.Gallagher@boeing.com> 7;; Maintainer: Kevin Gallagher <Kevin.Gallagher@boeing.com>
diff --git a/lisp/emulation/keypad.el b/lisp/emulation/keypad.el
index 307eadd069a..565caf2368c 100644
--- a/lisp/emulation/keypad.el
+++ b/lisp/emulation/keypad.el
@@ -1,7 +1,7 @@
1;;; keypad.el --- simplified keypad bindings 1;;; keypad.el --- simplified keypad bindings
2 2
3;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 3;; Copyright (C) 2002, 2003, 2004, 2005, 2006,
4;; 2007 Free Software Foundation, Inc. 4;; 2007, 2008 Free Software Foundation, Inc.
5 5
6;; Author: Kim F. Storm <storm@cua.dk> 6;; Author: Kim F. Storm <storm@cua.dk>
7;; Keywords: keyboard convenience 7;; Keywords: keyboard convenience
diff --git a/lisp/emulation/pc-mode.el b/lisp/emulation/pc-mode.el
index 6e04d678f69..075da633cef 100644
--- a/lisp/emulation/pc-mode.el
+++ b/lisp/emulation/pc-mode.el
@@ -1,7 +1,7 @@
1;;; pc-mode.el --- emulate certain key bindings used on PCs 1;;; pc-mode.el --- emulate certain key bindings used on PCs
2 2
3;; Copyright (C) 1995, 2001, 2002, 2003, 2004, 2005, 3;; Copyright (C) 1995, 2001, 2002, 2003, 2004, 2005,
4;; 2006, 2007 Free Software Foundation, Inc. 4;; 2006, 2007, 2008 Free Software Foundation, Inc.
5 5
6;; Maintainer: FSF 6;; Maintainer: FSF
7;; Keywords: emulations 7;; Keywords: emulations
diff --git a/lisp/emulation/pc-select.el b/lisp/emulation/pc-select.el
index c35044b70ec..956c61ee098 100644
--- a/lisp/emulation/pc-select.el
+++ b/lisp/emulation/pc-select.el
@@ -3,7 +3,7 @@
3;;; including key bindings. 3;;; including key bindings.
4 4
5;; Copyright (C) 1995, 1996, 1997, 2000, 2001, 2002, 2003, 2004, 5;; Copyright (C) 1995, 1996, 1997, 2000, 2001, 2002, 2003, 2004,
6;; 2005, 2006, 2007 Free Software Foundation, Inc. 6;; 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
7 7
8;; Author: Michael Staats <michael@thp.Uni-Duisburg.DE> 8;; Author: Michael Staats <michael@thp.Uni-Duisburg.DE>
9;; Keywords: convenience emulation 9;; Keywords: convenience emulation
diff --git a/lisp/emulation/tpu-edt.el b/lisp/emulation/tpu-edt.el
index c5ae34e0f07..686a79c9350 100644
--- a/lisp/emulation/tpu-edt.el
+++ b/lisp/emulation/tpu-edt.el
@@ -1,7 +1,7 @@
1;;; tpu-edt.el --- Emacs emulating TPU emulating EDT 1;;; tpu-edt.el --- Emacs emulating TPU emulating EDT
2 2
3;; Copyright (C) 1993, 1994, 1995, 2000, 2001, 2002, 2003, 2004, 3;; Copyright (C) 1993, 1994, 1995, 2000, 2001, 2002, 2003, 2004,
4;; 2005, 2006, 2007 Free Software Foundation, Inc. 4;; 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
5 5
6;; Author: Rob Riepel <riepel@networking.stanford.edu> 6;; Author: Rob Riepel <riepel@networking.stanford.edu>
7;; Maintainer: Rob Riepel <riepel@networking.stanford.edu> 7;; Maintainer: Rob Riepel <riepel@networking.stanford.edu>
@@ -66,11 +66,10 @@
66;; style keyboards. VT terminal emulators, including xterm with the 66;; style keyboards. VT terminal emulators, including xterm with the
67;; appropriate key translations, work just fine too. 67;; appropriate key translations, work just fine too.
68 68
69;; TPU-edt works with X-windows. This is accomplished through a TPU-edt X 69;; TPU-edt works with X-windows. This is accomplished through a TPU-edt
70;; key map. The TPU-edt module tpu-mapper creates this map and stores it 70;; X key map. The tpu-mapper command creates this map and stores it in a
71;; in a file. Tpu-mapper will be run automatically the first time you 71;; file. See the tpu-mapper command help for more information, or just
72;; invoke the X-windows version of emacs, or you can run it by hand. See 72;; run it and follow the directions.
73;; the commentary in tpu-mapper.el for details.
74 73
75 74
76;; %% Differences Between TPU-edt and DEC TPU/edt 75;; %% Differences Between TPU-edt and DEC TPU/edt
@@ -80,7 +79,7 @@
80;; mark". The mark is set at one end of a selected region; the cursor is 79;; mark". The mark is set at one end of a selected region; the cursor is
81;; at the other. In cases where the selected region cannot be shown in 80;; at the other. In cases where the selected region cannot be shown in
82;; inverse video an at sign (@) appears in the mode line when mark is set. 81;; inverse video an at sign (@) appears in the mode line when mark is set.
83;; The native emacs command ^X^X (Control-X twice) exchanges the cursor 82;; The native Emacs command ^X^X (Control-X twice) exchanges the cursor
84;; with the mark; this provides a handy way to find the location of the 83;; with the mark; this provides a handy way to find the location of the
85;; mark. 84;; mark.
86 85
@@ -92,8 +91,8 @@
92;; approximation of free mode, see the commentary in tpu-extras.el for 91;; approximation of free mode, see the commentary in tpu-extras.el for
93;; details. 92;; details.
94 93
95;; Like TPU, emacs uses multiple buffers. Some buffers are used to hold 94;; Like TPU, Emacs uses multiple buffers. Some buffers are used to hold
96;; files you are editing; other "internal" buffers are used for emacs' own 95;; files you are editing; other "internal" buffers are used for Emacs' own
97;; purposes (like showing you help). Here are some commands for dealing 96;; purposes (like showing you help). Here are some commands for dealing
98;; with buffers. 97;; with buffers.
99 98
@@ -115,9 +114,9 @@
115;; Note that the buffers associated with deleted windows still exist! 114;; Note that the buffers associated with deleted windows still exist!
116 115
117;; Like TPU, TPU-edt has a "command" function, invoked with Gold-KP7 or 116;; Like TPU, TPU-edt has a "command" function, invoked with Gold-KP7 or
118;; Do. Most of the commands available are emacs commands. Some TPU 117;; Do. Most of the commands available are Emacs commands. Some TPU
119;; commands are available, they are: replace, exit, quit, include, and 118;; commands are available, they are: replace, exit, quit, include, and
120;; Get (unfortunately, "get" is an internal emacs function, so we are 119;; Get (unfortunately, "get" is an internal Emacs function, so we are
121;; stuck with "Get" - to make life easier, Get is available as Gold-g). 120;; stuck with "Get" - to make life easier, Get is available as Gold-g).
122 121
123;; TPU-edt supports the recall of commands, file names, and search 122;; TPU-edt supports the recall of commands, file names, and search
@@ -128,10 +127,10 @@
128;; a small help file showing the default keypad layout, control key 127;; a small help file showing the default keypad layout, control key
129;; functions, and Gold key functions. Pressing any key inside of help 128;; functions, and Gold key functions. Pressing any key inside of help
130;; splits the screen and prints a description of the function of the 129;; splits the screen and prints a description of the function of the
131;; pressed key. Gold-PF2 invokes the native emacs help, with its 130;; pressed key. Gold-PF2 invokes the native Emacs help, with its
132;; zillions of options. 131;; zillions of options.
133 132
134;; Thanks to emacs, TPU-edt has some extensions that may make your life 133;; Thanks to Emacs, TPU-edt has some extensions that may make your life
135;; easier, or at least more interesting. For example, Gold-r toggles 134;; easier, or at least more interesting. For example, Gold-r toggles
136;; TPU-edt rectangular mode. In rectangular mode, Remove and Insert work 135;; TPU-edt rectangular mode. In rectangular mode, Remove and Insert work
137;; on rectangles. Likewise, Gold-* toggles TPU-edt regular expression 136;; on rectangles. Likewise, Gold-* toggles TPU-edt regular expression
@@ -147,27 +146,27 @@
147;; twice) on a particular line moves you back to the original window 146;; twice) on a particular line moves you back to the original window
148;; at that line. Occur is on Gold-o. 147;; at that line. Occur is on Gold-o.
149 148
150;; Finally, as you edit, remember that all the power of emacs is at 149;; Finally, as you edit, remember that all the power of Emacs is at
151;; your disposal. It really is a fantastic tool. You may even want to 150;; your disposal. It really is a fantastic tool. You may even want to
152;; take some time and read the emacs tutorial; perhaps not to learn the 151;; take some time and read the Emacs tutorial; perhaps not to learn the
153;; native emacs key bindings, but to get a feel for all the things 152;; native Emacs key bindings, but to get a feel for all the things
154;; emacs can do for you. The emacs tutorial is available from the 153;; Emacs can do for you. The Emacs tutorial is available from the
155;; emacs help function: "Gold-PF2 t" 154;; Emacs help function: "Gold-PF2 t"
156 155
157 156
158;; %% Starting TPU-edt 157;; %% Starting TPU-edt
159 158
160;; All you have to do to start TPU-edt, is turn it on. This can be 159;; All you have to do to start TPU-edt, is turn it on. This can be
161;; done from the command line when running emacs. 160;; done from the command line when running Emacs.
162 161
163;; prompt> emacs -f tpu-edt 162;; prompt> emacs -f tpu-edt
164 163
165;; If you've already started emacs, turn on TPU-edt using the tpu-edt 164;; If you've already started Emacs, turn on TPU-edt using the tpu-edt
166;; command. First press `M-x' (that's usually `ESC' followed by `x') 165;; command. First press `M-x' (that's usually `ESC' followed by `x')
167;; and type `tpu-edt' followed by a carriage return. 166;; and type `tpu-edt' followed by a carriage return.
168 167
169;; If you like TPU-edt and want to use it all the time, you can start 168;; If you like TPU-edt and want to use it all the time, you can start
170;; TPU-edt using the emacs initialization file, .emacs. Simply create 169;; TPU-edt using the Emacs initialization file, .emacs. Simply create
171;; a .emacs file in your home directory containing the line: 170;; a .emacs file in your home directory containing the line:
172 171
173;; (tpu-edt) 172;; (tpu-edt)
@@ -177,10 +176,10 @@
177 176
178;; %% Customizing TPU-edt using the Emacs Initialization File 177;; %% Customizing TPU-edt using the Emacs Initialization File
179 178
180;; The following is a sample emacs initialization file. It shows how to 179;; The following is a sample Emacs initialization file. It shows how to
181;; invoke TPU-edt, and how to customize it. 180;; invoke TPU-edt, and how to customize it.
182 181
183;; ; .emacs - a sample emacs initialization file 182;; ; .emacs - a sample Emacs initialization file
184 183
185;; ; Turn on TPU-edt 184;; ; Turn on TPU-edt
186;; (tpu-edt) 185;; (tpu-edt)
@@ -200,12 +199,12 @@
200;; (setq require-final-newline t) 199;; (setq require-final-newline t)
201 200
202;; ; Emacs uses Control-s and Control-q. Problems can occur when using 201;; ; Emacs uses Control-s and Control-q. Problems can occur when using
203;; ; emacs on terminals that use these codes for flow control (Xon/Xoff 202;; ; Emacs on terminals that use these codes for flow control (Xon/Xoff
204;; ; flow control). These lines disable emacs' use of these characters. 203;; ; flow control). These lines disable Emacs' use of these characters.
205;; (global-unset-key "\C-s") 204;; (global-unset-key "\C-s")
206;; (global-unset-key "\C-q") 205;; (global-unset-key "\C-q")
207 206
208;; ; The emacs universal-argument function is very useful. 207;; ; The Emacs universal-argument function is very useful.
209;; ; This line maps universal-argument to Gold-PF1. 208;; ; This line maps universal-argument to Gold-PF1.
210;; (define-key tpu-gold-map [kp_f1] 'universal-argument) ; Gold-PF1 209;; (define-key tpu-gold-map [kp_f1] 'universal-argument) ; Gold-PF1
211 210
@@ -225,9 +224,9 @@
225;; %% Regular Expressions in TPU-edt 224;; %% Regular Expressions in TPU-edt
226 225
227;; Gold-* toggles TPU-edt regular expression mode. In regular expression 226;; Gold-* toggles TPU-edt regular expression mode. In regular expression
228;; mode, find, find next, replace, and substitute accept emacs regular 227;; mode, find, find next, replace, and substitute accept Emacs regular
229;; expressions. A complete list of emacs regular expressions can be found 228;; expressions. A complete list of Emacs regular expressions can be found
230;; using the emacs "info" command (it's somewhat like the VMS help 229;; using the Emacs "info" command (it's somewhat like the VMS help
231;; command). Try the following sequence of commands: 230;; command). Try the following sequence of commands:
232 231
233;; DO info <enter info mode> 232;; DO info <enter info mode>
@@ -256,13 +255,13 @@
256;; Gold-^ Add a string at BOL in region or buffer 255;; Gold-^ Add a string at BOL in region or buffer
257;; Gold-$ Add a string at EOL in region or buffer 256;; Gold-$ Add a string at EOL in region or buffer
258 257
259;; There is also a TPU-edt interface to the native emacs string replacement 258;; There is also a TPU-edt interface to the native Emacs string replacement
260;; commands. Gold-/ invokes this command. It accepts regular expressions 259;; commands. Gold-/ invokes this command. It accepts regular expressions
261;; if TPU-edt is in regular expression mode. Given a repeat count, it will 260;; if TPU-edt is in regular expression mode. Given a repeat count, it will
262;; perform the replacement without prompting for confirmation. 261;; perform the replacement without prompting for confirmation.
263 262
264;; This command replaces empty strings correctly, however, it has its 263;; This command replaces empty strings correctly, however, it has its
265;; drawbacks. As a native emacs command, it has a different interface 264;; drawbacks. As a native Emacs command, it has a different interface
266;; than the emulated TPU commands. Also, it works only in the forward 265;; than the emulated TPU commands. Also, it works only in the forward
267;; direction, regardless of the current TPU-edt direction. 266;; direction, regardless of the current TPU-edt direction.
268 267
@@ -292,7 +291,7 @@
292;;; User Configurable Variables 291;;; User Configurable Variables
293;;; 292;;;
294(defcustom tpu-have-ispell t 293(defcustom tpu-have-ispell t
295 "If non-nil (default), TPU-edt uses ispell for spell checking." 294 "If non-nil (default), TPU-edt uses Ispell for spell checking."
296 :type 'boolean 295 :type 'boolean
297 :group 'tpu) 296 :group 'tpu)
298 297
@@ -695,15 +694,15 @@ GOLD is the ASCII 7-bit escape sequence <ESC>OP.")
695 (set-marker tpu-match-end-mark nil)) 694 (set-marker tpu-match-end-mark nil))
696 695
697(defun tpu-match-beginning nil 696(defun tpu-match-beginning nil
698 "Returns the location of the last match beginning." 697 "Return the location of the last match beginning."
699 (marker-position tpu-match-beginning-mark)) 698 (marker-position tpu-match-beginning-mark))
700 699
701(defun tpu-match-end nil 700(defun tpu-match-end nil
702 "Returns the location of the last match end." 701 "Return the location of the last match end."
703 (marker-position tpu-match-end-mark)) 702 (marker-position tpu-match-end-mark))
704 703
705(defun tpu-check-match nil 704(defun tpu-check-match nil
706 "Returns t if point is between tpu-match markers. 705 "Return t if point is between tpu-match markers.
707Otherwise sets the tpu-match markers to nil and returns nil." 706Otherwise sets the tpu-match markers to nil and returns nil."
708 ;; make sure 1- marker is in this buffer 707 ;; make sure 1- marker is in this buffer
709 ;; 2- point is at or after beginning marker 708 ;; 2- point is at or after beginning marker
@@ -814,7 +813,7 @@ Top line is 0. Counts each text line only once, even if it wraps."
814 (message "Mark %d set." num)) 813 (message "Mark %d set." num))
815 814
816(defun tpu-goto-breadcrumb (num) 815(defun tpu-goto-breadcrumb (num)
817 "Returns to a breadcrumb set with drop-breadcrumb." 816 "Return to a breadcrumb set with drop-breadcrumb."
818 (interactive "p") 817 (interactive "p")
819 (cond ((get tpu-breadcrumb-plist num) 818 (cond ((get tpu-breadcrumb-plist num)
820 (switch-to-buffer (car (get tpu-breadcrumb-plist num))) 819 (switch-to-buffer (car (get tpu-breadcrumb-plist num)))
@@ -873,7 +872,7 @@ With argument, fill and justify."
873 tpu-version)) 872 tpu-version))
874 873
875(defun tpu-reset-screen-size (height width) 874(defun tpu-reset-screen-size (height width)
876 "Sets the screen size." 875 "Set the screen size."
877 (interactive "nnew screen height: \nnnew screen width: ") 876 (interactive "nnew screen height: \nnnew screen width: ")
878 (set-frame-height (selected-frame) height) 877 (set-frame-height (selected-frame) height)
879 (set-frame-width (selected-frame) width)) 878 (set-frame-width (selected-frame) width))
@@ -895,8 +894,8 @@ With argument, fill and justify."
895 (if tpu-newline-and-indent-p " and indents." ".")))) 894 (if tpu-newline-and-indent-p " and indents." "."))))
896 895
897(defun tpu-spell-check nil 896(defun tpu-spell-check nil
898 "Checks the spelling of the region, or of the entire buffer if no 897 "Check the spelling of the region, or of the entire buffer,
899 region is selected." 898if no region is selected."
900 (interactive) 899 (interactive)
901 (cond (tpu-have-ispell 900 (cond (tpu-have-ispell
902 (if (tpu-mark) (ispell-region (tpu-mark) (point)) (ispell-buffer))) 901 (if (tpu-mark) (ispell-region (tpu-mark) (point)) (ispell-buffer)))
@@ -905,7 +904,7 @@ With argument, fill and justify."
905 (if (tpu-mark) (tpu-unselect t))) 904 (if (tpu-mark) (tpu-unselect t)))
906 905
907(defun tpu-toggle-overwrite-mode nil 906(defun tpu-toggle-overwrite-mode nil
908 "Switches in and out of overwrite mode" 907 "Switch in and out of overwrite mode."
909 (interactive) 908 (interactive)
910 (cond (overwrite-mode 909 (cond (overwrite-mode
911 (tpu-local-set-key "\177" tpu-saved-delete-func) 910 (tpu-local-set-key "\177" tpu-saved-delete-func)
@@ -916,8 +915,7 @@ With argument, fill and justify."
916 (overwrite-mode 1)))) 915 (overwrite-mode 1))))
917 916
918(defun tpu-special-insert (num) 917(defun tpu-special-insert (num)
919 "Insert a character or control code according to 918 "Insert a character or control code according to its ASCII decimal value."
920its ASCII decimal value."
921 (interactive "P") 919 (interactive "P")
922 (if overwrite-mode (delete-char 1)) 920 (if overwrite-mode (delete-char 1))
923 (insert (if num num 0))) 921 (insert (if num num 0)))
@@ -935,19 +933,19 @@ This is useful for inserting control characters."
935;;; TPU line-mode commands 933;;; TPU line-mode commands
936;;; 934;;;
937(defun tpu-include (file) 935(defun tpu-include (file)
938 "TPU-like include file" 936 "TPU-like include file."
939 (interactive "fInclude file: ") 937 (interactive "fInclude file: ")
940 (insert-file-contents file) 938 (insert-file-contents file)
941 (message "")) 939 (message ""))
942 940
943(defun tpu-get (file) 941(defun tpu-get (file)
944 "TPU-like get file" 942 "TPU-like get file."
945 (interactive "FFile to get: ") 943 (interactive "FFile to get: ")
946 (find-file file find-file-wildcards)) 944 (find-file file find-file-wildcards))
947 945
948(defun tpu-what-line nil 946(defun tpu-what-line nil
949 "Tells what line the point is on, 947 "Tell what line the point is on,
950 and the total number of lines in the buffer." 948and the total number of lines in the buffer."
951 (interactive) 949 (interactive)
952 (if (eobp) 950 (if (eobp)
953 (message "You are at the End of Buffer. The last line is %d." 951 (message "You are at the End of Buffer. The last line is %d."
@@ -1216,12 +1214,12 @@ This is useful for inserting control characters."
1216;;; Auto-insert 1214;;; Auto-insert
1217;;; 1215;;;
1218(defun tpu-insert-escape nil 1216(defun tpu-insert-escape nil
1219 "Inserts an escape character, and so becomes the escape-key alias." 1217 "Insert an escape character, and so becomes the escape-key alias."
1220 (interactive) 1218 (interactive)
1221 (insert "\e")) 1219 (insert "\e"))
1222 1220
1223(defun tpu-insert-formfeed nil 1221(defun tpu-insert-formfeed nil
1224 "Inserts a formfeed character." 1222 "Insert a formfeed character."
1225 (interactive) 1223 (interactive)
1226 (insert "\C-L")) 1224 (insert "\C-L"))
1227 1225
@@ -1232,7 +1230,7 @@ This is useful for inserting control characters."
1232(defvar tpu-saved-control-r nil "Saved value of Control-r.") 1230(defvar tpu-saved-control-r nil "Saved value of Control-r.")
1233 1231
1234(defun tpu-end-define-macro-key (key) 1232(defun tpu-end-define-macro-key (key)
1235 "Ends the current macro definition" 1233 "End the current macro definition."
1236 (interactive "kPress the key you want to use to do what was just learned: ") 1234 (interactive "kPress the key you want to use to do what was just learned: ")
1237 (end-kbd-macro nil) 1235 (end-kbd-macro nil)
1238 (global-set-key key last-kbd-macro) 1236 (global-set-key key last-kbd-macro)
@@ -1250,7 +1248,7 @@ This is useful for inserting control characters."
1250;;; Buffers and Windows 1248;;; Buffers and Windows
1251;;; 1249;;;
1252(defun tpu-kill-buffer nil 1250(defun tpu-kill-buffer nil
1253 "Kills the current buffer. If tpu-kill-buffers-silently is non-nil, 1251 "Kill the current buffer. If tpu-kill-buffers-silently is non-nil,
1254kills modified buffers without asking." 1252kills modified buffers without asking."
1255 (interactive) 1253 (interactive)
1256 (if tpu-kill-buffers-silently (set-buffer-modified-p nil)) 1254 (if tpu-kill-buffers-silently (set-buffer-modified-p nil))
@@ -1281,7 +1279,7 @@ kills modified buffers without asking."
1281 (switch-to-buffer (car (reverse list))))) 1279 (switch-to-buffer (car (reverse list)))))
1282 1280
1283(defun tpu-make-file-buffer-list (buffer-list) 1281(defun tpu-make-file-buffer-list (buffer-list)
1284 "Returns names from BUFFER-LIST excluding those beginning with a space or star." 1282 "Return names from BUFFER-LIST excluding those beginning with a space or star."
1285 (delq nil (mapcar '(lambda (b) 1283 (delq nil (mapcar '(lambda (b)
1286 (if (or (= (aref (buffer-name b) 0) ? ) 1284 (if (or (= (aref (buffer-name b) 0) ? )
1287 (= (aref (buffer-name b) 0) ?*)) nil b)) 1285 (= (aref (buffer-name b) 0) ?*)) nil b))
@@ -1304,7 +1302,7 @@ kills modified buffers without asking."
1304;;; Search 1302;;; Search
1305;;; 1303;;;
1306(defun tpu-toggle-regexp nil 1304(defun tpu-toggle-regexp nil
1307 "Switches in and out of regular expression search and replace mode." 1305 "Switch in and out of regular expression search and replace mode."
1308 (interactive) 1306 (interactive)
1309 (setq tpu-regexp-p (not tpu-regexp-p)) 1307 (setq tpu-regexp-p (not tpu-regexp-p))
1310 (tpu-set-search) 1308 (tpu-set-search)
@@ -1370,8 +1368,8 @@ The search is performed in the current direction."
1370(declare-function tpu-emacs-rev-search "tpu-edt") 1368(declare-function tpu-emacs-rev-search "tpu-edt")
1371 1369
1372(defun tpu-set-search (&optional arg) 1370(defun tpu-set-search (&optional arg)
1373 "Set the search functions and set the search direction to the current 1371 "Set the search functions and set the search direction to the current direction.
1374direction. If an argument is specified, don't set the search direction." 1372If an argument is specified, don't set the search direction."
1375 (if (not arg) (setq tpu-searching-forward tpu-advance)) 1373 (if (not arg) (setq tpu-searching-forward tpu-advance))
1376 (cond (tpu-searching-forward 1374 (cond (tpu-searching-forward
1377 (cond (tpu-regexp-p 1375 (cond (tpu-regexp-p
@@ -1428,7 +1426,7 @@ direction. If an argument is specified, don't set the search direction."
1428(defalias 'tpu-search-internal-core (symbol-function 'tpu-search-internal)) 1426(defalias 'tpu-search-internal-core (symbol-function 'tpu-search-internal))
1429 1427
1430(defun tpu-check-search-case (string) 1428(defun tpu-check-search-case (string)
1431 "Returns t if string contains upper case." 1429 "Return t if string contains upper case."
1432 ;; if using regexp, eliminate upper case forms (\B \W \S.) 1430 ;; if using regexp, eliminate upper case forms (\B \W \S.)
1433 (if tpu-regexp-p 1431 (if tpu-regexp-p
1434 (let ((pat (copy-sequence string)) (case-fold-search nil) (pos 0)) 1432 (let ((pat (copy-sequence string)) (case-fold-search nil) (pos 0))
@@ -1476,7 +1474,7 @@ Used for reversing a search in progress."
1476;;; Select / Unselect 1474;;; Select / Unselect
1477;;; 1475;;;
1478(defun tpu-select (&optional quiet) 1476(defun tpu-select (&optional quiet)
1479 "Sets the mark to define one end of a region." 1477 "Set the mark to define one end of a region."
1480 (interactive "P") 1478 (interactive "P")
1481 (cond ((tpu-mark) 1479 (cond ((tpu-mark)
1482 (tpu-unselect quiet)) 1480 (tpu-unselect quiet))
@@ -1486,7 +1484,7 @@ Used for reversing a search in progress."
1486 (if (not quiet) (message "Move the text cursor to select text."))))) 1484 (if (not quiet) (message "Move the text cursor to select text.")))))
1487 1485
1488(defun tpu-unselect (&optional quiet) 1486(defun tpu-unselect (&optional quiet)
1489 "Removes the mark to unselect the current region." 1487 "Remove the mark to unselect the current region."
1490 (interactive "P") 1488 (interactive "P")
1491 (deactivate-mark) 1489 (deactivate-mark)
1492 (setq mark-ring nil) 1490 (setq mark-ring nil)
@@ -1509,8 +1507,7 @@ Used for reversing a search in progress."
1509 (if tpu-rectangular-p "en" "dis")))) 1507 (if tpu-rectangular-p "en" "dis"))))
1510 1508
1511(defun tpu-arrange-rectangle nil 1509(defun tpu-arrange-rectangle nil
1512 "Adjust point and mark to mark upper left and lower right 1510 "Adjust point and mark to upper left and lower right corners of a rectangle."
1513corners of a rectangle."
1514 (let ((mc (current-column)) 1511 (let ((mc (current-column))
1515 (pc (progn (exchange-point-and-mark) (current-column)))) 1512 (pc (progn (exchange-point-and-mark) (current-column))))
1516 1513
@@ -1575,14 +1572,14 @@ The text is saved for the tpu-paste command."
1575 (tpu-error "No selection active.")))) 1572 (tpu-error "No selection active."))))
1576 1573
1577(defun tpu-cut (arg) 1574(defun tpu-cut (arg)
1578 "Copy selected region to the cut buffer. In the absence of an 1575 "Copy selected region to the cut buffer.
1579argument, delete the selected region too." 1576In the absence of an argument, delete the selected region too."
1580 (interactive "P") 1577 (interactive "P")
1581 (if arg (tpu-store-text) (tpu-cut-text))) 1578 (if arg (tpu-store-text) (tpu-cut-text)))
1582 1579
1583(defun tpu-append-region (arg) 1580(defun tpu-append-region (arg)
1584 "Append selected region to the tpu-cut buffer. In the absence of an 1581 "Append selected region to the tpu-cut buffer.
1585argument, delete the selected region too." 1582In the absence of an argument, delete the selected region too."
1586 (interactive "P") 1583 (interactive "P")
1587 (cond ((tpu-mark) 1584 (cond ((tpu-mark)
1588 (let ((beg (region-beginning)) (end (region-end))) 1585 (let ((beg (region-beginning)) (end (region-end)))
@@ -1658,8 +1655,8 @@ They are saved for the TPU-edt undelete-words command."
1658 (delete-region beg (point)))) 1655 (delete-region beg (point))))
1659 1656
1660(defun tpu-delete-current-char (num) 1657(defun tpu-delete-current-char (num)
1661 "Delete one or specified number of characters after point. The last 1658 "Delete one or specified number of characters after point.
1662character deleted is saved for the TPU-edt undelete-char command." 1659The last character deleted is saved for the TPU-edt undelete-char command."
1663 (interactive "p") 1660 (interactive "p")
1664 (while (and (> num 0) (not (eobp))) 1661 (while (and (> num 0) (not (eobp)))
1665 (setq tpu-last-deleted-char (char-after (point))) 1662 (setq tpu-last-deleted-char (char-after (point)))
@@ -1742,8 +1739,8 @@ With argument reinserts the character that many times."
1742 (tpu-error "No selection active.")))) 1739 (tpu-error "No selection active."))))
1743 1740
1744(defun tpu-substitute (num) 1741(defun tpu-substitute (num)
1745 "Replace the selected region with the contents of the cut buffer, and 1742 "Replace the selected region with the contents of the cut buffer,
1746repeat most recent search. A numeric argument serves as a repeat count. 1743and repeat most recent search. A numeric argument serves as a repeat count.
1747A negative argument means replace all occurrences of the search string." 1744A negative argument means replace all occurrences of the search string."
1748 (interactive "p") 1745 (interactive "p")
1749 (cond ((or (tpu-mark) (tpu-check-match)) 1746 (cond ((or (tpu-mark) (tpu-check-match))
@@ -1820,10 +1817,10 @@ A negative argument means replace all occurrences of the search string."
1820 (message "Replaced %s occurrence%s." strings (if (not (= 1 strings)) "s" "")))) 1817 (message "Replaced %s occurrence%s." strings (if (not (= 1 strings)) "s" ""))))
1821 1818
1822(defun tpu-emacs-replace (&optional dont-ask) 1819(defun tpu-emacs-replace (&optional dont-ask)
1823 "A TPU-edt interface to the Emacs replace functions. If TPU-edt is 1820 "A TPU-edt interface to the Emacs replace functions.
1824currently in regular expression mode, the Emacs regular expression 1821If TPU-edt is currently in regular expression mode, the Emacs regular
1825replace functions are used. If an argument is supplied, replacements 1822expression replace functions are used. If an argument is supplied,
1826are performed without asking. Only works in forward direction." 1823replacements are performed without asking. Only works in forward direction."
1827 (interactive "P") 1824 (interactive "P")
1828 (cond (dont-ask 1825 (cond (dont-ask
1829 (setq current-prefix-arg nil) 1826 (setq current-prefix-arg nil)
@@ -1872,7 +1869,7 @@ or each line of the entire buffer if no region is selected."
1872 (end-of-line) (insert text) (forward-line)))))) 1869 (end-of-line) (insert text) (forward-line))))))
1873 1870
1874(defun tpu-trim-line-ends nil 1871(defun tpu-trim-line-ends nil
1875 "Removes trailing whitespace from every line in the buffer." 1872 "Remove trailing whitespace from every line in the buffer."
1876 (interactive) 1873 (interactive)
1877 (save-match-data 1874 (save-match-data
1878 (save-excursion 1875 (save-excursion
@@ -2274,7 +2271,7 @@ Accepts a prefix argument for the number of tpu-pan-columns to scroll."
2274 (setq tpu-control-keys tpu-style))) 2271 (setq tpu-control-keys tpu-style)))
2275 2272
2276(defun tpu-toggle-control-keys nil 2273(defun tpu-toggle-control-keys nil
2277 "Toggles control key bindings between TPU-edt and Emacs." 2274 "Toggle control key bindings between TPU-edt and Emacs."
2278 (interactive) 2275 (interactive)
2279 (tpu-reset-control-keys (not tpu-control-keys)) 2276 (tpu-reset-control-keys (not tpu-control-keys))
2280 (and (interactive-p) 2277 (and (interactive-p)
@@ -2325,7 +2322,7 @@ Accepts a prefix argument for the number of tpu-pan-columns to scroll."
2325(defun tpu-load-xkeys (file) 2322(defun tpu-load-xkeys (file)
2326 "Load the TPU-edt X-windows key definitions FILE. 2323 "Load the TPU-edt X-windows key definitions FILE.
2327If FILE is nil, try to load a default file. The default file names are 2324If FILE is nil, try to load a default file. The default file names are
2328`~/.tpu-lucid-keys' for Lucid emacs, and `~/.tpu-keys' for Emacs." 2325`~/.tpu-lucid-keys' for XEmacs, and `~/.tpu-keys' for Emacs."
2329 (interactive "fX key definition file: ") 2326 (interactive "fX key definition file: ")
2330 (cond (file 2327 (cond (file
2331 (setq file (expand-file-name file))) 2328 (setq file (expand-file-name file)))
@@ -2347,10 +2344,10 @@ If FILE is nil, try to load a default file. The default file names are
2347 (cond ((file-readable-p file) 2344 (cond ((file-readable-p file)
2348 (load-file file)) 2345 (load-file file))
2349 (t 2346 (t
2350 ;; FIXME: This used to force the user to build `file'. With the 2347 ;; This used to force the user to build `file'. With the
2351 ;; new code, such a file is not even necessary, but we'll keep 2348 ;; new code, such a file may not be necessary. In case it
2352 ;; a warning message. 2349 ;; is, issue a message giving a hint as to how to build it.
2353 (message "%s not found: use tpu-mapper.el to create it" 2350 (message "%s not found: use M-x tpu-mapper to create it"
2354 (abbreviate-file-name file))))) 2351 (abbreviate-file-name file)))))
2355 2352
2356(defun tpu-copy-keyfile (oldname newname) 2353(defun tpu-copy-keyfile (oldname newname)
diff --git a/lisp/emulation/tpu-extras.el b/lisp/emulation/tpu-extras.el
index 062082a295a..518b60db2ec 100644
--- a/lisp/emulation/tpu-extras.el
+++ b/lisp/emulation/tpu-extras.el
@@ -1,7 +1,7 @@
1;;; tpu-extras.el --- scroll margins and free cursor mode for TPU-edt 1;;; tpu-extras.el --- scroll margins and free cursor mode for TPU-edt
2 2
3;; Copyright (C) 1993, 1994, 1995, 2000, 2001, 2002, 2003, 2004, 3;; Copyright (C) 1993, 1994, 1995, 2000, 2001, 2002, 2003, 2004,
4;; 2005, 2006, 2007 Free Software Foundation, Inc. 4;; 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
5 5
6;; Author: Rob Riepel <riepel@networking.stanford.edu> 6;; Author: Rob Riepel <riepel@networking.stanford.edu>
7;; Maintainer: Rob Riepel <riepel@networking.stanford.edu> 7;; Maintainer: Rob Riepel <riepel@networking.stanford.edu>
diff --git a/lisp/emulation/tpu-mapper.el b/lisp/emulation/tpu-mapper.el
index b3ad67ec4df..49d67f437f8 100644
--- a/lisp/emulation/tpu-mapper.el
+++ b/lisp/emulation/tpu-mapper.el
@@ -1,7 +1,7 @@
1;;; tpu-mapper.el --- create a TPU-edt X-windows keymap file 1;;; tpu-mapper.el --- create a TPU-edt X-windows keymap file
2 2
3;; Copyright (C) 1993, 1994, 1995, 2001, 2002, 2003, 2004, 3;; Copyright (C) 1993, 1994, 1995, 2001, 2002, 2003, 2004,
4;; 2005, 2006, 2007 Free Software Foundation, Inc. 4;; 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
5 5
6;; Author: Rob Riepel <riepel@networking.stanford.edu> 6;; Author: Rob Riepel <riepel@networking.stanford.edu>
7;; Maintainer: Rob Riepel <riepel@networking.stanford.edu> 7;; Maintainer: Rob Riepel <riepel@networking.stanford.edu>
@@ -26,57 +26,11 @@
26 26
27;;; Commentary: 27;;; Commentary:
28 28
29;; This emacs lisp program can be used to create an emacs lisp file that 29;; This Emacs Lisp program can be used to create an Emacs Lisp file that
30;; defines the TPU-edt keypad for emacs running on x-windows. Please read 30;; defines the TPU-edt keypad for Emacs running on X-Windows.
31;; the "Usage" AND "Known Problems" sections before attempting to run this
32;; program.
33
34;;; Usage:
35
36;; Simply load this file into the X-windows version of emacs using the
37;; following command.
38
39;; emacs -q -l tpu-mapper
40
41;; The "-q" option prevents loading of your .emacs file (commands therein
42;; might confuse this program).
43
44;; An instruction screen showing the TPU-edt keypad will be displayed, and
45;; you will be prompted to press the TPU-edt editing keys. Tpu-mapper uses
46;; the keys you press to create an Emacs Lisp file that will define a
47;; TPU-edt keypad for your X server. You can even re-arrange the standard
48;; EDT keypad to suit your tastes (or to cope with those silly Sun and PC
49;; keypads).
50
51;; Finally, you will be prompted for the name of the file to store the key
52;; definitions. If you chose the default, TPU-edt will find it and load it
53;; automatically. If you specify a different file name, you will need to
54;; set the variable "tpu-xkeys-file" before starting TPU-edt. Here's how
55;; you might go about doing that in your .emacs file.
56
57;; (setq tpu-xkeys-file (expand-file-name "~/.my-emacs-x-keys"))
58;; (tpu-edt)
59
60;;; Known Problems:
61
62;; Sometimes, tpu-mapper will ignore a key you press, and just continue to
63;; prompt for the same key. This can happen when your window manager sucks
64;; up the key and doesn't pass it on to Emacs, or it could be an Emacs bug.
65;; Either way, there's nothing that tpu-mapper can do about it. You must
66;; press RETURN, to skip the current key and continue. Later, you and/or
67;; your local X guru can try to figure out why the key is being ignored.
68 31
69;;; Code: 32;;; Code:
70 33
71
72;;;
73;;; Make sure we're running X-windows and Emacs version 19
74;;;
75(cond
76 ((not (and window-system (not (string-lessp emacs-version "19"))))
77 (error "tpu-mapper requires running in Emacs 19, with an X display")))
78
79
80;;; 34;;;
81;;; Key variables 35;;; Key variables
82;;; 36;;;
@@ -89,37 +43,89 @@
89(defvar tpu-enter-seq nil) 43(defvar tpu-enter-seq nil)
90(defvar tpu-return-seq nil) 44(defvar tpu-return-seq nil)
91 45
92
93;;; 46;;;
94;;; Make sure the window is big enough to display the instructions 47;;; Key mapping function
95;;; 48;;;
96(if (featurep 'xemacs) (set-screen-size (selected-screen) 80 36) 49(defun tpu-map-key (ident descrip func gold-func)
97 (set-frame-size (selected-frame) 80 36)) 50 (interactive)
51 (if (featurep 'xemacs)
52 (progn
53 (setq tpu-key-seq (read-key-sequence
54 (format "Press %s%s: " ident descrip))
55 tpu-key (format "[%s]" (event-key (aref tpu-key-seq 0))))
56 (unless (equal tpu-key tpu-return)
57 (set-buffer "Keys")
58 (insert (format"(global-set-key %s %s)\n" tpu-key func))
59 (set-buffer "Gold-Keys")
60 (insert (format "(define-key GOLD-map %s %s)\n" tpu-key gold-func))))
61 (message "Press %s%s: " ident descrip)
62 (setq tpu-key-seq (read-event)
63 tpu-key (format "[%s]" tpu-key-seq))
64 (unless (equal tpu-key tpu-return)
65 (set-buffer "Keys")
66 (insert (format"(define-key tpu-global-map %s %s)\n" tpu-key func))
67 (set-buffer "Gold-Keys")
68 (insert (format "(define-key tpu-gold-map %s %s)\n" tpu-key gold-func))))
69 (set-buffer "Directions")
70 tpu-key)
98 71
72;;;###autoload
73(defun tpu-mapper ()
74 "Create an Emacs lisp file defining the TPU-edt keypad for X-windows.
75
76This command displays an instruction screen showing the TPU-edt keypad
77and asks you to press the TPU-edt editing keys. It uses the keys you
78press to create an Emacs Lisp file that will define a TPU-edt keypad
79for your X server. You can even re-arrange the standard EDT keypad to
80suit your tastes (or to cope with those silly Sun and PC keypads).
81
82Finally, you will be prompted for the name of the file to store the key
83definitions. If you chose the default, TPU-edt will find it and load it
84automatically. If you specify a different file name, you will need to
85set the variable ``tpu-xkeys-file'' before starting TPU-edt. Here's how
86you might go about doing that in your .emacs file.
87
88 (setq tpu-xkeys-file (expand-file-name \"~/.my-emacs-x-keys\"))
89 (tpu-edt)
90
91Known Problems:
92
93Sometimes, tpu-mapper will ignore a key you press, and just continue to
94prompt for the same key. This can happen when your window manager sucks
95up the key and doesn't pass it on to Emacs, or it could be an Emacs bug.
96Either way, there's nothing that tpu-mapper can do about it. You must
97press RETURN, to skip the current key and continue. Later, you and/or
98your local X guru can try to figure out why the key is being ignored."
99 (interactive)
99 100
100;;; 101 ;; Make sure we're running X-windows
101;;; Create buffers - Directions, Keys, Gold-Keys
102;;;
103(if (not (get-buffer "Directions")) (generate-new-buffer "Directions"))
104(if (not (get-buffer "Keys")) (generate-new-buffer "Keys"))
105(if (not (get-buffer "Gold-Keys")) (generate-new-buffer "Gold-Keys"))
106 102
103 (if (not window-system)
104 (error "tpu-mapper requires running Emacs with an X display"))
107 105
108;;; 106 ;; Make sure the window is big enough to display the instructions
109;;; Put headers in the Keys buffer 107
110;;; 108 (if (featurep 'xemacs) (set-screen-size (selected-screen) 80 36)
111(set-buffer "Keys") 109 (set-frame-size (selected-frame) 80 36))
112(insert "\ 110
111 ;; Create buffers - Directions, Keys, Gold-Keys
112
113 (if (not (get-buffer "Directions")) (generate-new-buffer "Directions"))
114 (if (not (get-buffer "Keys")) (generate-new-buffer "Keys"))
115 (if (not (get-buffer "Gold-Keys")) (generate-new-buffer "Gold-Keys"))
116
117 ;; Put headers in the Keys buffer
118
119 (set-buffer "Keys")
120 (insert "\
113;; Key definitions for TPU-edt 121;; Key definitions for TPU-edt
114;; 122;;
115") 123")
116 124
125 ;; Display directions
117 126
118;;; 127 (switch-to-buffer "Directions")
119;;; Display directions 128 (insert "
120;;;
121(switch-to-buffer "Directions")
122(insert "
123 This program prompts you to press keys to create a custom keymap file 129 This program prompts you to press keys to create a custom keymap file
124 for use with the x-windows version of Emacs and TPU-edt. 130 for use with the x-windows version of Emacs and TPU-edt.
125 131
@@ -153,225 +159,197 @@
153 159
154 160
155") 161")
156(delete-other-windows) 162 (delete-other-windows)
157(goto-char (point-min)) 163 (goto-char (point-min))
158 164
159;;; 165 ;; Save <CR> for future reference
160;;; Save <CR> for future reference
161;;;
162(cond
163 ((featurep 'xemacs)
164 (setq tpu-return-seq (read-key-sequence "Hit carriage-return <CR> to continue "))
165 (setq tpu-return (concat "[" (format "%s" (event-key (aref tpu-return-seq 0))) "]")))
166 (t
167 (message "Hit carriage-return <CR> to continue ")
168 (setq tpu-return-seq (read-event))
169 (setq tpu-return (concat "[" (format "%s" tpu-return-seq) "]"))))
170 166
167 (cond
168 ((featurep 'xemacs)
169 (setq tpu-return-seq (read-key-sequence "Hit carriage-return <CR> to continue "))
170 (setq tpu-return (concat "[" (format "%s" (event-key (aref tpu-return-seq 0))) "]")))
171 (t
172 (message "Hit carriage-return <CR> to continue ")
173 (setq tpu-return-seq (read-event))
174 (setq tpu-return (concat "[" (format "%s" tpu-return-seq) "]"))))
171 175
172;;; 176 ;; Build the keymap file
173;;; Key mapping functions
174;;;
175(defun tpu-map-key (ident descrip func gold-func)
176 (interactive)
177 (if (featurep 'xemacs)
178 (progn
179 (setq tpu-key-seq (read-key-sequence
180 (format "Press %s%s: " ident descrip))
181 tpu-key (format "[%s]" (event-key (aref tpu-key-seq 0))))
182 (unless (equal tpu-key tpu-return)
183 (set-buffer "Keys")
184 (insert (format"(global-set-key %s %s)\n" tpu-key func))
185 (set-buffer "Gold-Keys")
186 (insert (format "(define-key GOLD-map %s %s)\n" tpu-key gold-func))))
187 (message "Press %s%s: " ident descrip)
188 (setq tpu-key-seq (read-event)
189 tpu-key (format "[%s]" tpu-key-seq))
190 (unless (equal tpu-key tpu-return)
191 (set-buffer "Keys")
192 (insert (format"(define-key tpu-global-map %s %s)\n" tpu-key func))
193 (set-buffer "Gold-Keys")
194 (insert (format "(define-key tpu-gold-map %s %s)\n" tpu-key gold-func))))
195 (set-buffer "Directions")
196 tpu-key)
197 177
198(set-buffer "Keys") 178 (set-buffer "Keys")
199(insert " 179 (insert "
200;; Arrows 180;; Arrows
201;; 181;;
202") 182")
203(set-buffer "Gold-Keys") 183 (set-buffer "Gold-Keys")
204(insert " 184 (insert "
205;; GOLD Arrows 185;; GOLD Arrows
206;; 186;;
207") 187")
208(set-buffer "Directions") 188 (set-buffer "Directions")
209
210(tpu-map-key "Up-Arrow" "" "'tpu-previous-line" "'tpu-move-to-beginning")
211(tpu-map-key "Down-arrow" "" "'tpu-next-line" "'tpu-move-to-end")
212(tpu-map-key "Right-arrow" "" "'tpu-forward-char" "'end-of-line")
213(tpu-map-key "Left-arrow" "" "'tpu-backward-char" "'beginning-of-line")
214 189
190 (tpu-map-key "Up-Arrow" "" "'tpu-previous-line" "'tpu-move-to-beginning")
191 (tpu-map-key "Down-arrow" "" "'tpu-next-line" "'tpu-move-to-end")
192 (tpu-map-key "Right-arrow" "" "'tpu-forward-char" "'end-of-line")
193 (tpu-map-key "Left-arrow" "" "'tpu-backward-char" "'beginning-of-line")
215 194
216(set-buffer "Keys") 195 (set-buffer "Keys")
217(insert " 196 (insert "
218;; PF keys 197;; PF keys
219;; 198;;
220") 199")
221(set-buffer "Gold-Keys") 200 (set-buffer "Gold-Keys")
222(insert " 201 (insert "
223;; GOLD PF keys 202;; GOLD PF keys
224;; 203;;
225") 204")
226(set-buffer "Directions") 205 (set-buffer "Directions")
227 206
228(tpu-map-key "PF1" " - The GOLD key" "GOLD-map" "'keyboard-quit") 207 (tpu-map-key "PF1" " - The GOLD key" "GOLD-map" "'keyboard-quit")
229(tpu-map-key "PF2" " - The Keypad Help key" "'tpu-help" "'help-for-help") 208 (tpu-map-key "PF2" " - The Keypad Help key" "'tpu-help" "'help-for-help")
230(tpu-map-key "PF3" " - The Find/Find-Next key" "'tpu-search-again" "'tpu-search") 209 (tpu-map-key "PF3" " - The Find/Find-Next key" "'tpu-search-again" "'tpu-search")
231(tpu-map-key "PF4" " - The Del/Undelete Line key" "'tpu-delete-current-line" "'tpu-undelete-lines") 210 (tpu-map-key "PF4" " - The Del/Undelete Line key" "'tpu-delete-current-line" "'tpu-undelete-lines")
232 211
233(set-buffer "Keys") 212 (set-buffer "Keys")
234(insert " 213 (insert "
235;; KP0-9 KP- KP, KP. and KPenter 214;; KP0-9 KP- KP, KP. and KPenter
236;; 215;;
237") 216")
238(set-buffer "Gold-Keys") 217 (set-buffer "Gold-Keys")
239(insert " 218 (insert "
240;; GOLD KP0-9 KP- KP, and KPenter 219;; GOLD KP0-9 KP- KP, and KPenter
241;; 220;;
242") 221")
243(set-buffer "Directions") 222 (set-buffer "Directions")
244 223
245(tpu-map-key "KP-0" " - The Line/Open-Line key" "'tpu-line" "'open-line") 224 (tpu-map-key "KP-0" " - The Line/Open-Line key" "'tpu-line" "'open-line")
246(tpu-map-key "KP-1" " - The Word/Change-Case key" "'tpu-word" "'tpu-change-case") 225 (tpu-map-key "KP-1" " - The Word/Change-Case key" "'tpu-word" "'tpu-change-case")
247(tpu-map-key "KP-2" " - The EOL/Delete-EOL key" "'tpu-end-of-line" "'tpu-delete-to-eol") 226 (tpu-map-key "KP-2" " - The EOL/Delete-EOL key" "'tpu-end-of-line" "'tpu-delete-to-eol")
248(tpu-map-key "KP-3" " - The Character/Special-Insert key" "'tpu-char" "'tpu-special-insert") 227 (tpu-map-key "KP-3" " - The Character/Special-Insert key" "'tpu-char" "'tpu-special-insert")
249(setq tpu-kp4 (tpu-map-key "KP-4" " - The Forward/Bottom key" "'tpu-advance-direction" "'tpu-move-to-end")) 228 (setq tpu-kp4 (tpu-map-key "KP-4" " - The Forward/Bottom key" "'tpu-advance-direction" "'tpu-move-to-end"))
250(setq tpu-kp5 (tpu-map-key "KP-5" " - The Reverse/Top key" "'tpu-backup-direction" "'tpu-move-to-beginning")) 229 (setq tpu-kp5 (tpu-map-key "KP-5" " - The Reverse/Top key" "'tpu-backup-direction" "'tpu-move-to-beginning"))
251(tpu-map-key "KP-6" " - The Remove/Insert key" "'tpu-cut" "'tpu-paste") 230 (tpu-map-key "KP-6" " - The Remove/Insert key" "'tpu-cut" "'tpu-paste")
252(tpu-map-key "KP-7" " - The Page/Do key" "'tpu-page" "'execute-extended-command") 231 (tpu-map-key "KP-7" " - The Page/Do key" "'tpu-page" "'execute-extended-command")
253(tpu-map-key "KP-8" " - The Section/Fill key" "'tpu-scroll-window" "'tpu-fill") 232 (tpu-map-key "KP-8" " - The Section/Fill key" "'tpu-scroll-window" "'tpu-fill")
254(tpu-map-key "KP-9" " - The Append/Replace key" "'tpu-append-region" "'tpu-replace") 233 (tpu-map-key "KP-9" " - The Append/Replace key" "'tpu-append-region" "'tpu-replace")
255(tpu-map-key "KP--" " - The Delete/Undelete Word key" "'tpu-delete-current-word" "'tpu-undelete-words") 234 (tpu-map-key "KP--" " - The Delete/Undelete Word key" "'tpu-delete-current-word" "'tpu-undelete-words")
256(tpu-map-key "KP-," " - The Delete/Undelete Character key" "'tpu-delete-current-char" "'tpu-undelete-char") 235 (tpu-map-key "KP-," " - The Delete/Undelete Character key" "'tpu-delete-current-char" "'tpu-undelete-char")
257(tpu-map-key "KP-." " - The Select/Reset key" "'tpu-select" "'tpu-unselect") 236 (tpu-map-key "KP-." " - The Select/Reset key" "'tpu-select" "'tpu-unselect")
258(tpu-map-key "KP-Enter" " - The Enter key on the numeric keypad" "'newline" "'tpu-substitute") 237 (tpu-map-key "KP-Enter" " - The Enter key on the numeric keypad" "'newline" "'tpu-substitute")
259;; Save the enter key 238 ;; Save the enter key
260(setq tpu-enter tpu-key) 239 (setq tpu-enter tpu-key)
261(setq tpu-enter-seq tpu-key-seq) 240 (setq tpu-enter-seq tpu-key-seq)
262 241
263(set-buffer "Keys") 242 (set-buffer "Keys")
264(insert " 243 (insert "
265;; Editing keypad (find, insert, remove) 244;; Editing keypad (find, insert, remove)
266;; (select, prev, next) 245;; (select, prev, next)
267;; 246;;
268") 247")
269(set-buffer "Gold-Keys") 248 (set-buffer "Gold-Keys")
270(insert " 249 (insert "
271;; GOLD Editing keypad (find, insert, remove) 250;; GOLD Editing keypad (find, insert, remove)
272;; (select, prev, next) 251;; (select, prev, next)
273;; 252;;
274") 253")
275(set-buffer "Directions") 254 (set-buffer "Directions")
276 255
277(tpu-map-key "Find" " - The Find key on the editing keypad" "'tpu-search" "'nil") 256 (tpu-map-key "Find" " - The Find key on the editing keypad" "'tpu-search" "'nil")
278(tpu-map-key "Insert" " - The Insert key on the editing keypad" "'tpu-paste" "'nil") 257 (tpu-map-key "Insert" " - The Insert key on the editing keypad" "'tpu-paste" "'nil")
279(tpu-map-key "Remove" " - The Remove key on the editing keypad" "'tpu-cut" "'tpu-store-text") 258 (tpu-map-key "Remove" " - The Remove key on the editing keypad" "'tpu-cut" "'tpu-store-text")
280(tpu-map-key "Select" " - The Select key on the editing keypad" "'tpu-select" "'tpu-unselect") 259 (tpu-map-key "Select" " - The Select key on the editing keypad" "'tpu-select" "'tpu-unselect")
281(tpu-map-key "Prev Scr" " - The Prev Scr key on the editing keypad" "'tpu-scroll-window-down" "'tpu-previous-window") 260 (tpu-map-key "Prev Scr" " - The Prev Scr key on the editing keypad" "'tpu-scroll-window-down" "'tpu-previous-window")
282(tpu-map-key "Next Scr" " - The Next Scr key on the editing keypad" "'tpu-scroll-window-up" "'tpu-next-window") 261 (tpu-map-key "Next Scr" " - The Next Scr key on the editing keypad" "'tpu-scroll-window-up" "'tpu-next-window")
283 262
284(set-buffer "Keys") 263 (set-buffer "Keys")
285(insert " 264 (insert "
286;; F10-14 Help Do F17 265;; F10-14 Help Do F17
287;; 266;;
288") 267")
289(set-buffer "Gold-Keys") 268 (set-buffer "Gold-Keys")
290(insert " 269 (insert "
291;; GOLD F10-14 Help Do F17 270;; GOLD F10-14 Help Do F17
292;; 271;;
293") 272")
294(set-buffer "Directions") 273 (set-buffer "Directions")
295 274
296(tpu-map-key "F10" " - Invokes the Exit function on VT200+ terminals" "'tpu-exit" "'nil") 275 (tpu-map-key "F10" " - Invokes the Exit function on VT200+ terminals" "'tpu-exit" "'nil")
297(tpu-map-key "F11" " - Inserts an Escape character into the text" "'tpu-insert-escape" "'nil") 276 (tpu-map-key "F11" " - Inserts an Escape character into the text" "'tpu-insert-escape" "'nil")
298(tpu-map-key "Backspace" " - Not Delete nor ^H! Sometimes on the F12 key" "'tpu-next-beginning-of-line" "'nil") 277 (tpu-map-key "Backspace" " - Not Delete nor ^H! Sometimes on the F12 key" "'tpu-next-beginning-of-line" "'nil")
299(tpu-map-key "F13" " - Invokes the delete previous word function" "'tpu-delete-previous-word" "'nil") 278 (tpu-map-key "F13" " - Invokes the delete previous word function" "'tpu-delete-previous-word" "'nil")
300(tpu-map-key "F14" " - Toggles insert/overstrike modes" "'tpu-toggle-overwrite-mode" "'nil") 279 (tpu-map-key "F14" " - Toggles insert/overstrike modes" "'tpu-toggle-overwrite-mode" "'nil")
301(tpu-map-key "Help" " - Brings up the help screen, same as PF2" "'tpu-help" "'describe-bindings") 280 (tpu-map-key "Help" " - Brings up the help screen, same as PF2" "'tpu-help" "'describe-bindings")
302(tpu-map-key "Do" " - Invokes the COMMAND function" "'execute-extended-command" "'nil") 281 (tpu-map-key "Do" " - Invokes the COMMAND function" "'execute-extended-command" "'nil")
303(tpu-map-key "F17" "" "'tpu-goto-breadcrumb" "'tpu-drop-breadcrumb") 282 (tpu-map-key "F17" "" "'tpu-goto-breadcrumb" "'tpu-drop-breadcrumb")
304 283
305(set-buffer "Gold-Keys") 284 (set-buffer "Gold-Keys")
306(cond 285 (cond
307 ((not (equal tpu-enter tpu-return)) 286 ((not (equal tpu-enter tpu-return))
308 (insert " 287 (insert "
309;; Minibuffer map additions to make KP_enter = RET 288;; Minibuffer map additions to make KP_enter = RET
310;; 289;;
311") 290")
312 291
313 (insert (format "(define-key minibuffer-local-map %s 'exit-minibuffer)\n" tpu-enter)) 292 (insert (format "(define-key minibuffer-local-map %s 'exit-minibuffer)\n" tpu-enter))
314 (insert (format "(define-key minibuffer-local-ns-map %s 'exit-minibuffer)\n" tpu-enter)) 293 ;; These are not necessary because they are inherited.
315 (insert (format "(define-key minibuffer-local-completion-map %s 'exit-minibuffer)\n" tpu-enter)) 294 ;; (insert (format "(define-key minibuffer-local-ns-map %s 'exit-minibuffer)\n" tpu-enter))
316 (insert (format "(define-key minibuffer-local-must-match-map %s 'minibuffer-complete-and-exit)\n" tpu-enter)))) 295 ;; (insert (format "(define-key minibuffer-local-completion-map %s 'exit-minibuffer)\n" tpu-enter))
296 (insert (format "(define-key minibuffer-local-must-match-map %s 'minibuffer-complete-and-exit)\n" tpu-enter))))
317 297
318(cond 298 (cond
319 ((not (or (equal tpu-kp4 tpu-return) (equal tpu-kp5 tpu-return))) 299 ((not (or (equal tpu-kp4 tpu-return) (equal tpu-kp5 tpu-return)))
320 (insert " 300 (insert "
321;; Minibuffer map additions to allow KP-4/5 termination of search strings. 301;; Minibuffer map additions to allow KP-4/5 termination of search strings.
322;; 302;;
323") 303")
324 304
325 (insert (format "(define-key minibuffer-local-map %s 'tpu-search-forward-exit)\n" tpu-kp4)) 305 (insert (format "(define-key minibuffer-local-map %s 'tpu-search-forward-exit)\n" tpu-kp4))
326 (insert (format "(define-key minibuffer-local-map %s 'tpu-search-backward-exit)\n" tpu-kp5)))) 306 (insert (format "(define-key minibuffer-local-map %s 'tpu-search-backward-exit)\n" tpu-kp5))))
327 307
328(insert " 308 (insert "
329;; Define the tpu-help-enter/return symbols 309;; Define the tpu-help-enter/return symbols
330;; 310;;
331") 311")
332 312
333(cond ((featurep 'xemacs) 313 (cond ((featurep 'xemacs)
334 (insert (format "(setq tpu-help-enter \"%s\")\n" tpu-enter-seq)) 314 (insert (format "(setq tpu-help-enter \"%s\")\n" tpu-enter-seq))
335 (insert (format "(setq tpu-help-return \"%s\")\n" tpu-return-seq)) 315 (insert (format "(setq tpu-help-return \"%s\")\n" tpu-return-seq))
336 (insert "(setq tpu-help-N \"[#<keypress-event N>]\")\n") 316 (insert "(setq tpu-help-N \"[#<keypress-event N>]\")\n")
337 (insert "(setq tpu-help-n \"[#<keypress-event n>]\")\n") 317 (insert "(setq tpu-help-n \"[#<keypress-event n>]\")\n")
338 (insert "(setq tpu-help-P \"[#<keypress-event P>]\")\n") 318 (insert "(setq tpu-help-P \"[#<keypress-event P>]\")\n")
339 (insert "(setq tpu-help-p \"[#<keypress-event p>]\")\n")) 319 (insert "(setq tpu-help-p \"[#<keypress-event p>]\")\n"))
340 (t 320 (t
341 (insert (format "(setq tpu-help-enter \"%s\")\n" tpu-enter)))) 321 (insert (format "(setq tpu-help-enter \"%s\")\n" tpu-enter))))
342 322
343(append-to-buffer "Keys" 1 (point)) 323 (append-to-buffer "Keys" 1 (point))
344(set-buffer "Keys") 324 (set-buffer "Keys")
345 325
346;;; 326 ;; Save the key mapping program
347;;; Save the key mapping program
348;;;
349(let ((file
350 (convert-standard-filename
351 (if (featurep 'xemacs) "~/.tpu-lucid-keys" "~/.tpu-keys"))))
352 (set-visited-file-name
353 (read-file-name (format "Save key mapping to file (default %s): " file) "" file)))
354(save-buffer)
355 327
356;;; 328 (let ((file
357;;; Load the newly defined keys and clean up 329 (convert-standard-filename
358;;; 330 (if (featurep 'xemacs) "~/.tpu-lucid-keys" "~/.tpu-keys"))))
359(eval-buffer) 331 (set-visited-file-name
360(kill-buffer (current-buffer)) 332 (read-file-name (format "Save key mapping to file (default %s): " file) "" file)))
361(kill-buffer "*scratch*") 333 (save-buffer)
362(kill-buffer "Gold-Keys")
363 334
364;;; 335 ;; Load the newly defined keys and clean up
365;;; Let them know it worked. 336
366;;; 337 (require 'tpu-edt)
367(switch-to-buffer "Directions") 338 (eval-buffer)
368(erase-buffer) 339 (kill-buffer (current-buffer))
369(insert " 340 (kill-buffer "*scratch*")
341 (kill-buffer "Gold-Keys")
342
343 ;; Let them know it worked.
344
345 (switch-to-buffer "Directions")
346 (erase-buffer)
347 (insert "
370 A custom TPU-edt keymap file has been created. 348 A custom TPU-edt keymap file has been created.
371 349
372 Press GOLD-k to remove this buffer and continue editing. 350 Press GOLD-k to remove this buffer and continue editing.
373") 351")
374(goto-char (point-min)) 352 (goto-char (point-min)))
375 353
376;; arch-tag: bab5872f-cd3a-4c1c-aedb-047b67646f6c 354;; arch-tag: bab5872f-cd3a-4c1c-aedb-047b67646f6c
377;;; tpu-mapper.el ends here 355;;; tpu-mapper.el ends here
diff --git a/lisp/emulation/vip.el b/lisp/emulation/vip.el
index e6fdd55f7c4..b4f80a9e1ed 100644
--- a/lisp/emulation/vip.el
+++ b/lisp/emulation/vip.el
@@ -1,7 +1,7 @@
1;;; vip.el --- a VI Package for GNU Emacs 1;;; vip.el --- a VI Package for GNU Emacs
2 2
3;; Copyright (C) 1986, 1987, 1988, 1992, 1993, 1998, 2001, 2002, 2003, 3;; Copyright (C) 1986, 1987, 1988, 1992, 1993, 1998, 2001, 2002, 2003,
4;; 2004, 2005, 2006, 2007 Free Software Foundation, Inc. 4;; 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
5 5
6;; Author: Masahiko Sato <ms@sail.stanford.edu> 6;; Author: Masahiko Sato <ms@sail.stanford.edu>
7;; Keywords: emulations 7;; Keywords: emulations
diff --git a/lisp/emulation/viper-cmd.el b/lisp/emulation/viper-cmd.el
index 8603169819f..3d74286589c 100644
--- a/lisp/emulation/viper-cmd.el
+++ b/lisp/emulation/viper-cmd.el
@@ -1,7 +1,7 @@
1;;; viper-cmd.el --- Vi command support for Viper 1;;; viper-cmd.el --- Vi command support for Viper
2 2
3;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 3;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4;; 2005, 2006, 2007 Free Software Foundation, Inc. 4;; 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
5 5
6;; Author: Michael Kifer <kifer@cs.stonybrook.edu> 6;; Author: Michael Kifer <kifer@cs.stonybrook.edu>
7 7
diff --git a/lisp/emulation/viper-ex.el b/lisp/emulation/viper-ex.el
index ccc06e0b938..6ce34852235 100644
--- a/lisp/emulation/viper-ex.el
+++ b/lisp/emulation/viper-ex.el
@@ -1,7 +1,7 @@
1;;; viper-ex.el --- functions implementing the Ex commands for Viper 1;;; viper-ex.el --- functions implementing the Ex commands for Viper
2 2
3;; Copyright (C) 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2003, 3;; Copyright (C) 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2003,
4;; 2004, 2005, 2006, 2007 Free Software Foundation, Inc. 4;; 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
5 5
6;; Author: Michael Kifer <kifer@cs.stonybrook.edu> 6;; Author: Michael Kifer <kifer@cs.stonybrook.edu>
7 7
diff --git a/lisp/emulation/viper-init.el b/lisp/emulation/viper-init.el
index c91886e0329..d0f89751d57 100644
--- a/lisp/emulation/viper-init.el
+++ b/lisp/emulation/viper-init.el
@@ -1,7 +1,7 @@
1;;; viper-init.el --- some common definitions for Viper 1;;; viper-init.el --- some common definitions for Viper
2 2
3;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 3;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4;; 2005, 2006, 2007 Free Software Foundation, Inc. 4;; 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
5 5
6;; Author: Michael Kifer <kifer@cs.stonybrook.edu> 6;; Author: Michael Kifer <kifer@cs.stonybrook.edu>
7 7
diff --git a/lisp/emulation/viper-keym.el b/lisp/emulation/viper-keym.el
index 85a94075720..f76a9310518 100644
--- a/lisp/emulation/viper-keym.el
+++ b/lisp/emulation/viper-keym.el
@@ -1,7 +1,7 @@
1;;; viper-keym.el --- Viper keymaps 1;;; viper-keym.el --- Viper keymaps
2 2
3;; Copyright (C) 1994, 1995, 1996, 1997, 2000, 2001, 2002, 2003, 2004, 3;; Copyright (C) 1994, 1995, 1996, 1997, 2000, 2001, 2002, 2003, 2004,
4;; 2005, 2006, 2007 Free Software Foundation, Inc. 4;; 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
5 5
6;; Author: Michael Kifer <kifer@cs.stonybrook.edu> 6;; Author: Michael Kifer <kifer@cs.stonybrook.edu>
7 7
diff --git a/lisp/emulation/viper-macs.el b/lisp/emulation/viper-macs.el
index 6eb7687c4e6..a9e24f28e7b 100644
--- a/lisp/emulation/viper-macs.el
+++ b/lisp/emulation/viper-macs.el
@@ -1,7 +1,7 @@
1;;; viper-macs.el --- functions implementing keyboard macros for Viper 1;;; viper-macs.el --- functions implementing keyboard macros for Viper
2 2
3;; Copyright (C) 1994, 1995, 1996, 1997, 2000, 2001, 2002, 2003, 2004, 3;; Copyright (C) 1994, 1995, 1996, 1997, 2000, 2001, 2002, 2003, 2004,
4;; 2005, 2006, 2007 Free Software Foundation, Inc. 4;; 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
5 5
6;; Author: Michael Kifer <kifer@cs.stonybrook.edu> 6;; Author: Michael Kifer <kifer@cs.stonybrook.edu>
7 7
diff --git a/lisp/emulation/viper-mous.el b/lisp/emulation/viper-mous.el
index dd727cd5f84..be2739777eb 100644
--- a/lisp/emulation/viper-mous.el
+++ b/lisp/emulation/viper-mous.el
@@ -1,7 +1,7 @@
1;;; viper-mous.el --- mouse support for Viper 1;;; viper-mous.el --- mouse support for Viper
2 2
3;; Copyright (C) 1994, 1995, 1996, 1997, 2001, 2002, 2003, 2004, 3;; Copyright (C) 1994, 1995, 1996, 1997, 2001, 2002, 2003, 2004,
4;; 2005, 2006, 2007 Free Software Foundation, Inc. 4;; 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
5 5
6;; Author: Michael Kifer <kifer@cs.stonybrook.edu> 6;; Author: Michael Kifer <kifer@cs.stonybrook.edu>
7 7
diff --git a/lisp/emulation/viper-util.el b/lisp/emulation/viper-util.el
index 78f54b3d63c..33061565196 100644
--- a/lisp/emulation/viper-util.el
+++ b/lisp/emulation/viper-util.el
@@ -1,7 +1,7 @@
1;;; viper-util.el --- Utilities used by viper.el 1;;; viper-util.el --- Utilities used by viper.el
2 2
3;; Copyright (C) 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002, 2003, 3;; Copyright (C) 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002, 2003,
4;; 2004, 2005, 2006, 2007 Free Software Foundation, Inc. 4;; 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
5 5
6;; Author: Michael Kifer <kifer@cs.stonybrook.edu> 6;; Author: Michael Kifer <kifer@cs.stonybrook.edu>
7 7
diff --git a/lisp/emulation/viper.el b/lisp/emulation/viper.el
index bb3e4eb583d..19d3a7f018a 100644
--- a/lisp/emulation/viper.el
+++ b/lisp/emulation/viper.el
@@ -4,7 +4,7 @@
4;; Viper Is also a Package for Emacs Rebels. 4;; Viper Is also a Package for Emacs Rebels.
5 5
6;; Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 6;; Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
7;; 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. 7;; 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
8 8
9;; Author: Michael Kifer <kifer@cs.stonybrook.edu> 9;; Author: Michael Kifer <kifer@cs.stonybrook.edu>
10;; Keywords: emulations 10;; Keywords: emulations
diff --git a/lisp/emulation/ws-mode.el b/lisp/emulation/ws-mode.el
index ee14d587e22..80fcfd333ed 100644
--- a/lisp/emulation/ws-mode.el
+++ b/lisp/emulation/ws-mode.el
@@ -1,7 +1,7 @@
1;;; ws-mode.el --- WordStar emulation mode for GNU Emacs 1;;; ws-mode.el --- WordStar emulation mode for GNU Emacs
2 2
3;; Copyright (C) 1991, 2001, 2002, 2003, 2004, 2005, 3;; Copyright (C) 1991, 2001, 2002, 2003, 2004, 2005,
4;; 2006, 2007 Free Software Foundation, Inc. 4;; 2006, 2007, 2008 Free Software Foundation, Inc.
5 5
6;; Author: Juergen Nickelsen <nickel@cs.tu-berlin.de> 6;; Author: Juergen Nickelsen <nickel@cs.tu-berlin.de>
7;; Version: 0.7 7;; Version: 0.7