annotate lisp/emulators/tpu-doc.el @ 23:0edd3412f124

Added tag r19-15b94 for changeset 8fc7fe29b841
author cvs
date Mon, 13 Aug 2007 08:50:31 +0200
parents 0293115a14e9
children 131b0175ea99
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1 ;;; tpu-doc.el --- Documentation for TPU-edt
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3 ;; Copyright (C) 1993 Free Software Foundation, Inc.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
5 ;; Author: Rob Riepel <riepel@networking.stanford.edu>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
6 ;; Maintainer: Rob Riepel <riepel@networking.stanford.edu>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
7 ;; Keywords: emulations
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
8
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
9 ;; This file is part of XEmacs.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
10
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
11 ;; XEmacs is free software; you can redistribute it and/or modify it
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
12 ;; under the terms of the GNU General Public License as published by
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
13 ;; the Free Software Foundation; either version 2, or (at your option)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
14 ;; any later version.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
15
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
16 ;; XEmacs is distributed in the hope that it will be useful, but
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
17 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
19 ;; General Public License for more details.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
20
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
21 ;; You should have received a copy of the GNU General Public License
16
0293115a14e9 Import from CVS: tag r19-15b91
cvs
parents: 2
diff changeset
22 ;; along with XEmacs; see the file COPYING. If not, write to the
0293115a14e9 Import from CVS: tag r19-15b91
cvs
parents: 2
diff changeset
23 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
0293115a14e9 Import from CVS: tag r19-15b91
cvs
parents: 2
diff changeset
24 ;; Boston, MA 02111-1307, USA.
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
25
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
26 (defconst tpu-doc-revision "!Revision: 1.6 !"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
27 "TPU-edt documentation revision number.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
28
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
29
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
30 ;; This is documentation for the TPU-edt editor for GNU emacs. Major
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
31 ;; sections of this document are separated with lines that begin with
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
32 ;; ";; %% <topic>", where <topic> is what is discussed in that section.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
33
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
34
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
35 ;; %% Contents
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
36
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
37 ;; % Introduction
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
38 ;; % Terminal Support
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
39 ;; % X-windows Support
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
40 ;; % Differences Between TPU-edt and the Real Thing
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
41 ;; % Starting TPU-edt
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
42 ;; % TPU-edt Default Editing Keypad, Control and Gold Key Bindings
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
43 ;; % Optional TPU-edt Extensions
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
44 ;; % Customizing TPU-edt using the Emacs Initialization File
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
45 ;; % Compiling TPU-edt
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
46 ;; % Regular expressions in TPU-edt
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
47 ;; % Etcetera
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
48
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
49
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
50 ;; %% Introduction
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
51
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
52 ;; TPU-edt is based on tpu.el by Jeff Kowalski. TPU-edt endeavors
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
53 ;; to be even more like TPU's EDT emulation than the original tpu.el.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
54 ;; Considerable effort has been expended to that end. Still, emacs
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
55 ;; is emacs and there are differences between TPU-edt and the real
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
56 ;; thing. Please read the "Differences Between TPU-edt and the Real
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
57 ;; Thing" and "Starting TPU-edt" sections before running TPU-edt.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
58
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
59
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
60 ;; %% Terminal Support
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
61
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
62 ;; TPU-edt, like it's VMS cousin, works on VT-series terminals with
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
63 ;; DEC style keyboards. VT terminal emulators, including xterm with
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
64 ;; the appropriate key translations, work just fine too.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
65
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
66
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
67 ;; %% X-windows Support
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
68
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
69 ;; Starting with version 19 of emacs, TPU-edt works with X-windows.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
70 ;; This is accomplished through a TPU-edt X keymap. The emacs lisp
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
71 ;; program tpu-mapper.el creates this map and stores it in a file.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
72 ;; Tpu-mapper will be run automatically the first time you invoke
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
73 ;; the X-windows version of emacs, or you can run it by hand. See
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
74 ;; the commentary in tpu-mapper.el for details.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
75
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
76
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
77 ;; %% Differences Between TPU-edt and the Real Thing (not Coke (r))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
78
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
79 ;; Emacs (version 18.58) doesn't support text highlighting, so selected
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
80 ;; regions are not shown in inverse video. Emacs uses the concept of
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
81 ;; "the mark". The mark is set at one end of a selected region; the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
82 ;; cursor is at the other. The letter "M" appears in the mode line
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
83 ;; when the mark is set. The native emacs command ^X^X (Control-X
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
84 ;; twice) exchanges the cursor with the mark; this provides a handy
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
85 ;; way to find the location of the mark.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
86
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
87 ;; In TPU the cursor can be either bound or free. Bound means the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
88 ;; cursor cannot wander outside the text of the file being edited.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
89 ;; Free means the arrow keys can move the cursor past the ends of
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
90 ;; lines. Free is the default mode in TPU; bound is the only mode
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
91 ;; in EDT. Bound is the only mode in the base version of TPU-edt;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
92 ;; optional extensions add an approximation of free mode.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
93
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
94 ;; Like TPU, emacs uses multiple buffers. Some buffers are used to
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
95 ;; hold files you are editing; other "internal" buffers are used for
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
96 ;; emacs' own purposes (like showing you help). Here are some commands
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
97 ;; for dealing with buffers.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
98
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
99 ;; Gold-B moves to next buffer, including internal buffers
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
100 ;; Gold-N moves to next buffer containing a file
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
101 ;; Gold-M brings up a buffer menu (like TPU "show buffers")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
102
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
103 ;; Emacs is very fond of throwing up new windows. Dealing with all
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
104 ;; these windows can be a little confusing at first, so here are a few
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
105 ;; commands to that may help:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
106
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
107 ;; Gold-Next_Scr moves to the next window on the screen
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
108 ;; Gold-Prev_Scr moves to the previous window on the screen
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
109 ;; Gold-TAB also moves to the next window on the screen
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
110
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
111 ;; Control-x 1 deletes all but the current window
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
112 ;; Control-x 0 deletes the current window
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
113
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
114 ;; Note that the buffers associated with deleted windows still exist!
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
115
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
116 ;; Like TPU, TPU-edt has a "command" function, invoked with Gold-KP7 or
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
117 ;; Do. Most of the commands available are emacs commands. Some TPU
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
118 ;; commands are available, they are: replace, exit, quit, include, and
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
119 ;; Get (unfortunately, "get" is an internal emacs function, so we are
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
120 ;; stuck with "Get" - to make life easier, Get is available as Gold-g).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
121
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
122 ;; Support for recall of commands, file names, and search strings was
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
123 ;; added to emacs in version 19. For version 18 of emacs, optional
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
124 ;; extensions are available to add this recall capability (see "Optional
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
125 ;; TPU-edt Extensions" below). The history of strings recalled in both
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
126 ;; versions of emacs differs slightly from TPU/edt, but it is still very
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
127 ;; convenient.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
128
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
129 ;; Help is available! The traditional help keys (Help and PF2) display
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
130 ;; a three page help file showing the default keypad layout, control key
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
131 ;; functions, and Gold key functions. Pressing any key inside of help
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
132 ;; splits the screen and prints a description of the function of the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
133 ;; pressed key. Gold-PF2 invokes the native emacs help, with it's
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
134 ;; zillions of options. Gold-Help shows all the current key bindings.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
135
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
136 ;; Thanks to emacs, TPU-edt has some extensions that may make your life
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
137 ;; easier, or at least more interesting. For example, Gold-r toggles
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
138 ;; TPU-edt rectangular mode. In rectangular mode, Remove and Insert work
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
139 ;; on rectangles. Likewise, Gold-* toggles TPU-edt regular expression
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
140 ;; mode. In regular expression mode Find, Find Next, and the line-mode
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
141 ;; replace command work with regular expressions. [A regular expression
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
142 ;; is a pattern that denotes a set of strings; like VMS wildcards.]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
143
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
144 ;; Emacs also gives TPU-edt the undo and occur functions. Undo does
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
145 ;; what it says; it undoes the last change. Multiple undos in a row
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
146 ;; undo multiple changes. For your convenience, undo is available on
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
147 ;; Gold-u. Occur shows all the lines containing a specific string in
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
148 ;; another window. Moving to that window, and typing ^C^C (Control-C
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
149 ;; twice) on a particular line moves you back to the original window
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
150 ;; at that line. Occur is on Gold-o.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
151
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
152 ;; Finally, as you edit, remember that all the power of emacs is at
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
153 ;; your disposal. It really is a fantastic tool. You may even want to
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
154 ;; take some time and read the emacs tutorial; perhaps not to learn the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
155 ;; native emacs key bindings, but to get a feel for all the things
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
156 ;; emacs can do for you. The emacs tutorial is available from the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
157 ;; emacs help function: "Gold-PF2 t"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
158
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
159
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
160 ;; %% Starting TPU-edt
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
161
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
162 ;; In order to use TPU-edt, the TPU-edt editor definitions, contained
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
163 ;; in tpu-edt.el, need to be loaded when emacs is run. This can be
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
164 ;; done in a couple of ways. The first is by explicitly requesting
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
165 ;; loading of the TPU-edt emacs definition file on the command line:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
166
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
167 ;; prompt> emacs -l /path/to/definitions/tpu-edt.el
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
168
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
169 ;; If TPU-edt is installed on your system, that is, if tpu-edt.el is in
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
170 ;; a directory like /usr/local/emacs/lisp, along with dozens of other
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
171 ;; .el files, you should be able to use the command:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
172
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
173 ;; prompt> emacs -l tpu-edt
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
174
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
175 ;; If you like TPU-edt and want to use it all the time, you can load
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
176 ;; the TPU-edt definitions using the emacs initialization file, .emacs.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
177 ;; Simply create a .emacs file in your home directory containing the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
178 ;; line:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
179
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
180 ;; (load "/path/to/definitions/tpu-edt")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
181
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
182 ;; or, if (as above) TPU-edt is installed on your system:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
183
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
184 ;; (load "tpu-edt")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
185
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
186 ;; Once TPU-edt has been loaded, you will be using an editor with the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
187 ;; interface shown in the next section (A section that is suitable for
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
188 ;; cutting out of this document and pasting next to your terminal!).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
189
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
190
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
191 ;; %% TPU-edt Default Editing Keypad, Control and Gold Key Bindings
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
192 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
193 ;; _______________________ _______________________________
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
194 ;; | HELP | Do | | | | | |
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
195 ;; |KeyDefs| | | | | | |
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
196 ;; |_______|_______________| |_______|_______|_______|_______|
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
197 ;; _______________________ _______________________________
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
198 ;; | Find |Insert |Remove | | Gold | HELP |FndNxt | Del L |
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
199 ;; | | |Sto Tex| | key |E-Help | Find |Undel L|
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
200 ;; |_______|_______|_______| |_______|_______|_______|_______|
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
201 ;; |Select |Pre Scr|Nex Scr| | Page | Sect |Append | Del W |
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
202 ;; | Reset |Pre Win|Nex Win| | Do | Fill |Replace|Undel W|
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
203 ;; |_______|_______|_______| |_______|_______|_______|_______|
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
204 ;; |Move up| |Forward|Reverse|Remove | Del C |
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
205 ;; | Top | |Bottom | Top |Insert |Undel C|
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
206 ;; _______|_______|_______ |_______|_______|_______|_______|
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
207 ;; |Mov Lef|Mov Dow|Mov Rig| | Word | EOL | Char | |
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
208 ;; |StaOfLi|Bottom |EndOfLi| |ChngCas|Del EOL|SpecIns| Enter |
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
209 ;; |_______|_______|_______| |_______|_______|_______| |
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
210 ;; | Line |Select | Subs |
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
211 ;; | Open Line | Reset | |
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
212 ;; |_______________|_______|_______|
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
213 ;; Control Characters
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
214 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
215 ;; ^A toggle insert and overwrite ^L insert page break
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
216 ;; ^B recall ^R remember, re-center
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
217 ;; ^E end of line ^U delete to beginning of line
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
218 ;; ^G cancel current operation ^V quote
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
219 ;; ^H beginning of line ^W refresh
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
220 ;; ^J delete previous word ^Z exit
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
221 ;; ^K learn ^X^X exchange point and mark
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
222 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
223 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
224 ;; Gold-<key> Functions
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
225 ;; -----------------------------------------------------------------
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
226 ;; W Write - save current buffer
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
227 ;; K Kill buffer - abandon edits and delete buffer
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
228 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
229 ;; E Exit - save current buffer and ask about others
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
230 ;; X eXit - save all modified buffers and exit
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
231 ;; Q Quit - exit without saving anything
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
232 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
233 ;; G Get - load a file into a new edit buffer
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
234 ;; I Include - include a file in this buffer
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
235 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
236 ;; B next Buffer - display the next buffer (all buffers)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
237 ;; N Next file buffer - display next buffer containing a file
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
238 ;; M buffer Menu - display a list of all buffers
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
239 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
240 ;; U Undo - undo the last edit
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
241 ;; C Recall - edit and possibly repeat previous commands
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
242 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
243 ;; O Occur - show following lines containing REGEXP
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
244 ;; S Search and substitute - line mode REPLACE command
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
245 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
246 ;; ? Spell check - check spelling in a region or entire buffer
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
247 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
248 ;; R Toggle Rectangular mode for remove and insert
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
249 ;; * Toggle regular expression mode for search and substitute
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
250 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
251 ;; V Show TPU-edt version
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
252 ;; -----------------------------------------------------------------
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
253
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
254
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
255 ;; %% Optional TPU-edt Extensions
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
256
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
257 ;; Several optional packages have been included in this distribution
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
258 ;; of TPU-edt. The following is a brief description of each package.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
259 ;; See the {package}.el file for more detailed information and usage
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
260 ;; instructions.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
261
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
262 ;; tpu-extras - TPU/edt scroll margins and free cursor mode.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
263 ;; tpu-recall - String, file name, and command history.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
264 ;; vt-control - VTxxx terminal width and keypad controls.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
265
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
266 ;; Packages are normally loaded from the emacs initialization file
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
267 ;; (discussed below). If a package is not installed in the emacs
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
268 ;; lisp directory, it can be loaded by specifying the complete path
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
269 ;; to the package file. However, it is preferable to modify the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
270 ;; emacs load-path variable to include the directory where packages
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
271 ;; are stored. This way, packages can be loaded by name, just as if
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
272 ;; they were installed. The first part of the sample .emacs file
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
273 ;; below shows how to make such a modification.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
274
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
275
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
276 ;; %% Customizing TPU-edt using the Emacs Initialization File
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
277
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
278 ;; .emacs - a sample emacs initialization file
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
279
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
280 ;; This is a sample emacs initialization file. It shows how to invoke
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
281 ;; TPU-edt, and how to customize it.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
282
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
283 ;; The load-path is where emacs looks for files to fulfill load requests.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
284 ;; If TPU-edt is not installed in a standard emacs directory, the load-path
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
285 ;; should be updated to include the directory where the TPU-edt files are
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
286 ;; stored. Modify and un-comment the following section if TPU-ed is not
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
287 ;; installed on your system - be sure to leave the double quotes!
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
288
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
289 ;; (setq load-path
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
290 ;; (append (list (expand-file-name "/path/to/tpu-edt/files"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
291 ;; load-path))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
292
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
293 ;; Load TPU-edt
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
294 (load "tpu-edt")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
295
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
296 ;; Load the optional goodies - scroll margins, free cursor mode, command
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
297 ;; and string recall. But don't complain if the file aren't available.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
298 (load "tpu-extras" t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
299 (load "tpu-recall" t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
300
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
301 ;; Uncomment this line to set scroll margins 10% (top) and 15% (bottom).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
302 ;(and (fboundp 'tpu-set-scroll-margins) (tpu-set-scroll-margins "10%" "15%"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
303
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
304 ;; Load the vtxxx terminal control functions, but don't complain if
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
305 ;; the file is not found.
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
306 (load "vt-control" t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
307
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
308 ;; TPU-edt treats words like EDT; here's how to add word separators.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
309 ;; Note that backslash (\) and double quote (") are quoted with '\'.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
310 (tpu-add-word-separators "]\\[-_,.\"=+()'/*#:!&;$")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
311
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
312 ;; Emacs is happy to save files without a final newline; other Unix programs
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
313 ;; hate that! This line will make sure that files end with newlines.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
314 (setq require-final-newline t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
315
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
316 ;; Emacs has the ability to automatically run code embedded in files
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
317 ;; you edit. This line makes emacs ask if you want to run the code.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
318 (if tpu-emacs19-p (setq enable-local-variables "ask")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
319 (setq inhibit-local-variables t))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
320
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
321 ;; Emacs uses Control-s and Control-q. Problems can occur when using emacs
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
322 ;; on terminals that use these codes for flow control (Xon/Xoff flow control).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
323 ;; These lines disable emacs' use of these characters.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
324 (global-unset-key "\C-s")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
325 (global-unset-key "\C-q")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
326
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
327 ;; top, bottom, bol, eol seem like a waste of Gold-arrow functions. The
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
328 ;; following section re-maps up and down arrow keys to top and bottom of
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
329 ;; screen, and left and right arrow keys to pan left and right (pan-left,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
330 ;; right moves the screen 16 characters left or right - try it, you'll
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
331 ;; like it!).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
332
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
333 ;; Re-map the Gold-arrow functions
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
334 (define-key GOLD-CSI-map "A" 'tpu-beginning-of-window) ; up-arrow
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
335 (define-key GOLD-CSI-map "B" 'tpu-end-of-window) ; down-arrow
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
336 (define-key GOLD-CSI-map "C" 'tpu-pan-right) ; right-arrow
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
337 (define-key GOLD-CSI-map "D" 'tpu-pan-left) ; left-arrow
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
338 (define-key GOLD-SS3-map "A" 'tpu-beginning-of-window) ; up-arrow
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
339 (define-key GOLD-SS3-map "B" 'tpu-end-of-window) ; down-arrow
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
340 (define-key GOLD-SS3-map "C" 'tpu-pan-right) ; right-arrow
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
341 (define-key GOLD-SS3-map "D" 'tpu-pan-left) ; left-arrow
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
342
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
343 ;; Re-map the Gold-arrow functions for X-windows TPU-edt (emacs version 19)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
344 (cond
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
345 ((and tpu-emacs19-p window-system)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
346 (define-key GOLD-map [up] 'tpu-beginning-of-window) ; up-arrow
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
347 (define-key GOLD-map [down] 'tpu-end-of-window) ; down-arrow
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
348 (define-key GOLD-map [right] 'tpu-pan-right) ; right-arrow
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
349 (define-key GOLD-map [left] 'tpu-pan-left))) ; left-arrow
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
350
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
351 ;; The emacs universal-argument function is very useful for native emacs
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
352 ;; commands. This line maps universal-argument to Gold-PF1
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
353 (define-key GOLD-SS3-map "P" 'universal-argument) ; Gold-PF1
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
354
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
355 ;; Make KP7 move by paragraphs, instead of pages.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
356 (define-key SS3-map "w" 'tpu-paragraph) ; KP7
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
357
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
358 ;; TPU-edt assumes you have the ispell spelling checker;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
359 ;; Un-comment this line if you don't.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
360 ;(setq tpu-have-spell nil)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
361
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
362 ;; Display the TPU-edt version.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
363 (tpu-version)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
364
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
365 ;; End of .emacs - a sample emacs initialization file
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
366
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
367 ;; After initialization with the .emacs file shown above, the editing
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
368 ;; keys have been re-mapped to look like this:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
369
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
370 ;; _______________________ _______________________________
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
371 ;; | HELP | Do | | | | | |
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
372 ;; |KeyDefs| | | | | | |
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
373 ;; |_______|_______________| |_______|_______|_______|_______|
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
374 ;; _______________________ _______________________________
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
375 ;; | Find |Insert |Remove | | Gold | HELP |FndNxt | Del L |
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
376 ;; | | |Sto Tex| | U Arg |E-Help | Find |Undel L|
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
377 ;; |_______|_______|_______| |_______|_______|_______|_______|
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
378 ;; |Select |Pre Scr|Nex Scr| |Paragra| Sect |Append | Del W |
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
379 ;; | Reset |Pre Win|Nex Win| | Do | Fill |Replace|Undel W|
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
380 ;; |_______|_______|_______| |_______|_______|_______|_______|
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
381 ;; |Move up| |Forward|Reverse|Remove | Del C |
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
382 ;; |Tscreen| |Bottom | Top |Insert |Undel C|
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
383 ;; _______|_______|_______ |_______|_______|_______|_______|
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
384 ;; |Mov Lef|Mov Dow|Mov Rig| | Word | EOL | Char | |
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
385 ;; |PanLeft|Bscreen|PanRigh| |ChngCas|Del EOL|SpecIns| Enter |
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
386 ;; |_______|_______|_______| |_______|_______|_______| |
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
387 ;; | Line |Select | Subs |
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
388 ;; | Open Line | Reset | |
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
389 ;; |_______________|_______|_______|
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
390
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
391 ;; Astute emacs hackers will realize that on systems where TPU-edt is
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
392 ;; installed, this documentation file can be loaded to produce the above
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
393 ;; editing keypad layout. In fact, to get all the changes in the sample
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
394 ;; initialization file, you only need a one line initialization file:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
395
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
396 ;; (load "tpu-doc")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
397
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
398 ;; wow!
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
399
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
400
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
401 ;; %% Compiling TPU-edt
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
402
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
403 ;; It is not necessary to compile (byte-compile in emacs parlance)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
404 ;; TPU-edt to use it. However, byte-compiled code loads and runs
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
405 ;; faster, and takes up less memory when loaded. To byte compile
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
406 ;; TPU-edt, use the following command.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
407
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
408 ;; emacs -batch -f batch-byte-compile tpu-edt.el
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
409
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
410 ;; This will produce a file named tpu-edt.elc. This new file can be
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
411 ;; used in place of the original tpu-edt.el file. In commands where
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
412 ;; the file type is not specified, emacs always attempts to use the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
413 ;; byte-compiled version before resorting to the source.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
414
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
415
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
416 ;; %% Regular expressions in TPU-edt
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
417
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
418 ;; Gold-* toggles TPU-edt regular expression mode. In regular expression
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
419 ;; mode, find, find next, replace, and substitute accept emacs regular
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
420 ;; expressions. A complete list of emacs regular expressions can be
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
421 ;; found using the emacs "info" command (it's somewhat like the VMS help
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
422 ;; command). Try the following sequence of commands:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
423
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
424 ;; DO info <enter info mode>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
425 ;; m regex <select the "regular expression" topic>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
426 ;; m directives <select the "directives" topic>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
427
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
428 ;; Type "q" to quit out of info mode.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
429
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
430 ;; There is a problem in regular expression mode when searching for
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
431 ;; empty strings, like beginning-of-line (^) and end-of-line ($).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
432 ;; When searching for these strings, find-next may find the current
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
433 ;; string, instead of the next one. This can cause global replace and
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
434 ;; substitute commands to loop forever in the same location. For this
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
435 ;; reason, commands like
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
436
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
437 ;; replace "^" "> " <add "> " to beginning of line>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
438 ;; replace "$" "00711" <add "00711" to end of line>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
439
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
440 ;; may not work properly.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
441
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
442 ;; Commands like those above are very useful for adding text to the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
443 ;; beginning or end of lines. They might work on a line-by-line basis,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
444 ;; but go into an infinite loop if the "all" response is specified. If
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
445 ;; the goal is to add a string to the beginning or end of a particular
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
446 ;; set of lines TPU-edt provides functions to do this.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
447
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
448 ;; Gold-^ Add a string at BOL in region or buffer
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
449 ;; Gold-$ Add a string at EOL in region or buffer
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
450
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
451 ;; There is also a TPU-edt interface to the native emacs string
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
452 ;; replacement commands. Gold-/ invokes this command. It accepts
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
453 ;; regular expressions if TPU-edt is in regular expression mode. Given
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
454 ;; a repeat count, it will perform the replacement without prompting
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
455 ;; for confirmation.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
456
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
457 ;; This command replaces empty strings correctly, however, it has its
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
458 ;; drawbacks. As a native emacs command, it has a different interface
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
459 ;; than the emulated TPU commands. Also, it works only in the forward
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
460 ;; direction, regardless of the current TPU-edt direction.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
461
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
462
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
463 ;; %% Etcetera
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
464
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
465 ;; That's TPU-edt in a nutshell...
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
466
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
467 ;; Please send any bug reports, feature requests, or cookies to the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
468 ;; author, Rob Riepel, at the address shown by the tpu-version command
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
469 ;; (Gold-V).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
470
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
471 ;; Share and enjoy... Rob Riepel 7/93
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
472
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
473 ;;; tpu-doc.el ends here