annotate etc/OTHER.EMACSES @ 36:c53a95d3c46d r19-15b101

Import from CVS: tag r19-15b101
author cvs
date Mon, 13 Aug 2007 08:53:38 +0200
parents 376386a54a3c
children
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 How is this Emacs different from all other Emacses? -*-Outline-*-
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3 This file describes the differences between GNU Emacs 19, Twenex
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4 Emacs, Gosling Emacs (including the commercial versions by Unipress)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
5 and CCA Emacs.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
6
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
7 * Copyright (c) 1985 Richard M. Stallman
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
8
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
9 Permission is granted to anyone to make or distribute verbatim copies
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
10 of this document as received, in any medium, provided that the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
11 copyright notice and permission notice are preserved,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
12 and that the distributor grants the recipient permission
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
13 for further redistribution as permitted by this notice.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
14
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
15 Permission is granted to distribute modified versions
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
16 of this document, or of portions of it,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
17 under the above conditions, provided also that they
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
18 carry prominent notices stating who last changed them.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
19
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
20 Updated March 1993 for Emacs 19 by Eric S. Raymond
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
21
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
22
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
23 * How is this Emacs different from Twenex Emacs?
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
24
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
25 ** Fundamental concepts.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
26
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
27 *** There is no concept of "typeout" in GNU Emacs.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
28
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
29 Any time that a command wants to display some output,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
30 it creates a buffer (usually with a name surrounded by asterisks)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
31 and displays it in a window.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
32
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
33 This provides some advantages:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
34 you can edit some more while looking at the output;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
35 you can copy parts of the output into other buffers.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
36
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
37 It also has a disadvantage that you must type a command
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
38 in order to make the output disappear.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
39 You can use C-x 1 to get rid of all windows except the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
40 selected one. To be more selective, you can switch to
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
41 the window you want to get rid of and then type C-x 0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
42 (delete-window).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
43
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
44 You also need to type a command to scroll the other
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
45 window if not all the output fits in it. Meta-Control-v
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
46 will usually do the job.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
47
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
48 *** There is no concept of a "subsystem" in GNU Emacs.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
49
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
50 Where Twenex Emacs would use a subsystem, GNU Emacs
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
51 instead creates a buffer and redefines commands in it.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
52
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
53 For example, when you send mail in GNU Emacs, you use
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
54 a buffer named *mail* which is in Mail Mode. You can
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
55 switch away from this buffer to any other buffer and
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
56 resume normal editing; then switch back and resume
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
57 composing mail. You do not have to "exit" from
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
58 composing mail in order to do ordinary editing.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
59
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
60 This has many advantages, but it also has a disadvantage:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
61 Subsystems in Emacs tend to have "exit" commands that return you
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
62 to whatever you were doing before entering the subsystem.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
63 In GNU Emacs the idea of what to return to is not well defined,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
64 so it is not clear what an "exit" command should do.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
65 The only way to "exit" in general is to type C-x b, C-x C-f, or
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
66 some other suitable command to switch buffers. Some
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
67 subsystem-like major modes, such as Info and Mail mode, provide
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
68 commands to "exit" by switching to the previously selected
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
69 buffer.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
70
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
71 *** Files are always visited in their own buffers.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
72
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
73 Beginning users of Twenex Emacs were told how to edit
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
74 using a single buffer and reading one file after another
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
75 into that buffer. Use of a new buffer for each file was
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
76 regarded as a more advanced mode.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
77
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
78 In GNU Emacs, the idea of using a single buffer for various
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
79 files, one by one, has been dropped, given that the address
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
80 space is expected to be large enough for many buffers. C-x
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
81 C-f (find-file), which behaves nearly the same as in Twenex
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
82 Emacs, is in GNU Emacs the canonical way for all users to
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
83 visit files.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
84
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
85 Various commands need to read files into Emacs in the course
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
86 of their execution. In Twenex Emacs the user must tell them
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
87 whether to reuse buffers or create new ones, using the variable
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
88 Tags Find File. In GNU Emacs, these commands always use
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
89 C-x C-f.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
90
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
91 The command C-x C-v does still exist; it kills the current
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
92 buffer and reads the specified file into a new buffer.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
93 It is equivalent to kill-buffer followed by find-file.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
94
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
95 Since there is no reusing of buffers, there is no point in
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
96 calling the initial buffer "main". So the initial buffer
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
97 in GNU Emacs is called "*scratch*" and is intended for typing
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
98 Lisp expressions to be evaluated.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
99
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
100 *** File name defaulting.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
101
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
102 GNU Emacs records a separate working directory for each buffer.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
103 Normally this is the directory on which the buffer's file
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
104 resides; for buffers not visiting any file, it is copied from
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
105 the buffer that was current when it was created. The current buffer's
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
106 working directory can be printed with M-x pwd and set with M-x cd.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
107
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
108 GNU Emacs shows you the default directory by inserting it in
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
109 the minibuffer when a file name is being read. You can type
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
110 the filename you want at the end of the default as if the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
111 default were not there, or you can edit and alter the default.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
112
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
113 If you want file /lose/big when the default /foo/defaultdir/
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
114 has been inserted for you, you need not kill the default; simply
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
115 type at the end of it: /foo/defaultdir//lose/big. Such a file
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
116 name is not ordinarily considered valid, but GNU Emacs
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
117 considers it equivalent to /lose/big.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
118
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
119 Likewise, if you want file quux in your home directory, just add
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
120 ~/quux to the end of the supplied text, to get
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
121 /foo/defaultdir/~/quux. GNU Emacs sees "/~" and throws away
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
122 everything before the "~".
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
123
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
124 You can refer to environment variables also within file names.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
125 $ followed by the environment variable name is replaced by the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
126 variable's value. The variable name should either be followed
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
127 by a nonalphanumeric character (which counts as part of the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
128 file name) or be surrounded by braces {...} (which do not count
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
129 as part of the file name). Thus, if variable USER has value "rms",
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
130 "x/$USER-foo" is expanded to "x/rms-foo", and "x${USER}foo"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
131 is expanded to "xrmsfoo". Note that this substitution is not
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
132 performed by the primitive file operation functions of GNU Emacs,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
133 but rather by the interactive file name reader. It is also
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
134 available as a separate primitive, in the function
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
135 substitute-in-file-name.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
136
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
137 *** Exit commands C-z, C-x C-c and C-x C-z.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
138
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
139 There are two ways to exit GNU Emacs: killing and suspending.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
140 Killing is like what Control-c does to ordinary Unix programs.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
141 In GNU Emacs, you type C-x C-c to kill it. (This offers to
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
142 save any modified file buffers before really killing Emacs.)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
143 Suspending is like what Control-z does to ordinary Unix programs.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
144 To suspend GNU Emacs, type C-x C-z, or type just C-z.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
145 Note that C-z suspends ordinary programs instantly, but
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
146 Emacs does not suspend until it reads the C-z.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
147
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
148 Usually it is better to suspend: once a system is smart
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
149 enough to have job control, why ever kill an editor?
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
150 You'll just have to make a new one in a minute.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
151 This is why the convenient command C-z is provided for
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
152 suspending.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
153
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
154 C-c is used as a prefix key for mode-specific commands and for users'
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
155 own commands. We deliberately do not make C-c ever kill Emacs,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
156 because it should not be so easy to do something irreversible.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
157
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
158 *** Quitting with C-g.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
159
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
160 If you type C-g while GNU Emacs is waiting for input, it
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
161 is an ordinary command (which is defined to beep). If you
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
162 type C-g while Lisp code is executing, it sets a flag which
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
163 causes a special signal, nearly the same as an error, to
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
164 happen at the next safe place in Lisp execution. This usually
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
165 has the effect of aborting the current command in a safe way.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
166
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
167 Because at times there have been bugs causing GNU Emacs to loop
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
168 without checking the quit flag, a special feature causes
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
169 GNU Emacs to be suspended immediately if you type a second C-g
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
170 while the flag is already set. So you can always get out
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
171 of GNU Emacs. Normally GNU Emacs recognizes and clears the quit flag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
172 quickly enough to prevent this from happening.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
173
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
174 When you resume GNU Emacs after a suspension caused by multiple C-g, it
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
175 asks two questions before resuming execution:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
176 Checkpoint?
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
177 Dump core?
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
178 Answer each one with `y' or `n' and a Return.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
179 `y' to Checkpoint? causes immediate auto-saving of all
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
180 buffers in which auto-saving is enabled.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
181 `y' to Dump core? causes an illegal instruction to be executed.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
182 This is to enable a wizard to figure out why GNU Emacs was
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
183 looping without checking for quits. Execution does not continue
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
184 after a core dump. If you answer `n', execution continues.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
185 With luck, GNU Emacs will ultimately check the quit flag,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
186 and quit normally. If not, and you type another C-g, it
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
187 is suspended again.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
188
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
189 If GNU Emacs is not really hung, just slow, you may invoke
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
190 the double C-g feature without really meaning to. Then just
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
191 resume and answer `n' to both questions, and you will
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
192 arrive at your former state. Presumably the quit you
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
193 wanted will finish happening soon.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
194
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
195 These questions are not asked if you suspend GNU Emacs with the C-z
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
196 command. Continuing GNU Emacs after a C-z takes you straight back
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
197 into editing.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
198
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
199 *** Undoing with C-x u or C-_
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
200
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
201 You can undo many commands--up to 10,000 characters worth.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
202 Each time you type C-x u or C-_, another command or batch of change
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
203 is undone. Undo information is stored per buffer, and the undo
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
204 command always applies to the current buffer. A numeric argument
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
205 serves as a repeat count.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
206
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
207 Consecutive self-inserting characters are undone in groups of twenty.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
208
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
209 *** Different character set.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
210
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
211 GNU Emacs does not expect anyone ever to have a keyboard in which
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
212 the Control key sets an independent bit which may accompany any
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
213 character. The only control characters that can exist are the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
214 ASCII control characters.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
215
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
216 There is, as a result, no "control prefix" character.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
217
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
218 *** Control-h is the Help character.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
219
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
220 I'm amazed it took me so long to get this idea. In Twenex Emacs, C-h
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
221 and C-b are equivalent commands, making C-h redundant. C-h is not
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
222 only easy to type, it is mnemonic for "Help". So in GNU Emacs the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
223 Help character is C-h.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
224
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
225 *** Completion is done by TAB, not ESC.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
226
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
227 ESC in the minibuffer is a Meta prefix, same as at top level.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
228
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
229 *** The string-argument reader is the minibuffer is an editor window.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
230
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
231 In GNU Emacs, the line at the bottom of the screen is the minibuffer.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
232 Commands that want string arguments always use this line to read them,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
233 and you can use the ordinary Emacs editing commands to edit the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
234 input. You can terminate input with Return because Return is defined
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
235 as the exit-minibuffer command when in the minibuffer. If you
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
236 are using a command that needs several arguments, terminate each
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
237 one with Return. You cannot separate arguments with Escape
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
238 the way you would in Twenex Emacs.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
239
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
240 The minibuffer window does not overlay other editor windows;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
241 it is a nearly ordinary editor window which lacks a mode line
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
242 and is "turned off" when not in use. While it IS in use, you
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
243 can switch windows to and from the minibuffer, kill text in other
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
244 windows and yank in the minibuffer, etc.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
245
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
246 You can even issue a command that uses the minibuffer while in the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
247 minibuffer. This gets you temporarily into a recursive minibuffer.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
248 However, this is allowed only if you enable it, since it could be
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
249 confusing for beginners.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
250
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
251 When you exit the minibuffer, the cursor immediately moves back to
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
252 column zero of the minibuffer line, to show you that the exit
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
253 command has been obeyed. The minibuffer contents remain on the screen
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
254 until the end of the command, unless some other text is displayed there.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
255
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
256 A single Control-g exits the minibuffer.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
257
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
258 *** There are no &'s or ^R's or spaces in function names.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
259
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
260 For example, the function which is called ^R Forward Word
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
261 in Twenex Emacs is called forward-word in GNU Emacs.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
262
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
263 *** The extension language is Lisp rather than TECO.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
264
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
265 Libraries must be written in Lisp. Meta-ESC reads a Lisp
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
266 expression, evaluates it, and prints the result. Note that
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
267 Meta-ESC is "disabled" by default, so that beginning users
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
268 do not get into the minibuffer by accident in a confusing way.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
269
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
270 Data types available include integers (which double as characters),
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
271 strings, symbols, lists, vectors, buffers, buffer pointers,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
272 windows, and process channels.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
273
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
274 For now, to learn about writing Lisp code for GNU Emacs, read some of
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
275 the source code, which is in directory ../lisp. Read the GNU Emacs Lisp
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
276 Reference Manual. Also, all Lisp primitives have self-documentation you can
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
277 read with C-h f.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
278
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
279 *** Enabling the error handler.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
280
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
281 GNU Emacs has a Lisp debugger/stepper/trace package, but normally
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
282 errors do not enter the debugger because that is slow, and unlikely to
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
283 be of interest to most users. Set the variable debug-on-error to t to
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
284 cause errors to invoke the debugger. Set debug-on-quit to cause quit
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
285 signals (caused by C-g) to invoke the debugger.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
286
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
287 ** Other changes.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
288
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
289 *** More than two windows are allowed.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
290
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
291 C-x 2 splits the current window into two windows,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
292 one above the other. Initially they both display
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
293 the same buffer.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
294
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
295 C-x 2 now accepts a numeric argument to specify the number of
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
296 lines to give to the uppermost of the two windows it makes.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
297
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
298 C-x 0 kills the current window, making all others larger.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
299 C-x 1 kills all windows except the current one.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
300 C-x O switches to the next window down.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
301 It rotates from the bottom one to the top one.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
302 An argument serves as a repeat count; negative arguments
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
303 circulate in the reverse order.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
304
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
305 If the same buffer is displayed in several windows,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
306 changes made in it are redisplayed in all of them.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
307
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
308 *** Side by side windows are supported.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
309
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
310 The command C-x 3 splits the current window into
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
311 two side-by-side windows.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
312
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
313 C-x } makes the selected window ARG columns wider at the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
314 expense of the windows at its sides. C-x { makes the selected
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
315 window ARG columns narrower. An argument to C-x 5 specifies
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
316 how many columns to give to the leftmost of the two windows made.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
317
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
318 *** Horizontal scrolling of the lines in a window is implemented.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
319
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
320 C-x < (scroll-left) scrolls all displayed lines left,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
321 with the numeric argument (default 1) saying how far to scroll.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
322 When the window is scrolled left, some amount of the beginning
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
323 of each nonempty line is replaced by an "$".
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
324 C-x > scrolls right. If a window has no text hidden at the left
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
325 margin, it cannot be scrolled any farther right than that.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
326 When nonzero leftwards scrolling is in effect in a window.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
327 lines are automatically truncated at the window's right margin
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
328 regardless of the value of the variable truncate-lines in the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
329 buffer being displayed.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
330
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
331 *** Return key does not use up empty lines.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
332
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
333 In Twenex Emacs, the Return command advances over an existing
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
334 empty line in some cases. In GNU Emacs, the Return command always
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
335 makes inserts a newline. Twenex Emacs was designed at a time when
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
336 most display terminals did not have the ability to scroll part
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
337 of the screen, and using existing empty lines made redisplay faster.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
338 Nowadays, terminals that cannot scroll part of the screen are rare,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
339 so there is no need to make Return behave in a more complicated manner.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
340
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
341 *** Help m.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
342
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
343 Typing C-h m displays documentation of the current major mode.,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
344 telling you what special commands and features are available
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
345 and how to use them or get more information on them.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
346
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
347 This is simply the documentation, as a function, of the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
348 symbol which is the value of major-mode. Each major mode
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
349 function has been given documentation intended for C-h m.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
350
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
351 *** Display-hiding features.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
352
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
353 **** Hiding indented lines
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
354
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
355 The command C-x $ with numeric argument N causes lines indented by N
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
356 or more columns to become invisible. All you see is " ..." appended
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
357 to the previous line, in place of any number of consecutive invisible
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
358 lines.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
359
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
360 **** Outline Mode.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
361
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
362 Outline mode is designed for editing outline-structured
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
363 files, such as this one.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
364
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
365 Headings should be lines starting with one or more asterisks.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
366 Major headings have one asterisk, subheadings two, etc.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
367 Lines not starting with asterisks are body text.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
368
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
369 You can make the body under a heading, or the subheadings
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
370 under a heading, temporarily invisible, or visible again.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
371 Invisible lines are attached to the end of the previous line
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
372 so they go with it if you kill it and yank it back.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
373
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
374 Commands:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
375 Meta-} next-visible-heading move by visible headings
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
376 Meta-{ previous-visible-heading move by visible headings
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
377
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
378 Meta-x hide-body make all body text invisible (not headings).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
379 Meta-x show-all make everything in buffer visible.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
380
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
381 The remaining commands are used when dot is on a heading line.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
382 They apply to some of the body or subheadings of that heading.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
383 C-c C-h hide-subtree make text and subheadings invisible.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
384 C-c C-s show-subtree make text and subheadings visible.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
385 C-c C-i show-children make direct subheadings visible.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
386 No effect on body, or subheadings 2 or more levels down.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
387 With arg N, affects subheadings N levels down.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
388 M-x hide-entry make immediately following body invisible.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
389 M-x show-entry make it visible.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
390 M-x hide-leaves make text under heading and under its subheadings invisible.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
391 The subheadings remain visible.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
392 M-x show-branches make all subheadings at all levels visible.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
393
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
394 *** C mode is fancy.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
395
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
396 C mode assumes that you put the initial open-brace of
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
397 a function definition at the beginning of a line.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
398 If you use the popular indenting style that puts this
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
399 open-brace at the end of a line containing a type declaration,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
400 YOU WILL LOSE: C mode does not know a function starts there.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
401
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
402 Open-brace at the beginning of a line makes it possible
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
403 for C mode to find function boundaries with total reliability;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
404 something I consider vital and which cannot be done
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
405 if the other style is used.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
406
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
407 The Tab command indents C code very cleverly.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
408 I know of only one cases in which Tab does not indent C code nicely:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
409 Expressions continued over several lines with few parentheses.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
410 Tab does not know the precedences of C operators, so it does
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
411 not know which lines of the expression should go where.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
412 Using parentheses to indicate the nesting of operators
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
413 except within a line makes this problem go away.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
414
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
415 The indenting algorithm is entirely written in Lisp.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
416
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
417 Tab with a numeric argument in Twenex Emacs indents
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
418 that many lines. It is different in GNU Emacs: it means
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
419 to shift all the lines of a bracketed expression by the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
420 same amount as the line being indented. For example, if you have
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
421 if (foo)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
422 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
423 hack ();
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
424 /** Well? */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
425 }
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
426 and type C-u Tab on the line with the open brace, you get
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
427 if (foo)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
428 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
429 hack ();
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
430 /* Well? */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
431 }
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
432 from indenting the brace line and then shifting the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
433 lines within the braces rigidly with the first one.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
434
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
435 Meta-Control-q works as in Lisp mode; it should be
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
436 used with dot just before a bracketed grouping, and
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
437 indents each line INSIDE that grouping using Tab.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
438 If used instead of C-u Tab in the previous example, it makes
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
439 if (foo)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
440 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
441 hack ();
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
442 /* Well? */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
443 }
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
444
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
445 Meta-Control-h puts mark at the end of the current C function
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
446 and puts dot before it.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
447
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
448 Most other Meta-Control commands intended for Lisp expressions
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
449 work usefully in C mode as well.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
450
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
451 *** Meta-g (fill-region) is different.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
452
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
453 In Twenex Emacs, Meta-g fills the region with no paragraph
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
454 boundaries except for blank and indented lines. In GNU Emacs,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
455 it divides the region into paragraphs in the same manner as
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
456 Meta-], and fills each paragraph separately. There is also
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
457 the function fill-region-as-paragraph which fills the region
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
458 regarding at as a single paragraph regardless even of blank
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
459 or indented lines.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
460
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
461 *** Indented Text Mode instead of Edit Indented Text.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
462
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
463 Twenex Emacs has a command Edit Indented Text which temporarily
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
464 alters some commands for editing indented paragraphs.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
465 GNU Emacs has instead a separate major mode, Indented Text Mode,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
466 which is different from ordinary Text Mode in just the same
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
467 alterations. Specifically, in Indented Text Mode,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
468 Tab runs the function indent-relative, and auto filling indents
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
469 the newly created lines.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
470
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
471 *** But rectangle commands are implemented.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
472
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
473 C-x r r stores the rectangle described by dot and mark
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
474 into a register; it reads the register name from the keyboard.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
475 C-x r g, the command to insert the contents of a register,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
476 can be used to reinsert the rectangle elsewhere.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
477
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
478 Other rectangle commands include
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
479 open-rectangle:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
480 insert a blank rectangle in the position and size
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
481 described by dot and mark, at its corners;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
482 the existing text is pushed to the right.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
483 clear-rectangle:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
484 replace the rectangle described by dot ane mark
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
485 with blanks. The previous text is deleted.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
486 delete-rectangle:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
487 delete the text of the specified rectangle,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
488 moving the text beyond it on each line leftward.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
489 kill-rectangle
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
490 like delete-rectangle but also stores the text of
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
491 the rectangle in the "rectangle kill buffer".
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
492 More precisely, it stores the text as a list of strings
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
493 (one string for each line) in the variable killed-rectangle.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
494 yank-rectangle
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
495 inserts the text of the last killed rectangle.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
496 extract-rectangle and delete-extract-rectangle
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
497 these functions return the text of a rectangle
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
498 as a list of strings. They are for use in writing
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
499 other functions that operate on rectangles.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
500
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
501 *** Keyboard Macros
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
502
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
503 The C-x ( command for defining a keyboard macro can in GNU Emacs
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
504 be given a numeric argument, which means that the new macro
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
505 starts out not empty but rather as the same as the last
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
506 keyboard macro entered. In addition, that last keyboard
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
507 macro is replayed when the C-x ( is typed. C-x ( with an
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
508 argument is thus equivalent to typing plain C-x ( and then
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
509 retyping the last keyboard macro entered.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
510
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
511 The command write-kbd-macro and append-kbd-macro can be used to
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
512 save a keyboard macro definition in a file. It is represented as
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
513 a Lisp expression which, when evaluated, will define the keyboard
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
514 macro. write-kbd-macro writes the specified file from scratch,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
515 whereas append-kbd-macro adds to any existing text in the file.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
516 Both expect the keyboard macro to be saved to be specified by
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
517 name; this means you must use the command name-last-kbd-macro to
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
518 give the macro a name before you can save it.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
519
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
520 *** The command to resume a terminated tags-search or tags-query-replace
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
521
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
522 is Meta-comma in GNU Emacs.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
523
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
524 *** Auto Save is on by default.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
525
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
526 Auto Save mode is enabled by default in all buffers
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
527 that are visiting files.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
528
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
529 The file name used for auto saving is made by prepending
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
530 "#" to the file name visited.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
531
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
532 *** Backup files.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
533
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
534 Since Unix stupidly fails to have file version numbers,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
535 GNU Emacs compensates slightly in the customary fashion:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
536 when a file is modified and saved for the first time in
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
537 a particular GNU Emacs run, the original file is renamed,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
538 appending "~" to its name. Thus, foo.c becomes foo.c~.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
539
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
540 Emacs can also put a version number into the name of the backup file,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
541 as in foo.c.~69~ for version number 69. This is an optional feature
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
542 that the user has to enable.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
543
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
544 *** Mode Line differences.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
545
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
546 Each window in GNU Emacs has its own mode line, which always
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
547 displays the status of that window's buffer and nothing else.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
548 The mode line appears at the bottom of the window. It is
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
549 full of dashes, to emphasize the boundaries between windows,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
550 and is displayed in inverse video if the terminal supports it.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
551 The information usually available includes:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
552
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
553 *** Local Modes feature changed slightly.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
554
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
555 GNU Emacs supports local mode lists much like those in Twenex Emacs,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
556 but you can only set variables, not commands. You write
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
557
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
558 Local variables:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
559 tab-width: 10
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
560 end:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
561
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
562 in the last page of a file, if you want to make tab-width be ten in a
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
563 file's buffer. The value you specify must be a Lisp object!
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
564 It will be read, but not evaluated. So, to specify a string,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
565 you MUST use doublequotes. For "false", in variables whose
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
566 meanings are true or false, you MUST write nil .
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
567
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
568 Two variable names are special: "mode" and "eval".
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
569 Mode is used for specifying the major mode (as in Twenex Emacs).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
570
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
571 mode: text
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
572
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
573 specifies text mode. Eval is used for requesting the evaluation
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
574 of a Lisp expression; its value is ignored. Thus,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
575
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
576 eval: (set-syntax-table lisp-mode-syntax-table)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
577
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
578 causes Lisp Mode syntax to be used.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
579
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
580
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
581 Note that GNU Emacs looks for the string "Local variables:"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
582 whereas Twenex Emacs looks for "Local modes:". This incompatibility
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
583 id deliberate, so that neither one will see local settings
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
584 intended for the other.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
585
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
586 *** Lisp code libraries.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
587
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
588 Libraries of commands, and init files, are written in Lisp.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
589 libraries conventionally have names ending in .el, while the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
590 init file is named .emacs and is in your home directory.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
591
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
592 Use Meta-x load-library to load a library. Most standard libraries
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
593 load automatically if you try to use the commands in them.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
594
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
595 Meta-x byte-compile-file filename
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
596 compiles the file into byte code which loads and runs faster
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
597 than Lisp source code. The file of byte code is given a name
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
598 made by appending "c" to the end of the input file name.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
599
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
600 Meta-x byte-recompile-directory directoryname
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
601 compiles all files in the specified directory (globbing not allowed)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
602 which have been compiled before but have been changed since then.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
603
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
604 Meta-x load-library automatically checks for a compiled file
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
605 before loading the source file.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
606
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
607 Libraries once loaded do not retain their identity within GNU
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
608 Emacs. Therefore, you cannot tell just what was loaded from a
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
609 library, and you cannot un-load a library. Normally, libraries
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
610 are written so that loading one has no effect on the editing
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
611 operations that you would have used if you had not loaded the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
612 library.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
613
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
614 *** Dired features.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
615
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
616 You can do dired on partial directories --- any pattern
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
617 the shell can glob. Dired creates a buffer named after
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
618 the directory or pattern, so you can dired several different
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
619 directories. If you repeat dired on the same directory or
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
620 pattern, it just reselects the same buffer. Use Meta-x Revert
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
621 on that buffer to read in the current contents of the directory.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
622
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
623 *** Directory listing features.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
624
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
625 C-x C-d now uses the default output format of `ls',
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
626 which gives just file names in multiple columns.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
627 C-u C-x C-d passes the -l switch to `ls'.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
628
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
629 Both read a directory spec from the minibuffer. It can
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
630 be any pattern that the shell can glob.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
631
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
632 *** Compiling other programs.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
633
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
634 Meta-x compile allows you to run make, or any other compilation
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
635 command, underneath GNU Emacs. Error messages go into a buffer whose
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
636 name is *compilation*. If you get error messages, you can use the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
637 command C-x ` (that is a backquote) to find the text of the next
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
638 error message.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
639
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
640 You must specify the command to be run as an argument to M-x compile.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
641 A default is placed in the minibuffer; you can kill it and start
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
642 fresh, edit it, or just type Return if it is what you want.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
643 The default is the last compilation command you used; initially,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
644 it is "make -k".
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
645
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
646 *** Searching multiple files.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
647
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
648 Meta-x grep searches many files for a regexp by invoking grep
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
649 and reading the output of grep into a buffer. You can then
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
650 move to the text lines that grep found, using the C-x ` command
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
651 just as after M-x compile.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
652
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
653 *** Running inferior shells.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
654
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
655 Do Meta-x shell to make an inferior shell together with a buffer
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
656 which serves to hold "terminal" input and output of the shell.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
657 The shell used is specified by the environment variable ESHELL,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
658 or by SHELL if ESHELL is not set.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
659
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
660 Use C-h m whilst in the *shell* buffer to get more detailed info.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
661
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
662 The inferior shell loads the file .emacs_csh or.emacs_sh
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
663 (or similar using whatever name the shell has) when it starts up.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
664
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
665 M-! executes a shell command in an inferior shell
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
666 and displays the output from it. With a prefix argument,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
667 it inserts the output in the current buffer after dot
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
668 and sets the mark after the output. The shell command
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
669 gets /dev/null as its standard input.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
670
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
671 M-| is like M-! but passes the contents of the region
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
672 as input to the shell command. A prefix argument makes
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
673 the output from the command replace the contents of the region.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
674
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
675 *** Sending mail.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
676
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
677 Once you enter Mail Mode using C-x m or C-x 4 m or M-x mail,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
678 C-c becomes a prefix character for mail-related editing commands.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
679 C-c C-s is vital; that's how you send the message. C-c C-c sends
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
680 and then switches buffers or kills the current window.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
681 Use C-h m to get a list of the others.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
682
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
683 *** Regular expressions.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
684
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
685 GNU Emacs has regular expression facilities like those of most
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
686 Unix editors, but more powerful:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
687
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
688 **** -- + --
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
689
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
690 + specifies repetition of the preceding expression 1 or more
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
691 times. It is in other respect like *, which specifies repetition
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
692 0 or more times.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
693
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
694 **** -- ? --
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
695
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
696 ? is like * but matches at most one repetition of the preceding
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
697 expression.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
698
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
699 **** -- \| --
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
700
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
701 \| specifies an alternative. Two regular expressions A and B with \| in
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
702 between form an expression that matches anything that either A or B will
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
703 match. Thus, "foo\|bar" matches either "foo" or "bar" but no other
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
704 string.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
705
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
706 \| applies to the larges possible surrounding expressions. Only a
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
707 surrounding \( ... \) grouping can limit the grouping power of \|.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
708
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
709 Full backtracking capability exists when multiple \|'s are used.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
710
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
711 **** -- \( ... \) --
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
712
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
713 \( ... \) are a grouping construct that serves three purposes:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
714
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
715 1. To enclose a set of \| alternatives for other operations.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
716 Thus, "\(foo\|bar\)x" matches either "foox" or "barx".
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
717 2. To enclose a complicated expression for * to operate on.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
718 Thus, "ba\(na\)*" matches "bananana", etc., with any number
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
719 of na's (zero or more).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
720 3. To mark a matched substring for future reference.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
721
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
722 Application 3 is not a consequence of the idea of a parenthetical
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
723 grouping; it is a separate feature which happens to be assigned as a
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
724 second meaning to the same \( ... \) construct because there is no
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
725 conflict in practice between the two meanings. Here is an explanation
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
726 of this feature.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
727
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
728 -- \digit --
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
729
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
730 After the end of a \( ... \) construct, the matcher remembers the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
731 beginning and end of the text matched by that construct. Then, later on
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
732 in the regular expression, you can use \ followed by a digit to mean,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
733 ``match the same text matched this time by the \( ... \) construct.''
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
734 The first nine \( ... \) constructs that appear in a regular expression
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
735 are assigned numbers 1 through 9 in order of their beginnings. \1
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
736 through \9 can be used to refer to the text matched by the corresponding
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
737 \( ... \) construct.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
738
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
739 For example, "\(.*\)\1" matches any string that is composed of two
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
740 identical halves. The "\(.*\)" matches the first half, which can be
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
741 anything, but the \1 that follows must match the same exact text.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
742
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
743 **** -- \` --
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
744
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
745 Matches the empty string, but only if it is at the beginning of the buffer.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
746
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
747 **** -- \' --
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
748
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
749 Matches the empty string, but only if it is at the end of the buffer.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
750
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
751 **** -- \b --
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
752
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
753 Matches the empty string, but only if it is at the beginning or end of
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
754 a word. Thus, "\bfoo\b" matches any occurrence of "foo" as a separate word.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
755 "\bball\(s\|\)\b" matches "ball" or "balls" as a separate word.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
756
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
757 **** -- \B --
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
758
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
759 Matches the empty string, provided it is NOT at the beginning or end of
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
760 a word.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
761
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
762 **** -- \< --
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
763
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
764 Matches the empty string, provided it is at the beginning of a word.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
765
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
766 **** -- \> --
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
767
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
768 Matches the empty string, provided it is at the end of a word.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
769
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
770 **** -- \w --
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
771
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
772 Matches any word-constituent character. The editor syntax table determines
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
773 which characters these are.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
774
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
775 **** -- \W --
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
776
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
777 Matches any character that is not a word-constituent.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
778
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
779 **** -- \s<code> --
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
780
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
781 Matches any character whose syntax is <code>. <code> is a letter that
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
782 represents a syntax code: thus, "w" for word constituent, "-" for
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
783 whitespace, "(" for open-parenthesis, etc. Thus, "\s(" matches any
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
784 character with open-parenthesis syntax.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
785
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
786 **** -- \S<code> --
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
787
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
788 Matches any character whose syntax is not <code>.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
789
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
790 * How is this Emacs different from Gosling Emacs?
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
791
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
792 ** Advantages of Gosling Emacs:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
793
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
794 1. The program itself is much smaller.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
795 GNU Emacs uses about 250k more pure storage.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
796 As a result, Gosling Emacs can run on machines
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
797 that cannot run GNU Emacs. There is not much difference
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
798 in the amount of impure storage in the two programs.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
799
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
800 2. In some versions there is support for other forks to
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
801 establish communications channels to Emacs (using sockets?).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
802
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
803 3. There is a direct interface to dbm (data bases).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
804
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
805 ** Advantages of GNU Emacs:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
806
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
807 *** True Lisp, not Mocklisp.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
808
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
809 GNU Emacs's extension language has real symbols, lists
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
810 and vectors. Many extensions are much simpler, and some
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
811 become possible that were nearly impossible in Gosling Emacs.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
812 Many primitives can have cleaner interfaces, and some features
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
813 need not be put in as special primitives because you can do
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
814 them easily yourself.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
815
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
816 *** But Mocklisp still works.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
817
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
818 An automatic conversion package plus a run-time library
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
819 allows you to convert a Mocklisp library into a Lisp library.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
820
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
821 *** Commands are better crafted.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
822
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
823 For example, nearly every editing function for which a
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
824 numeric argument would make sense as a repeat count does
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
825 accept a repeat count, and does handle a negative argument
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
826 in the way you would expect.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
827
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
828 *** The manual is clearer.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
829
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
830 Everyone tells me it is a very good manual.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
831
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
832 *** Better on-line documentation.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
833
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
834 Both functions and variables have documentation strings that
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
835 describe exactly how to use them.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
836
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
837 *** C mode is smart.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
838
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
839 It really knows how to indent each line correctly,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
840 for most popular indentation styles. (Some variables
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
841 control which style is used; popular named styles are also supported.)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
842
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
843 *** Compatible with PDP-10 Emacs, Multics Emacs and Zmacs.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
844
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
845 The commands in GNU Emacs are nearly the same as in the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
846 original Emacs and the other Emacses which imitated it.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
847 (A few have been changed to fit the Unix environment better.)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
848
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
849 *** Support for Gosling's Emacs commands.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
850
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
851 M-x set-gosmacs-bindings rebinds many editing commands for
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
852 compatibility with Gosling's Emacs.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
853 M-x set-gnu-bindings reverses the change.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
854
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
855 *** Side-by-side windows.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
856
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
857 You can split a GNU Emacs window either horizontally or
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
858 vertically.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
859
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
860 *** Redisplay is faster.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
861
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
862 GNU Emacs sends about the same stuff to the terminal that
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
863 Gosling's does, but GNU Emacs uses much less CPU time to
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
864 decide what to do.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
865
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
866 *** Entirely termcap-driven.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
867
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
868 GNU Emacs has nearly no special code for any terminal type. Various
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
869 new termcap strings make it possible to handle all terminals nearly as
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
870 fast as they could be handled by special-case code.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
871
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
872 *** Display-hiding features.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
873
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
874 For example, Outline Mode makes it possible for you to edit
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
875 an outline, making entire sub-branches of the outline visible
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
876 or invisible when you wish.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
877
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
878 *** You can interrupt with Control-G.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
879
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
880 Even a looping Lisp program can be stopped this way.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
881 And even a loop in C code does not stop you from killing
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
882 Emacs and getting back to your shell.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
883
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
884 *** Per-buffer Undo.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
885
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
886 You can undo the last several changes, in each buffer
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
887 independently.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
888
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
889 *** The editor code itself is clean.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
890
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
891 Many people have remarked on how much they enjoy reading
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
892 the code for GNU Emacs.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
893
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
894 One other note: The program etc/cvtmail that comes with GNU Emacs can
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
895 be used to convert a mail directory for Gosling Emacs's Rmail into a
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
896 Unix mail file that you could read into GNU Emacs's Rmail.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
897
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
898 * How is this Emacs different from CCA Emacs?
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
899
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
900 ** GNU Emacs Lisp vs CCA Elisp.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
901
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
902 GNU Emacs Lisp does not have a distinction between Lisp functions
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
903 and Emacs functions, or between Lisp variables and Emacs variables.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
904 The Lisp and the editor are integrated. A Lisp function defined
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
905 with defun is callable as an editor command if you put an
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
906 interactive calling spec in it; for example,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
907 (defun forward-character (n)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
908 (interactive "p")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
909 (goto-char (+ (point) n)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
910 defines a function of one argument that moves point forward by
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
911 a specified number of characters. Programs could call this function,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
912 as in (forward-character 6), or it could be assigned to a key,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
913 in which case the "p" says to pass the prefix numeric arg as
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
914 the function's argument. As a result of this feature, you often
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
915 need not have two different functions, one to be called by programs
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
916 and another to read arguments from the user conveniently; the same
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
917 function can do both.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
918
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
919 CCA Elisp tries to be a subset of Common Lisp and tries to
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
920 have as many Common Lisp functions as possible (though it is still
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
921 only a small fraction of full Common Lisp). GNU Emacs Lisp
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
922 is somewhat similar to Common Lisp just because of my Maclisp
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
923 and Lisp Machine background, but it has several distinct incompatibilities
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
924 in both syntax and semantics. Also, I have not attempted to
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
925 provide many Common Lisp functions that you could write in Lisp,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
926 or others that provide no new capability in the circumstances.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
927
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
928 GNU Emacs Lisp does not have packages, readtables, or character objects
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
929 (it uses integers to represent characters).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
930
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
931 On the other hand, windows, buffers, relocatable markers and processes
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
932 are first class objects in GNU Emacs Lisp. You can get information about them
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
933 and do things to them in a Lispy fashion. Not so in CCA Emacs.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
934
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
935 In GNU Emacs Lisp, you cannot open a file and read or write characters
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
936 or Lisp objects from it. This feature is painful to support, and
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
937 is not fundamentally necessary in an Emacs, because instead you
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
938 can read the file into a buffer, read or write characters or
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
939 Lisp objects in the buffer, and then write the buffer into the file.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
940
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
941 On the other hand, GNU Emacs Lisp does allow you to rename, delete, add
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
942 names to, and copy files; also to find out whether a file is a
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
943 directory, whether it is a symbolic link and to what name, whether
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
944 you can read it or write it, find out its directory component,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
945 expand a relative pathname, find completions of a file name, etc.,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
946 which you cannot do in CCA Elisp.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
947
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
948 GNU Emacs Lisp uses dynamic scope exclusively. This enables you to
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
949 bind variables which affect the execution of the editor, such as
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
950 indent-tabs-mode.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
951
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
952 GNU Emacs Lisp code is normally compiled into byte code. Most of the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
953 standard editing commands are written in Lisp, and many are
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
954 dumped, pure, in the Emacs that users normally run.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
955
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
956 GNU Emacs allows you to interrupt a runaway Lisp program with
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
957 Control-g.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
958
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
959 ** GNU Emacs Editing Advantages
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
960
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
961 GNU Emacs is faster for many things, especially insertion of text
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
962 and file I/O.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
963
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
964 GNU Emacs allows you to undo more than just the last command
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
965 with the undo command (C-x u, or C-_). You can undo quite a ways back.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
966 Undo information is separate for each buffer; changes in one buffer
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
967 do not affect your ability to undo in another buffer.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
968
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
969 GNU Emacs commands that want to display some output do so by putting
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
970 it in a buffer and displaying that buffer in a window. This
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
971 technique comes from Gosling Emacs. It has both advantages and
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
972 disadvantages when compared with the technique, copied by CCA Emacs
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
973 from my original Emacs which inherited it from TECO, of having "type
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
974 out" which appears on top of the text in the current window but
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
975 disappears automatically at the next input character.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
976
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
977 GNU Emacs does not use the concept of "subsystems". Instead, it uses
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
978 highly specialized major modes. For example, dired in GNU Emacs has
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
979 the same commands as dired does in other versions of Emacs, give or
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
980 take a few, but it is a major mode, not a subsystem. The advantage
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
981 of this is that you do not have to "exit" from dired and lose the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
982 state of dired in order to edit files again. You can simply switch
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
983 to another buffer, and switch back to the dired buffer later. You
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
984 can also have several dired buffers, looking at different directories.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
985
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
986 It is still possible to write a subsystem--your own command loop--
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
987 in GNU Emacs, but it is not recommended, since writing a major mode
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
988 for a special buffer is better.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
989
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
990 Recursive edits are also rarely used, for the same reason: it is better
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
991 to make a new buffer and put it in a special major mode. Sending
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
992 mail is done this way.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
993
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
994 GNU Emacs expects everyone to use find-file (C-x C-f) for reading
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
995 in files; its C-x C-v command kills the current buffer and then finds
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
996 the specified file.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
997
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
998 As a result, users do not need to think about the complexities
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
999 of subsystems, recursive edits, and various ways to read in files
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1000 or what to do if a buffer contains changes to some other file.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1001
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1002 GNU Emacs uses its own format of tag table, made by the "etags"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1003 program. This format makes finding a tag much faster.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1004
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1005 Dissociated Press is supported.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1006
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1007
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1008 ** GNU Emacs Editing Disadvantages.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1009
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1010 GNU Emacs does not display the location of the mark.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1011
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1012 GNU Emacs does not have a concept of numbers of buffers,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1013 or a permanent ordering of buffers, or searching through multiple
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1014 buffers. The tags-search command provides a way to search
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1015 through several buffers automatically.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1016
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1017 GNU Emacs does not provide commands to visit files without
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1018 setting the buffer's default directory. Users can write such
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1019 commands in Lisp by copying the code of the standard file
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1020 visiting commands and modifying them.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1021
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1022 GNU Emacs does not support "plus options" in the command
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1023 arguments or in buffer-selection commands, except for line numbers.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1024
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1025 GNU Emacs does not support encryption. Down with security!
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1026
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1027 GNU Emacs does not support replaying keystroke files,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1028 and does not normally write keystroke files.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1029
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1030
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1031 ** Neutral Differences
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1032
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1033 GNU Emacs uses TAB, not ESC, to complete file names, buffer names,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1034 command names, etc.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1035
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1036 GNU Emacs uses LFD to terminate searches, instead of
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1037 the C-d uses by CCA Emacs. (Actually, this character is controlled
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1038 by a parameter in GNU Emacs.) C-M-s in GNU Emacs is an interactive
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1039 regular expression search, but you can get to a noninteractive
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1040 one by typing ESC right after the C-M-s.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1041
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1042 In GNU Emacs, C-x s asks, for each modified file buffer, whether
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1043 to save it.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1044
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1045 GNU Emacs indicates line continuation with "\" and line
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1046 truncation (at either margin) with "$".
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1047
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1048 The command to resume a tags-search or tags-query-replace in
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1049 GNU Emacs is Meta-Comma.