aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2000-12-20 14:23:38 +0000
committerEli Zaretskii2000-12-20 14:23:38 +0000
commited5c18e2604ab49e33ccdb2a67e8d18e9a6b12d6 (patch)
tree2f4a5b290dd65dc107efc22fcf5942fd39919c52
parent73ec16700b64f7b81f56cbe1c4809c3f13bd3b1e (diff)
downloademacs-ed5c18e2604ab49e33ccdb2a67e8d18e9a6b12d6.tar.gz
emacs-ed5c18e2604ab49e33ccdb2a67e8d18e9a6b12d6.zip
Many changes to make it consistent with Emacs 21.
-rw-r--r--man/ChangeLog2
-rw-r--r--man/faq.texi1719
2 files changed, 1051 insertions, 670 deletions
diff --git a/man/ChangeLog b/man/ChangeLog
index af7f6113beb..a91b64d2416 100644
--- a/man/ChangeLog
+++ b/man/ChangeLog
@@ -1,5 +1,7 @@
12000-12-20 Eli Zaretskii <eliz@is.elta.co.il> 12000-12-20 Eli Zaretskii <eliz@is.elta.co.il>
2 2
3 * faq.texi: Many changes to make it consistent with Emacs 21.
4
3 * Makefile.in (../info/idlwave): Use --no-split. 5 * Makefile.in (../info/idlwave): Use --no-split.
4 6
52000-12-14 Dave Love <fx@gnu.org> 72000-12-14 Dave Love <fx@gnu.org>
diff --git a/man/faq.texi b/man/faq.texi
index 262f8e67563..3d5281950c2 100644
--- a/man/faq.texi
+++ b/man/faq.texi
@@ -6,6 +6,9 @@
6 6
7@setchapternewpage odd 7@setchapternewpage odd
8 8
9@c This is used in many places
10@set VER 21.1
11
9@c The @ifinfo stuff only appears in the Info version 12@c The @ifinfo stuff only appears in the Info version
10@ifinfo 13@ifinfo
11@dircategory Emacs 14@dircategory Emacs
@@ -13,7 +16,7 @@
13* Emacs FAQ: (efaq). Frequently Asked Questions about Emacs. 16* Emacs FAQ: (efaq). Frequently Asked Questions about Emacs.
14@end direntry 17@end direntry
15 18
16Copyright 1994,1995,1996,1997,1998,1999 Reuven M. Lerner@* 19Copyright 1994,1995,1996,1997,1998,1999,2000 Reuven M. Lerner@*
17Copyright 1992,1993 Steven Byrnes@* 20Copyright 1992,1993 Steven Byrnes@*
18Copyright 1990,1991,1992 Joseph Brian Wells@* 21Copyright 1990,1991,1992 Joseph Brian Wells@*
19 22
@@ -44,7 +47,7 @@ itself allows free copying and redistribution.
44@c The following two commands start the copyright page. 47@c The following two commands start the copyright page.
45@page 48@page
46@vskip 0pt plus 1filll 49@vskip 0pt plus 1filll
47Copyright @copyright{} 1994,1995,1996,1997,1998,1999 Reuven M. Lerner@* 50Copyright @copyright{} 1994,1995,1996,1997,1998,1999,2000 Reuven M. Lerner@*
48Copyright @copyright{} 1992,1993 Steven Byrnes@* 51Copyright @copyright{} 1992,1993 Steven Byrnes@*
49Copyright @copyright{} 1990,1991,1992 Joseph Brian Wells@* 52Copyright @copyright{} 1990,1991,1992 Joseph Brian Wells@*
50 53
@@ -70,10 +73,10 @@ itself allows free copying and redistribution.
70 73
71This is the GNU Emacs FAQ, last updated on @today{}. 74This is the GNU Emacs FAQ, last updated on @today{}.
72 75
73The FAQ is slowly but surely being turned into a Texinfo document, 76The FAQ is maintained as a Texinfo document, allowing us to create HTML,
74allowing us to create HTML, Info, and TeX documents from a single source 77Info, and TeX documents from a single source file, and is slowly but
75file. Please bear with us as we improve on this format. If you have 78surely being improved. Please bear with us as we improve on this
76any suggestions or questions, please contact 79format. If you have any suggestions or questions, please contact
77@email{emacs-faq@@lerner.co.il, the FAQ maintainers}. 80@email{emacs-faq@@lerner.co.il, the FAQ maintainers}.
78 81
79@menu 82@menu
@@ -97,7 +100,7 @@ any suggestions or questions, please contact
97@chapter FAQ notation 100@chapter FAQ notation
98@cindex FAQ notation 101@cindex FAQ notation
99 102
100This section describes notation used in the GNU Emacs FAQ, as well as in 103This chapter describes notation used in the GNU Emacs FAQ, as well as in
101the Emacs documentation. Consult this section if this is the first time 104the Emacs documentation. Consult this section if this is the first time
102you are reading the FAQ, or if you are confused by notation or terms 105you are reading the FAQ, or if you are confused by notation or terms
103used in the FAQ. 106used in the FAQ.
@@ -115,7 +118,7 @@ used in the FAQ.
115@cindex Basic keys 118@cindex Basic keys
116@cindex Control key, notation for 119@cindex Control key, notation for
117@cindex @key{Meta} key, notation for 120@cindex @key{Meta} key, notation for
118@cindex Control-meta characters, notation for 121@cindex Control-Meta characters, notation for
119@cindex @kbd{C-h}, definition of 122@cindex @kbd{C-h}, definition of
120@cindex @kbd{M-C-h}, definition of 123@cindex @kbd{M-C-h}, definition of
121@cindex @key{DEL}, definition of 124@cindex @key{DEL}, definition of
@@ -124,6 +127,7 @@ used in the FAQ.
124@cindex @key{RET}, definition of 127@cindex @key{RET}, definition of
125@cindex @key{SPC}, definition of 128@cindex @key{SPC}, definition of
126@cindex @key{TAB}, definition of 129@cindex @key{TAB}, definition of
130@cindex Notation for keys
127 131
128@itemize @bullet 132@itemize @bullet
129 133
@@ -132,7 +136,7 @@ used in the FAQ.
132 136
133@item 137@item
134@kbd{M-x}: press the @key{x} key while holding down the @key{Meta} key 138@kbd{M-x}: press the @key{x} key while holding down the @key{Meta} key
135(if your computer doesn't have a @key{Meta} key, see @pxref{No Meta key}) 139(if your computer doesn't have a @key{Meta} key, @pxref{No Meta key})
136 140
137@item 141@item
138@kbd{M-C-x}: press the @key{x} key while holding down both @key{Control} 142@kbd{M-C-x}: press the @key{x} key while holding down both @key{Control}
@@ -148,8 +152,9 @@ and @key{Meta}
148@key{RET}: @key{Return}, sometimes marked @key{Enter}; same as @kbd{C-m} 152@key{RET}: @key{Return}, sometimes marked @key{Enter}; same as @kbd{C-m}
149 153
150@item 154@item
151@key{DEL}: @key{Delete}, usually not the same as @key{Backspace}; same 155@key{DEL}: @key{Delete}, usually @strong{not} the same as
152 as @kbd{C-?} (@pxref{Backspace invokes help} if deleting invokes Emacs help) 156@key{Backspace}; same as @kbd{C-?} (see @ref{Backspace invokes help}, if
157deleting invokes Emacs help)
153 158
154@item 159@item
155@key{ESC}: Escape; same as @kbd{C-[} 160@key{ESC}: Escape; same as @kbd{C-[}
@@ -163,23 +168,32 @@ and @key{Meta}
163@end itemize 168@end itemize
164 169
165Key sequences longer than one key (and some single-key sequences) are 170Key sequences longer than one key (and some single-key sequences) are
166inside double quotes or on lines by themselves. Any real spaces in such 171written inside quotes or on lines by themselves, like this:
167a key sequence should be ignored; only @key{SPC} really means press the 172
168space key. 173@display
174 @kbd{M-x frobnicate-while-foo RET}
175@end display
176
177@noindent
178Any real spaces in such a key sequence should be ignored; only @key{SPC}
179really means press the space key.
169 180
170The ASCII code sent by @kbd{C-x} (except for @kbd{C-?}) is the value 181The ASCII code sent by @kbd{C-x} (except for @kbd{C-?}) is the value
171that would be sent by pressing just @key{x} minus 96 (or 64 for 182that would be sent by pressing just @key{x} minus 96 (or 64 for
172uppercase @key{X}) and will be from 0 to 31. The ASCII code sent by 183uppercase @key{X}) and will be from 0 to 31. On Unix and GNU/Linux
173@kbd{M-x} is the sum of 128 and the ASCII code that would be sent by 184terminals, the ASCII code sent by @kbd{M-x} is the sum of 128 and the
174pressing just @key{x}. Essentially, @key{Control} turns off bits 5 and 185ASCII code that would be sent by pressing just @key{x}. Essentially,
1756 and @key{Meta} turns on bit 7. 186@key{Control} turns off bits 5 and 6 and @key{Meta} turns on bit
1877@footnote{
188DOS and Windows terminals don't set bit 7 when the @key{Meta} key is
189pressed.}.
176 190
177@kbd{C-?} (aka @key{DEL}) is ASCII code 127. It is a misnomer to call 191@kbd{C-?} (aka @key{DEL}) is ASCII code 127. It is a misnomer to call
178@kbd{C-?} a "control" key, since 127 has both bits 5 and 6 turned ON. 192@kbd{C-?} a ``control'' key, since 127 has both bits 5 and 6 turned ON.
179Also, on very few keyboards does @kbd{C-?} generate ASCII code 127. 193Also, on very few keyboards does @kbd{C-?} generate ASCII code 127.
180 194
181@inforef{Characters, Characters, emacs} and @inforef{Keys, Keys, emacs} 195@inforef{Characters, Characters, emacs}, and @inforef{Keys, Keys, emacs},
182for more information. (@pxref{On-line manual} for more information about 196for more information. (@xref{On-line manual}, for more information about
183Info.) 197Info.)
184 198
185@node Extended commands, On-line manual, Basic keys, FAQ notation 199@node Extended commands, On-line manual, Basic keys, FAQ notation
@@ -189,7 +203,7 @@ Info.)
189@cindex M-x, meaning of 203@cindex M-x, meaning of
190 204
191@kbd{M-x @var{command}} means type @kbd{M-x}, then type the name of the 205@kbd{M-x @var{command}} means type @kbd{M-x}, then type the name of the
192command, then type @key{RET}. (@pxref{Basic keys} if you're not sure 206command, then type @key{RET}. (@xref{Basic keys}, if you're not sure
193what @kbd{M-x} and @key{RET} mean.) 207what @kbd{M-x} and @key{RET} mean.)
194 208
195@kbd{M-x} (by default) invokes the command 209@kbd{M-x} (by default) invokes the command
@@ -197,14 +211,17 @@ what @kbd{M-x} and @key{RET} mean.)
197Emacs command if you can remember the command's name. If you can't 211Emacs command if you can remember the command's name. If you can't
198remember the command's name, you can type @key{TAB} and @key{SPC} for 212remember the command's name, you can type @key{TAB} and @key{SPC} for
199completion, @key{?} for a list of possibilities, and @kbd{M-p} and 213completion, @key{?} for a list of possibilities, and @kbd{M-p} and
200@kbd{M-n} to see previous commands entered. An Emacs "command" is any 214@kbd{M-n} (or up-arrow and down-arrow on terminals that have these
201"interactive" Emacs function. 215editing keys) to see previous commands entered. An Emacs @dfn{command}
216is an @dfn{interactive} Emacs function.
202 217
218@cindex @key{Do} key
203Your system administrator may have bound other key sequences to invoke 219Your system administrator may have bound other key sequences to invoke
204@code{execute-extended-command}. A function key labeled @kbd{Do} is a 220@code{execute-extended-command}. A function key labeled @kbd{Do} is a
205good candidate for this. 221good candidate for this, on keyboards that have such a key.
206 222
207To run non-interactive Emacs functions, @pxref{Evaluating Emacs Lisp code}. 223If you need to run non-interactive Emacs functions, see @ref{Evaluating
224Emacs Lisp code}.
208 225
209@node On-line manual, Filename conventions, Extended commands, FAQ notation 226@node On-line manual, Filename conventions, Extended commands, FAQ notation
210@section How do I read topic XXX in the on-line manual? 227@section How do I read topic XXX in the on-line manual?
@@ -213,18 +230,19 @@ To run non-interactive Emacs functions, @pxref{Evaluating Emacs Lisp code}.
213@cindex Finding topics in the on-line manual 230@cindex Finding topics in the on-line manual
214@cindex Info, finding topics in 231@cindex Info, finding topics in
215 232
216When we refer you to topic XXX in the on-line manual, you can read this 233When we refer you to some @var{topic} in the on-line manual, you can
217manual node inside Emacs (assuming nothing is broken) by typing @kbd{C-h 234read this manual node inside Emacs (assuming nothing is broken) by
218i m emacs @key{RET} m XXX @key{RET}}. 235typing @kbd{C-h i m emacs @key{RET} m @var{topic} @key{RET}}.
219 236
220This invokes Info, the GNU hypertext documentation browser. If you don't 237This invokes Info, the GNU hypertext documentation browser. If you don't
221already know how to use Info, type @key{?} from within Info. 238already know how to use Info, type @key{?} from within Info.
222 239
223If we refer to topic XXX:YYY, type @kbd{C-h i m emacs @key{RET} m XXX 240If we refer to @var{topic}:@var{subtopic}, type @kbd{C-h i m emacs
224@key{RET} m YYY @key{RET}}. 241@key{RET} m @var{topic} @key{RET} m @var{subtopic} @key{RET}}.
225 242
226Your system administrator may not have installed the Info files, or may 243If these commands don't work as expected, your system administrator may
227have installed them improperly. In this case you should complain. 244not have installed the Info files, or may have installed them
245improperly. In this case you should complain.
228 246
229@xref{Getting a printed manual}, if you would like a paper copy of the 247@xref{Getting a printed manual}, if you would like a paper copy of the
230Emacs manual. 248Emacs manual.
@@ -242,20 +260,22 @@ into subdirectories; the important ones are @file{etc}, @file{lisp}, and
242If you use Emacs, but don't know where it is kept on your system, start 260If you use Emacs, but don't know where it is kept on your system, start
243Emacs, then type @kbd{C-h v data-directory @key{RET}}. The directory 261Emacs, then type @kbd{C-h v data-directory @key{RET}}. The directory
244name displayed by this will be the full pathname of the installed 262name displayed by this will be the full pathname of the installed
245@file{etc} directory. 263@file{etc} directory. (This full path is recorded in the Emacs variable
264@code{data-directory}, and @kbd{C-h v} displays the value and the
265documentation of a variable.)
246 266
247The location of your Info directory (i.e., where on-line documentation 267The location of your Info directory (i.e., where on-line documentation
248is stored) is kept in the variable @code{Info-default-directory-list}. Use 268is stored) is kept in the variable @code{Info-default-directory-list}. Use
249@kbd{C-h v Info-default-directory-list @key{RET}} to see the contents of 269@kbd{C-h v Info-default-directory-list @key{RET}} to see the value of
250this variable, which will be a list of directory names. The last 270this variable, which will be a list of directory names. The last
251directory in that list is probably where most Info files are stored. By 271directory in that list is probably where most Info files are stored. By
252default, Info documentation is placed in @file{/usr/local/info}. 272default, Info documentation is placed in @file{/usr/local/info}.
253 273
254Some of these files are available individually via FTP or e-mail; 274Some of these files are available individually via FTP or e-mail; see
255@pxref{Informational files for Emacs}. All are available in the source 275@ref{Informational files for Emacs}. They all are available in the
256distribution. Many of the files in the @file{etc} directory are also 276source distribution. Many of the files in the @file{etc} directory are
257available via the Emacs "help" menu, or by typing @kbd{C-h ?} (@kbd{M-x 277also available via the Emacs "@samp{Help} menu, or by typing @kbd{C-h ?}
258help-for-help}). 278(@kbd{M-x help-for-help}).
259 279
260Your system administrator may have removed the @file{src} directory and 280Your system administrator may have removed the @file{src} directory and
261many files from the @file{etc} directory. 281many files from the @file{etc} directory.
@@ -305,11 +325,11 @@ high quality free software available for everyone. The OSF is a
305consortium of computer vendors which develops commercial software for 325consortium of computer vendors which develops commercial software for
306Unix systems. 326Unix systems.
307 327
308The word "free" in the title of the Free Software Foundation refers to 328The word ``free'' in the title of the Free Software Foundation refers to
309"freedom," not "zero dollars." Anyone can charge any price for 329``freedom,'' not ``zero dollars.'' Anyone can charge any price for
310GPL-covered software that they want to. However, in practice, the 330GPL-covered software that they want to. However, in practice, the
311freedom enforced by the GPL leads to low prices, because you can always 331freedom enforced by the GPL leads to low prices, because you can always
312get the software for less money from someone else, because everyone has 332get the software for less money from someone else, since everyone has
313the right to resell or give away GPL-covered software. 333the right to resell or give away GPL-covered software.
314 334
315@c ------------------------------------------------------------ 335@c ------------------------------------------------------------
@@ -317,7 +337,7 @@ the right to resell or give away GPL-covered software.
317@chapter General questions 337@chapter General questions
318@cindex General questions 338@cindex General questions
319 339
320This section contains general questions having to do with Emacs, the 340This chapter contains general questions having to do with Emacs, the
321Free Software Foundation, and related organizations. 341Free Software Foundation, and related organizations.
322 342
323@menu 343@menu
@@ -340,12 +360,12 @@ Free Software Foundation, and related organizations.
340The LPF opposes the expanding danger of software patents and 360The LPF opposes the expanding danger of software patents and
341look-and-feel copyrights. To get more information, feel free to contact 361look-and-feel copyrights. To get more information, feel free to contact
342the LPF via e-mail or otherwise. You may also contact 362the LPF via e-mail or otherwise. You may also contact
343@email{jbw@@cs.bu.edu, Joe Wells}; he will be happy to talk with you 363@email{jbw@@cs.bu.edu, Joe Wells}; he will be happy to talk to you
344about the LPF. 364about the LPF.
345 365
346You can find more information about the LPF in the file @file{etc/LPF}. 366You can find more information about the LPF in the file @file{etc/LPF}.
347More papers describing the LPF's views are available on the Internet and 367More papers describing the LPF's views are available on the Internet and
348also from @uref{http://lpf.ai.mit.edu/, the LPF}. 368also from @uref{http://lpf.ai.mit.edu/, the LPF home page}.
349 369
350@node Real meaning of copyleft, Guidelines for newsgroup postings, The LPF, General questions 370@node Real meaning of copyleft, Guidelines for newsgroup postings, The LPF, General questions
351@section What is the real legal meaning of the GNU copyleft? 371@section What is the real legal meaning of the GNU copyleft?
@@ -366,11 +386,11 @@ RMS writes:
366@quotation 386@quotation
367The legal meaning of the GNU copyleft is less important than the spirit, 387The legal meaning of the GNU copyleft is less important than the spirit,
368which is that Emacs is a free software project and that work pertaining 388which is that Emacs is a free software project and that work pertaining
369to Emacs should also be free software. "Free" means that all users have 389to Emacs should also be free software. ``Free'' means that all users
370the freedom to study, share, change and improve Emacs. To make sure 390have the freedom to study, share, change and improve Emacs. To make
371everyone has this freedom, pass along source code when you distribute 391sure everyone has this freedom, pass along source code when you
372any version of Emacs or a related program, and give the recipients the 392distribute any version of Emacs or a related program, and give the
373same freedom that you enjoyed. 393recipients the same freedom that you enjoyed.
374@end quotation 394@end quotation
375 395
376@node Guidelines for newsgroup postings, Newsgroup archives, Real meaning of copyleft, General questions 396@node Guidelines for newsgroup postings, Newsgroup archives, Real meaning of copyleft, General questions
@@ -379,31 +399,34 @@ same freedom that you enjoyed.
379@cindex GNU newsgroups, appropriate messages for 399@cindex GNU newsgroups, appropriate messages for
380@cindex Usenet groups, appropriate messages for 400@cindex Usenet groups, appropriate messages for
381@cindex Mailing lists, appropriate messages for 401@cindex Mailing lists, appropriate messages for
402@cindex Posting messages to newsgroups
382 403
383The file @file{etc/MAILINGLISTS} discusses the purpose of each GNU 404@cindex GNU mailing lists
384mailing-list. (@pxref{Informational files for Emacs} if you want a copy 405The file @file{etc/MAILINGLISTS} describes the purpose of each GNU
406mailing list. (@xref{Informational files for Emacs}, if you want a copy
385of the file.) For those lists which are gatewayed with newsgroups, it 407of the file.) For those lists which are gatewayed with newsgroups, it
386lists both the newsgroup name and the mailing list address. 408lists both the newsgroup name and the mailing list address.
387 409
388@uref{news:comp.emacs} is for discussion of Emacs programs in general. 410The newsgroup @uref{news:comp.emacs} is for discussion of Emacs programs
389This includes Emacs along with various other implementations, such as 411in general. This includes Emacs along with various other
390JOVE, MicroEmacs, Freemacs, MG, Unipress, CCA, and Epsilon. 412implementations, such as XEmacs, JOVE, MicroEmacs, Freemacs, MG,
413Unipress, CCA, and Epsilon.
391 414
392Many people post Emacs questions to @uref{news:comp.emacs} because they 415Many people post Emacs questions to @uref{news:comp.emacs} because they
393don't receive any of the gnu.* newsgroups. Arguments have been made 416don't receive any of the @code{gnu.*} newsgroups. Arguments have been
394both for and against posting GNU-Emacs-specific material to 417made both for and against posting GNU-Emacs-specific material to
395@uref{news:comp.emacs}. You have to decide for yourself. 418@uref{news:comp.emacs}. You have to decide for yourself.
396 419
397Messages advocating "non-free" software are considered unacceptable on 420Messages advocating ``non-free'' software are considered unacceptable on
398any of the gnu.* newsgroups except for @uref{news:gnu.misc.discuss}, 421any of the @code{gnu.*} newsgroups except for @uref{news:gnu.misc.discuss},
399which was created to hold the extensive flame-wars on the subject. 422which was created to hold the extensive flame-wars on the subject.
400"Non-free" software includes any software for which the end user can't 423``Non-free'' software includes any software for which the end user can't
401freely modify the source code and exchange enhancements. Be careful to 424freely modify the source code and exchange enhancements. Be careful to
402remove the gnu.* groups from the "Newsgroups:" line when posting a 425remove the @code{gnu.*} groups from the @samp{Newsgroups:} line when
403followup that recommends such software. 426posting a followup that recommends such software.
404 427
405@uref{news:gnu.emacs.bug} is a place where bug reports appear, but avoid 428@uref{news:gnu.emacs.bug} is a place where bug reports appear, but avoid
406posting bug reports to this newsgroup (@pxref{Reporting bugs}). 429posting bug reports to this newsgroup directly (@pxref{Reporting bugs}).
407 430
408@node Newsgroup archives, Reporting bugs, Guidelines for newsgroup postings, General questions 431@node Newsgroup archives, Reporting bugs, Guidelines for newsgroup postings, General questions
409@section Where can I get old postings to @uref{news:gnu.emacs.help} and other GNU groups? 432@section Where can I get old postings to @uref{news:gnu.emacs.help} and other GNU groups?
@@ -422,7 +445,7 @@ As of this writing, the archives are not yet working.
422 445
423Web-based Usenet search services, such as 446Web-based Usenet search services, such as
424@uref{http://www.dejanews.com, DejaNews}, also archive the 447@uref{http://www.dejanews.com, DejaNews}, also archive the
425gnu.* groups. 448@code{gnu.*} groups.
426 449
427@node Reporting bugs, Unsubscribing from Emacs lists, Newsgroup archives, General questions 450@node Reporting bugs, Unsubscribing from Emacs lists, Newsgroup archives, General questions
428@section Where should I report bugs and other problems with Emacs? 451@section Where should I report bugs and other problems with Emacs?
@@ -437,9 +460,9 @@ newsgroup @uref{news:gnu.emacs.bug}, but please use e-mail instead of
437news to submit the bug report. This ensures a reliable return address 460news to submit the bug report. This ensures a reliable return address
438so you can be contacted for further details. 461so you can be contacted for further details.
439 462
440Be sure to read the "Bugs" section of the Emacs manual before reporting 463Be sure to read the ``Bugs'' section of the Emacs manual before reporting
441a bug to bug-gnu-emacs! The manual describes in detail how to submit a 464a bug to bug-gnu-emacs! The manual describes in detail how to submit a
442useful bug report. (@pxref{On-line manual} if you don't know how to read the 465useful bug report. (@xref{On-line manual}, if you don't know how to read the
443manual.) 466manual.)
444 467
445RMS says: 468RMS says:
@@ -459,7 +482,7 @@ RMS says it is sometimes fine to post to @uref{news:gnu.emacs.help}:
459@quotation 482@quotation
460If you have reported a bug and you don't hear about a possible fix, 483If you have reported a bug and you don't hear about a possible fix,
461then after a suitable delay (such as a week) it is okay to post on 484then after a suitable delay (such as a week) it is okay to post on
462gnu.emacs.help asking if anyone can help you. 485@code{gnu.emacs.help} asking if anyone can help you.
463@end quotation 486@end quotation
464 487
465If you are unsure whether you have found a bug, consider the following 488If you are unsure whether you have found a bug, consider the following
@@ -477,15 +500,16 @@ does, that is a bug.
477@cindex Unsubscribing from GNU mailing lists 500@cindex Unsubscribing from GNU mailing lists
478@cindex Removing yourself from GNU mailing lists 501@cindex Removing yourself from GNU mailing lists
479 502
480If you are receiving a GNU mailing list named "XXX", you might be able 503If you are receiving a GNU mailing list named @var{list}, you might be
481to unsubscribe from it by sending a request to the address 504able to unsubscribe from it by sending a request to the address
482@email{XXX-request@@gnu.org}. However, this will not work if you are 505@email{@var{list}-request@@gnu.org}. However, this will not work if you are
483not listed on the main mailing list, but instead receive the mail from a 506not listed on the main mailing list, but instead receive the mail from a
484distribution point. In that case, you will have to track down at which 507distribution point. In that case, you will have to track down at which
485distribution point you are listed. Inspecting the @samp{Received} headers 508distribution point you are listed. Inspecting the @samp{Received} headers
486on the mail messages may help, along with liberal use of the "EXPN" or 509on the mail messages may help, along with liberal use of the @samp{EXPN} or
487"VRFY" sendmail commands through "telnet <site-address> smtp". Ask your 510@samp{VRFY} sendmail commands through @samp{telnet @var{site-address}
488postmaster for help. 511smtp}. Ask your postmaster for help, if you cannot figure out these
512details.
489 513
490@node Contacting the FSF, , Unsubscribing from Emacs lists, General questions 514@node Contacting the FSF, , Unsubscribing from Emacs lists, General questions
491@section What is the current address of the FSF? 515@section What is the current address of the FSF?
@@ -516,15 +540,17 @@ USA@*
516 540
517@end table 541@end table
518 542
519For details on how to order items directly from the FSF, see the file 543@cindex Ordering GNU software
520@file{etc/ORDERS}. 544For details on how to order items directly from the FSF, see the
545@uref{http://www.gnu.org/order/order.html, GNU Web site}, and also the
546files @file{etc/ORDERS}, @file{ORDERS.EUROPE}, and @file{ORDERS.JAPAN}.
521 547
522@c ------------------------------------------------------------ 548@c ------------------------------------------------------------
523@node Getting help, Status of Emacs, General questions, Top 549@node Getting help, Status of Emacs, General questions, Top
524@chapter Getting help 550@chapter Getting help
525@cindex Getting help 551@cindex Getting help
526 552
527This section tells you how to get help with Emacs 553This chapter tells you how to get help with Emacs
528 554
529@menu 555@menu
530* Basic editing:: 556* Basic editing::
@@ -562,7 +588,7 @@ Emacs help works best if it is invoked by a single key whose value
562should be stored in the variable @code{help-char}. 588should be stored in the variable @code{help-char}.
563 589
564There is also a WWW-based tutorial for Emacs 18, much of which is also 590There is also a WWW-based tutorial for Emacs 18, much of which is also
565relevant for Emacs 20, available at 591relevant for later versions of Emacs, available at
566 592
567@uref{http://kufacts.cc.ukans.edu/cwis/writeups/misc/emacsguide.html} 593@uref{http://kufacts.cc.ukans.edu/cwis/writeups/misc/emacsguide.html}
568 594
@@ -577,32 +603,64 @@ There are several methods for finding out how to do things in Emacs.
577 603
578@itemize @bullet 604@itemize @bullet
579 605
606@cindex Reading the Emacs manual
580@item 607@item
581The complete text of the Emacs manual is available on-line via the Info 608The complete text of the Emacs manual is available on-line via the Info
582hypertext reader. Type @kbd{C-h i} to invoke Info. Typing @key{h} 609hypertext reader. Type @kbd{C-h i} to invoke Info. Typing @key{h}
583immediately after entering Info will provide a short tutorial on how to 610immediately after entering Info will provide a short tutorial on how to
584use it. 611use it.
585 612
613@cindex Lookup a subject in a manual
614@cindex Index search in a manual
586@item 615@item
587You can order a hardcopy of the manual from the FSF. @xref{Getting a 616To quickly locate the section of the manual which discusses a certain
588printed manual}. 617issue, or describes a command or a variable, type @kbd{C-h i m emacs
589 618@key{RET} i @var{topic} @key{RET}}, where @var{topic} is the name of the
590@item 619topic, the command, or the variable which you are looking for. If this
591You can get a printed reference card listing commands and keys to 620does not land you on the right place in the manual, press @kbd{,}
592invoke them. You can order one from the FSF for $1 (or 10 for $5), 621(comma) repeatedly until you find what you need. (The @kbd{i} and
593or you can print your own from the @file{etc/refcard.tex} or 622@kbd{,} keys invoke the index-searching functions, which look for the
594@file{etc/refcard.ps} files in the Emacs distribution. 623@var{topic} you type in all the indices of the Emacs manual.)
595 624
625@cindex Apropos
596@item 626@item
597You can list all of the commands whose names contain a certain word 627You can list all of the commands whose names contain a certain word
598(actually which match a regular expression) using @kbd{C-h a} (@kbd{M-x 628(actually which match a regular expression) using @kbd{C-h a} (@kbd{M-x
599command-apropos}). 629command-apropos}).
600 630
631@cindex Command description in the manual
632@item
633The command @kbd{C-h C-f} (@code{Info-goto-emacs-command-node}) prompts
634for the name of a command, and then attempts to find the section in the
635Emacs manual where that command is described.
636
637@cindex Finding commands and variables
601@item 638@item
602You can list all of the functions and variables whose names contain a 639You can list all of the functions and variables whose names contain a
603certain word using @kbd{M-x apropos}. 640certain word using @kbd{M-x apropos}.
604 641
605@item 642@item
643You can list all of the functions and variables whose documentation
644matches a regular expression or a string, using @kbd{M-x
645apropos-documentation}.
646
647@item
648You can order a hardcopy of the manual from the FSF. @xref{Getting a
649printed manual}.
650
651@cindex Reference cards, in other languages
652@item
653You can get a printed reference card listing commands and keys to
654invoke them. You can order one from the FSF for $1 (or 10 for $5),
655or you can print your own from the @file{etc/refcard.tex} or
656@file{etc/refcard.ps} files in the Emacs distribution. Beginning with
657version 21.1, the Emacs distribution comes with translations of the
658reference card into several languages; look for files named
659@file{etc/@var{lang}-refcard.*}, where @var{lang} is a two-letter code
660of the language. For example, the German version of the reference card
661is in the files @file{etc/de-refcard.tex} and @file{etc/de-refcard.ps}.
662
663@item
606There are many other commands in Emacs for getting help and 664There are many other commands in Emacs for getting help and
607information. To get a list of these commands, type @samp{?} after 665information. To get a list of these commands, type @samp{?} after
608@kbd{C-h}. 666@kbd{C-h}.
@@ -616,11 +674,13 @@ information. To get a list of these commands, type @samp{?} after
616@cindex Emacs manual, obtaining a printed copy of 674@cindex Emacs manual, obtaining a printed copy of
617 675
618You can order a printed copy of the Emacs manual from the FSF. For 676You can order a printed copy of the Emacs manual from the FSF. For
619details see the file @file{etc/ORDERS}. 677details see the @uref{http://www.gnu.org/order/order.html, GNU Web site}
678and the file @file{etc/ORDERS}.
620 679
621The full @TeX{} source for the manual also comes in the @file{man} 680@c The number 620 below is version-dependent!
681The full Texinfo source for the manual also comes in the @file{man}
622directory of the Emacs distribution, if you're daring enough to try to 682directory of the Emacs distribution, if you're daring enough to try to
623print out this 440-page manual yourself (@pxref{Printing a Texinfo 683print out this 620-page manual yourself (@pxref{Printing a Texinfo
624file}). 684file}).
625 685
626If you absolutely have to print your own copy, and you don't have @TeX{}, 686If you absolutely have to print your own copy, and you don't have @TeX{},
@@ -628,7 +688,7 @@ you can get a PostScript version from
628 688
629@uref{http://www.gnu.org/manual/emacs/ps/emacs.ps.gz} 689@uref{http://www.gnu.org/manual/emacs/ps/emacs.ps.gz}
630 690
631A WWW version of the manual is at 691An HTML version of the manual is at
632 692
633@uref{www.gnu.org/manual/emacs/index.html} 693@uref{www.gnu.org/manual/emacs/index.html}
634 694
@@ -645,23 +705,25 @@ A WWW version of the manual is at
645Within Emacs, you can type @kbd{C-h f} to get the documentation for a 705Within Emacs, you can type @kbd{C-h f} to get the documentation for a
646function, @kbd{C-h v} for a variable. 706function, @kbd{C-h v} for a variable.
647 707
648For more information, obtain the Emacs Lisp Reference Manual. Details on 708For more information, obtain the Emacs Lisp Reference Manual. Details
649ordering it from FSF are in file @file{etc/ORDERS}. 709on ordering it from FSF are on the
710@uref{http://www.gnu.org/order/order.html, GNU Web site} and in the file
711@file{etc/ORDERS}.
650 712
651The Emacs Lisp Reference Manual is also available on-line, in Info 713The Emacs Lisp Reference Manual is also available on-line, in Info
652format. Texinfo source for the manual (along with pregenerated Info 714format. Texinfo source for the manual (along with pregenerated Info
653files) is available at 715files) is available at
654 716
655@uref{ftp://ftp.gnu.org/pub/gnu/emacs/elisp-manual-20-2.5.tar.gz} 717@uref{ftp://ftp.gnu.org/pub/gnu/emacs/elisp-manual-21-2.6.tar.gz}
656 718
657and all mirrors of @samp{ftp.gnu.org} (@pxref{Current GNU distributions} for a 719and all mirrors of @samp{ftp.gnu.org} (for a list, @pxref{Current GNU
658list). @xref{Installing Texinfo documentation}, if you want to install 720distributions}). @xref{Installing Texinfo documentation}, if you want
659the Info files, or @ref{Printing a Texinfo file} if you want to use the 721to install the Info files, or @ref{Printing a Texinfo file}, if you want
660Texinfo source to print the manual yourself. 722to use the Texinfo source to print the manual yourself.
661 723
662A WWW version of the Emacs Lisp Reference Manual is available at 724An HTML version of the Emacs Lisp Reference Manual is available at
663 725
664@uref{http://www.gnu.org/manual/elisp-manual-20-2.5/elisp.html} 726@uref{http://www.gnu.org/manual/elisp-manual-21-2.6/elisp.html}
665 727
666@node Installing Texinfo documentation, Printing a Texinfo file, Emacs Lisp documentation, Getting help 728@node Installing Texinfo documentation, Printing a Texinfo file, Emacs Lisp documentation, Getting help
667@section How do I install a piece of Texinfo documentation? 729@section How do I install a piece of Texinfo documentation?
@@ -669,30 +731,53 @@ A WWW version of the Emacs Lisp Reference Manual is available at
669@cindex Installing Texinfo documentation 731@cindex Installing Texinfo documentation
670@cindex New Texinfo files, installing 732@cindex New Texinfo files, installing
671@cindex Documentation, installing new Texinfo files 733@cindex Documentation, installing new Texinfo files
734@cindex Info files, how to install
672 735
673First, you must turn the Texinfo files into Info files. You may do this 736First, you must turn the Texinfo files into Info files. You may do this
674using the stand-alone @file{makeinfo} program, available as part of the latest 737using the stand-alone @file{makeinfo} program, available as part of the latest
675Texinfo package at 738Texinfo package at
676 739
677@uref{ftp://ftp.gnu.org/pub/gnu/texinfo/texinfo-3.12.tar.gz} 740@uref{ftp://ftp.gnu.org/pub/gnu/texinfo/texinfo-4.0.tar.gz}
678 741
679and all mirrors of @samp{ftp.gnu.org} (@pxref{Current GNU distributions} for a list). 742and all mirrors of @samp{ftp.gnu.org} (for a list, @pxref{Current GNU
743distributions}).
680 744
681For information about the Texinfo format, read the Texinfo manual which 745For information about the Texinfo format, read the Texinfo manual which
682comes with Emacs. This manual also comes installed in Info format, so 746comes with the Texinfo package. This manual also comes installed in
683you can read it on-line. 747Info format, so you can read it on-line; type @kbd{C-h i m texinfo
748@key{RET}}.
749
750Alternatively, you could use the Emacs command @kbd{M-x
751texinfo-format-buffer}, after visiting the Texinfo source file of the
752manual you want to convert.
684 753
685Neither @code{texinfo-format-buffer} nor @file{makeinfo} installs the 754Neither @code{texinfo-format-buffer} nor @file{makeinfo} installs the
686resulting Info files in Emacs's Info tree. To install Info files: 755resulting Info files in Emacs's Info tree. To install Info files,
756perform these steps:
687 757
688@enumerate 758@enumerate
759@item
760Move the files to the @file{info} directory in the installed Emacs
761distribution. @xref{Filename conventions}, if you don't know where that
762is.
689 763
690@item Move the files to the @file{info} directory in the installed Emacs 764@item
691 distribution. @xref{Filename conventions}, if you don't know where that is. 765Run the @code{install-info} command, which is part of the Texinfo
766distribution, to update the main Info directory menu, like this:
767
768@example
769 install-info --info-dir=@var{dir-path} @var{dir-path}/@var{file}
770@end example
692 771
693@item Edit the file @file{info/dir} in the installed Emacs distribution, 772@noindent
694 and add a line for the top level node in the Info package that you are 773where @var{dir-path} is the full path to the directory where you copied
695 installing. Follow the examples already in this file. The format is: 774the produced Info file(s), and @var{file} is the name of the Info file
775you produced and want to install.
776
777If you don't have the @code{install-info} command installed, you can
778edit the file @file{info/dir} in the installed Emacs distribution, and
779add a line for the top level node in the Info package that you are
780installing. Follow the examples already in this file. The format is:
696 781
697@example 782@example
698* Topic: (relative-pathname). Short description of topic. 783* Topic: (relative-pathname). Short description of topic.
@@ -704,24 +789,23 @@ If you want to install Info files and you don't have the necessary
704privileges, you have several options: 789privileges, you have several options:
705 790
706@itemize @bullet 791@itemize @bullet
707
708@item 792@item
709Info files don't actually need to be installed before being used. You 793Info files don't actually need to be installed before being used. You
710can feed a file name to the @code{Info-goto-node} command (invoked by 794can feed a file name to the @code{Info-goto-node} command (invoked by
711pressing @key{g} in Info mode) by typing the name of the file in 795pressing @key{g} in Info mode) by typing the name of the file in
712parentheses. This goes to the node named "Top" in that file. For 796parentheses. This goes to the node named ``Top'' in that file. For
713example, to view a Info file named "XXX" in your home directory, you can 797example, to view a Info file named @file{@var{info-file}} in your home
714type this: 798directory, you can type this:
715 799
716@lisp 800@lisp
717C-h i g (~/XXX) @key{RET} 801C-h i g (~/@var{info-file}) @key{RET}
718@end lisp 802@end lisp
719 803
720@item 804@item
721You can create your own Info directory. You can tell Emacs where the 805You can create your own Info directory. You can tell Emacs where that
722Info directory is by adding its pathname to the value of the variable 806Info directory is by adding its pathname to the value of the variable
723@code{Info-default-directory-list}. For example, to use a private Info 807@code{Info-default-directory-list}. For example, to use a private Info
724directory which is a subdirectory of your home directory named "Info", 808directory which is a subdirectory of your home directory named @file{Info},
725you could put this in your @file{.emacs} file: 809you could put this in your @file{.emacs} file:
726 810
727@lisp 811@lisp
@@ -730,7 +814,7 @@ you could put this in your @file{.emacs} file:
730@end lisp 814@end lisp
731 815
732You will need a top-level Info file named @file{dir} in this directory 816You will need a top-level Info file named @file{dir} in this directory
733which has everything the system dir file has in it, except it should 817which has everything the system @file{dir} file has in it, except it should
734list only entries for Info files in that directory. You might not need 818list only entries for Info files in that directory. You might not need
735it if all files in this directory were referenced by other @file{dir} 819it if all files in this directory were referenced by other @file{dir}
736files. The node lists from all @file{dir} files in 820files. The node lists from all @file{dir} files in
@@ -742,6 +826,7 @@ files. The node lists from all @file{dir} files in
742@section How do I print a Texinfo file? 826@section How do I print a Texinfo file?
743@cindex Printing a Texinfo file 827@cindex Printing a Texinfo file
744@cindex Texinfo file, printing 828@cindex Texinfo file, printing
829@cindex Printing documentation
745 830
746You can't get nicely printed output from Info files; you must still have 831You can't get nicely printed output from Info files; you must still have
747the original Texinfo source file for the manual you want to print. 832the original Texinfo source file for the manual you want to print.
@@ -750,25 +835,30 @@ Assuming you have @TeX{} installed on your system, follow these steps:
750 835
751@enumerate 836@enumerate
752 837
753@item Make sure the first line of the Texinfo file looks like this: 838@item
839Make sure the first line of the Texinfo file looks like this:
754 840
755@example 841@example
756\input texinfo 842\input texinfo
757@end example 843@end example
758 844
759 You may need to change @samp{texinfo} to the full pathname of the 845You may need to change @samp{texinfo} to the full pathname of the
760 texinfo.tex file, which comes with Emacs as @samp{man/texinfo.tex} (or 846@file{texinfo.tex} file, which comes with Emacs as
761 copy or link it into the current directory). 847@file{man/texinfo.tex} (or copy or link it into the current directory).
762
763@item @code{tex XXX.texinfo}
764 848
765@item @code{texindex XXX.??} 849@item
766 850Type @kbd{texi2dvi @var{texinfo-source}}, where @var{texinfo-source} is
767 The @samp{texindex} program comes with Emacs as @file{man/texindex.c}. 851the name of the Texinfo source file for which you want to produce a
852printed copy.
768 853
769@item @code{tex XXX.texinfo} 854The @samp{texi2dvi} script is part of the GNU Texinfo distribution
855(@pxref{Installing Texinfo documentation}).
770 856
771@item Print the DVI file @file{XXX.dvi} in the normal way for printing DVI files at your site. 857@item
858Print the DVI file @file{@var{texinfo-source}.dvi} in the normal way for
859printing DVI files at your site. For example, if you have a PostScript
860printer, run the @code{dvips} program to print the DVI file on that
861printer.
772 862
773@end enumerate 863@end enumerate
774 864
@@ -785,16 +875,22 @@ Yes. Here are some alternative programs:
785 875
786@itemize @bullet 876@itemize @bullet
787 877
788@item Info, a stand-alone version of the Info program, comes as part of the 878@item
789Texinfo package. @xref{Installing Texinfo documentation}, for details. 879@code{info}, a stand-alone version of the Info program, comes as part of
880the Texinfo package. @xref{Installing Texinfo documentation}, for
881details.
790 882
791@item Xinfo, a stand-alone version of the Info program that runs under X 883@item
792Windows. You can get it at 884Xinfo, a stand-alone version of the Info program that runs under X
885Window system. You can get it at
793@uref{ftp://ftp.gnu.org/pub/gnu/xinfo/xinfo-1.01.01.tar.gz} and all 886@uref{ftp://ftp.gnu.org/pub/gnu/xinfo/xinfo-1.01.01.tar.gz} and all
794mirrors of @samp{ftp.gnu.org} (@pxref{Current GNU distributions} for a list). 887mirrors of @samp{ftp.gnu.org} (see @ref{Current GNU distributions}, for a
888list of mirrors).
795 889
796@item Tkinfo, an Info viewer that runs under X Windows and uses Tcl/Tk. You 890@item
797can get Tkinfo at @uref{http://math-www.uni-paderborn.de/~axel/tkinfo/}. 891Tkinfo, an Info viewer that runs under X Window system and uses Tcl/Tk.
892You can get Tkinfo at
893@uref{http://math-www.uni-paderborn.de/~axel/tkinfo/}.
798 894
799@end itemize 895@end itemize
800 896
@@ -804,7 +900,6 @@ can get Tkinfo at @uref{http://math-www.uni-paderborn.de/~axel/tkinfo/}.
804@cindex Files included with Emacs 900@cindex Files included with Emacs
805@cindex @file{COPYING}, description of file 901@cindex @file{COPYING}, description of file
806@cindex @file{DISTRIB}, description of file 902@cindex @file{DISTRIB}, description of file
807@cindex @file{FAQ}, description of file
808@cindex @file{FTP}, description of file 903@cindex @file{FTP}, description of file
809@cindex @file{GNU}, description of file 904@cindex @file{GNU}, description of file
810@cindex @file{INTERVIEW}, description of file 905@cindex @file{INTERVIEW}, description of file
@@ -820,7 +915,8 @@ informational files about Emacs and relevant aspects of the GNU project
820are available for you to read. 915are available for you to read.
821 916
822The following files are available in the @file{etc} directory of the 917The following files are available in the @file{etc} directory of the
823Emacs distribution (@pxref{Filename conventions} if you're not sure where that is). 918Emacs distribution (see @ref{Filename conventions}, if you're not sure
919where that is).
824 920
825@table @file 921@table @file
826 922
@@ -831,9 +927,6 @@ Emacs General Public License
831Emacs Availability Information, including the popular "Free Software 927Emacs Availability Information, including the popular "Free Software
832Foundation Order Form" 928Foundation Order Form"
833 929
834@item FAQ
835Emacs Frequently Asked Questions (You're reading it)
836
837@item FTP 930@item FTP
838How to get GNU Software by Internet FTP or by UUCP 931How to get GNU Software by Internet FTP or by UUCP
839 932
@@ -854,7 +947,7 @@ Status of Emacs on Various Machines and Systems
854GNU Project Electronic Mailing Lists 947GNU Project Electronic Mailing Lists
855 948
856@item NEWS 949@item NEWS
857Emacs news, a history of user-visible changes 950Emacs news, a history of recent user-visible changes
858 951
859@item SERVICE 952@item SERVICE
860GNU Service Directory 953GNU Service Directory
@@ -868,8 +961,8 @@ Latest versions of the above files also available at
868 961
869@uref{ftp://ftp.gnu.org/pub/gnu/GNUinfo/} 962@uref{ftp://ftp.gnu.org/pub/gnu/GNUinfo/}
870 963
871More GNU information, including back issues of the "GNU's Bulletin", are 964More GNU information, including back issues of the @cite{GNU's
872at 965Bulletin}, are at
873 966
874@uref{http://www.gnu.org/bulletins/bulletins.html} and 967@uref{http://www.gnu.org/bulletins/bulletins.html} and
875 968
@@ -880,13 +973,15 @@ at
880@cindex Installation help 973@cindex Installation help
881@cindex Help installing Emacs 974@cindex Help installing Emacs
882 975
883@xref{Installing Emacs}, for some basic installation hints, and question 976@xref{Installing Emacs}, for some basic installation hints, and see
88483 if you have problems with the installation. 977@ref{Problems building Emacs}, or @ref{Linking with -lX11 fails}, if you
978have problems with the installation.
885 979
886The file @file{etc/SERVICE} (@pxref{Filename conventions} if you're not 980The file @file{etc/SERVICE} (see @ref{Filename conventions}, if you're
887sure where that is) lists companies and individuals willing to sell you 981not sure where that is) lists companies and individuals willing to sell
888help in installing or using Emacs. An up-to-date version this file is 982you help in installing or using Emacs. An up-to-date version this file
889available on @samp{ftp.gnu.org} (@pxref{Informational files for Emacs}). 983is available on @samp{ftp.gnu.org} (@pxref{Informational files for
984Emacs}).
890 985
891@node Obtaining the FAQ, , Help installing Emacs, Getting help 986@node Obtaining the FAQ, , Help installing Emacs, Getting help
892@section Where can I get the latest version of this FAQ? 987@section Where can I get the latest version of this FAQ?
@@ -901,9 +996,9 @@ The Emacs FAQ is available in several ways:
901@itemize @bullet 996@itemize @bullet
902 997
903@item 998@item
904Inside of Emacs itself. You can get it from selecting the "Emacs FAQ" 999Inside of Emacs itself. You can get it from selecting the @samp{Emacs
905option from the "Help" menu at the top of any Emacs frame, or by typing 1000FAQ} option from the @samp{Help} menu of the Emacs menu bar at the top
906@kbd{C-h F} (@kbd{M-x view-emacs-FAQ}). 1001of any Emacs frame, or by typing @kbd{C-h F} (@kbd{M-x view-emacs-FAQ}).
907 1002
908@item 1003@item
909Via USENET. If you can read news, the FAQ should be available in your 1004Via USENET. If you can read news, the FAQ should be available in your
@@ -922,12 +1017,13 @@ In Gnus, you should type @kbd{C-u C-x C-s} from the @file{*Summary*}
922buffer or @kbd{C-u @key{SPC}} from the @file{*Newsgroup*} buffer to view 1017buffer or @kbd{C-u @key{SPC}} from the @file{*Newsgroup*} buffer to view
923all articles in a newsgroup. 1018all articles in a newsgroup.
924 1019
925If the FAQ articles have expired and been deleted from your news spool, 1020If the FAQ articles have expired and have been deleted from your news
926it might (or might not) do some good to complain to your news 1021spool, it might (or might not) do some good to complain to your news
927administrator, because the most recent FAQ should not expire for a 1022administrator, because the most recent FAQ should not expire for a
928while. 1023while.
929 1024
930@item Via HTTP or FTP. You can always fetch the latest FAQ from 1025@item
1026Via HTTP or FTP. You can always fetch the latest FAQ from
931 1027
932@uref{http://www.lerner.co.il/emacs/} and 1028@uref{http://www.lerner.co.il/emacs/} and
933 1029
@@ -935,8 +1031,8 @@ while.
935 1031
936@item 1032@item
937In the Emacs distribution. Since Emacs 18.56, the FAQ at the time 1033In the Emacs distribution. Since Emacs 18.56, the FAQ at the time
938of release has been part of the Emacs distribution as @file{etc/FAQ} 1034of release has been part of the Emacs distribution as
939(@pxref{Filename conventions}). 1035@file{man/faq.texi} (@pxref{Filename conventions}).
940 1036
941@item 1037@item
942Via the World Wide Web. A hypertext version is available at 1038Via the World Wide Web. A hypertext version is available at
@@ -972,7 +1068,7 @@ with "help" and "index" in the body on separate lines.
972@item 1068@item
973As the very last resort, you can e-mail a request to 1069As the very last resort, you can e-mail a request to
974@email{emacs-faq@@lerner.co.il}. Don't do this unless you have made a 1070@email{emacs-faq@@lerner.co.il}. Don't do this unless you have made a
975serious effort to obtain the FAQ list via one of the methods listed 1071good-faith effort to obtain the FAQ list via one of the methods listed
976above. 1072above.
977 1073
978@end itemize 1074@end itemize
@@ -982,53 +1078,55 @@ above.
982@chapter Status of Emacs 1078@chapter Status of Emacs
983@cindex Status of Emacs 1079@cindex Status of Emacs
984 1080
985This section gives you basic information about Emacs, including its 1081This chapter gives you basic information about Emacs, including its
986latest version status. 1082latest version status.
987 1083
988@menu 1084@menu
989* Origin of the term Emacs:: 1085* Origin of the term Emacs::
990* Latest version of Emacs:: 1086* Latest version of Emacs::
991* New in Emacs 20:: 1087* New in Emacs 20::
1088* New in Emacs 21::
992@end menu 1089@end menu
993 1090
994@node Origin of the term Emacs, Latest version of Emacs, Status of Emacs, Status of Emacs 1091@node Origin of the term Emacs, Latest version of Emacs, Status of Emacs, Status of Emacs
995@section Where does the name "Emacs" come from? 1092@section Where does the name ``Emacs'' come from?
996@cindex Origin of the term "Emacs" 1093@cindex Origin of the term ``Emacs''
997@cindex Emacs name origin 1094@cindex Emacs name origin
998@cindex TECO 1095@cindex TECO
999@cindex Original version of Emacs 1096@cindex Original version of Emacs
1000 1097
1001Emacs originally was an acronym for Editor MACroS. RMS says he "picked 1098Emacs originally was an acronym for Editor MACroS. RMS says he ``picked
1002the name Emacs because @key{E} was not in use as an abbreviation on ITS at 1099the name Emacs because @key{E} was not in use as an abbreviation on ITS at
1003the time." The first Emacs was a set of macros written in 1976 at MIT 1100the time.'' The first Emacs was a set of macros written in 1976 at MIT
1004by RMS for the editor TECO (Text Editor and COrrector, originally Tape 1101by RMS for the editor TECO (Text Editor and COrrector, originally Tape
1005Editor and COrrector) under ITS on a PDP-10. RMS had already extended 1102Editor and COrrector) under ITS on a PDP-10. RMS had already extended
1006TECO with a "real-time" full screen mode with reprogrammable keys. 1103TECO with a ``real-time'' full-screen mode with reprogrammable keys.
1007Emacs was started by @email{gls@@east.sun.com, Guy Steele} as a project 1104Emacs was started by @email{gls@@east.sun.com, Guy Steele} as a project
1008to unify the many divergent TECO command sets and key bindings at MIT, 1105to unify the many divergent TECO command sets and key bindings at MIT,
1009and completed by RMS. 1106and completed by RMS.
1010 1107
1011Many people have said that TECO code looks a lot like line noise; you 1108Many people have said that TECO code looks a lot like line noise; you
1012can read more at @uref{news:alt.lang.teco}. Someone has written a TECO 1109can read more at @uref{news:alt.lang.teco}. Someone has written a TECO
1013implementation in Emacs Lisp (to find it, @ref{Packages that do not come 1110implementation in Emacs Lisp (to find it, see @ref{Packages that do not
1014with Emacs}); it would be an interesting project to run the original 1111come with Emacs}); it would be an interesting project to run the
1015TECO Emacs inside of Emacs. 1112original TECO Emacs inside of Emacs.
1016 1113
1114@cindex Why Emacs?
1017For some not-so-serious alternative reasons for Emacs to have that 1115For some not-so-serious alternative reasons for Emacs to have that
1018name, check out @file{etc/JOKES} (@pxref{Filename conventions}). 1116name, check out the file @file{etc/JOKES} (@pxref{Filename
1117conventions}).
1019 1118
1020@node Latest version of Emacs, New in Emacs 20, Origin of the term Emacs, Status of Emacs 1119@node Latest version of Emacs, New in Emacs 20, Origin of the term Emacs, Status of Emacs
1021@section What is the latest version of Emacs? 1120@section What is the latest version of Emacs?
1022@cindex Version, latest 1121@cindex Version, latest
1023@cindex Latest version 1122@cindex Latest version of Emacs
1024 1123
1025Emacs 20.5 is the current version as of this writing. 1124Emacs @value{VER} is the current version as of this writing.
1026 1125
1027@node New in Emacs 20, , Latest version of Emacs, Status of Emacs 1126@node New in Emacs 20, New in Emacs 21, Latest version of Emacs, Status of Emacs
1028@section What is different about Emacs 20? 1127@section What is different about Emacs 20?
1029@cindex Differences between Emacs 19 and Emacs 20 1128@cindex Differences between Emacs 19 and Emacs 20
1030@cindex Emacs 20, new features in 1129@cindex Emacs 20, new features in
1031@cindex Recently introduced features
1032 1130
1033To find out what has changed in recent versions, type @kbd{C-h n} 1131To find out what has changed in recent versions, type @kbd{C-h n}
1034(@kbd{M-x view-emacs-news}). The oldest changes are at the bottom of 1132(@kbd{M-x view-emacs-news}). The oldest changes are at the bottom of
@@ -1041,16 +1139,38 @@ obvious to even the most casual user.
1041 1139
1042There are differences between Emacs versions 19 and 20 as well, but many 1140There are differences between Emacs versions 19 and 20 as well, but many
1043are more subtle or harder to find. Among the changes are the inclusion 1141are more subtle or harder to find. Among the changes are the inclusion
1044of MULE code for languages that use non-Latin characters, the "customize" 1142of MULE code for languages that use non-Latin characters and for mixing
1045facility for modifying variables without having to use Lisp, and 1143several languages in the same document; the ``Customize'' facility for
1046automatic conversion of files from Macintosh, Microsoft, and Unix 1144modifying variables without having to use Lisp; and automatic conversion
1047platforms. 1145of files from Macintosh, Microsoft, and Unix platforms.
1048 1146
1049A number of older Lisp packages, such as Gnus, Supercite and the 1147A number of older Lisp packages, such as Gnus, Supercite and the
1050calendar/diary, have been updated and enhanced to work with Emacs 20, 1148calendar/diary, have been updated and enhanced to work with Emacs 20,
1051and are now included with the standard distribution. 1149and are now included with the standard distribution.
1052 1150
1053 1151
1152@node New in Emacs 21, , New in Emacs 20, Status of Emacs
1153@section What is different about Emacs 21?
1154@cindex Differences between Emacs 20 and Emacs 21
1155@cindex Emacs 21, new features in
1156@cindex Recently introduced features
1157
1158@cindex Variable-size fonts
1159@cindex Toolbar support
1160Emacs 21 features a thorough rewrite of the display engine. The new
1161display engine supports variable-size fonts, images, and can play sounds
1162on platforms which support that. As a result, the visual appearence of
1163Emacs, when it runs on a windowed display, is much more reminiscent of
1164modern GUI programs, and includes 3D widgets (used for the mode line and
1165the scroll bars), a configurable and extensible toolbar, tooltips
1166(a.k.a.@: balloon help), and other niceties.
1167
1168@cindex Colors on character terminals
1169@cindex TTY colors
1170In addition, Emacs 21 supports faces on character terminals. This means
1171that you can now have colors when you run Emacs on a GNU/Linux console
1172and on @code{xterm} with @kbd{emacs -nw}.
1173
1054@c ------------------------------------------------------------ 1174@c ------------------------------------------------------------
1055@node Common requests, Bugs and problems, Status of Emacs, Top 1175@node Common requests, Bugs and problems, Status of Emacs, Top
1056@chapter Common requests 1176@chapter Common requests
@@ -1059,6 +1179,7 @@ and are now included with the standard distribution.
1059@menu 1179@menu
1060* Setting up a customization file:: 1180* Setting up a customization file::
1061* Debugging a customization file:: 1181* Debugging a customization file::
1182* Colors on a TTY::
1062* Displaying the current line or column:: 1183* Displaying the current line or column::
1063* Displaying the current filename in the titlebar:: 1184* Displaying the current filename in the titlebar::
1064* Turning on abbrevs by default:: 1185* Turning on abbrevs by default::
@@ -1104,7 +1225,7 @@ and are now included with the standard distribution.
1104* Filling paragraphs with a single space:: 1225* Filling paragraphs with a single space::
1105@end menu 1226@end menu
1106 1227
1107@node Setting up a customization file, Debugging a customization file, Common requests, Common requests 1228@node Setting up a customization file, Colors on a TTY, Common requests, Common requests
1108@section How do I set up a @file{.emacs} file properly? 1229@section How do I set up a @file{.emacs} file properly?
1109@cindex @file{.emacs} file, setting up 1230@cindex @file{.emacs} file, setting up
1110@cindex Init file, setting up 1231@cindex Init file, setting up
@@ -1117,25 +1238,46 @@ it causes confusing non-standard behavior. Then they send questions to
1117@email{help-gnu-emacs@@gnu.org} asking why Emacs isn't behaving as 1238@email{help-gnu-emacs@@gnu.org} asking why Emacs isn't behaving as
1118documented. 1239documented.
1119 1240
1120Emacs 20 includes the new @code{customize} facility, which can be 1241Beginning with version 20.1, Emacs includes the new Customize
1121invoked using @kbd{M-x customize @key{RET}}. This allows users who are 1242facility, which can be invoked using @kbd{M-x customize @key{RET}}.
1122unfamiliar with Emacs Lisp to modify their @file{.emacs} files in a 1243This allows users who are unfamiliar with Emacs Lisp to modify their
1123relatively straightforward way, using menus rather than Lisp code. Not 1244@file{.emacs} files in a relatively straightforward way, using menus
1124all packages support Customize as of this writing, but the number is 1245rather than Lisp code. Not all packages support Customize as of this
1125growing fairly steadily. 1246writing, but the number is growing fairly steadily.
1126 1247
1127While @code{customize} might indeed make it easier to configure Emacs, 1248While Customize might indeed make it easier to configure Emacs,
1128consider taking a bit of time to learn Emacs Lisp and modifying your 1249consider taking a bit of time to learn Emacs Lisp and modifying your
1129@file{.emacs} directly. Simple configuration options are described 1250@file{.emacs} directly. Simple configuration options are described
1130rather completely in @inforef{Init File, Init File, emacs}, for users 1251rather completely in @inforef{Init File, Init File, emacs}, for users
1131interested in performing frequently requested, basic tasks. 1252interested in performing frequently requested, basic tasks.
1132 1253
1133@node Debugging a customization file, Displaying the current line or column, Setting up a customization file, Common requests 1254@node Colors on a TTY, Debugging a customization file, Setting up a customization file, Common requests
1255@section How do I get colors and syntax highlighting on a TTY?
1256@cindex Colors on a TTY
1257@cindex Syntax highlighting on a TTY
1258@cindex Console, colors
1259
1260As of Emacs 21.1, colors and faces are supported in non-windowed mode,
1261i.e.@: on Unix and GNU/Linux character terminals and consoles, and when
1262invoked as @samp{emacs -nw} on X and MS-Windows. (Colors and faces were
1263supported in the MS-DOS port since Emacs 19.29.) Emacs automatically
1264detects color support at startup and uses it if available. If you think
1265that your terminal supports colors, but Emacs won't use them, check the
1266@code{termcap} entry for your display type for color-related
1267capabilities.
1268
1269The command @kbd{M-x list-colors-display} pops up a window which
1270exhibits all the colors Emacs knows about on the current display.
1271
1272Syntax highlighting is usually turned off by default; see @ref{Turning
1273on syntax highlighting}, for instructions how to turn it on.
1274
1275@node Debugging a customization file, Displaying the current line or column, Colors on a TTY, Common requests
1134@section How do I debug a @file{.emacs} file? 1276@section How do I debug a @file{.emacs} file?
1135@cindex Debugging @file{.emacs} file 1277@cindex Debugging @file{.emacs} file
1136@cindex @file{.emacs} debugging 1278@cindex @file{.emacs} debugging
1137@cindex Init file debugging 1279@cindex Init file debugging
1138@cindex @samp{-debug-init} 1280@cindex @samp{-debug-init} option
1139 1281
1140Start Emacs with the @samp{-debug-init} command-line option. This 1282Start Emacs with the @samp{-debug-init} command-line option. This
1141enables the Emacs Lisp debugger before evaluating your @file{.emacs} 1283enables the Emacs Lisp debugger before evaluating your @file{.emacs}
@@ -1168,9 +1310,12 @@ form
1168(setq line-number-mode t) 1310(setq line-number-mode t)
1169@end lisp 1311@end lisp
1170 1312
1313@noindent
1171in your @file{.emacs} file to achieve this whenever you start Emacs. 1314in your @file{.emacs} file to achieve this whenever you start Emacs.
1172Note that Emacs will not display the line number if the buffer is larger 1315(Line number display is on by default, unless your site-specific
1173than the value of the variable @code{line-number-display-limit}. 1316initialization disables it.) Note that Emacs will not display the line
1317number if the buffer's size in bytes is larger than the value of the
1318variable @code{line-number-display-limit}.
1174 1319
1175As of Emacs 20, you can similarly display the current column with 1320As of Emacs 20, you can similarly display the current column with
1176@kbd{M-x column-number-mode}, or by putting the form 1321@kbd{M-x column-number-mode}, or by putting the form
@@ -1179,21 +1324,23 @@ As of Emacs 20, you can similarly display the current column with
1179(setq column-number-mode t) 1324(setq column-number-mode t)
1180@end lisp 1325@end lisp
1181 1326
1327@noindent
1182in your @file{.emacs} file. 1328in your @file{.emacs} file.
1183 1329
1184The "%c" format specifier in the variable @code{mode-line-format} will 1330The @code{"%c"} format specifier in the variable @code{mode-line-format}
1185insert the current column's value into the mode line. See the 1331will insert the current column's value into the mode line. See the
1186documentation for @code{mode-line-format} (using @kbd{C-h v 1332documentation for @code{mode-line-format} (using @kbd{C-h v
1187mode-line-format @key{RET}}) for more information on how to set and use 1333mode-line-format @key{RET}}) for more information on how to set and use
1188this variable. 1334this variable.
1189 1335
1190Users of all Emacs versions can display the current column using 1336Users of all Emacs versions can display the current column using the
1191@email{abraham@@iesd.auc.dk, Per Abrahamsen's} "column" package. 1337@samp{column} package written by @email{abraham@@dina.kvl.dk, Per
1192@xref{Packages that do not come with Emacs}, for instructions on how to 1338Abrahamsen}. @xref{Packages that do not come with Emacs}, for
1193get it. 1339instructions on how to get it.
1194 1340
1195None of the vi emulation modes provide the "set number" capability of vi 1341@cindex Set number capability in @code{vi} emulators
1196(as far as we know). 1342None of the @code{vi} emulation modes provide the ``set number''
1343capability of @code{vi} (as far as we know).
1197 1344
1198@node Displaying the current filename in the titlebar, Turning on abbrevs by default, Displaying the current line or column, Common requests 1345@node Displaying the current filename in the titlebar, Turning on abbrevs by default, Displaying the current line or column, Common requests
1199@section How can I modify the titlebar to contain the current filename? 1346@section How can I modify the titlebar to contain the current filename?
@@ -1201,7 +1348,7 @@ None of the vi emulation modes provide the "set number" capability of vi
1201@cindex Filename, displaying in the titlebar 1348@cindex Filename, displaying in the titlebar
1202@cindex @code{frame-title-format} 1349@cindex @code{frame-title-format}
1203 1350
1204The contains of an Emacs frame's titlebar is controlled by the variable 1351The contents of an Emacs frame's titlebar is controlled by the variable
1205@code{frame-title-format}, which has the same structure as the variable 1352@code{frame-title-format}, which has the same structure as the variable
1206@code{mode-line-format}. (Use @kbd{C-h v} or @kbd{M-x 1353@code{mode-line-format}. (Use @kbd{C-h v} or @kbd{M-x
1207describe-variable} to get information about one or both of these 1354describe-variable} to get information about one or both of these
@@ -1226,7 +1373,7 @@ in your @file{.emacs}:
1226@end lisp 1373@end lisp
1227 1374
1228@node Turning on abbrevs by default, Turning on auto-fill by default, Displaying the current filename in the titlebar, Common requests 1375@node Turning on abbrevs by default, Turning on auto-fill by default, Displaying the current filename in the titlebar, Common requests
1229@section How do I turn on abbrevs by default just in mode XXX? 1376@section How do I turn on abbrevs by default just in mode @var{mymode}?
1230@cindex Abbrevs, turning on by default 1377@cindex Abbrevs, turning on by default
1231 1378
1232Put this in your @file{.emacs} file: 1379Put this in your @file{.emacs} file:
@@ -1236,7 +1383,7 @@ Put this in your @file{.emacs} file:
1236 (quietly-read-abbrev-file) 1383 (quietly-read-abbrev-file)
1237 (file-error nil)) 1384 (file-error nil))
1238 1385
1239(add-hook 'XXX-mode-hook 1386(add-hook '@var{mymode}-mode-hook
1240 (lambda () 1387 (lambda ()
1241 (setq abbrev-mode t))) 1388 (setq abbrev-mode t)))
1242@end lisp 1389@end lisp
@@ -1271,25 +1418,26 @@ If you want @code{auto-fill} mode on in all major modes, do this:
1271@cindex @code{auto-mode-alist}, modifying 1418@cindex @code{auto-mode-alist}, modifying
1272@cindex Modes, associating with file extensions 1419@cindex Modes, associating with file extensions
1273 1420
1274If you want to use XXX mode for all files which end with the extension 1421If you want to use a certain mode @var{foo} for all files whose names end
1275@samp{.YYY}, this will do it for you: 1422with the extension @file{.@var{bar}}, this will do it for you:
1276 1423
1277@lisp 1424@lisp
1278(setq auto-mode-alist (cons '("\\.YYY\\'" . XXX-mode) auto-mode-alist)) 1425(setq auto-mode-alist (cons '("\\.@var{bar}\\'" . @var{foo}-mode) auto-mode-alist))
1279@end lisp 1426@end lisp
1280 1427
1281Otherwise put this somewhere in the first line of any file you want to 1428Otherwise put this somewhere in the first line of any file you want to
1282edit in XXX mode (in the second line, if the first line begins with 1429edit in the mode @var{foo} (in the second line, if the first line begins
1283@samp{#!}): 1430with @samp{#!}):
1284 1431
1285@example 1432@example
1286-*-XXX-*- 1433-*- @var{foo} -*-
1287@end example 1434@end example
1288 1435
1436@cindex Major mode for shell scripts
1289Beginning with Emacs 19, the variable @code{interpreter-mode-alist} 1437Beginning with Emacs 19, the variable @code{interpreter-mode-alist}
1290specifies which mode to use when loading a shell script. (Emacs 1438specifies which mode to use when loading a shell script. (Emacs
1291determines which interpreter you're using by examining the first line of 1439determines which interpreter you're using by examining the first line of
1292the file.) This feature only applies when the file name doesn't 1440the script.) This feature only applies when the file name doesn't
1293indicate which mode to use. Use @kbd{C-h v} (or @kbd{M-x 1441indicate which mode to use. Use @kbd{C-h v} (or @kbd{M-x
1294describe-variable}) on @code{interpreter-mode-alist} to learn more. 1442describe-variable}) on @code{interpreter-mode-alist} to learn more.
1295 1443
@@ -1305,9 +1453,9 @@ describe-variable}) on @code{interpreter-mode-alist} to learn more.
1305To search for a single character that appears in the buffer as, for 1453To search for a single character that appears in the buffer as, for
1306example, @samp{\237}, you can type @kbd{C-s C-q 2 3 7}. (This assumes 1454example, @samp{\237}, you can type @kbd{C-s C-q 2 3 7}. (This assumes
1307the value of @code{search-quote-char} is 17 (i.e., @kbd{C-q}).) 1455the value of @code{search-quote-char} is 17 (i.e., @kbd{C-q}).)
1308Searching for ALL unprintable characters is best done with a regular 1456Searching for @strong{all} unprintable characters is best done with a
1309expression ("regexp") search. The easiest regexp to use for the 1457regular expression (@dfn{regexp}) search. The easiest regexp to use for
1310unprintable chars is the complement of the regexp for the printable 1458the unprintable chars is the complement of the regexp for the printable
1311chars. 1459chars.
1312 1460
1313@itemize @bullet 1461@itemize @bullet
@@ -1343,7 +1491,8 @@ M-x replace-regexp @key{RET} [^ @key{TAB} C-q @key{LFD} C-q @key{RET} C-q C-l @k
1343 1491
1344@itemize @bullet 1492@itemize @bullet
1345 1493
1346@item You don't need to quote @key{TAB} with either isearch or typing 1494@item
1495You don't need to quote @key{TAB} with either isearch or typing
1347something in the minibuffer. 1496something in the minibuffer.
1348 1497
1349@end itemize 1498@end itemize
@@ -1362,13 +1511,13 @@ to be highlighted when the mark is active by including
1362(transient-mark-mode t) 1511(transient-mark-mode t)
1363@end lisp 1512@end lisp
1364 1513
1365in your @file{.emacs} file. (Also see @xref{Turning on syntax highlighting}.) 1514in your @file{.emacs} file. (Also see @ref{Turning on syntax
1515highlighting}.)
1366 1516
1367@node Controlling case sensitivity, Wrapping words automatically, Highlighting a region, Common requests 1517@node Controlling case sensitivity, Wrapping words automatically, Highlighting a region, Common requests
1368@section How do I control Emacs's case-sensitivity when searching/replacing? 1518@section How do I control Emacs's case-sensitivity when searching/replacing?
1369@cindex @code{case-fold-search} 1519@cindex @code{case-fold-search}
1370@cindex Case sensitivity of searches 1520@cindex Case sensitivity of searches
1371@cindex @code{case-replace}
1372@cindex Searching without case sensitivity 1521@cindex Searching without case sensitivity
1373@cindex Ignoring case in searches 1522@cindex Ignoring case in searches
1374 1523
@@ -1380,14 +1529,17 @@ determines whether they are case sensitive:
1380(setq case-fold-search t) ; make searches case insensitive 1529(setq case-fold-search t) ; make searches case insensitive
1381@end lisp 1530@end lisp
1382 1531
1383Similarly, for replacing the variable @code{case-replace} determines 1532@cindex Case sensitivity in replacements
1533@cindex Replacing, and case sensitivity
1534@cindex @code{case-replace}
1535Similarly, for replacing, the variable @code{case-replace} determines
1384whether replacements preserve case. 1536whether replacements preserve case.
1385 1537
1386To change the case sensitivity just for one major mode, use the major 1538To change the case sensitivity just for one major mode, use the major
1387mode's hook. For example: 1539mode's hook. For example:
1388 1540
1389@lisp 1541@lisp
1390(add-hook 'XXX-mode-hook 1542(add-hook '@var{foo}-mode-hook
1391 (lambda () 1543 (lambda ()
1392 (setq case-fold-search nil))) 1544 (setq case-fold-search nil)))
1393@end lisp 1545@end lisp
@@ -1395,13 +1547,16 @@ mode's hook. For example:
1395@node Wrapping words automatically, Spell-checkers, Controlling case sensitivity, Common requests 1547@node Wrapping words automatically, Spell-checkers, Controlling case sensitivity, Common requests
1396@section How do I make Emacs wrap words for me? 1548@section How do I make Emacs wrap words for me?
1397@cindex Wrapping word automatically 1549@cindex Wrapping word automatically
1550@cindex Wrapping lines
1551@cindex Line wrap
1398@cindex @code{auto-fill-mode}, introduction to 1552@cindex @code{auto-fill-mode}, introduction to
1399@cindex Maximum line width, default value 1553@cindex Maximum line width, default value
1400@cindex @code{fill-column}, default value 1554@cindex @code{fill-column}, default value
1401 1555
1402Use @code{auto-fill-mode}, activated by typing @kbd{M-x auto-fill-mode}. 1556Use @code{auto-fill-mode}, activated by typing @kbd{M-x auto-fill-mode}.
1403The default maximum line width is 70, determined by the variable 1557The default maximum line width is 70, determined by the variable
1404@code{fill-column}. To learn how to turn this on automatically, @pxref{Turning on auto-fill by default}. 1558@code{fill-column}. To learn how to turn this on automatically, see
1559@ref{Turning on auto-fill by default}.
1405 1560
1406@node Spell-checkers, Checking TeX and *roff documents, Wrapping words automatically, Common requests 1561@node Spell-checkers, Checking TeX and *roff documents, Wrapping words automatically, Common requests
1407@section Where can I get a better spelling checker for Emacs? 1562@section Where can I get a better spelling checker for Emacs?
@@ -1425,16 +1580,16 @@ Use Ispell. Ispell can handle @TeX{} and *roff documents.
1425@cindex Adding to @code{load-path} 1580@cindex Adding to @code{load-path}
1426 1581
1427In general, you should only add to the @code{load-path}. You can add 1582In general, you should only add to the @code{load-path}. You can add
1428directory @var{/XXX/YYY} to the load path like this: 1583directory @var{/dir/subdir} to the load path like this:
1429 1584
1430@lisp 1585@lisp
1431(setq load-path (cons "/XXX/YYY/" load-path)) 1586(setq load-path (cons "/dir/subdir/" load-path))
1432@end lisp 1587@end lisp
1433 1588
1434To do this relative to your home directory: 1589To do this relative to your home directory:
1435 1590
1436@lisp 1591@lisp
1437(setq load-path (cons "~/YYY/" load-path) 1592(setq load-path (cons "~/mysubdir/" load-path)
1438@end lisp 1593@end lisp
1439 1594
1440@node Using an already running Emacs process, Compiler error messages, Changing load-path, Common requests 1595@node Using an already running Emacs process, Compiler error messages, Changing load-path, Common requests
@@ -1451,7 +1606,7 @@ expecting the request.
1451@itemize @bullet 1606@itemize @bullet
1452 1607
1453@item 1608@item
1454Setup 1609Setup:
1455 1610
1456Emacs must have executed the @code{server-start} function for 1611Emacs must have executed the @code{server-start} function for
1457@samp{emacsclient} to work. This can be done either by a command line 1612@samp{emacsclient} to work. This can be done either by a command line
@@ -1464,13 +1619,13 @@ emacs -f server-start
1464or by invoking @code{server-start} from @file{.emacs}: 1619or by invoking @code{server-start} from @file{.emacs}:
1465 1620
1466@lisp 1621@lisp
1467(if (some conditions are met) (server-start)) 1622(if (@var{some conditions are met}) (server-start))
1468@end lisp 1623@end lisp
1469 1624
1470When this is done, Emacs starts a subprocess running a program called 1625When this is done, Emacs starts a subprocess running a program called
1471@samp{server}. @samp{server} creates a Unix domain socket. The socket 1626@samp{server}. @samp{server} creates a Unix domain socket. The socket
1472is either named @file{.emacs_server}, in the user's home directory, 1627is either named @file{.emacs_server}, in the user's home directory,
1473or @file{esrv-@var{USER-ID}-@var{SYSTEM-NAME}}, in the @file{/tmp} 1628or @file{esrv-@var{user-id}-@var{system-name}}, in the @file{/tmp}
1474directory, depending on how @samp{emacsserver} was compiled. 1629directory, depending on how @samp{emacsserver} was compiled.
1475 1630
1476To get your news reader, mail reader, etc., to invoke 1631To get your news reader, mail reader, etc., to invoke
@@ -1490,37 +1645,38 @@ setenv EDITOR /usr/local/emacs/etc/emacsclient
1490EDITOR=emacsclient ; export EDITOR 1645EDITOR=emacsclient ; export EDITOR
1491@end example 1646@end example
1492 1647
1493@item Normal use 1648@item
1649Normal use:
1494 1650
1495When @samp{emacsclient} is run, it connects to the @file{.emacs_server} 1651When @samp{emacsclient} is run, it connects to the @file{.emacs_server}
1496socket and passes its command line options to @samp{server}. When 1652socket and passes its command line options to @samp{server}. When
1497@samp{server} receives these requests, it sends this information on the 1653@samp{server} receives these requests, it sends this information to the
1498the Emacs process, which at the next opportunity will visit the files 1654the Emacs process, which at the next opportunity will visit the files
1499specified. (Line numbers can be specified just like with Emacs.) The 1655specified. (Line numbers can be specified just like with Emacs.) The
1500user will have to switch to the Emacs window by hand. When the user is 1656user will have to switch to the Emacs window by hand. When the user is
1501done editing a file, the user can type @kbd{C-x #} (or @kbd{M-x 1657done editing a file, the user can type @kbd{C-x #} (or @kbd{M-x
1502server-edit}) to indicate this. If there is another buffer requested by 1658server-edit}) to indicate this. If there is another buffer requested by
1503emacsclient, Emacs will switch to it; otherwise emacsclient will exit, 1659@code{emacsclient}, Emacs will switch to it; otherwise
1504signaling the calling program to continue. 1660@code{emacsclient} will exit, signaling the calling program to continue.
1505 1661
1506@samp{emacsclient} and @samp{server} must be running on machines which 1662@samp{emacsclient} and @samp{server} must be running on machines which
1507share the same filesystem for this to work. The pathnames that 1663share the same filesystem for this to work. The pathnames that
1508@samp{emacsclient} specifies should be correct for the filesystem that 1664@samp{emacsclient} specifies should be correct for the filesystem that
1509the Emacs process sees. The Emacs process should not be suspended at 1665the Emacs process sees. The Emacs process should not be suspended at
1510the time @samp{emacsclient} is invoked. @samp{emacsclient} should 1666the time @samp{emacsclient} is invoked. On Unix and GNU/Linux systems,
1511either be invoked from another X window or from a shell window inside 1667@samp{emacsclient} should either be invoked from another X window or
1512Emacs itself. 1668from a shell window inside Emacs itself.
1513 1669
1670@cindex @code{gnuserv}
1514There is an enhanced version of @samp{emacsclient}/server called 1671There is an enhanced version of @samp{emacsclient}/server called
1515@samp{gnuserv} by @email{ange@@hplb.hpl.hp.com, Andy Norman} which is 1672@samp{gnuserv}, written by @email{ange@@hplb.hpl.hp.com, Andy Norman}
1516available in the Emacs Lisp Archive (@pxref{Packages that do not come 1673which is available in the Emacs Lisp Archive (@pxref{Packages that do
1517with Emacs}). @samp{gnuserv} uses Internet domain sockets, so it can 1674not come with Emacs}). @samp{gnuserv} uses Internet domain sockets, so
1518work across most network connections. It also supports the execution of 1675it can work across most network connections. It also supports the
1519arbitrary Emacs Lisp forms and does not require the client program to 1676execution of arbitrary Emacs Lisp forms and does not require the client
1520wait for completion. 1677program to wait for completion.
1521 1678
1522The alpha version of an enhanced @samp{gnuserv} is available 1679The alpha version of an enhanced @samp{gnuserv} is available at
1523at
1524 1680
1525@uref{ftp://ftp.wellfleet.com/netman/psmith/emacs/gnuserv-2.1alpha.tar.gz} 1681@uref{ftp://ftp.wellfleet.com/netman/psmith/emacs/gnuserv-2.1alpha.tar.gz}
1526 1682
@@ -1534,21 +1690,20 @@ at
1534@cindex Errors, recognizing compiler 1690@cindex Errors, recognizing compiler
1535 1691
1536The variable @code{compilation-error-regexp-alist} helps control how 1692The variable @code{compilation-error-regexp-alist} helps control how
1537Emacs parses your compiler output. It is a list of triples of the form: 1693Emacs parses your compiler output. It is a list of triplets of the form:
1538@code{(@var{regexp} @var{file-idx} @var{line-idx})}, where @var{regexp}, @var{file-idx} and 1694@code{(@var{regexp} @var{file-idx} @var{line-idx})}, where @var{regexp},
1539@var{line-idx} are strings. To help determine what the constituent 1695@var{file-idx} and @var{line-idx} are strings. To help determine what
1540elements should be, load @file{compile.el} and then use @kbd{C-h v 1696the constituent elements should be, load @file{compile.el} and then type
1541compilation-error-regexp-alist @key{RET}} 1697@kbd{C-h v compilation-error-regexp-alist @key{RET}} to see the current
1542 1698value. A good idea is to look at @file{compile.el} itself as the
1543to see the current value. A good idea is to look at @file{compile.el} 1699comments included for this variable are quite useful---the regular
1544itself as the comments included for this variable are quite useful --- 1700expressions required for your compiler's output may be very close to one
1545the regular expressions required for your compiler's output may be very 1701already provided. Once you have determined the proper regexps, use the
1546close to one already provided. Once you have determined the proper 1702following to inform Emacs of your changes:
1547regexps, use the following to inform Emacs of your changes:
1548 1703
1549@lisp 1704@lisp
1550(setq compilation-error-regexp-alist 1705(setq compilation-error-regexp-alist
1551 (cons '(REGEXP FILE-IDX LINE-IDX) 1706 (cons '(@var{regexp} @var{file-idx} @var{line-idx})
1552 compilation-error-regexp-alist)) 1707 compilation-error-regexp-alist))
1553@end lisp 1708@end lisp
1554 1709
@@ -1579,8 +1734,9 @@ The solution at first appears to be: set @code{c-indent-level} to 4 and
1579@code{c-label-offset} to -2. However, this will give you an indentation 1734@code{c-label-offset} to -2. However, this will give you an indentation
1580spacing of four instead of two. 1735spacing of four instead of two.
1581 1736
1582The solution is to use @code{cc-mode} (the default mode for C 1737The @emph{real} solution is to use @code{cc-mode} (the default mode for
1583programming in Emacs 20) and add the following line: 1738C programming in Emacs 20 and later) and add the following line to yoyr
1739@file{.emacs}:
1584 1740
1585@lisp 1741@lisp
1586(c-set-offset 'case-label '+) 1742(c-set-offset 'case-label '+)
@@ -1594,27 +1750,37 @@ There appears to be no way to do this with the old @code{c-mode}.
1594@cindex Horizontal scrolling 1750@cindex Horizontal scrolling
1595@cindex Scrolling horizontally 1751@cindex Scrolling horizontally
1596 1752
1597Use @code{hscroll-mode}, included in Emacs 20. Here is some information from 1753In Emacs 21 and later, this is on by default: if the variable
1754@code{truncate-lines} is non-@code{nil} in the current buffer, Emacs
1755automatically scrolls the display horizontally when point moves off the
1756left or right edge of the window.
1757
1758In Emacs 20, use the @code{hscroll-mode}. Here is some information from
1598the documentation, available by typing @kbd{C-h f hscroll-mode @key{RET}}: 1759the documentation, available by typing @kbd{C-h f hscroll-mode @key{RET}}:
1599 1760
1600Automatically scroll horizontally when the point moves off the 1761Automatically scroll horizontally when the point moves off the
1601left or right edge of the window. 1762left or right edge of the window.
1602 1763
1603@itemize @minus 1764@itemize @minus
1765@item
1766Type @kbd{M-x hscroll-mode} to enable it in the current buffer.
1604 1767
1605@item Type @kbd{M-x hscroll-mode} to enable it in the current buffer. 1768@item
1606@item Type @kbd{M-x hscroll-global-mode} to enable it in every buffer. 1769Type @kbd{M-x hscroll-global-mode} to enable it in every buffer.
1607@item @code{turn-on-hscroll} is useful in mode hooks as in: 1770
1771@item
1772@code{turn-on-hscroll} is useful in mode hooks as in:
1608 1773
1609@lisp 1774@lisp
1610(add-hook 'text-mode-hook 'turn-on-hscroll) 1775(add-hook 'text-mode-hook 'turn-on-hscroll)
1611@end lisp 1776@end lisp
1612 1777
1613@item @code{hscroll-margin} controls how close the cursor can get to the 1778@item
1779@code{hscroll-margin} controls how close the cursor can get to the
1614edge of the window. 1780edge of the window.
1615 1781
1616@item @code{hscroll-step-percent} controls how far to jump once we decide to do so. 1782@item
1617 1783@code{hscroll-step-percent} controls how far to jump once we decide to do so.
1618@end itemize 1784@end itemize
1619 1785
1620@node Overwrite mode, Turning off beeping, Horizontal scrolling, Common requests 1786@node Overwrite mode, Turning off beeping, Horizontal scrolling, Common requests
@@ -1628,7 +1794,7 @@ edge of the window.
1628@code{overwrite-mode} on and off, so exiting from @code{overwrite-mode} 1794@code{overwrite-mode} on and off, so exiting from @code{overwrite-mode}
1629is as easy as another @kbd{M-x overwrite-mode}. 1795is as easy as another @kbd{M-x overwrite-mode}.
1630 1796
1631On some workstations, @key{Insert} toggles @code{overwrite-mode} on and off. 1797On some systems, @key{Insert} toggles @code{overwrite-mode} on and off.
1632 1798
1633@node Turning off beeping, Turning the volume down, Overwrite mode, Common requests 1799@node Turning off beeping, Turning the volume down, Overwrite mode, Common requests
1634@section How do I stop Emacs from beeping on a terminal? 1800@section How do I stop Emacs from beeping on a terminal?
@@ -1638,8 +1804,8 @@ On some workstations, @key{Insert} toggles @code{overwrite-mode} on and off.
1638 1804
1639@email{martin@@cc.gatech.edu, Martin R. Frank} writes: 1805@email{martin@@cc.gatech.edu, Martin R. Frank} writes:
1640 1806
1641Tell Emacs to use the "visible bell" instead of the audible bell, and 1807Tell Emacs to use the @dfn{visible bell} instead of the audible bell,
1642set the visible bell to nothing. 1808and set the visible bell to nothing.
1643 1809
1644That is, put the following in your @code{TERMCAP} environment variable 1810That is, put the following in your @code{TERMCAP} environment variable
1645(assuming you have one): 1811(assuming you have one):
@@ -1659,11 +1825,11 @@ And evaluate the following Lisp form:
1659@cindex Bell, volume of 1825@cindex Bell, volume of
1660@cindex Volume of bell 1826@cindex Volume of bell
1661 1827
1662You can adjust the bell volume and duration for all programs with the 1828On X Window system, you can adjust the bell volume and duration for all
1663shell command @file{xset}. 1829programs with the shell command @code{xset}.
1664 1830
1665Invoking @file{xset} without any arguments produces some basic information, 1831Invoking @code{xset} without any arguments produces some basic
1666including the following: 1832information, including the following:
1667 1833
1668@example 1834@example
1669usage: xset [-display host:dpy] option ... 1835usage: xset [-display host:dpy] option ...
@@ -1678,9 +1844,10 @@ usage: xset [-display host:dpy] option ...
1678@cindex Indenting new lines 1844@cindex Indenting new lines
1679@cindex New lines, indenting of 1845@cindex New lines, indenting of
1680@cindex Previous line, indenting according to 1846@cindex Previous line, indenting according to
1847@cindex Text indentation
1681 1848
1682Such behavior is automatic in Emacs 20. From the NEWS file for Emacs 1849Such behavior is automatic in Emacs 20 and later. From the
168320.2: 1850@file{etc/NEWS} file for Emacs 20.2:
1684 1851
1685@example 1852@example
1686** In Text mode, now only blank lines separate paragraphs. This makes 1853** In Text mode, now only blank lines separate paragraphs. This makes
@@ -1696,10 +1863,12 @@ If you want spaces at the beginning of a line to start a paragraph, use
1696the new mode, Paragraph Indent Text mode. 1863the new mode, Paragraph Indent Text mode.
1697@end example 1864@end example
1698 1865
1699If you have @code{auto-fill-mode} on (@pxref{Turning on auto-fill by 1866@cindex Prefixing lines
1700default}), you can tell Emacs to prefix every line with a certain 1867@cindex Fill prefix
1701character sequence, the "fill prefix." Type the prefix at the beginning 1868If you have @code{auto-fill-mode} turned on (@pxref{Turning on auto-fill
1702of a line, position point after it, and then type @kbd{C-x .} 1869by default}), you can tell Emacs to prefix every line with a certain
1870character sequence, the @dfn{fill prefix}. Type the prefix at the
1871beginning of a line, position point after it, and then type @kbd{C-x .}
1703(@code{set-fill-prefix}) to set the fill prefix. Thereafter, 1872(@code{set-fill-prefix}) to set the fill prefix. Thereafter,
1704auto-filling will automatically put the fill prefix at the beginning of 1873auto-filling will automatically put the fill prefix at the beginning of
1705new lines, and @kbd{M-q} (@code{fill-paragraph}) will maintain any fill 1874new lines, and @kbd{M-q} (@code{fill-paragraph}) will maintain any fill
@@ -1709,8 +1878,8 @@ If you have paragraphs with different levels of indentation, you will
1709have to set the fill prefix to the correct value each time you move to a 1878have to set the fill prefix to the correct value each time you move to a
1710new paragraph. To avoid this hassle, try one of the many packages 1879new paragraph. To avoid this hassle, try one of the many packages
1711available from the Emacs Lisp Archive (@pxref{Packages that do not come 1880available from the Emacs Lisp Archive (@pxref{Packages that do not come
1712with Emacs}.) Look up "fill" and "indent" in the Lisp Code Directory 1881with Emacs}.) Look up ``fill'' and ``indent'' in the Lisp Code
1713for guidance. 1882Directory for guidance.
1714 1883
1715@node Matching parentheses, Hiding #ifdef lines, Automatic indentation, Common requests 1884@node Matching parentheses, Hiding #ifdef lines, Automatic indentation, Common requests
1716@section How do I show which parenthesis matches the one I'm looking at? 1885@section How do I show which parenthesis matches the one I'm looking at?
@@ -1737,29 +1906,29 @@ your @file{.emacs} file:
1737(show-paren-mode 1) 1906(show-paren-mode 1)
1738@end lisp 1907@end lisp
1739 1908
1740@code{customize} will let you turn on @code{show-paren-mode}. Use 1909Customize will let you turn on @code{show-paren-mode}. Use @kbd{M-x
1741@kbd{M-x customize-group @key{RET} paren-showing @key{RET}}. From 1910customize-group @key{RET} paren-showing @key{RET}}. From within
1742within @code{customize}, you can also go directly to the "paren-showing" 1911Customize, you can also go directly to the ``paren-showing'' group.
1743group.
1744 1912
1745 Alternatives to paren include: 1913Alternatives to paren include:
1746 1914
1747@itemize @bullet 1915@itemize @bullet
1748 1916
1749@item 1917@item
1750If you're looking at a right parenthesis (or brace or bracket) you can 1918If you're looking at a right parenthesis (or brace or bracket) you can
1751delete it and reinsert it. Emacs will blink the cursor on the matching 1919delete it and reinsert it. Emacs will momentarily move the cursor to
1752parenthesis. 1920the matching parenthesis.
1753 1921
1754@item 1922@item
1755@kbd{M-C-f} (@code{forward-sexp}) and @kbd{M-C-b} (@code{backward-sexp}) 1923@kbd{M-C-f} (@code{forward-sexp}) and @kbd{M-C-b} (@code{backward-sexp})
1756will skip over one set of balanced parentheses, so you can see which 1924will skip over one set of balanced parentheses, so you can see which
1757parentheses match. (You can train it to skip over balanced brackets 1925parentheses match. (You can train it to skip over balanced brackets
1758and braces at the same time by modifying the syntax @key{TAB}le.) 1926and braces at the same time by modifying the syntax table.)
1759 1927
1928@cindex Show matching paren as in @code{vi}
1760@item 1929@item
1761Here is some Emacs Lisp that will make the @key{%} key show the matching 1930Here is some Emacs Lisp that will make the @key{%} key show the matching
1762parenthesis, like in vi. In addition, if the cursor isn't over a 1931parenthesis, like in @code{vi}. In addition, if the cursor isn't over a
1763parenthesis, it simply inserts a % like normal. 1932parenthesis, it simply inserts a % like normal.
1764 1933
1765@lisp 1934@lisp
@@ -1790,27 +1959,30 @@ to try @file{cpp.el}, available at the Emacs Lisp Archive
1790 1959
1791@node Repeating commands, Valid X resources, Hiding #ifdef lines, Common requests 1960@node Repeating commands, Valid X resources, Hiding #ifdef lines, Common requests
1792@section Is there an equivalent to the @code{.} (dot) command of vi? 1961@section Is there an equivalent to the @code{.} (dot) command of vi?
1793@cindex Repeating commands as with vi 1962@cindex Repeating commands as with @code{vi}
1794@cindex Command, repeat last 1963@cindex Command, repeat last
1795@cindex @code{.}, equivalent to vi command 1964@cindex @code{.}, equivalent to @code{vi} command
1796 1965
1797(@code{.} is the redo command in vi. It redoes the last insertion/deletion.) 1966(@code{.} is the redo command in @code{vi}. It redoes the last
1967insertion/deletion.)
1798 1968
1799As of Emacs 20.3, there is indeed a @code{repeat} command (@kbd{C-x .}) 1969As of Emacs 20.3, there is indeed a @code{repeat} command (@kbd{C-x z})
1800that repeats the last command. If you preface it with a prefix 1970that repeats the last command. If you preface it with a prefix
1801argument, the prefix arg is applied to the command. 1971argument, the prefix arg is applied to the command.
1802 1972
1803You can also type @kbd{C-x @key{ESC} @key{ESC}} 1973You can also type @kbd{C-x @key{ESC} @key{ESC}}
1804(@code{repeat-complex-command}) to reinvoke commands that used the 1974(@code{repeat-complex-command}) to reinvoke commands that used the
1805minibuffer to get arguments. In @code{repeat-complex-command} you can 1975minibuffer to get arguments. In @code{repeat-complex-command} you can
1806type @kbd{M-p} and @kbd{M-n} to scan through all the different complex 1976type @kbd{M-p} and @kbd{M-n} (and also up-arrow and down-arrow, if your
1977keyboard has these keys) to scan through all the different complex
1807commands you've typed. 1978commands you've typed.
1808 1979
1809To repeat a set of commands, use keyboard macros. (@inforef{Keyboard 1980To repeat a set of commands, use keyboard macros. (@inforef{Keyboard
1810Macros, Keyboard Macros, emacs}.) 1981Macros, Keyboard Macros, emacs}.)
1811 1982
1812If you're really desperate for the @code{.} command, use VIPER, which comes 1983If you're really desperate for the @code{.} command, use VIPER, a
1813with Emacs, and which appears to support it. (@xref{VIPER}.) 1984@code{vi} emulation mode which comes with Emacs, and which appears to
1985support it. (@xref{VIPER}.)
1814 1986
1815@node Valid X resources, Evaluating Emacs Lisp code, Repeating commands, Common requests 1987@node Valid X resources, Evaluating Emacs Lisp code, Repeating commands, Common requests
1816@section What are the valid X resource settings (i.e., stuff in .Xdefaults)? 1988@section What are the valid X resource settings (i.e., stuff in .Xdefaults)?
@@ -1829,15 +2001,15 @@ was compiled with the X toolkit.
1829@cindex Evaluating Lisp code 2001@cindex Evaluating Lisp code
1830@cindex Lisp forms, evaluating 2002@cindex Lisp forms, evaluating
1831 2003
1832There are a number of ways to execute ("evaluate," in Lisp lingo) an 2004There are a number of ways to execute (@dfn{evaluate}, in Lisp lingo) an
1833Emacs Lisp "form": 2005Emacs Lisp @dfn{form}:
1834 2006
1835@itemize @bullet 2007@itemize @bullet
1836 2008
1837@item 2009@item
1838If you want it evaluated every time you run Emacs, put it in a file 2010If you want it evaluated every time you run Emacs, put it in a file
1839named @file{.emacs} in your home directory. This is known as your ".emacs 2011named @file{.emacs} in your home directory. This is known as ``your
1840file," and contains all of your personal customizations. 2012@file{.emacs} file,'' and contains all of your personal customizations.
1841 2013
1842@item 2014@item
1843You can type the form in the @file{*scratch*} buffer, and then type 2015You can type the form in the @file{*scratch*} buffer, and then type
@@ -1854,7 +2026,7 @@ before point and prints its value in the echo area.
1854 2026
1855@item 2027@item
1856Typing @kbd{M-:} or @kbd{M-x eval-expression} allows you to type a Lisp 2028Typing @kbd{M-:} or @kbd{M-x eval-expression} allows you to type a Lisp
1857form in the minibuffer which will be evaluated. 2029form in the minibuffer which will be evaluated once you press @key{RET}.
1858 2030
1859@item 2031@item
1860You can use @kbd{M-x load-file} to have Emacs evaluate all the Lisp 2032You can use @kbd{M-x load-file} to have Emacs evaluate all the Lisp
@@ -1863,8 +2035,8 @@ instead.)
1863 2035
1864The functions @code{load-library}, @code{eval-region}, 2036The functions @code{load-library}, @code{eval-region},
1865@code{eval-current-buffer}, @code{require}, and @code{autoload} are also 2037@code{eval-current-buffer}, @code{require}, and @code{autoload} are also
1866useful; @pxref{Emacs Lisp documentation} if you want to learn more about 2038useful; see @ref{Emacs Lisp documentation}, if you want to learn more
1867them. 2039about them.
1868 2040
1869@end itemize 2041@end itemize
1870 2042
@@ -1905,28 +2077,32 @@ want to prefix, move the cursor to last line to be prefixed, and type
1905@kbd{C-x h C-x r t > @key{RET}}. 2077@kbd{C-x h C-x r t > @key{RET}}.
1906 2078
1907If you are trying to prefix a yanked mail message with @samp{>}, you 2079If you are trying to prefix a yanked mail message with @samp{>}, you
1908might want to set the variable @code{mail-yank-prefix}. Better yet, get 2080might want to set the variable @code{mail-yank-prefix}. Better yet, use
1909the Supercite package (@pxref{Supercite}), which provides flexible 2081the Supercite package (@pxref{Supercite}), which provides flexible
1910citation for yanked mail and news messages. @xref{Changing the included 2082citation for yanked mail and news messages; it is included in Emacs
1911text prefix}, for additional information. 2083since version 19.20. @xref{Changing the included text prefix}, for
2084additional information.
1912 2085
1913@node Underlining paragraphs, Repeating a command as many times as possible, Inserting > at the beginning of each line, Common requests 2086@node Underlining paragraphs, Repeating a command as many times as possible, Inserting > at the beginning of each line, Common requests
1914@section How do I insert "_^H" before each character in a region to get an underlined paragraph? 2087@section How do I insert "_^H" before each character in a region to get an underlined paragraph?
1915@cindex Underlining a region of text 2088@cindex Underlining a region of text
1916@cindex @code{underline-region} 2089@cindex @code{underline-region}
1917 2090
1918@kbd{M-x underline-region}. 2091Mark the region and then type @kbd{M-x underline-region @key{RET}}.
1919 2092
1920@node Repeating a command as many times as possible, Forcing the cursor to remain in the same column, Underlining paragraphs, Common requests 2093@node Repeating a command as many times as possible, Forcing the cursor to remain in the same column, Underlining paragraphs, Common requests
1921@section How do I repeat a command as many times as possible? 2094@section How do I repeat a command as many times as possible?
1922@cindex Repeating commands 2095@cindex Repeating commands many times
1923@cindex Commands, repeating 2096@cindex Commands, repeating many times
1924 2097
1925Use @kbd{C-x (} and @kbd{C-x )} to make a keyboard macro that invokes 2098Use @kbd{C-x (} and @kbd{C-x )} to make a keyboard macro that invokes
1926the command and then type @kbd{M-0 C-x e}. 2099the command and then type @kbd{M-0 C-x e}.
1927 2100
1928Any messages your command prints in the echo area will be suppressed. 2101Any messages your command prints in the echo area will be suppressed.
1929 2102
2103If you need to repeat a command a small number of times, you can use
2104@kbd{C-x z}, see @ref{Repeating commands}.
2105
1930@node Forcing the cursor to remain in the same column, Forcing Emacs to iconify itself, Repeating a command as many times as possible, Common requests 2106@node Forcing the cursor to remain in the same column, Forcing Emacs to iconify itself, Repeating a command as many times as possible, Common requests
1931@section How do I make Emacs behave like this: when I go up or down, the cursor should stay in the same column even if the line is too short? 2107@section How do I make Emacs behave like this: when I go up or down, the cursor should stay in the same column even if the line is too short?
1932@cindex @code{picture-mode} 2108@cindex @code{picture-mode}
@@ -1954,21 +2130,23 @@ otherwise. @inforef{Misc X, Misc X, emacs}.
1954 2130
1955@inforef{Regexps, Regexps, emacs}. 2131@inforef{Regexps, Regexps, emacs}.
1956 2132
1957The "or" operator is @samp{\|}, not @samp{|}, and the grouping operators 2133The @code{or} operator is @samp{\|}, not @samp{|}, and the grouping operators
1958are @samp{\(} and @samp{\)}. Also, the string syntax for a backslash is 2134are @samp{\(} and @samp{\)}. Also, the string syntax for a backslash is
1959@samp{\\}. To specify a regular expression like @samp{xxx\(foo\|bar\)} 2135@samp{\\}. To specify a regular expression like @samp{xxx\(foo\|bar\)}
1960in a Lisp string, use @samp{xxx\\(foo\\|bar\\)}. 2136in a Lisp string, use @samp{xxx\\(foo\\|bar\\)}.
1961 2137
1962Notice the doubled backslashes! 2138Note the doubled backslashes!
1963 2139
1964@itemize @bullet 2140@itemize @bullet
1965 2141
1966@item Unlike in Unix @file{grep}, @file{sed}, etc., a complement 2142@item
1967character set (@samp{[^...]}) can match a newline character (@key{LFD} 2143Unlike in Unix @file{grep}, @file{sed}, etc., a complement character set
1968aka @kbd{C-j} aka @samp{\n}), unless newline is mentioned as one of the 2144(@samp{[^...]}) can match a newline character (@key{LFD} a.k.a.@:
2145@kbd{C-j} a.k.a.@: @samp{\n}), unless newline is mentioned as one of the
1969characters not to match. 2146characters not to match.
1970 2147
1971@item The character syntax regexps (e.g., @samp{\sw}) are not 2148@item
2149The character syntax regexps (e.g., @samp{\sw}) are not
1972meaningful inside character set regexps (e.g., @samp{[aeiou]}). (This 2150meaningful inside character set regexps (e.g., @samp{[aeiou]}). (This
1973is actually typical for regexp syntax.) 2151is actually typical for regexp syntax.)
1974 2152
@@ -1980,9 +2158,9 @@ is actually typical for regexp syntax.)
1980@cindex Multiple files, replacing across 2158@cindex Multiple files, replacing across
1981@cindex Files, replacing strings across multiple 2159@cindex Files, replacing strings across multiple
1982 2160
1983The "tags" feature of Emacs includes the command 2161The ``tags'' feature of Emacs includes the command
1984@code{tags-query-replace} which performs a query-replace across all the 2162@code{tags-query-replace} which performs a query-replace across all the
1985files mentioned in the TAGS file. @inforef{Tags Search, Tags Search, 2163files mentioned in the @file{TAGS} file. @inforef{Tags Search, Tags Search,
1986emacs}. 2164emacs}.
1987 2165
1988As of Emacs 19.29, Dired mode (@kbd{M-x dired @key{RET}}, or @kbd{C-x 2166As of Emacs 19.29, Dired mode (@kbd{M-x dired @key{RET}}, or @kbd{C-x
@@ -1990,12 +2168,12 @@ d}) supports the command @code{dired-do-query-replace}, which allows
1990users to replace regular expressions in multiple files. 2168users to replace regular expressions in multiple files.
1991 2169
1992@node Documentation for etags, Disabling backups, Replacing text across multiple files, Common requests 2170@node Documentation for etags, Disabling backups, Replacing text across multiple files, Common requests
1993@section Where is the documentation for @file{etags}? 2171@section Where is the documentation for @code{etags}?
1994@cindex Documentation for @file{etags} 2172@cindex Documentation for @code{etags}
1995@cindex @file{etags}, documentation for 2173@cindex @code{etags}, documentation for
1996 2174
1997The @file{etags} man page should be in the same place as the 2175The @code{etags} man page should be in the same place as the
1998@file{emacs} man page. 2176@code{emacs} man page.
1999 2177
2000Quick command-line switch descriptions are also available. For example, 2178Quick command-line switch descriptions are also available. For example,
2001@samp{etags -H}. 2179@samp{etags -H}.
@@ -2005,10 +2183,11 @@ Quick command-line switch descriptions are also available. For example,
2005@cindex Backups, disabling 2183@cindex Backups, disabling
2006@cindex Disabling backups 2184@cindex Disabling backups
2007 2185
2008You probably don't want to do this, since backups are useful. 2186You probably don't want to do this, since backups are useful, especially
2187when something goes wrong.
2009 2188
2010To avoid seeing backup files (and other "uninteresting" files) in Dired, 2189To avoid seeing backup files (and other "uninteresting" files) in Dired,
2011load dired-x by adding the following to your @file{.emacs} file: 2190load @code{dired-x} by adding the following to your @file{.emacs} file:
2012 2191
2013@lisp 2192@lisp
2014(add-hook 'dired-load-hook 2193(add-hook 'dired-load-hook
@@ -2016,7 +2195,7 @@ load dired-x by adding the following to your @file{.emacs} file:
2016 (load "dired-x"))) 2195 (load "dired-x")))
2017@end lisp 2196@end lisp
2018 2197
2019With dired-x loaded, @kbd{M-o} toggles omitting in each dired buffer. 2198With @code{dired-x} loaded, @kbd{M-o} toggles omitting in each dired buffer.
2020You can make omitting the default for new dired buffers by putting the 2199You can make omitting the default for new dired buffers by putting the
2021following in your @file{.emacs}: 2200following in your @file{.emacs}:
2022 2201
@@ -2024,12 +2203,21 @@ following in your @file{.emacs}:
2024(add-hook 'dired-mode-hook 'dired-omit-toggle) 2203(add-hook 'dired-mode-hook 'dired-omit-toggle)
2025@end lisp 2204@end lisp
2026 2205
2027If you're tired of seeing backup files whenever you do an "ls" at the 2206If you're tired of seeing backup files whenever you do an @samp{ls} at
2028Unix shell, try GNU ls with the "-B" option. GNU ls is part of the GNU 2207the Unix shell, try GNU @code{ls} with the @samp{-B} option. GNU
2029fileutils package, available at mirrors of @samp{ftp.gnu.org} (@pxref{Current GNU distributions} ). 2208@code{ls} is part of the GNU Fileutils package, available from
2209@samp{ftp.gnu.org} and its mirrors (@pxref{Current GNU distributions}).
2210
2211To disable or change the way backups are made, @inforef{Backup Names, ,
2212emacs}.
2030 2213
2031To disable or change how backups are made, see "Backup Names" in the 2214@cindex Backup files in a single directory
2032on-line manual. 2215Beginning with Emacs 21.1, you can control where Emacs puts backup files
2216by customizing the variable @code{backup-directory-alist}. This
2217variable's value specifies that files whose names match specific patters
2218should have their backups put in certain directories. A typical use is
2219to add the element @code{("." . @var{dir})} to force Emacs to put
2220@strong{all} backup files in the directory @file{dir}.
2033 2221
2034@node Disabling auto-save-mode, Modifying pull-down menus, Disabling backups, Common requests 2222@node Disabling auto-save-mode, Modifying pull-down menus, Disabling backups, Common requests
2035@section How do I disable @code{auto-save-mode}? 2223@section How do I disable @code{auto-save-mode}?
@@ -2052,8 +2240,8 @@ with Emacs}). This
2052package also allows you to place all auto-save files in one directory, 2240package also allows you to place all auto-save files in one directory,
2053such as @file{/tmp}. 2241such as @file{/tmp}.
2054 2242
2055To disable or change how @code{auto-save-mode} works, see "Auto Save" in the 2243To disable or change how @code{auto-save-mode} works, @inforef{Auto
2056on-line manual. 2244Save, , emacs}.
2057 2245
2058@node Modifying pull-down menus, Deleting menus and menu options, Disabling auto-save-mode, Common requests 2246@node Modifying pull-down menus, Deleting menus and menu options, Disabling auto-save-mode, Common requests
2059@section How can I create or modify new pull-down menu options? 2247@section How can I create or modify new pull-down menu options?
@@ -2064,13 +2252,13 @@ on-line manual.
2064@cindex Menus and keymaps 2252@cindex Menus and keymaps
2065@cindex Keymaps and menus 2253@cindex Keymaps and menus
2066 2254
2067Each menu title (e.g., Buffers, File, Edit) represents a local or global 2255Each menu title (e.g., @samp{File}, @samp{Edit}, @samp{Buffers})
2068keymap. Selecting a menu title with the mouse displays that keymap's 2256represents a local or global keymap. Selecting a menu title with the
2069non-nil contents in the form of a menu. 2257mouse displays that keymap's non-nil contents in the form of a menu.
2070 2258
2071So to add a menu option to an existing menu, all you have to do is add a 2259So to add a menu option to an existing menu, all you have to do is add a
2072new definition to the appropriate keymap. Adding a "forward word" 2260new definition to the appropriate keymap. Adding a @samp{Forward Word}
2073command to the "Edit" menu thus requires the following Lisp code: 2261item to the @samp{Edit} menu thus requires the following Lisp code:
2074 2262
2075@lisp 2263@lisp
2076(define-key global-map 2264(define-key global-map
@@ -2078,14 +2266,15 @@ command to the "Edit" menu thus requires the following Lisp code:
2078 '("Forward word" . forward-word)) 2266 '("Forward word" . forward-word))
2079@end lisp 2267@end lisp
2080 2268
2269@noindent
2081The first line adds the entry to the global keymap, which includes 2270The first line adds the entry to the global keymap, which includes
2082global menu bar entries. Replacing the reference to @code{global-map} 2271global menu bar entries. Replacing the reference to @code{global-map}
2083with a local keymap would add this menu option only within a particular 2272with a local keymap would add this menu option only within a particular
2084mode. 2273mode.
2085 2274
2086The second line describes the path from the menu-bar to the new entry. 2275The second line describes the path from the menu-bar to the new entry.
2087Placing this menu entry underneath the "File" menu would mean changing 2276Placing this menu entry underneath the @samp{File} menu would mean
2088the word "edit" in the second line to "file." 2277changing the word @code{edit} in the second line to @code{file}.
2089 2278
2090The third line is a cons cell whose first element is the title that will 2279The third line is a cons cell whose first element is the title that will
2091be displayed, and whose second element is the function that will be 2280be displayed, and whose second element is the function that will be
@@ -2099,9 +2288,10 @@ define an entirely new keymap:
2099 (cons "Words" (make-sparse-keymap "Words"))) 2288 (cons "Words" (make-sparse-keymap "Words")))
2100@end lisp 2289@end lisp
2101 2290
2102The above code creates a new sparse keymap, gives it the name "Words", 2291The above code creates a new sparse keymap, gives it the name
2103and attaches it to the global menu bar. Adding the "forward word" 2292@samp{Words}, and attaches it to the global menu bar. Adding the
2104command to this new menu would thus require the following code: 2293@samp{Forward Word} item to this new menu would thus require the
2294following code:
2105 2295
2106@lisp 2296@lisp
2107(define-key global-map 2297(define-key global-map
@@ -2109,15 +2299,17 @@ command to this new menu would thus require the following code:
2109 '("Forward word" . forward-word)) 2299 '("Forward word" . forward-word))
2110@end lisp 2300@end lisp
2111 2301
2302@noindent
2112Note that because of the way keymaps work, menu options are displayed 2303Note that because of the way keymaps work, menu options are displayed
2113with the more recently defined items at the top. Thus if you were to 2304with the more recently defined items at the top. Thus if you were to
2114define menu options "foo", "bar", and "baz" (in that order), menu option 2305define menu options @samp{foo}, @samp{bar}, and @samp{baz} (in that
2115"baz" would appear at the top, and "foo" would be at the bottom. 2306order), the menu option @samp{baz} would appear at the top, and
2307@samp{foo} would be at the bottom.
2116 2308
2117One way to avoid this problem is to use the function @code{define-key-after}, 2309One way to avoid this problem is to use the function @code{define-key-after},
2118which works the same as @code{define-key}, but lets you modify where items 2310which works the same as @code{define-key}, but lets you modify where items
2119appear. The following Lisp code would insert the "forward word" function 2311appear. The following Lisp code would insert the @samp{Forward Word}
2120in the "edit" menu immediately following the "undo" option: 2312item in the @samp{Edit} menu immediately following the @samp{Undo} item:
2121 2313
2122@lisp 2314@lisp
2123(define-key-after 2315(define-key-after
@@ -2135,9 +2327,9 @@ defined.
2135To move a menu option from one position to another, simply evaluate 2327To move a menu option from one position to another, simply evaluate
2136@code{define-key-after} with the appropriate final argument. 2328@code{define-key-after} with the appropriate final argument.
2137 2329
2138More detailed information --- and more examples of how to create and 2330More detailed information---and more examples of how to create and
2139modify menu options --- are in the Emacs Lisp Reference Manual, under 2331modify menu options---are in the @cite{Emacs Lisp Reference Manual}, under
2140"Keymaps". (@pxref{Emacs Lisp documentation} for information on this 2332``Keymaps''. (@xref{Emacs Lisp documentation}, for information on this
2141manual.) 2333manual.)
2142 2334
2143@node Deleting menus and menu options, Turning on syntax highlighting, Modifying pull-down menus, Common requests 2335@node Deleting menus and menu options, Turning on syntax highlighting, Modifying pull-down menus, Common requests
@@ -2146,7 +2338,7 @@ manual.)
2146@cindex Menus, deleting 2338@cindex Menus, deleting
2147 2339
2148The simplest way to remove a menu is to set its keymap to @samp{nil}. 2340The simplest way to remove a menu is to set its keymap to @samp{nil}.
2149For example, to delete the "Words" menu (@pxref{Modifying pull-down 2341For example, to delete the @samp{Words} menu (@pxref{Modifying pull-down
2150menus}), use: 2342menus}), use:
2151 2343
2152@lisp 2344@lisp
@@ -2154,8 +2346,9 @@ menus}), use:
2154@end lisp 2346@end lisp
2155 2347
2156Similarly, removing a menu option requires redefining a keymap entry to 2348Similarly, removing a menu option requires redefining a keymap entry to
2157@code{nil}. For example, to delete the "Forward word" menu option from the 2349@code{nil}. For example, to delete the @samp{Forward word} menu option
2158"Edit" menu (we added it in @ref{Modifying pull-down menus}), use: 2350from the @samp{Edit} menu (we added it in @ref{Modifying pull-down
2351menus}), use:
2159 2352
2160@lisp 2353@lisp
2161(define-key global-map [menu-bar edit forward] nil) 2354(define-key global-map [menu-bar edit forward] nil)
@@ -2170,11 +2363,13 @@ Similarly, removing a menu option requires redefining a keymap entry to
2170@cindex FAQ, @code{font-lock-mode} 2363@cindex FAQ, @code{font-lock-mode}
2171 2364
2172@code{font-lock-mode} is the standard way to have Emacs perform syntax 2365@code{font-lock-mode} is the standard way to have Emacs perform syntax
2173highlighting. With @code{font-lock-mode} invoked, different types of 2366highlighting in the current buffer. With @code{font-lock-mode} turned
2174text will appear in different colors. For instance, if you turn on 2367on, different types of text will appear in different colors. For
2175@code{font-lock-mode} in a programming mode, variables will appear in one 2368instance, if you turn on @code{font-lock-mode} in a programming mode,
2176face, keywords in a second, and comments in a third. 2369variables will appear in one face, keywords in a second, and comments in
2370a third.
2177 2371
2372@cindex hilit19 is deprecated
2178Earlier versions of Emacs supported hilit19, a similar package. Use of 2373Earlier versions of Emacs supported hilit19, a similar package. Use of
2179hilit19 is now considered non-standard, although @file{hilit19.el} comes 2374hilit19 is now considered non-standard, although @file{hilit19.el} comes
2180with the stock Emacs distribution. It is no longer maintained. 2375with the stock Emacs distribution. It is no longer maintained.
@@ -2198,6 +2393,7 @@ in your @file{.emacs} file:
2198(global-font-lock-mode 1) 2393(global-font-lock-mode 1)
2199@end lisp 2394@end lisp
2200 2395
2396@noindent
2201This instructs Emacs to turn on font-lock mode in those buffers for 2397This instructs Emacs to turn on font-lock mode in those buffers for
2202which a font-lock mode definition has been provided (in the variable 2398which a font-lock mode definition has been provided (in the variable
2203@code{font-lock-global-modes}). If you edit a file in 2399@code{font-lock-global-modes}). If you edit a file in
@@ -2205,8 +2401,24 @@ which a font-lock mode definition has been provided (in the variable
2205@code{pie-ala} files, then the above setting will have no effect on that 2401@code{pie-ala} files, then the above setting will have no effect on that
2206particular buffer. 2402particular buffer.
2207 2403
2208Highlighting with @code{font-lock-mode} can take quite a while, and thus 2404Highlighting a buffer with @code{font-lock-mode} can take quite a while,
2209different levels of decoration are available, from slight to gaudy. To 2405and cause an annoying delay in display, so several features exist to
2406work around this.
2407
2408@cindex Just-In-Time syntax highlighting
2409In Emacs 21 and later, turning on @code{font-lock-mode} automatically
2410activates the new @dfn{Just-In-Time fontification} provided by
2411@code{jit-lock-mode}. @code{jit-lock-mode} defers the fontification of
2412portions of buffer until you actually need to see them, and can also
2413fontify while Emacs is idle. This makes display of the visible portion
2414of a buffer almost instantaneous. For details about customizing
2415@code{jit-lock-mode}, type @kbd{C-h f jit-lock-mode @key{RET}}.
2416
2417@cindex Levels of syntax highlighting
2418@cindex Decoration level, in @code{font-lock-mode}
2419In versions of Emacs before 21, different levels of decoration are
2420available, from slight to gaudy. More decoration means you need to wait
2421more time for a buffer to be fontified (or a faster machine). To
2210control how decorated your buffers should become, set the value of 2422control how decorated your buffers should become, set the value of
2211@code{font-lock-maximum-decoration} in your @file{.emacs} file, with a 2423@code{font-lock-maximum-decoration} in your @file{.emacs} file, with a
2212@code{nil} value indicating default (usually minimum) decoration, and a 2424@code{nil} value indicating default (usually minimum) decoration, and a
@@ -2217,20 +2429,23 @@ possible look, then, include the line
2217(setq font-lock-maximum-decoration t) 2429(setq font-lock-maximum-decoration t)
2218@end lisp 2430@end lisp
2219 2431
2432@noindent
2220in your @file{.emacs} file. You can also set this variable such that 2433in your @file{.emacs} file. You can also set this variable such that
2221different modes are highlighted in a different ways; for more 2434different modes are highlighted in a different ways; for more
2222information, see the documentation for 2435information, see the documentation for
2223@code{font-lock-maximum-decoration} with @kbd{C-h v} (or @kbd{M-x 2436@code{font-lock-maximum-decoration} with @kbd{C-h v} (or @kbd{M-x
2224describe-variable @key{RET}}). 2437describe-variable @key{RET}}).
2225 2438
2439@cindex Lazy font-lock
2226You might also want to investigate @code{fast-lock-mode} and 2440You might also want to investigate @code{fast-lock-mode} and
2227@code{lazy-lock-mode}, versions of @code{font-lock-mode} that speed up 2441@code{lazy-lock-mode}, versions of @code{font-lock-mode} that speed up
2228highlighting. The advantage of @code{lazy-lock-mode} is that it only 2442highlighting. These are the alternatives for @code{jit-lock-mode} in
2229fontifies buffers when certain conditions are met, such as after a 2443versions of Emacs before 21.1. The advantage of @code{lazy-lock-mode}
2230certain amount of idle time, or after you have finished scrolling 2444is that it only fontifies buffers when certain conditions are met, such
2231through text. See the documentation for @code{lazy-lock-mode} by typing @kbd{C-h f 2445as after a certain amount of idle time, or after you have finished
2232@code{lazy-lock-mode}} (@kbd{M-x describe-function @key{RET} 2446scrolling through text. See the documentation for @code{lazy-lock-mode}
2233lazy-lock-mode @key{RET}}). 2447by typing @kbd{C-h f @code{lazy-lock-mode}} (@kbd{M-x describe-function
2448@key{RET} lazy-lock-mode @key{RET}}).
2234 2449
2235Also see the documentation for the function @code{font-lock-mode}, 2450Also see the documentation for the function @code{font-lock-mode},
2236available by typing @kbd{C-h f font-lock-mode} (@kbd{M-x 2451available by typing @kbd{C-h f font-lock-mode} (@kbd{M-x
@@ -2244,7 +2459,10 @@ For more information on font-lock mode, take a look at the
2244 2459
2245To print buffers with the faces (i.e., colors and fonts) intact, use 2460To print buffers with the faces (i.e., colors and fonts) intact, use
2246@kbd{M-x ps-print-buffer-with-faces} or @kbd{M-x 2461@kbd{M-x ps-print-buffer-with-faces} or @kbd{M-x
2247ps-print-region-with-faces}. 2462ps-print-region-with-faces}. You will need a way to send text to a
2463PostScript printer, or a PostScript interpreter such as Ghostscript;
2464consult the documentation of the variables @code{ps-printer-name},
2465@code{ps-lpr-command}, and @code{ps-lpr-switches} for more details.
2248 2466
2249@node Scrolling only one line, Replacing highlighted text, Turning on syntax highlighting, Common requests 2467@node Scrolling only one line, Replacing highlighted text, Turning on syntax highlighting, Common requests
2250@section How can I force Emacs to scroll only one line when I move past the bottom of the screen? 2468@section How can I force Emacs to scroll only one line when I move past the bottom of the screen?
@@ -2265,15 +2483,15 @@ Place the following Lisp form in your @file{.emacs} file:
2265@cindex Replacing highlighted text 2483@cindex Replacing highlighted text
2266@cindex Highlighing and replacing text 2484@cindex Highlighing and replacing text
2267 2485
2268Use @code{delete-selection mode}, which you can start automatically by 2486Use @code{delete-selection-mode}, which you can start automatically by
2269placing the following Lisp form in your @file{.emacs} file: 2487placing the following Lisp form in your @file{.emacs} file:
2270 2488
2271@lisp 2489@lisp
2272(delete-selection-mode t) 2490(delete-selection-mode t)
2273@end lisp 2491@end lisp
2274 2492
2275According to the documentation string for delete-selection mode (which 2493According to the documentation string for @code{delete-selection-mode}
2276you can read using @kbd{M-x describe-function @key{RET} 2494(which you can read using @kbd{M-x describe-function @key{RET}
2277delete-selection-mode @key{RET}}): 2495delete-selection-mode @key{RET}}):
2278 2496
2279@quotation 2497@quotation
@@ -2292,17 +2510,21 @@ pressing @key{DEL}.
2292@cindex Windows files, editing 2510@cindex Windows files, editing
2293 2511
2294As of Emacs 20, detection and handling of MS-DOS (and Windows) files is 2512As of Emacs 20, detection and handling of MS-DOS (and Windows) files is
2295performed transparently. You can open MS-DOS files on a Unix system, 2513performed transparently. You can open MS-DOS files on a Unix system,
2296edit it, and save it without having to worry about the file format. 2514edit it, and save it without having to worry about the file format.
2297 2515
2298When editing an MS-DOS style file, a backslash (@samp{\}) will appear in 2516When editing an MS-DOS style file, the mode line will indicate that it
2299the mode line. 2517is a DOS file. On Unix and GNU/Linux systems, and also on a Macintosh,
2518the string @samp{(DOS)} will appear near the left edge of the mode line;
2519on DOS and Windows, where the DOS end-of-line (EOL) format is the
2520default, a backslash (@samp{\}) will appear in the mode line.
2300 2521
2301If you are running an earlier version of Emacs, get @code{crypt++} from 2522If you are running a version of Emacs before 20.1, get @code{crypt++}
2302the Emacs Lisp Archive (@pxref{Packages that do not come with Emacs}). 2523from the Emacs Lisp Archive (@pxref{Packages that do not come with
2303Among other things, @code{crypt++} transparently modifies MS-DOS files 2524Emacs}). Among other things, @code{crypt++} transparently modifies
2304as they are loaded and saved, allowing you to ignore the different 2525MS-DOS files as they are loaded and saved, allowing you to ignore the
2305conventions that Unix and MS-DOS have for delineating the end of a line. 2526different conventions that Unix and MS-DOS have for delineating the end
2527of a line.
2306 2528
2307@node Filling paragraphs with a single space, , Editing MS-DOS files, Common requests 2529@node Filling paragraphs with a single space, , Editing MS-DOS files, Common requests
2308@section How can I tell Emacs to fill paragraphs with a single space after each period? 2530@section How can I tell Emacs to fill paragraphs with a single space after each period?
@@ -2349,19 +2571,22 @@ following two lines to your @file{.emacs} file:
2349 2571
2350Old versions (i.e., anything before 19.29) of Emacs had problems editing 2572Old versions (i.e., anything before 19.29) of Emacs had problems editing
2351files larger than 8 megabytes. As of version 19.29, the maximum buffer 2573files larger than 8 megabytes. As of version 19.29, the maximum buffer
2352size is at least 2^27-1, or 134,217,727 bytes. 2574size is at least 2^27-1, or 134,217,727 bytes, or 132 MBytes. Emacs 20
2575can be compiled on some 64-bit systems in a way that enlarges the buffer
2576size up to 576,460,752,303,423,487 bytes, or 549,755,813 GBytes.
2353 2577
2354If you are using an older version of Emacs and cannot upgrade, you will 2578If you are using a version of Emacs older than 19.29 and cannot upgrade,
2355have to recompile. @email{lnz@@lucid.com, Leonard N. Zubkoff} suggests 2579you will have to recompile. @email{lnz@@lucid.com, Leonard N. Zubkoff}
2356putting the following two lines in @file{src/config.h} before compiling 2580suggests putting the following two lines in @file{src/config.h} before
2357Emacs to allow for 26-bit integers and pointers (and thus file sizes of 2581compiling Emacs to allow for 26-bit integers and pointers (and thus file
2358up to 33,554,431 bytes): 2582sizes of up to 33,554,431 bytes):
2359 2583
2360@example 2584@example
2361#define VALBITS 26 2585#define VALBITS 26
2362#define GCTYPEBITS 5 2586#define GCTYPEBITS 5
2363@end example 2587@end example
2364 2588
2589@noindent
2365This method may result in "ILLEGAL DATATYPE" and other random errors on 2590This method may result in "ILLEGAL DATATYPE" and other random errors on
2366some machines. 2591some machines.
2367 2592
@@ -2373,9 +2598,9 @@ versions of Emacs, the theory remains the same with current versions.
2373Emacs is largely written in a dialect of Lisp; Lisp is a freely-typed 2598Emacs is largely written in a dialect of Lisp; Lisp is a freely-typed
2374language in the sense that you can put any value of any type into any 2599language in the sense that you can put any value of any type into any
2375variable, or return it from a function, and so on. So each value 2600variable, or return it from a function, and so on. So each value
2376must carry a "tag" along with it identifying what kind of thing it is, 2601must carry a @dfn{tag} along with it identifying what kind of thing it
2377e.g., integer, pointer to a list, pointer to an editing buffer, and so 2602is, e.g., integer, pointer to a list, pointer to an editing buffer, and
2378on. Emacs uses standard 32-bit integers for data objects, taking the 2603so on. Emacs uses standard 32-bit integers for data objects, taking the
2379top 8 bits for the tag and the bottom 24 bits for the value. So 2604top 8 bits for the tag and the bottom 24 bits for the value. So
2380integers (and pointers) are somewhat restricted compared to true C 2605integers (and pointers) are somewhat restricted compared to true C
2381integers and pointers. 2606integers and pointers.
@@ -2389,7 +2614,8 @@ integers and pointers.
2389Try typing @kbd{M-x shell-strip-ctrl-m @key{RET}} while in @code{shell-mode} to 2614Try typing @kbd{M-x shell-strip-ctrl-m @key{RET}} while in @code{shell-mode} to
2390make them go away. If that doesn't work, you have several options: 2615make them go away. If that doesn't work, you have several options:
2391 2616
2392For tcsh, put this in your @file{.cshrc} (or @file{.tcshrc}) file: 2617For @code{tcsh}, put this in your @file{.cshrc} (or @file{.tcshrc})
2618file:
2393 2619
2394@example 2620@example
2395if ($?EMACS) then 2621if ($?EMACS) then
@@ -2407,13 +2633,14 @@ unset edit
2407stty nl 2633stty nl
2408@end example 2634@end example
2409 2635
2410Alternatively, use @file{csh} in your shell buffers instead of 2636Alternatively, use @code{csh} in your shell buffers instead of
2411@file{tcsh}. One way is: 2637@code{tcsh}. One way is:
2412 2638
2413@lisp 2639@lisp
2414(setq explicit-shell-file-name "/bin/csh") 2640(setq explicit-shell-file-name "/bin/csh")
2415@end lisp 2641@end lisp
2416 2642
2643@noindent
2417and another is to do this in your @file{.cshrc} (or @file{.tcshrc}) 2644and another is to do this in your @file{.cshrc} (or @file{.tcshrc})
2418file: 2645file:
2419 2646
@@ -2421,6 +2648,7 @@ file:
2421setenv ESHELL /bin/csh 2648setenv ESHELL /bin/csh
2422@end example 2649@end example
2423 2650
2651@noindent
2424(You must start Emacs over again with the environment variable properly 2652(You must start Emacs over again with the environment variable properly
2425set for this to take effect.) 2653set for this to take effect.)
2426 2654
@@ -2443,6 +2671,7 @@ stty -icrnl -onlcr -echo susp ^Z
2443@section Why do I get "Process shell exited abnormally with code 1"? 2671@section Why do I get "Process shell exited abnormally with code 1"?
2444@cindex Abnormal exits from @code{shell-mode} 2672@cindex Abnormal exits from @code{shell-mode}
2445@cindex @code{shell-mode} exits 2673@cindex @code{shell-mode} exits
2674@cindex Process shell exited
2446 2675
2447The most likely reason for this message is that the @samp{env} program 2676The most likely reason for this message is that the @samp{env} program
2448is not properly installed. Compile this program for your architecture, 2677is not properly installed. Compile this program for your architecture,
@@ -2482,17 +2711,19 @@ correct termcap entry for @samp{emacs}:
2482emacs:tc=unknown: 2711emacs:tc=unknown:
2483@end example 2712@end example
2484 2713
2485To make a terminfo entry for "emacs", use "tic" or "captoinfo." You need 2714To make a terminfo entry for @samp{emacs}, use @code{tic} or
2486to generate @file{/usr/lib/terminfo/e/emacs}. It may work to simply copy 2715@code{captoinfo}. You need to generate
2487@file{/usr/lib/terminfo/d/dumb} to @file{/usr/lib/terminfo/e/emac}s. 2716@file{/usr/lib/terminfo/e/emacs}. It may work to simply copy
2717@file{/usr/lib/terminfo/d/dumb} to @file{/usr/lib/terminfo/e/emacs}.
2488 2718
2489Having a termcap/terminfo entry will not enable the use of full screen 2719Having a termcap/terminfo entry will not enable the use of full screen
2490programs in shell buffers. Use @kbd{M-x terminal-emulator} for that 2720programs in shell buffers. Use @kbd{M-x terminal-emulator} for that
2491instead. 2721instead.
2492 2722
2493A workaround to the problem of missing termcap/terminfo entries is to 2723A workaround to the problem of missing termcap/terminfo entries is to
2494change terminal type "emacs" to type "dumb" or "unknown" in your shell 2724change terminal type @samp{emacs} to type @samp{dumb} or @samp{unknown}
2495start up file. "csh" users could put this in their .cshrc files: 2725in your shell start up file. @code{csh} users could put this in their
2726@file{.cshrc} files:
2496 2727
2497@example 2728@example
2498if ("$term" == emacs) set term=dumb 2729if ("$term" == emacs) set term=dumb
@@ -2508,7 +2739,7 @@ Your terminal (or something between your terminal and the computer) is
2508sending @kbd{C-s} and @kbd{C-q} for flow control, and Emacs is receiving 2739sending @kbd{C-s} and @kbd{C-q} for flow control, and Emacs is receiving
2509these characters and interpreting them as commands. (The @kbd{C-s} 2740these characters and interpreting them as commands. (The @kbd{C-s}
2510character normally invokes the @code{isearch-forward} command.) For 2741character normally invokes the @code{isearch-forward} command.) For
2511possible solutions, @pxref{Handling C-s and C-q with flow control}. 2742possible solutions, see @ref{Handling C-s and C-q with flow control}.
2512 2743
2513@node Problems talking to certain hosts, Errors with init files, Spontaneous entry into isearch-mode, Bugs and problems 2744@node Problems talking to certain hosts, Errors with init files, Spontaneous entry into isearch-mode, Bugs and problems
2514@section Why can't Emacs talk to certain hosts (or certain hostnames)? 2745@section Why can't Emacs talk to certain hosts (or certain hostnames)?
@@ -2517,9 +2748,9 @@ possible solutions, @pxref{Handling C-s and C-q with flow control}.
2517 2748
2518The problem may be that Emacs is linked with a wimpier version of 2749The problem may be that Emacs is linked with a wimpier version of
2519@code{gethostbyname} than the rest of the programs on the machine. This 2750@code{gethostbyname} than the rest of the programs on the machine. This
2520is often manifested as a message on startup of "X server not responding. 2751is often manifested as a message on startup of ``X server not responding.
2521Check your @samp{DISPLAY} environment variable." or a message of 2752Check your @samp{DISPLAY} environment variable.'' or a message of
2522"Unknown host" from @code{open-network-stream}. 2753``Unknown host'' from @code{open-network-stream}.
2523 2754
2524On a Sun, this may be because Emacs had to be linked with the static C 2755On a Sun, this may be because Emacs had to be linked with the static C
2525library. The version of @code{gethostbyname} in the static C library 2756library. The version of @code{gethostbyname} in the static C library
@@ -2550,8 +2781,8 @@ useful versions such as the ones in @file{libresolv.a}. Then relink
2550Emacs. 2781Emacs.
2551 2782
2552@item 2783@item
2553If you are actually running NIS, make sure that "ypbind" is properly 2784If you are actually running NIS, make sure that @code{ypbind} is
2554told to do DNS lookups with the correct command line switch. 2785properly told to do DNS lookups with the correct command line switch.
2555 2786
2556@end itemize 2787@end itemize
2557 2788
@@ -2564,10 +2795,12 @@ told to do DNS lookups with the correct command line switch.
2564@cindex Debugging @file{.emacs} file 2795@cindex Debugging @file{.emacs} file
2565 2796
2566An error occurred while loading either your @file{.emacs} file or the 2797An error occurred while loading either your @file{.emacs} file or the
2567system-wide file @file{lisp/default.el}. 2798system-wide file @file{lisp/default.el}. Emacs 21.1 and later pops the
2799@file{*Messages*} buffer, and puts there some additional information
2800about the error, to provide some hints for debugging.
2568 2801
2569For information on how to debug your @file{.emacs} file, 2802For information on how to debug your @file{.emacs} file, see
2570@pxref{Debugging a customization file}. 2803@ref{Debugging a customization file}.
2571 2804
2572It may be the case that you need to load some package first, or use a 2805It may be the case that you need to load some package first, or use a
2573hook that will be evaluated after the package is loaded. A common case 2806hook that will be evaluated after the package is loaded. A common case
@@ -2591,7 +2824,8 @@ by the following environment variables:
2591 2824
2592@end itemize 2825@end itemize
2593 2826
2594This emulates the functionality provided by programs written using Xt. 2827This emulates the functionality provided by programs written using the
2828Xt toolkit.
2595 2829
2596@code{XFILESEARCHPATH} and @code{XUSERFILESEARCHPATH} should be a list 2830@code{XFILESEARCHPATH} and @code{XUSERFILESEARCHPATH} should be a list
2597of file names separated by colons. @code{XAPPLRESDIR} should be a list 2831of file names separated by colons. @code{XAPPLRESDIR} should be a list
@@ -2601,35 +2835,54 @@ Emacs searches for X resources:
2601 2835
2602@enumerate 2836@enumerate
2603 2837
2604@item specified on the command line, with the @samp{-xrm RESOURCESTRING} option, 2838@item
2605@item then in the value of the @samp{XENVIRONMENT} environment variable, 2839specified on the command line, with the @samp{-xrm RESOURCESTRING} option,
2840
2841@item
2842then in the value of the @samp{XENVIRONMENT} environment variable,
2606 2843
2607@itemize @minus 2844@itemize @minus
2608 2845
2609@item or if that is unset, in the file named @samp{~/.Xdefaults-HOSTNAME} if it exists (where @samp{HOSTNAME} is the hostname of the machine Emacs is running on), 2846@item
2847or if that is unset, in the file named
2848@file{~/.Xdefaults-@var{hostname}} if it exists (where @var{hostname} is
2849the name of the machine Emacs is running on),
2610 2850
2611@end itemize 2851@end itemize
2612 2852
2613@item then in the screen-specific and server-wide resource properties provided by the server, 2853@item
2854then in the screen-specific and server-wide resource properties provided
2855by the server,
2614 2856
2615@itemize @minus 2857@itemize @minus
2616 2858
2617@item or if those properties are unset, in the file named ~/.Xdefaults if it exists, 2859@item
2860or if those properties are unset, in the file named @file{~/.Xdefaults}
2861if it exists,
2618 2862
2619@end itemize 2863@end itemize
2620 2864
2621@item then in the files listed in @samp{XUSERFILESEARCHPATH}, 2865@item
2866then in the files listed in @samp{XUSERFILESEARCHPATH},
2622 2867
2623@itemize @minus 2868@itemize @minus
2624 2869
2625@item or in files named @file{LANG/Emacs} in directories listed in @samp{XAPPLRESDIR} (where @samp{LANG} is the value of the @samp{LANG} environment variable), if the @samp{LANG} environment variable is set, 2870@item
2626@item or in files named Emacs in the directories listed in @samp{XAPPLRESDIR} 2871or in files named @file{@var{lang}/Emacs} in directories listed in
2627@item or in @file{~/LANG/Emacs} (if the @samp{LANG} environment variable is set), 2872@samp{XAPPLRESDIR} (where @var{lang} is the value of the @code{LANG}
2628@item or in @file{~/Emacs}, 2873environment variable), if the @samp{LANG} environment variable is set,
2874@item
2875or in files named Emacs in the directories listed in @samp{XAPPLRESDIR}
2876@item
2877or in @file{~/@var{lang}/Emacs} (if the @code{LANG} environment variable
2878is set),
2879@item
2880or in @file{~/Emacs},
2629 2881
2630@end itemize 2882@end itemize
2631 2883
2632@item then in the files listed in @code{XFILESEARCHPATH}. 2884@item
2885then in the files listed in @code{XFILESEARCHPATH}.
2633 2886
2634@end enumerate 2887@end enumerate
2635 2888
@@ -2640,7 +2893,7 @@ Emacs searches for X resources:
2640@cindex Files, take a long time to visit 2893@cindex Files, take a long time to visit
2641 2894
2642Old versions of Emacs (i.e., versions before Emacs 20.x) often 2895Old versions of Emacs (i.e., versions before Emacs 20.x) often
2643encountered this when the master lock file, @file{!!!SuperLock!!!} has 2896encountered this when the master lock file, @file{!!!SuperLock!!!}, has
2644been left in the lock directory somehow. Delete it. 2897been left in the lock directory somehow. Delete it.
2645 2898
2646@email{meuer@@geom.umn.edu, Mark Meuer} says that NeXT NFS has a bug 2899@email{meuer@@geom.umn.edu, Mark Meuer} says that NeXT NFS has a bug
@@ -2667,13 +2920,13 @@ this behavior, type @kbd{$$} instead.
2667 2920
2668Emacs has no way of knowing when the shell actually changes its 2921Emacs has no way of knowing when the shell actually changes its
2669directory. This is an intrinsic limitation of Unix. So it tries to 2922directory. This is an intrinsic limitation of Unix. So it tries to
2670guess by recognizing @samp{cd} commands. If you type "cd" followed by a 2923guess by recognizing @samp{cd} commands. If you type @kbd{cd} followed
2671directory name with a variable reference (@samp{cd $HOME/bin}) or with a 2924by a directory name with a variable reference (@kbd{cd $HOME/bin}) or
2672shell metacharacter (@samp{cd ../lib*}), Emacs will fail to correctly 2925with a shell metacharacter (@kbd{cd ../lib*}), Emacs will fail to
2673guess the shell's new current directory. A huge variety of fixes and 2926correctly guess the shell's new current directory. A huge variety of
2674enhancements to shell mode for this problem have been written to handle 2927fixes and enhancements to shell mode for this problem have been written
2675this problem. Check the Lisp Code Directory (@pxref{Finding a package 2928to handle this problem. Check the Lisp Code Directory (@pxref{Finding a
2676with particular functionality}). 2929package with particular functionality}).
2677 2930
2678You can tell Emacs the shell's current directory with the command 2931You can tell Emacs the shell's current directory with the command
2679@kbd{M-x dirs}. 2932@kbd{M-x dirs}.
@@ -2688,25 +2941,28 @@ You can tell Emacs the shell's current directory with the command
2688 2941
2689@itemize @bullet 2942@itemize @bullet
2690 2943
2691@item The @file{movemail} incident (No, this is not a risk.) 2944@item
2945The @file{movemail} incident. (No, this is not a risk.)
2692 2946
2693In his book @emph{The Cuckoo's Egg}, Cliff Stoll describes this in 2947In his book @cite{The Cuckoo's Egg}, Cliff Stoll describes this in
2694chapter 4. The site at LBL had installed the @file{etc/movemail} 2948chapter 4. The site at LBL had installed the @file{/etc/movemail}
2695program setuid root. (As of version 19, @file{movemail} is in your 2949program setuid root. (As of version 19, @file{movemail} is in your
2696architecture-specific directory; type @kbd{C-h v exec-directory 2950architecture-specific directory; type @kbd{C-h v exec-directory
2697@key{RET}} to see what it is.) Since @file{movemail} had not been 2951@key{RET}} to see what it is.) Since @code{movemail} had not been
2698designed for this situation, a security hole was created and users could 2952designed for this situation, a security hole was created and users could
2699get root privileges. 2953get root privileges.
2700 2954
2701@file{movemail} has since been changed so that this security hole will 2955@code{movemail} has since been changed so that this security hole will
2702not exist, even if it is installed setuid root. However, 2956not exist, even if it is installed setuid root. However,
2703@file{movemail} no longer needs to be installed setuid root, which 2957@code{movemail} no longer needs to be installed setuid root, which
2704should eliminate this particular risk. 2958should eliminate this particular risk.
2705 2959
2706We have heard unverified reports that the 1988 Internet worm took 2960We have heard unverified reports that the 1988 Internet worm took
2707advantage of this configuration problem. 2961advantage of this configuration problem.
2708 2962
2709@item The @code{file-local-variable} feature (Yes, a risk, but easy to change.) 2963@item
2964The @code{file-local-variable} feature. (Yes, a risk, but easy to
2965change.)
2710 2966
2711There is an Emacs feature that allows the setting of local values for 2967There is an Emacs feature that allows the setting of local values for
2712variables when editing a file by including specially formatted text near 2968variables when editing a file by including specially formatted text near
@@ -2726,18 +2982,20 @@ of files by setting the variable @code{enable-local-eval}.
2726 2982
2727For more information, @inforef{File Variables, File Variables, emacs}. 2983For more information, @inforef{File Variables, File Variables, emacs}.
2728 2984
2729@item Synthetic X events (Yes, a risk; use @samp{MIT-MAGIC-COOKIE-1} or better.) 2985@item
2986Synthetic X events. (Yes, a risk; use @samp{MIT-MAGIC-COOKIE-1} or
2987better.)
2730 2988
2731Emacs accepts synthetic X events generated by the SendEvent request as 2989Emacs accepts synthetic X events generated by the @code{SendEvent}
2732though they were regular events. As a result, if you are using the 2990request as though they were regular events. As a result, if you are
2733trivial host-based authentication, other users who can open X 2991using the trivial host-based authentication, other users who can open X
2734connections to your X workstation can make your Emacs process do 2992connections to your X workstation can make your Emacs process do
2735anything, including run other processes with your privileges. 2993anything, including run other processes with your privileges.
2736 2994
2737The only fix for this is to prevent other users from being able to open 2995The only fix for this is to prevent other users from being able to open
2738X connections. The standard way to prevent this is to use a real 2996X connections. The standard way to prevent this is to use a real
2739authentication mechanism, such as @samp{MIT-MAGIC-COOKIE-1}. If using 2997authentication mechanism, such as @samp{MIT-MAGIC-COOKIE-1}. If using
2740the @file{xauth} program has any effect, then you are probably using 2998the @code{xauth} program has any effect, then you are probably using
2741@samp{MIT-MAGIC-COOKIE-1}. Your site may be using a superior 2999@samp{MIT-MAGIC-COOKIE-1}. Your site may be using a superior
2742authentication method; ask your system administrator. 3000authentication method; ask your system administrator.
2743 3001
@@ -2748,13 +3006,14 @@ narrowing the time window when hostile users would have access, but
2748@emph{does not eliminate the risk}. 3006@emph{does not eliminate the risk}.
2749 3007
2750On most computers running Unix and X Windows, you enable and disable 3008On most computers running Unix and X Windows, you enable and disable
2751access using the @file{xhost} command. To allow all hosts access to 3009access using the @code{xhost} command. To allow all hosts access to
2752your X server, use 3010your X server, use
2753 3011
2754@example 3012@example
2755xhost + 3013xhost +
2756@end example 3014@end example
2757 3015
3016@noindent
2758at the shell prompt, which (on an HP machine, at least) produces the 3017at the shell prompt, which (on an HP machine, at least) produces the
2759following message: 3018following message:
2760 3019
@@ -2781,19 +3040,21 @@ access control enabled, only authorized clients can connect
2781@section Dired says, "no file on this line" when I try to do something. 3040@section Dired says, "no file on this line" when I try to do something.
2782@cindex Dired does not see a file 3041@cindex Dired does not see a file
2783 3042
3043@c FIXME: I think this is fixed in Emacs 21, but I didn't have time to
3044@c check.
2784Chances are you're using a localized version of Unix that doesn't use US 3045Chances are you're using a localized version of Unix that doesn't use US
2785date format in dired listings. You can check this by looking at dired 3046date format in dired listings. You can check this by looking at dired
2786listings or by typing @code{ls -l} to a shell and looking at the dates that 3047listings or by typing @kbd{ls -l} to a shell and looking at the dates that
2787come out. 3048come out.
2788 3049
2789Dired uses a regular expression to find the beginning of a file name. 3050Dired uses a regular expression to find the beginning of a file name.
2790In a long Unix-style directory listing ("ls -l"), the file name starts 3051In a long Unix-style directory listing (@samp{ls -l}), the file name
2791after the date. The regexp has thus been written to look for the date, 3052starts after the date. The regexp has thus been written to look for the
2792the format of which can vary on non-US systems. 3053date, the format of which can vary on non-US systems.
2793 3054
2794There are two approaches to solving this. The first one involves 3055There are two approaches to solving this. The first one involves
2795setting things up so that "ls -l" outputs US date format. This can be 3056setting things up so that @samp{ls -l} outputs US date format. This can
2796done by setting the locale. See your OS manual for more information. 3057be done by setting the locale. See your OS manual for more information.
2797 3058
2798The second approach involves changing the regular expression used by 3059The second approach involves changing the regular expression used by
2799dired, @code{dired-move-to-filename-regexp}. 3060dired, @code{dired-move-to-filename-regexp}.
@@ -2823,8 +3084,7 @@ dired, @code{dired-move-to-filename-regexp}.
2823This answer is meant for users of Unix and Unix-like systems. Users of 3084This answer is meant for users of Unix and Unix-like systems. Users of
2824other operating systems should see the series of questions beginning 3085other operating systems should see the series of questions beginning
2825with @ref{Emacs for MS-DOS}, which describe where to get non-Unix source 3086with @ref{Emacs for MS-DOS}, which describe where to get non-Unix source
2826and binaries. These packages should come with installation 3087and binaries, and how to install Emacs on those systems.
2827instructions.
2828 3088
2829For Unix and Unix-like systems, the easiest way is often to compile it 3089For Unix and Unix-like systems, the easiest way is often to compile it
2830from scratch. You will need: 3090from scratch. You will need:
@@ -2834,17 +3094,17 @@ from scratch. You will need:
2834@item 3094@item
2835Emacs sources. @xref{Current GNU distributions}, for a list of ftp sites 3095Emacs sources. @xref{Current GNU distributions}, for a list of ftp sites
2836that make them available. On @file{ftp.gnu.org}, the main GNU 3096that make them available. On @file{ftp.gnu.org}, the main GNU
2837distribution site, sources are available at 3097distribution site, sources are available as
2838 3098
2839@uref{ftp://ftp.gnu.org/pub/gnu/emacs/emacs-20.5.tar.gz} 3099@uref{ftp://ftp.gnu.org/pub/gnu/emacs/emacs-@value{VER}.tar.gz}
2840 3100
2841The above will obviously change as new versions of Emacs come out. For 3101The above will obviously change as new versions of Emacs come out. For
2842instance, when Emacs 21 is released, it will most probably be 3102instance, when Emacs 21.42 is released, it will most probably be
2843available at 3103available as
2844 3104
2845@uref{ftp://ftp.gnu.org/pub/gnu/emacs/emacs-21.1.tar.gz} 3105@uref{ftp://ftp.gnu.org/pub/gnu/emacs/emacs-21.42.tar.gz}
2846 3106
2847Again, you should use one of the GNU mirror sites (@xref{Current GNU 3107Again, you should use one of the GNU mirror sites (see @ref{Current GNU
2848distributions}, and adjust the URL accordingly) so as to reduce load on 3108distributions}, and adjust the URL accordingly) so as to reduce load on
2849@file{ftp.gnu.org}. 3109@file{ftp.gnu.org}.
2850 3110
@@ -2856,70 +3116,71 @@ retrieved the Emacs sources, you will probably be able to uncompress
2856them with the command 3116them with the command
2857 3117
2858@example 3118@example
2859gunzip --verbose emacs-20.5.tar.gz 3119gunzip --verbose emacs-@value{VER}.tar.gz
2860@end example 3120@end example
2861 3121
2862changing the Emacs version (20.5), as necessary. Once gunzip has 3122@noindent
2863finished doing its job, a file by the name of "emacs-20.5.tar" should 3123changing the Emacs version (@value{VER}), as necessary. Once
2864be in your build directory. 3124@code{gunzip} has finished doing its job, a file by the name of
3125@file{emacs-@value{VER}.tar} should be in your build directory.
2865 3126
2866@item 3127@item
2867@file{tar}, the "tape archiving" program, which moves multiple files 3128@code{tar}, the @dfn{tape archiving} program, which moves multiple files
2868into and out of archive files, or "tarfiles." All of the files 3129into and out of archive files, or @dfn{tarfiles}. All of the files
2869comprising the Emacs source come in a single tarfile, and must be 3130comprising the Emacs source come in a single tarfile, and must be
2870extracted using @file{tar} before you can build Emacs. Typically, the 3131extracted using @code{tar} before you can build Emacs. Typically, the
2871extraction command would look like 3132extraction command would look like
2872 3133
2873@example 3134@example
2874tar -xvvf emacs-20.5.tar 3135tar -xvvf emacs-@value{VER}.tar
2875@end example 3136@end example
2876 3137
3138@noindent
2877The @samp{x} indicates that we want to extract files from this tarfile, 3139The @samp{x} indicates that we want to extract files from this tarfile,
2878the two @samp{v}s force verbose output, and the @samp{f} tells 3140the two @samp{v}s force verbose output, and the @samp{f} tells
2879@file{tar} to use a disk file, rather than one on tape. 3141@code{tar} to use a disk file, rather than one on the tape drive.
2880 3142
2881If you're using GNU @file{tar} (available at mirrors of 3143If you're using GNU @code{tar} (available at mirrors of
2882@file{ftp.gnu.org}), you can combine this step and the previous one by 3144@file{ftp.gnu.org}), you can combine this step and the previous one by
2883using the command 3145using the command
2884 3146
2885@example 3147@example
2886tar -zxvvf emacs-20.5.tar.gz 3148tar -zxvvf emacs-@value{VER}.tar.gz
2887@end example 3149@end example
2888 3150
2889The additional @samp{z} at the beginning of the options list tells GNU tar 3151@noindent
2890to uncompress the file with gunzip before extracting the tarfile's 3152The additional @samp{z} at the beginning of the options list tells GNU
2891components. 3153@code{tar} to uncompress the file with @code{gunzip} before extracting
3154the tarfile's components.
2892 3155
2893@end itemize 3156@end itemize
2894 3157
2895At this point, the Emacs sources (all 25+ megabytes of them) should be 3158At this point, the Emacs sources (all 70+ megabytes of them) should be
2896sitting in a directory called @file{emacs-20.5}. On most common Unix and 3159sitting in a directory called @file{emacs-@value{VER}}. On most common
2897Unix-like systems, you should be able to compile Emacs (with X Windows 3160Unix and Unix-like systems, you should be able to compile Emacs (with X
2898support) with the following commands: 3161Window system support) with the following commands:
2899 3162
2900@example 3163@example
2901cd emacs-20.5 # change directory to emacs-20.5 3164cd emacs-@value{VER} # change directory to emacs-@value{VER}
2902./configure # configure Emacs for your particular system 3165./configure # configure Emacs for your particular system
2903make # use Makefile to build components, then Emacs 3166make # use Makefile to build components, then Emacs
2904@end example 3167@end example
2905 3168
2906If the @code{make} completes successfully, the odds are fairly good that 3169If the @code{make} completes successfully, the odds are fairly good that
2907the build has gone well. (@pxref{Problems building Emacs} if you weren't 3170the build has gone well. (@xref{Problems building Emacs}, if you weren't
2908successful.) 3171successful.)
2909 3172
2910By default, Emacs is installed in the following directories: 3173By default, Emacs is installed in the following directories:
2911 3174
2912@table @file 3175@table @file
2913
2914@item /usr/local/bin 3176@item /usr/local/bin
2915binaries 3177binaries.
2916 3178
2917@item /usr/local/share/emacs/20.xx 3179@item /usr/local/share/emacs/@value{VER}
2918Lisp code and support files 3180Lisp code and support files.
2919 3181
2920@item /usr/local/info 3182@item /usr/local/info
2921Info documentation 3183Info documentation.
2922
2923@end table 3184@end table
2924 3185
2925To install files in those default directories, become the superuser and 3186To install files in those default directories, become the superuser and
@@ -2929,7 +3190,7 @@ type
2929make install 3190make install
2930@end example 3191@end example
2931 3192
2932Note that @code{make install} will overwrite @file{/usr/local/bin/emacs} 3193Note that @samp{make install} will overwrite @file{/usr/local/bin/emacs}
2933and any Emacs Info files that might be in @file{/usr/local/info}. 3194and any Emacs Info files that might be in @file{/usr/local/info}.
2934 3195
2935Much more verbose instructions (with many more hints and suggestions) 3196Much more verbose instructions (with many more hints and suggestions)
@@ -2942,8 +3203,9 @@ come with the Emacs sources, in the file @file{INSTALL}.
2942@xref{Installing Emacs}, and follow the instructions there for 3203@xref{Installing Emacs}, and follow the instructions there for
2943installation. 3204installation.
2944 3205
2945Most files are placed in version-specific directories. Emacs 20.5, for 3206Most files are placed in version-specific directories. Emacs
2946instance, places files in @file{/usr/local/share/emacs/20.5}. 3207@value{VER}, for instance, places files in
3208@file{/usr/local/share/emacs/@value{VER}}.
2947 3209
2948Upgrading should overwrite only, @file{/usr/local/bin/emacs} (the Emacs 3210Upgrading should overwrite only, @file{/usr/local/bin/emacs} (the Emacs
2949binary) and documentation in @file{/usr/local/info}. Back up these 3211binary) and documentation in @file{/usr/local/info}. Back up these
@@ -2960,14 +3222,14 @@ your problem. Next, look for other questions in this FAQ that have to
2960do with Emacs installation and compilation problems. 3222do with Emacs installation and compilation problems.
2961 3223
2962If you'd like to have someone look at your problem and help solve it, 3224If you'd like to have someone look at your problem and help solve it,
2963@pxref{Help installing Emacs}. 3225see @ref{Help installing Emacs}.
2964 3226
2965If you cannot find a solution in the documentation, send a message to 3227If you cannot find a solution in the documentation, send a message to
2966@email{bug-gnu-emacs@@gnu.org}. 3228@email{bug-gnu-emacs@@gnu.org}.
2967 3229
2968Please do not post it to @uref{news:gnu.emacs.help} or send e-mail to 3230Please do not post it to @uref{news:gnu.emacs.help} or send e-mail to
2969@email{help-gnu-emacs@@gnu.org}. For further guidelines, 3231@email{help-gnu-emacs@@gnu.org}. For further guidelines, see
2970@pxref{Guidelines for newsgroup postings} and @ref{Reporting bugs}. 3232@ref{Guidelines for newsgroup postings} and @ref{Reporting bugs}.
2971 3233
2972@node Linking with -lX11 fails, , Problems building Emacs, Compiling and installing Emacs 3234@node Linking with -lX11 fails, , Problems building Emacs, Compiling and installing Emacs
2973@section Why does linking Emacs with -lX11 fail? 3235@section Why does linking Emacs with -lX11 fail?
@@ -2977,27 +3239,29 @@ Please do not post it to @uref{news:gnu.emacs.help} or send e-mail to
2977Emacs needs to be linked with the static version of the X11 library, 3239Emacs needs to be linked with the static version of the X11 library,
2978@file{libX11.a}. This may be missing. 3240@file{libX11.a}. This may be missing.
2979 3241
2980Under OpenWindows, you may need to use "add_services" to add the 3242On OpenWindows, you may need to use @code{add_services} to add the
2981"OpenWindows Programmers" optional software category from the CD-ROM. 3243"OpenWindows Programmers" optional software category from the CD-ROM.
2982 3244
2983Under HP-UX 8.0, you may need to run "update" again to load the X11-PRG 3245On HP-UX 8.0, you may need to run @code{update} again to load the
2984"fileset". This may be missing even if you specified "all filesets" the 3246X11-PRG ``fileset''. This may be missing even if you specified ``all
2985first time. If @file{libcurses.a} is missing, you may need to load the 3247filesets'' the first time. If @file{libcurses.a} is missing, you may
2986"Berkeley Development Option." 3248need to load the ``Berkeley Development Option.''
2987 3249
2988@email{zoo@@armadillo.com, David Zuhn} says that MIT X builds shared 3250@email{zoo@@armadillo.com, David Zuhn} says that MIT X builds shared
2989libraries by default, and only shared libraries, on those platforms that 3251libraries by default, and only shared libraries, on those platforms that
2990support them. These shared libraries can't be used when undumping 3252support them. These shared libraries can't be used when undumping
2991temacs (the last stage of the Emacs build process). To get regular 3253@code{temacs} (the last stage of the Emacs build process). To get
2992libraries in addition to shared libraries, add this to @file{site.cf}: 3254regular libraries in addition to shared libraries, add this to
3255@file{site.cf}:
2993 3256
2994@example 3257@example
2995#define ForceNormalLib YES 3258#define ForceNormalLib YES
2996@end example 3259@end example
2997 3260
2998Other systems may have similar problems. You can always define 3261Other systems may have similar problems. You can always define
2999CANNOT_DUMP and link with the shared libraries instead. 3262@code{CANNOT_DUMP} and link with the shared libraries instead.
3000 3263
3264@cindex X Menus don't work
3001To get the Xmenu stuff to work, you need to find a copy of MIT's 3265To get the Xmenu stuff to work, you need to find a copy of MIT's
3002@file{liboldX.a}. 3266@file{liboldX.a}.
3003 3267
@@ -3035,11 +3299,11 @@ To get the Xmenu stuff to work, you need to find a copy of MIT's
3035 3299
3036Look in the files @file{etc/DISTRIB} and @file{etc/FTP} for information 3300Look in the files @file{etc/DISTRIB} and @file{etc/FTP} for information
3037on nearby archive sites and @file{etc/ORDERS} for mail orders. If you 3301on nearby archive sites and @file{etc/ORDERS} for mail orders. If you
3038don't already have Emacs, @pxref{Informational files for Emacs} for how 3302don't already have Emacs, see @ref{Informational files for Emacs}, for how
3039to get these files. 3303to get these files.
3040 3304
3041@xref{Installing Emacs}, for information on how to obtain and build the latest 3305@xref{Installing Emacs}, for information on how to obtain and build the latest
3042version of Emacs, and @pxref{Current GNU distributions} for a list of 3306version of Emacs, and see @ref{Current GNU distributions}, for a list of
3043archive sites that make GNU software available. 3307archive sites that make GNU software available.
3044 3308
3045@node Finding a package with particular functionality, Packages that do not come with Emacs, Finding Emacs on the Internet, Finding Emacs and related packages 3309@node Finding a package with particular functionality, Packages that do not come with Emacs, Finding Emacs on the Internet, Finding Emacs and related packages
@@ -3057,7 +3321,7 @@ It is also possible that the package is on your system, but has not been
3057loaded. To see which packages are available for loading, look through 3321loaded. To see which packages are available for loading, look through
3058your computer's lisp directory (@pxref{Filename conventions}). The Lisp 3322your computer's lisp directory (@pxref{Filename conventions}). The Lisp
3059source to most most packages contains a short description of how they 3323source to most most packages contains a short description of how they
3060should be loaded, invoked, and configured --- so before you use or 3324should be loaded, invoked, and configured---so before you use or
3061modify a Lisp package, see if the author has provided any hints in the 3325modify a Lisp package, see if the author has provided any hints in the
3062source code. 3326source code.
3063 3327
@@ -3123,19 +3387,27 @@ You can access the Emacs Lisp Archive at
3123 3387
3124@uref{ftp://archive.cis.ohio-state.edu/pub/emacs-lisp/} 3388@uref{ftp://archive.cis.ohio-state.edu/pub/emacs-lisp/}
3125 3389
3390@noindent
3391or at
3392
3393@uref{http://www.cis.ohio-state.edu/emacs-lisp}
3394
3395@noindent
3126Retrieve and read the file @file{README} first. 3396Retrieve and read the file @file{README} first.
3127 3397
3128@itemize @bullet 3398@itemize @bullet
3129 3399
3130@item The archive maintainers do not have time to answer individual 3400@item
3401The archive maintainers do not have time to answer individual
3131requests for packages or the list of packages in the archive. If you 3402requests for packages or the list of packages in the archive. If you
3132cannot use FTP or UUCP to access the archive yourself, try to find a 3403cannot use FTP or UUCP to access the archive yourself, try to find a
3133friend who can, but please don't ask the maintainers. 3404friend who can, but please don't ask the maintainers.
3134 3405
3135@item Any files with names ending in @samp{.Z}, @samp{.z}, or @samp{.gz} are 3406@item
3407Any files with names ending in @file{.Z}, @file{.z}, or @file{.gz} are
3136compressed, so you should use "binary" mode in FTP to retrieve them. 3408compressed, so you should use "binary" mode in FTP to retrieve them.
3137You should also use binary mode whenever you retrieve any files with 3409You should also use binary mode whenever you retrieve any files with
3138names ending in @samp{.elc}. 3410names ending in @file{.elc}.
3139 3411
3140@end itemize 3412@end itemize
3141 3413
@@ -3147,7 +3419,7 @@ names ending in @samp{.elc}.
3147@cindex Archive, submitting to the Emacs Lisp 3419@cindex Archive, submitting to the Emacs Lisp
3148 3420
3149Guidelines and procedures for submission to the archive can be found in 3421Guidelines and procedures for submission to the archive can be found in
3150the file @file{GUIDELINES} in the archive directory (@ref{Packages that 3422the file @file{GUIDELINES} in the archive directory (@pxref{Packages that
3151do not come with Emacs}). It covers documentation, copyrights, 3423do not come with Emacs}). It covers documentation, copyrights,
3152packaging, submission, and the Lisp Code Directory Record. Anonymous 3424packaging, submission, and the Lisp Code Directory Record. Anonymous
3153FTP uploads are not permitted. Instead, all submissions are mailed to 3425FTP uploads are not permitted. Instead, all submissions are mailed to
@@ -3184,9 +3456,9 @@ A list of sites mirroring @samp{ftp.gnu.org} can be found at
3184 3456
3185First of all, they're both GNU Emacs. XEmacs is just as much a later 3457First of all, they're both GNU Emacs. XEmacs is just as much a later
3186version of GNU Emacs as the FSF-distributed version. This FAQ refers to 3458version of GNU Emacs as the FSF-distributed version. This FAQ refers to
3187the latest version to be distributed by the FSF as "Emacs," partly 3459the latest version to be distributed by the FSF as ``Emacs,'' partly
3188because the XEmacs maintainers now refer to their product using the 3460because the XEmacs maintainers now refer to their product using the
3189"XEmacs" name, and partly because there isn't any accurate way to 3461``XEmacs'' name, and partly because there isn't any accurate way to
3190differentiate between the two without getting mired in paragraphs of 3462differentiate between the two without getting mired in paragraphs of
3191legalese and history. 3463legalese and history.
3192 3464
@@ -3198,7 +3470,7 @@ base and now always contains the MULE multilingual facilities.
3198XEmacs can do some clever tricks with X Windows, such as 3470XEmacs can do some clever tricks with X Windows, such as
3199putting arbitrary graphics in a buffer. Similar facilities have been 3471putting arbitrary graphics in a buffer. Similar facilities have been
3200implemented for Emacs as part of a new redisplay implementation for 3472implemented for Emacs as part of a new redisplay implementation for
3201Emacs 21, expected to be released after Emacs 20.5. 3473Emacs 21, and are available in the latest Emacs releases.
3202Emacs and XEmacs each come with 3474Emacs and XEmacs each come with
3203Lisp packages that are lacking in the other; RMS says that the FSF would 3475Lisp packages that are lacking in the other; RMS says that the FSF would
3204include more packages that come with XEmacs, but that the XEmacs 3476include more packages that come with XEmacs, but that the XEmacs
@@ -3212,6 +3484,16 @@ Many XEmacs features have found their way into recent versions of Emacs,
3212and more features can be expected in the future, but there are still many 3484and more features can be expected in the future, but there are still many
3213differences between the two. 3485differences between the two.
3214 3486
3487The latest stable version of XEmacs as of this writing is 21.1; you can
3488get it at
3489
3490@uref{ftp://ftp.xemacs.org/pub/xemacs/current/xemacs-21.1.13.tar.gz}
3491
3492More information about XEmacs, including a list of frequently asked
3493questions (FAQ), is available at
3494
3495@uref{http://www.xemacs.org/}
3496
3215@node Emacs for MS-DOS, Emacs for Windows, Difference between Emacs and XEmacs, Finding Emacs and related packages 3497@node Emacs for MS-DOS, Emacs for Windows, Difference between Emacs and XEmacs, Finding Emacs and related packages
3216@section Where can I get Emacs for my PC running MS-DOS? 3498@section Where can I get Emacs for my PC running MS-DOS?
3217@cindex MS-DOS, Emacs for 3499@cindex MS-DOS, Emacs for
@@ -3220,14 +3502,15 @@ differences between the two.
3220@cindex Emacs for MS-DOS 3502@cindex Emacs for MS-DOS
3221@cindex Tools needed to compile Emacs under DOS 3503@cindex Tools needed to compile Emacs under DOS
3222 3504
3223A pre-built binary distribution of Emacs is available from the Simtel 3505A pre-built binary distribution of Emacs is available from the
3224archives. This version apparently works under MS-DOS and Windows (3.x, 3506SimTel.NET archives. This version apparently works under MS-DOS and
322595x, and NT) and supports long file names under Windows 9x. More 3507Windows (3.X, 9X, ME, NT, and 2000) and supports long file names under
3226information is available from 3508Windows 9X, Windows ME, and Windows 2000. More information is available
3509from
3227 3510
3228@uref{ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/emacs.README} 3511@uref{ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/emacs.README}
3229 3512
3230The binary itself is available in the files em1934*.zip in the 3513The binary itself is available in the files @file{em*.zip} in the
3231directory 3514directory
3232 3515
3233@uref{ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/} 3516@uref{ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/}
@@ -3242,20 +3525,28 @@ following:
3242@table @emph 3525@table @emph
3243 3526
3244@item Compiler 3527@item Compiler
3245djgpp version 1.12 maint 1 or later. Djgpp 2.0 or later is 3528DJGPP version 1.12 maint 1 or later. Djgpp 2.0 or later is
3246recommended, since 1.x is being phased out. Djgpp 2 supports 3529recommended, since 1.x is very old an unmaintained. Djgpp 2 supports
3247long filenames under Windows 9x. 3530long filenames on Windows 9X/ME/2K.
3248 3531
3249You can get the latest release of djgpp by retrieving all of 3532You can get the latest release of DJGPP by retrieving all of
3250the files in 3533the files in
3251 3534
3252@uref{ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp} 3535@uref{ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2*}
3253 3536
3254@item Gunzip and tar 3537@item Unpacking program
3255The easiest way is to use "djtar" which comes with djgpp v2.x, 3538The easiest way is to use @code{djtar} which comes with DJGPP v2.x,
3256because it can open gzip'ed tarfiles (i.e., those ending with 3539because it can open gzip'ed tarfiles (i.e., those ending with
3257".tar.gz") in one step. Djtar comes in "djdev201.zip", from 3540@file{.tar.gz}) in one step. @code{Djtar} comes in
3258the URL mentioned above. 3541@file{djdev@var{nnn}.zip} archive (where @var{nnn} is the DJGPP version
3542number), from the URL mentioned above.
3543
3544@strong{Warning!} Do @strong{not} use the popular WinZip program to
3545unpack the Emacs distribution! WinZip is known to corrupt some of the
3546files by converting them to the DOS CR-LF format, it doesn't always
3547preserve the directory structure recorded in the compressed Emacs
3548archive, and commits other atrocities. Some of these problems could
3549actually prevent Emacs from building successfully!
3259 3550
3260@item make, mv, sed, and rm 3551@item make, mv, sed, and rm
3261All of these utilities are available at 3552All of these utilities are available at
@@ -3266,11 +3557,15 @@ All of these utilities are available at
3266 3557
3267@uref{ftp://ftp.simtel.net/pub/simtelnet/gnu/gnuish} 3558@uref{ftp://ftp.simtel.net/pub/simtelnet/gnu/gnuish}
3268 3559
3560@noindent
3561(@code{mv} and @code{rm} are in the Fileutils package, @code{sed} and
3562@code{make} are each one in a separate package named after them.)
3563
3269@end table 3564@end table
3270 3565
3271The files @file{INSTALL} and @file{PROBLEMS} in the top-level directory 3566The files @file{INSTALL} (near its end) and @file{PROBLEMS} in the
3272of the Emacs source contains some additional information regarding Emacs 3567top-level directory of the Emacs source contains some additional
3273under MS-DOS. 3568information regarding Emacs under MS-DOS.
3274 3569
3275For a list of other MS-DOS implementations of Emacs (and Emacs 3570For a list of other MS-DOS implementations of Emacs (and Emacs
3276look-alikes), consult the list of "Emacs implementations and literature," 3571look-alikes), consult the list of "Emacs implementations and literature,"
@@ -3285,8 +3580,8 @@ lack certain features, such as the Emacs Lisp extension language.
3285@section Where can I get Emacs for Microsoft Windows 3580@section Where can I get Emacs for Microsoft Windows
3286@cindex FAQ for NT Emacs 3581@cindex FAQ for NT Emacs
3287@cindex Microsoft Windows, Emacs for 3582@cindex Microsoft Windows, Emacs for
3288@cindex Windows NT, Emacs for 3583@cindex Windows NT and Windows 2K, Emacs for
3289@cindex Windows '95 and '98, Emacs for 3584@cindex Windows 95, 98, and ME, Emacs for
3290 3585
3291For information on Emacs for Windows 95 and NT, read the FAQ produced by 3586For information on Emacs for Windows 95 and NT, read the FAQ produced by
3292@email{voelker@@cs.washington.edu, Geoff Voelker}, available at 3587@email{voelker@@cs.washington.edu, Geoff Voelker}, available at
@@ -3337,6 +3632,7 @@ menus, and multiple frames. You can get it from
3337@node Emacs for Apple computers, Emacs for VMS and DECwindows, Emacs for NeXTSTEP, Finding Emacs and related packages 3632@node Emacs for Apple computers, Emacs for VMS and DECwindows, Emacs for NeXTSTEP, Finding Emacs and related packages
3338@section Where can I get Emacs for my Apple computer? 3633@section Where can I get Emacs for my Apple computer?
3339@cindex Apple computers, Emacs for 3634@cindex Apple computers, Emacs for
3635@cindex Macintosh, Emacs for
3340 3636
3341An unofficial port of GNU Emacs 18.59 to the Macintosh is available at a 3637An unofficial port of GNU Emacs 18.59 to the Macintosh is available at a
3342number of ftp sites, the home being 3638number of ftp sites, the home being
@@ -3345,6 +3641,10 @@ number of ftp sites, the home being
3345A port of Emacs 20.4 is available at 3641A port of Emacs 20.4 is available at
3346@uref{http://www.cs.hku.hk/~choi/emacs/index.html}. 3642@uref{http://www.cs.hku.hk/~choi/emacs/index.html}.
3347 3643
3644Beginning with version 21.1, the Macintosh is supported in the official
3645Emacs distribution; see the files @file{mac/README} and
3646@file{mac/INSTALL} in the Emacs distribution for build instructions.
3647
3348Apple's forthcoming "OS X" is based largely on NeXTSTEP and OpenStep. 3648Apple's forthcoming "OS X" is based largely on NeXTSTEP and OpenStep.
3349@xref{Emacs for NeXTSTEP}, for more details about that version. 3649@xref{Emacs for NeXTSTEP}, for more details about that version.
3350 3650
@@ -3357,12 +3657,12 @@ Up-to-date information about GNU software (including Emacs) for VMS is
3357available at @uref{http://vms.gnu.org/}. 3657available at @uref{http://vms.gnu.org/}.
3358 3658
3359@node Modes for various languages, Translating names to IP addresses, Emacs for VMS and DECwindows, Finding Emacs and related packages 3659@node Modes for various languages, Translating names to IP addresses, Emacs for VMS and DECwindows, Finding Emacs and related packages
3360@section Where can I get modes for Lex, Yacc/Bison, Bourne shell, csh, C++, Objective-C, Pascal, Java, and Awk? 3660@section Where can I get modes for Lex, Yacc/Bison, Bourne shell, csh, C@t{++}, Objective-C, Pascal, Java, and Awk?
3361@cindex Awk, mode for 3661@cindex Awk, mode for
3362@cindex @code{awk-mode} 3662@cindex @code{awk-mode}
3363@cindex Bison, mode for 3663@cindex Bison, mode for
3364@cindex Bourne Shell, mode for 3664@cindex Bourne Shell, mode for
3365@cindex C++, mode for 3665@cindex C@t{++}, mode for
3366@cindex Java, mode for 3666@cindex Java, mode for
3367@cindex Lex mode 3667@cindex Lex mode
3368@cindex Objective-C, mode for 3668@cindex Objective-C, mode for
@@ -3375,11 +3675,15 @@ available at @uref{http://vms.gnu.org/}.
3375 3675
3376Most of these modes are now available in standard Emacs distribution. 3676Most of these modes are now available in standard Emacs distribution.
3377To get additional modes, look in the Lisp Code Directory (@pxref{Finding 3677To get additional modes, look in the Lisp Code Directory (@pxref{Finding
3378a package with particular functionality}). For C++, if you use 3678a package with particular functionality}). For C@t{++}, if you use
3379@code{lisp-dir-apropos}, you must specify the pattern with something 3679@code{lisp-dir-apropos}, you must specify the pattern with something
3380like @kbd{M-x lisp-dir-apropos @key{RET} c\+\+ @key{RET}}. 3680like @kbd{M-x lisp-dir-apropos @key{RET} c\+\+ @key{RET}}.@footnote{
3681The backslashes in @samp{\+\+} are required because @kbd{M-x
3682lisp-dir-apropos} expects a regular expression as its argument
3683(@pxref{Using regular expressions}), and @samp{+} has a special meaning
3684in regular expressions.}
3381 3685
3382Barry Warsaw's @code{cc-mode} now works for C, C++, Objective-C, and 3686Barry Warsaw's @code{cc-mode} now works for C, C@t{++}, Objective-C, and
3383Java code. You can get the latest version from the Emacs Lisp Archive; 3687Java code. You can get the latest version from the Emacs Lisp Archive;
3384@pxref{Packages that do not come with Emacs} for details. A FAQ for 3688@pxref{Packages that do not come with Emacs} for details. A FAQ for
3385@code{cc-mode} is available at 3689@code{cc-mode} is available at
@@ -3397,12 +3701,10 @@ included in the Berkeley BIND package. For example, to find the IP
3397address of @samp{ftp.gnu.org}, you would type @code{nslookup 3701address of @samp{ftp.gnu.org}, you would type @code{nslookup
3398ftp.gnu.org}. 3702ftp.gnu.org}.
3399 3703
3400Your computer should then provide the IP address of that computer. 3704Your computer should then provide the IP address of that machine.
3401 3705
3402If your site's nameserver is deficient, you can use IP addresses to FTP 3706If your site's nameserver is deficient, you can use IP addresses to FTP
3403files. You can get this information by 3707files. You can get this information by e-mail:
3404
3405* E-mail:
3406 3708
3407@example 3709@example
3408To: dns@@[134.214.84.25] (to grasp.insa-lyon.fr) 3710To: dns@@[134.214.84.25] (to grasp.insa-lyon.fr)
@@ -3410,6 +3712,7 @@ Body: ip XXX.YYY.ZZZ (or "help" for more information
3410 and options - no quotes) 3712 and options - no quotes)
3411@end example 3713@end example
3412 3714
3715@noindent
3413or: 3716or:
3414 3717
3415@example 3718@example
@@ -3467,9 +3770,10 @@ Submissions to @email{bug-vm@@uunet.uu.net}
3467@end table 3770@end table
3468 3771
3469VM 6 works with Emacs 20.4, and may cause problems with Emacs 20.3 and 3772VM 6 works with Emacs 20.4, and may cause problems with Emacs 20.3 and
3470below. (Note that many people seem to use Emacs 20.3 with VM 6, without 3773below. (But note that many people seem to use Emacs 20.3 with VM 6,
3471any problems.) Risk-averse users might wish to try VM 5.97, available 3774without any problems.) Risk-averse users might wish to try VM 5.97,
3472from @uref{ftp://ftp.wonderworks.com/pub/vm/, the same FTP site}. 3775available from @uref{ftp://ftp.wonderworks.com/pub/vm/, the same FTP
3776site}.
3473 3777
3474@node Supercite, Calc, VM, Major packages and programs 3778@node Supercite, Calc, VM, Major packages and programs
3475@section Supercite --- mail and news citation package within Emacs 3779@section Supercite --- mail and news citation package within Emacs
@@ -3485,7 +3789,7 @@ from @uref{ftp://ftp.wonderworks.com/pub/vm/, the same FTP site}.
3485@email{bwarsaw@@cen.com, Barry Warsaw} 3789@email{bwarsaw@@cen.com, Barry Warsaw}
3486 3790
3487@item Latest version 3791@item Latest version
34883.1 (comes with Emacs 20) 37923.54 (comes bundled with Emacs 20)
3489 3793
3490@item Distribution 3794@item Distribution
3491@uref{http://www.python.org/emacs/supercite.tar.gz} 3795@uref{http://www.python.org/emacs/supercite.tar.gz}
@@ -3502,6 +3806,7 @@ Superyank is an old version of Supercite.
3502@section Calc --- poor man's Mathematica within Emacs 3806@section Calc --- poor man's Mathematica within Emacs
3503@cindex Programmable calculator 3807@cindex Programmable calculator
3504@cindex Calc 3808@cindex Calc
3809@cindex Mathematical package
3505 3810
3506@table @b 3811@table @b
3507 3812
@@ -3516,17 +3821,25 @@ Superyank is an old version of Supercite.
3516 3821
3517@end table 3822@end table
3518 3823
3824Note that Calc 2.02f needs patching to work with Emacs 21 and later.
3825
3826@cindex @code{calculator}, a package
3827Emacs 21.1 and later comes with a package called @file{calculator.el}.
3828It doesn't support all the mathematical wizardry offered by Calc, such
3829as matrices, special functions, and statistics, but is more than
3830adequate as a replacement for @code{xcalc} and similar programs.
3831
3519@node VIPER, AUC-TeX, Calc, Major packages and programs 3832@node VIPER, AUC-TeX, Calc, Major packages and programs
3520@section VIPER --- vi emulation for Emacs 3833@section VIPER --- @code{vi} emulation for Emacs
3521@cindex vi emulation 3834@cindex @code{vi} emulation
3522@cindex VIPER 3835@cindex VIPER
3523@cindex Emulation of vi 3836@cindex Emulation of @code{vi}
3524 3837
3525Since Emacs 19.29, the preferred vi emulation in Emacs is VIPER 3838Since Emacs 19.29, the preferred @code{vi} emulation in Emacs is VIPER
3526(@kbd{M-x viper-mode @key{RET}}), which comes with Emacs. It extends 3839(@kbd{M-x viper-mode @key{RET}}), which comes with Emacs. It extends
3527and supersedes VIP (including VIP 4.3) and provides vi emulation at 3840and supersedes VIP (including VIP 4.3) and provides @code{vi} emulation
3528several levels, from one that closely follows vi to one that departs 3841at several levels, from one that closely follows @code{vi} to one that
3529from vi in several significant ways. 3842departs from @code{vi} in several significant ways.
3530 3843
3531For Emacs 19.28 and earlier, the following version of VIP is generally 3844For Emacs 19.28 and earlier, the following version of VIP is generally
3532better than the one distributed with Emacs: 3845better than the one distributed with Emacs:
@@ -3554,7 +3867,7 @@ better than the one distributed with Emacs:
3554 3867
3555@item Authors 3868@item Authors
3556@email{krab@@iesd.auc.dk, Kresten Krab Thorup} and@* 3869@email{krab@@iesd.auc.dk, Kresten Krab Thorup} and@*
3557@email{abraham@@iesd.auc.dk, Per Abrahamsen} 3870@email{abraham@@dina.kvl.dk, Per Abrahamsen}
3558 3871
3559@item Latest version 3872@item Latest version
35609.9p 38739.9p
@@ -3623,10 +3936,13 @@ Release announcements: @email{bbdb-announce-request@@xemacs.org}
3623 3936
3624@itemize @bullet 3937@itemize @bullet
3625 3938
3626@item Do not ask Geoff to send you the latest version of Ispell. He does not have free e-mail. 3939@item
3940Do not ask Geoff to send you the latest version of Ispell. He does not
3941have free e-mail.
3627 3942
3628@item This Ispell program is distinct from GNU Ispell 4.0. GNU Ispell 3943@item
36294.0 is no longer a supported product. 3944This Ispell program is distinct from GNU Ispell 4.0. GNU Ispell 4.0 is
3945no longer a supported product.
3630 3946
3631@end itemize 3947@end itemize
3632 3948
@@ -3634,7 +3950,7 @@ Release announcements: @email{bbdb-announce-request@@xemacs.org}
3634@section w3-mode --- A World Wide Web browser inside of Emacs 3950@section w3-mode --- A World Wide Web browser inside of Emacs
3635@cindex WWW browser 3951@cindex WWW browser
3636@cindex Web browser 3952@cindex Web browser
3637@cindex Browser in Emacs 3953@cindex HTML browser in Emacs
3638@cindex @code{w3-mode} 3954@cindex @code{w3-mode}
3639 3955
3640@table @b 3956@table @b
@@ -3685,7 +4001,8 @@ Help to develop @code{w3-mode} at @email{w3-dev@@indiana.edu}
3685@table @b 4001@table @b
3686 4002
3687@item Authors 4003@item Authors
3688@email{patl@@lcs.mit.edu, Patrick J. LoPresti} and @email{jin@@atype.com, Jin S. Choi} 4004@email{patl@@lcs.mit.edu, Patrick J. LoPresti} and
4005@email{jin@@atype.com, Jin S. Choi}
3689 4006
3690@item Maintainer 4007@item Maintainer
3691@email{lbudney@@pobox.com, Len Budney} 4008@email{lbudney@@pobox.com, Len Budney}
@@ -3736,7 +4053,7 @@ jde-subscribe@@sunsite.auc.dk
3736@email{lwall@@wall.org, Larry Wall} (with GNU modifications) 4053@email{lwall@@wall.org, Larry Wall} (with GNU modifications)
3737 4054
3738@item Latest version 4055@item Latest version
37392.5 40562.5.4
3740 4057
3741@item Distribution 4058@item Distribution
3742@xref{Current GNU distributions}. 4059@xref{Current GNU distributions}.
@@ -3777,14 +4094,15 @@ jde-subscribe@@sunsite.auc.dk
3777 4094
3778Keys can be bound to commands either interactively or in your 4095Keys can be bound to commands either interactively or in your
3779@file{.emacs} file. To interactively bind keys for all modes, type 4096@file{.emacs} file. To interactively bind keys for all modes, type
3780@kbd{M-x global-set-key @key{RET} KEY CMD @key{RET}}. 4097@kbd{M-x global-set-key @key{RET} @var{key} @var{cmd} @key{RET}}.
3781 4098
3782To bind a key just in the current major mode, type @kbd{M-x local-set-key @key{RET} KEY CMD @key{RET}}. 4099To bind a key just in the current major mode, type @kbd{M-x
4100local-set-key @key{RET} @var{key} @var{cmd} @key{RET}}.
3783 4101
3784See @inforef{Key Bindings, Key Bindings, emacs} for further details. 4102@inforef{Key Bindings, Key Bindings, emacs}, for further details.
3785 4103
3786To bind keys on starting Emacs or on starting any given mode, use the 4104To make the process of binding keys interactively eaiser, use the
3787following "trick": First bind the key interactively, then immediately 4105following ``trick'': First bind the key interactively, then immediately
3788type @kbd{C-x @key{ESC} @key{ESC} C-a C-k C-g}. Now, the command needed 4106type @kbd{C-x @key{ESC} @key{ESC} C-a C-k C-g}. Now, the command needed
3789to bind the key is in the kill ring, and can be yanked into your 4107to bind the key is in the kill ring, and can be yanked into your
3790@file{.emacs} file. If the key binding is global, no changes to the 4108@file{.emacs} file. If the key binding is global, no changes to the
@@ -3794,6 +4112,7 @@ command are required. For example,
3794(global-set-key (quote [f1]) (quote help-for-help)) 4112(global-set-key (quote [f1]) (quote help-for-help))
3795@end lisp 4113@end lisp
3796 4114
4115@noindent
3797can be placed directly into the @file{.emacs} file. If the key binding is 4116can be placed directly into the @file{.emacs} file. If the key binding is
3798local, the command is used in conjunction with the "add-hook" command. 4117local, the command is used in conjunction with the "add-hook" command.
3799For example, in tex-mode, a local binding might be 4118For example, in tex-mode, a local binding might be
@@ -3807,21 +4126,24 @@ For example, in tex-mode, a local binding might be
3807 4126
3808@itemize @bullet 4127@itemize @bullet
3809 4128
3810@item Control characters in key sequences, in the form yanked from the 4129@item
3811kill ring are given in their graphic form --- i.e., @key{CTRL} is shown 4130Control characters in key sequences, in the form yanked from the kill
3812as @samp{^}, @key{TAB} as a set of spaces (usually 8), etc. You may 4131ring are given in their graphic form---i.e., @key{CTRL} is shown as
3813want to convert these into their vector or string forms. 4132@samp{^}, @key{TAB} as a set of spaces (usually 8), etc. You may want
4133to convert these into their vector or string forms.
3814 4134
3815@item If a prefix key of the character sequence to be bound is already 4135@item
4136If a prefix key of the character sequence to be bound is already
3816bound as a complete key, then you must unbind it before the new 4137bound as a complete key, then you must unbind it before the new
3817binding. For example, if "ESC @{" is previously bound: 4138binding. For example, if @kbd{ESC @{} is previously bound:
3818 4139
3819@lisp 4140@lisp
3820(global-unset-key [?\e ?@{]) ;; or 4141(global-unset-key [?\e ?@{]) ;; or
3821(local-unset-key [?\e ?@{]) 4142(local-unset-key [?\e ?@{])
3822@end lisp 4143@end lisp
3823 4144
3824@item Aside from commands and "lambda lists," a vector or string also 4145@item
4146Aside from commands and ``lambda lists,'' a vector or string also
3825can be bound to a key and thus treated as a macro. For example: 4147can be bound to a key and thus treated as a macro. For example:
3826 4148
3827@lisp 4149@lisp
@@ -3840,8 +4162,8 @@ can be bound to a key and thus treated as a macro. For example:
3840Usually, one of two things has happened. In one case, the control 4162Usually, one of two things has happened. In one case, the control
3841character in the key sequence has been misspecified (e.g. @samp{C-f} 4163character in the key sequence has been misspecified (e.g. @samp{C-f}
3842used instead of @samp{\C-f} within a Lisp expression). In the other 4164used instead of @samp{\C-f} within a Lisp expression). In the other
3843case, a "prefix key" in the keystroke sequence you were trying to bind 4165case, a @dfn{prefix key} in the keystroke sequence you were trying to bind
3844was already bound as a "complete key." Historically, the @samp{ESC [} 4166was already bound as a @dfn{complete key}. Historically, the @samp{ESC [}
3845prefix was usually the problem, in which case you should evaluate either 4167prefix was usually the problem, in which case you should evaluate either
3846of these forms before attempting to bind the key sequence: 4168of these forms before attempting to bind the key sequence:
3847 4169
@@ -3861,9 +4183,9 @@ been executed but is not, then you will experience this problem (this
3861code/file execution order is not enforced after startup). 4183code/file execution order is not enforced after startup).
3862 4184
3863To postpone the execution of Emacs Lisp code until after terminal or 4185To postpone the execution of Emacs Lisp code until after terminal or
3864window-system setup, treat the code as a "lambda list" and set the value 4186window-system setup, treat the code as a @dfn{lambda list} and set the
3865of either the @code{term-setup-hook} or @code{window-setup-hook} 4187value of either the @code{term-setup-hook} or @code{window-setup-hook}
3866variable to this "lambda function." For example, 4188variable to this lambda function. For example,
3867 4189
3868@lisp 4190@lisp
3869(add-hook 'term-setup-hook 4191(add-hook 'term-setup-hook
@@ -3898,17 +4220,17 @@ Emacs on-line documentation for an explanation). This works for other
3898keys as well. 4220keys as well.
3899 4221
3900@node X key translations for Emacs, Handling C-s and C-q with flow control, Working with function and arrow keys, Key bindings 4222@node X key translations for Emacs, Handling C-s and C-q with flow control, Working with function and arrow keys, Key bindings
3901@section How do I set the X key "translations" for Emacs? 4223@section How do I set the X key ``translations'' for Emacs?
3902@cindex X key translations 4224@cindex X key translations
3903@cindex Key translations under X 4225@cindex Key translations under X
3904@cindex Translations for keys under X 4226@cindex Translations for keys under X
3905 4227
3906Emacs is not written using the Xt library by default, so there are no 4228Emacs is not written using the Xt library by default, so there are no
3907"translations" to be set. (We aren't sure how to set such translations 4229``translations'' to be set. (We aren't sure how to set such translations
3908if you do build Emacs with Xt; please let us know if you've done this!) 4230if you do build Emacs with Xt; please let us know if you've done this!)
3909 4231
3910The only way to affect the behavior of keys within Emacs is through 4232The only way to affect the behavior of keys within Emacs is through
3911"xmodmap" (outside Emacs) or @code{define-key} (inside Emacs). The 4233@code{xmodmap} (outside Emacs) or @code{define-key} (inside Emacs). The
3912@code{define-key} command should be used in conjunction with the 4234@code{define-key} command should be used in conjunction with the
3913@code{function-key-map} map. For instance, 4235@code{function-key-map} map. For instance,
3914 4236
@@ -3916,6 +4238,7 @@ The only way to affect the behavior of keys within Emacs is through
3916(define-key function-key-map [M-@key{TAB}] [?\M-\t]) 4238(define-key function-key-map [M-@key{TAB}] [?\M-\t])
3917@end lisp 4239@end lisp
3918 4240
4241@noindent
3919defines the @kbd{M-@key{TAB}} key sequence. 4242defines the @kbd{M-@key{TAB}} key sequence.
3920 4243
3921@node Handling C-s and C-q with flow control, Binding C-s and C-q, X key translations for Emacs, Key bindings 4244@node Handling C-s and C-q with flow control, Binding C-s and C-q, X key translations for Emacs, Key bindings
@@ -3924,29 +4247,31 @@ defines the @kbd{M-@key{TAB}} key sequence.
3924@cindex @kbd{C-s} and @kbd{C-q} with flow control 4247@cindex @kbd{C-s} and @kbd{C-q} with flow control
3925 4248
3926@kbd{C-s} and @kbd{C-q} are used in the XON/XOFF flow control protocol. 4249@kbd{C-s} and @kbd{C-q} are used in the XON/XOFF flow control protocol.
3927This messes things up when you're using Emacs, because Emacs binds these 4250This messes things up when you're using Emacs over a serial line,
3928keys to commands by default. Because Emacs won't honor them as flow 4251because Emacs binds these keys to commands by default. Because Emacs
3929control characters, too many of these characters are not passed on and 4252won't honor them as flow control characters, too many of these
3930overwhelm output buffers. Sometimes, intermediate software using 4253characters are not passed on and overwhelm output buffers. Sometimes,
3931XON/XOFF flow control will prevent Emacs from ever seeing @kbd{C-s} and 4254intermediate software using XON/XOFF flow control will prevent Emacs
3932@kbd{C-q}. 4255from ever seeing @kbd{C-s} and @kbd{C-q}.
3933 4256
3934Possible solutions: 4257Possible solutions:
3935 4258
3936@itemize @bullet 4259@itemize @bullet
3937 4260
3938@item Disable the use of @kbd{C-s} and @kbd{C-q} for flow control. 4261@item
4262Disable the use of @kbd{C-s} and @kbd{C-q} for flow control.
3939 4263
3940You need to determine the cause of the flow control. 4264You need to determine the cause of the flow control.
3941 4265
3942@itemize @minus 4266@itemize @minus
3943 4267
3944@item your terminal 4268@item
4269your terminal
3945 4270
3946Your terminal may use XON/XOFF flow control to have time to display 4271Your terminal may use XON/XOFF flow control to have time to display
3947all the characters it receives. For example, VT series terminals do 4272all the characters it receives. For example, VT series terminals do
3948this. It may be possible to turn this off from a setup menu. For 4273this. It may be possible to turn this off from a setup menu. For
3949example, on a VT220 you may select "No XOFF" in the setup menu. This 4274example, on a VT220 you may select ``No XOFF'' in the setup menu. This
3950is also true for some terminal emulation programs on PCs. 4275is also true for some terminal emulation programs on PCs.
3951 4276
3952When you turn off flow control at the terminal, you will also need to 4277When you turn off flow control at the terminal, you will also need to
@@ -3955,40 +4280,42 @@ logged in to or at some terminal server in between.
3955 4280
3956If you turn off flow control, characters may be lost; using a printer 4281If you turn off flow control, characters may be lost; using a printer
3957connected to the terminal may fail. You may be able to get around 4282connected to the terminal may fail. You may be able to get around
3958this problem by modifying the "termcap" entry for your terminal to 4283this problem by modifying the @samp{termcap} entry for your terminal to
3959include extra NUL padding characters. 4284include extra NUL padding characters.
3960 4285
3961@item a modem 4286@item
4287a modem
3962 4288
3963If you are using a dialup connection, the modems may be using 4289If you are using a dialup connection, the modems may be using
3964XON/XOFF flow control. It's not clear how to get around this. 4290XON/XOFF flow control. It's not clear how to get around this.
3965 4291
3966@item a router or terminal server 4292@item
4293a router or terminal server
3967 4294
3968Some network box between the terminal and your computer may be using 4295Some network box between the terminal and your computer may be using
3969XON/XOFF flow control. It may be possible to make it use some other 4296XON/XOFF flow control. It may be possible to make it use some other
3970kind of flow control. You will probably have to ask your local 4297kind of flow control. You will probably have to ask your local
3971network experts for help with this. 4298network experts for help with this.
3972 4299
3973@item tty and/or pty devices 4300@item
4301@code{tty} and/or @code{pty} devices
3974 4302
3975If your connection to Emacs goes through multiple tty and/or pty 4303If your connection to Emacs goes through multiple @code{tty} and/or
3976devices, they may be using XON/XOFF flow control even when it is not 4304@code{pty} devices, they may be using XON/XOFF flow control even when it
3977necessary. 4305is not necessary.
3978 4306
3979@email{eirik@@theory.tn.cornell.edu, Eirik Fuller} writes: 4307@email{eirik@@theory.tn.cornell.edu, Eirik Fuller} writes:
3980 4308
3981@quotation 4309@quotation
3982Some versions of "rlogin" (and possibly telnet) do not pass flow 4310Some versions of @code{rlogin} (and possibly @code{telnet}) do not pass
3983control characters to the remote system to which they connect. On 4311flow control characters to the remote system to which they connect. On
3984such systems, Emacs on the remote system cannot disable flow 4312such systems, Emacs on the remote system cannot disable flow control on
3985control on the local system. Sometimes "rlogin -8" will avoid this 4313the local system. Sometimes @samp{rlogin -8} will avoid this problem.
3986problem.
3987 4314
3988One way to cure this is to disable flow control on the local host 4315One way to cure this is to disable flow control on the local host (the
3989(the one running rlogin, not the one running rlogind) using the 4316one running @code{rlogin}, not the one running @code{rlogind}) using the
3990stty command, before starting the rlogin process. On many systems, 4317@code{stty} command, before starting the @code{rlogin} process. On many
3991@samp{stty start u stop u} will do this. 4318systems, @samp{stty start u stop u} will do this.
3992 4319
3993Some versions of @samp{tcsh} will prevent even this from working. One 4320Some versions of @samp{tcsh} will prevent even this from working. One
3994way around this is to start another shell before starting rlogin, 4321way around this is to start another shell before starting rlogin,
@@ -3999,7 +4326,8 @@ Use @samp{stty -ixon} instead of @samp{stty start u stop u} on some systems.
3999 4326
4000@end itemize 4327@end itemize
4001 4328
4002@item Make Emacs speak the XON/XOFF flow control protocol. 4329@item
4330Make Emacs speak the XON/XOFF flow control protocol.
4003 4331
4004You can make Emacs treat @kbd{C-s} and @kbd{C-q} as flow control characters by 4332You can make Emacs treat @kbd{C-s} and @kbd{C-q} as flow control characters by
4005evaluating the form 4333evaluating the form
@@ -4008,12 +4336,14 @@ evaluating the form
4008(enable-flow-control) 4336(enable-flow-control)
4009@end lisp 4337@end lisp
4010 4338
4339@noindent
4011to unconditionally enable flow control or 4340to unconditionally enable flow control or
4012 4341
4013@lisp 4342@lisp
4014(enable-flow-control-on "vt100" "h19") 4343(enable-flow-control-on "vt100" "h19")
4015@end lisp 4344@end lisp
4016 4345
4346@noindent
4017(using your terminal names instead of @samp{vt100} or @samp{h19}) to 4347(using your terminal names instead of @samp{vt100} or @samp{h19}) to
4018enable selectively. These commands will automatically swap @kbd{C-s} 4348enable selectively. These commands will automatically swap @kbd{C-s}
4019and @kbd{C-q} to @kbd{C-\} and @kbd{C-^}. Variables can be used to 4349and @kbd{C-q} to @kbd{C-\} and @kbd{C-^}. Variables can be used to
@@ -4029,10 +4359,13 @@ this form in @file{lisp/default.el} has the problem that if the user's
4029the user, even for correcting their @file{.emacs} file (unless they're 4359the user, even for correcting their @file{.emacs} file (unless they're
4030smart enough to move it to another name). 4360smart enough to move it to another name).
4031 4361
4362@code{enable-flow-control} can be invoked interactively as well:
4363@kbd{M-x enable-flow-control @key{RET}}.
4364
4032@end itemize 4365@end itemize
4033 4366
4034For further discussion of this issue, read the file @file{PROBLEMS} (in 4367For further discussion of this issue, read the file @file{etc/PROBLEMS}
4035the top-level directory when you unpack the Emacs source). 4368(in the Emacs source directory when you unpack the Emacs distribution).
4036 4369
4037@node Binding C-s and C-q, Backspace invokes help, Handling C-s and C-q with flow control, Key bindings 4370@node Binding C-s and C-q, Backspace invokes help, Handling C-s and C-q with flow control, Key bindings
4038@section How do I bind @kbd{C-s} and @kbd{C-q} (or any key) if these keys are filtered out? 4371@section How do I bind @kbd{C-s} and @kbd{C-q} (or any key) if these keys are filtered out?
@@ -4040,7 +4373,7 @@ the top-level directory when you unpack the Emacs source).
4040@cindex @kbd{C-s} and @kbd{C-q}, binding 4373@cindex @kbd{C-s} and @kbd{C-q}, binding
4041 4374
4042To bind @kbd{C-s} and @kbd{C-q}, use either @code{enable-flow-control} 4375To bind @kbd{C-s} and @kbd{C-q}, use either @code{enable-flow-control}
4043or @sc{enable-flow-control-on}. @xref{Handling C-s and C-q with flow 4376or @code{enable-flow-control-on}. @xref{Handling C-s and C-q with flow
4044control}, for usage and implementation details. 4377control}, for usage and implementation details.
4045 4378
4046To bind other keys, use @code{keyboard-translate}. @xref{Swapping keys}, 4379To bind other keys, use @code{keyboard-translate}. @xref{Swapping keys},
@@ -4051,7 +4384,8 @@ used.
4051 4384
4052@itemize @bullet 4385@itemize @bullet
4053 4386
4054@item If you do this for an entire site, the users will be confused by 4387@item
4388If you do this for an entire site, the users will be confused by
4055the disparity between what the documentation says and how Emacs 4389the disparity between what the documentation says and how Emacs
4056actually behaves. 4390actually behaves.
4057 4391
@@ -4084,10 +4418,10 @@ stty erase `^?'
4084@end example 4418@end example
4085 4419
4086@item 4420@item
4087The person may prefer using the @key{Backspace} key for deleting the 4421The user may prefer the @key{Backspace} key for deleting the
4088previous character because it is more conveniently located on their 4422previous character because it is more conveniently located on their
4089keyboard or because they don't even have a separate Delete key. In 4423keyboard or because they don't even have a separate @key{Delete} key.
4090this case, the @key{Backspace} key should be made to behave like 4424In this case, the @key{Backspace} key should be made to behave like
4091@key{Delete}. There are several methods. 4425@key{Delete}. There are several methods.
4092 4426
4093@item 4427@item
@@ -4125,6 +4459,10 @@ many modes that have local bindings of @key{DEL} that will interfere.
4125 4459
4126@end itemize 4460@end itemize
4127 4461
4462When Emacs 21 or later runs on a windowed display, it binds the
4463@key{Delete} key to a command which deletes the character at point, to
4464make Emacs more consistent with keyboard operation on these systems.
4465
4128@node stty and Backspace key, Swapping keys, Backspace invokes help, Key bindings 4466@node stty and Backspace key, Swapping keys, Backspace invokes help, Key bindings
4129@section Why doesn't Emacs look at the @file{stty} settings for @key{Backspace} vs. @key{Delete}? 4467@section Why doesn't Emacs look at the @file{stty} settings for @key{Backspace} vs. @key{Delete}?
4130@cindex @file{stty} and Emacs 4468@cindex @file{stty} and Emacs
@@ -4133,6 +4471,9 @@ many modes that have local bindings of @key{DEL} that will interfere.
4133 4471
4134Good question! 4472Good question!
4135 4473
4474@c FIXME: RMS explained the reasons for this on emacs-hackers. It's
4475@c probably worth putting that explanation here.
4476
4136@node Swapping keys, Producing C-XXX with the keyboard, stty and Backspace key, Key bindings 4477@node Swapping keys, Producing C-XXX with the keyboard, stty and Backspace key, Key bindings
4137@section How do I swap two keys? 4478@section How do I swap two keys?
4138@cindex Swapping keys 4479@cindex Swapping keys
@@ -4148,6 +4489,7 @@ In Emacs 19, you can swap two keys (or key sequences) by using the
4148(keyboard-translate ?\C-? ?\C-h) ; translate DEL to `C-h'. 4489(keyboard-translate ?\C-? ?\C-h) ; translate DEL to `C-h'.
4149@end lisp 4490@end lisp
4150 4491
4492@noindent
4151The first key sequence of the pair after the function identifies what is 4493The first key sequence of the pair after the function identifies what is
4152produced by the keyboard; the second, what is matched for in the 4494produced by the keyboard; the second, what is matched for in the
4153keymaps. 4495keymaps.
@@ -4202,11 +4544,13 @@ name of the command.
4202@cindex No @key{Meta} key 4544@cindex No @key{Meta} key
4203@cindex @key{Meta} key, what to do if you lack it 4545@cindex @key{Meta} key, what to do if you lack it
4204 4546
4547On many keyboards, the @key{Alt} key acts as @key{Meta}, so try it.
4548
4205Instead of typing @kbd{M-a}, you can type @kbd{@key{ESC} a}. In fact, 4549Instead of typing @kbd{M-a}, you can type @kbd{@key{ESC} a}. In fact,
4206Emacs converts @kbd{M-a} internally into @kbd{@key{ESC} a} anyway 4550Emacs converts @kbd{M-a} internally into @kbd{@key{ESC} a} anyway
4207(depending on the value of @code{meta-prefix-char}). Note that you 4551(depending on the value of @code{meta-prefix-char}). Note that you
4208press @key{Meta} and @key{a} together, while you press @kbd{ESC}, 4552press @key{Meta} and @key{a} together, but with @key{ESC}, you press
4209release it, and then press @key{a}. 4553@key{ESC}, release it, and then press @key{a}.
4210 4554
4211@node No Escape key, Compose Character, No Meta key, Key bindings 4555@node No Escape key, Compose Character, No Meta key, Key bindings
4212@section What if I don't have an @key{Escape} key? 4556@section What if I don't have an @key{Escape} key?
@@ -4231,7 +4575,8 @@ generates @key{ESC}. If not, the following form can be used to bind it:
4231 4575
4232On a dumb terminal such as a VT220, no. It is rumored that certain 4576On a dumb terminal such as a VT220, no. It is rumored that certain
4233VT220 clones could have their @key{Compose} key configured this way. If 4577VT220 clones could have their @key{Compose} key configured this way. If
4234you're using X, you might be able to do this with the @file{xmodmap} program. 4578you're using X, you might be able to do this with the @code{xmodmap}
4579command.
4235 4580
4236@node Binding combinations of modifiers and function keys, Meta key does not work in xterm, Compose Character, Key bindings 4581@node Binding combinations of modifiers and function keys, Meta key does not work in xterm, Compose Character, Key bindings
4237@section How do I bind a combination of modifier key and function key? 4582@section How do I bind a combination of modifier key and function key?
@@ -4239,14 +4584,15 @@ you're using X, you might be able to do this with the @file{xmodmap} program.
4239@cindex Function keys and modifiers 4584@cindex Function keys and modifiers
4240@cindex Binding modifiers and function keys 4585@cindex Binding modifiers and function keys
4241 4586
4242With Emacs 19 you can represent modified function keys in vector format 4587With Emacs 19 and later, you can represent modified function keys in
4243by adding prefixes to the function key symbol. For example (from the 4588vector format by adding prefixes to the function key symbol. For
4244on-line documentation): 4589example (from the on-line documentation):
4245 4590
4246@lisp 4591@lisp
4247(global-set-key [?\C-x right] 'forward-page) 4592(global-set-key [?\C-x right] 'forward-page)
4248@end lisp 4593@end lisp
4249 4594
4595@noindent
4250where @samp{?\C-x} is the Lisp character constant for the character @kbd{C-x}. 4596where @samp{?\C-x} is the Lisp character constant for the character @kbd{C-x}.
4251 4597
4252You can use the modifier keys @key{Control}, @key{Meta}, @key{Hyper}, 4598You can use the modifier keys @key{Control}, @key{Meta}, @key{Hyper},
@@ -4261,9 +4607,10 @@ is how to make @kbd{H-M-RIGHT} move forward a word:
4261 4607
4262@itemize @bullet 4608@itemize @bullet
4263 4609
4264@item Not all modifiers are permitted in all situations. @key{Hyper}, 4610@item
4265@key{Super}, and @key{Alt} are available only under X (provided there 4611Not all modifiers are permitted in all situations. @key{Hyper},
4266are such keys). Non-ASCII keys and mouse events (e.g. @kbd{C-=} and 4612@key{Super}, and @key{Alt} are not available on Unix character
4613terminals. Non-ASCII keys and mouse events (e.g. @kbd{C-=} and
4267@kbd{mouse-1}) also fall under this category. 4614@kbd{mouse-1}) also fall under this category.
4268 4615
4269@end itemize 4616@end itemize
@@ -4271,42 +4618,46 @@ are such keys). Non-ASCII keys and mouse events (e.g. @kbd{C-=} and
4271@xref{Binding keys to commands}, for general key binding instructions. 4618@xref{Binding keys to commands}, for general key binding instructions.
4272 4619
4273@node Meta key does not work in xterm, ExtendChar key does not work as Meta, Binding combinations of modifiers and function keys, Key bindings 4620@node Meta key does not work in xterm, ExtendChar key does not work as Meta, Binding combinations of modifiers and function keys, Key bindings
4274@section Why doesn't my @key{Meta} key work in an xterm window? 4621@section Why doesn't my @key{Meta} key work in an @code{xterm} window?
4275@cindex @key{Meta} key and xterm 4622@cindex @key{Meta} key and @code{xterm}
4276@cindex Xterm and @key{Meta} key 4623@cindex Xterm and @key{Meta} key
4277 4624
4278Try all of these methods before asking for further help: 4625@inforef{Single-Byte Character Support, Single-Byte Character Set
4626Support, emacs}.
4627
4628If the advice in the Emacs manual fails, try all of these methods before
4629asking for further help:
4279 4630
4280@itemize @bullet 4631@itemize @bullet
4281 4632
4282@item 4633@item
4283You may have big problems using @file{mwm} as your window manager. 4634You may have big problems using @code{mwm} as your window manager.
4284(Does anyone know a good generic solution to allow the use of the 4635(Does anyone know a good generic solution to allow the use of the
4285@key{Meta} key in Emacs with @file{mwm}?) 4636@key{Meta} key in Emacs with @file{mwm}?)
4286 4637
4287@item 4638@item
4288For X11: Make sure it really is a @key{Meta} key. Use @file{xev} to 4639For X11: Make sure it really is a @key{Meta} key. Use @code{xev} to
4289find out what keysym your @key{Meta} key generates. It should be either 4640find out what keysym your @key{Meta} key generates. It should be either
4290@key{Meta}_L or @key{Meta}_R. If it isn't, use @file{xmodmap} to fix 4641@key{Meta}_L or @key{Meta}_R. If it isn't, use @file{xmodmap} to fix
4291the situation. 4642the situation.
4292 4643
4293@item 4644@item
4294Make sure the pty the xterm is using is passing 8 bit characters. 4645Make sure the @code{pty} the @code{xterm} is using is passing 8 bit
4295@samp{stty -a} (or @samp{stty everything}) should show @samp{cs8} somewhere. 4646characters. @samp{stty -a} (or @samp{stty everything}) should show
4296If it shows @samp{cs7} instead, use @samp{stty cs8 -istrip} (or @samp{stty 4647@samp{cs8} somewhere. If it shows @samp{cs7} instead, use @samp{stty
4297pass8}) to fix it. 4648cs8 -istrip} (or @samp{stty pass8}) to fix it.
4298 4649
4299@item 4650@item
4300If there is an rlogin connection between the xterm and the Emacs, the 4651If there is an @code{rlogin} connection between @code{xterm} and Emacs, the
4301"-8" argument may need to be given to rlogin to make it pass all 8 bits 4652@samp{-8} argument may need to be given to rlogin to make it pass all 8 bits
4302of every character. 4653of every character.
4303 4654
4304@item 4655@item
4305If the Emacs is running under Ultrix, it is reported that evaluating 4656If Emacs is running on Ultrix, it is reported that evaluating
4306@code{(set-input-mode t nil)} helps. 4657@code{(set-input-mode t nil)} helps.
4307 4658
4308@item 4659@item
4309If all else fails, you can make xterm generate @kbd{@key{ESC} W} when 4660If all else fails, you can make @code{xterm} generate @kbd{@key{ESC} W} when
4310you type @kbd{M-W}, which is the same conversion Emacs would make if it 4661you type @kbd{M-W}, which is the same conversion Emacs would make if it
4311got the @kbd{M-W} anyway. In X11R4, the following resource 4662got the @kbd{M-W} anyway. In X11R4, the following resource
4312specification will do this: 4663specification will do this:
@@ -4315,15 +4666,17 @@ specification will do this:
4315XTerm.VT100.EightBitInput: false 4666XTerm.VT100.EightBitInput: false
4316@end example 4667@end example
4317 4668
4669@noindent
4318(This changes the behavior of the @code{insert-eight-bit} action.) 4670(This changes the behavior of the @code{insert-eight-bit} action.)
4319 4671
4320With older xterms, you can specify this behavior with a translation: 4672With older @code{xterm}s, you can specify this behavior with a translation:
4321 4673
4322@example 4674@example
4323XTerm.VT100.Translations: #override \ 4675XTerm.VT100.Translations: #override \
4324 Meta<KeyPress>: string(0x1b) insert() 4676 Meta<KeyPress>: string(0x1b) insert()
4325@end example 4677@end example
4326 4678
4679@noindent
4327You might have to replace @samp{Meta} with @samp{Alt}. 4680You might have to replace @samp{Meta} with @samp{Alt}.
4328 4681
4329@end itemize 4682@end itemize
@@ -4332,18 +4685,22 @@ You might have to replace @samp{Meta} with @samp{Alt}.
4332@section Why doesn't my @key{ExtendChar} key work as a @key{Meta} key under HP-UX 8.0 and 9.x? 4685@section Why doesn't my @key{ExtendChar} key work as a @key{Meta} key under HP-UX 8.0 and 9.x?
4333@cindex @key{ExtendChar} key as @key{Meta} 4686@cindex @key{ExtendChar} key as @key{Meta}
4334@cindex @key{Meta}, using @key{ExtendChar} for 4687@cindex @key{Meta}, using @key{ExtendChar} for
4688@cindex HP-UX, the @key{ExtendChar} key
4335 4689
4336This is a result of an internationalization extension in X11R4 and the 4690This is a result of an internationalization extension in X11R4 and the
4337fact that HP is now using this extension. Emacs assumes that 4691fact that HP is now using this extension. Emacs assumes that the
4338XLookupString returns the same result regardless of the @key{Meta} key 4692@code{XLookupString} function returns the same result regardless of the
4339state which is no longer necessarily true. Until Emacs is fixed, the 4693@key{Meta} key state which is no longer necessarily true. Until Emacs
4340temporary kludge is to run this command after each time the X server is 4694is fixed, the temporary kludge is to run this command after each time
4341started but preferably before any xterm clients are: 4695the X server is started but preferably before any xterm clients are:
4342 4696
4343@example 4697@example
4344xmodmap -e 'remove mod1 = Mode_switch' 4698xmodmap -e 'remove mod1 = Mode_switch'
4345@end example 4699@end example
4346 4700
4701@c FIXME: Emacs 21 supports I18N in X11; does that mean that this bug is
4702@c solved?
4703
4347This will disable the use of the extra keysyms systemwide, which may be 4704This will disable the use of the extra keysyms systemwide, which may be
4348undesirable if you actually intend to use them. 4705undesirable if you actually intend to use them.
4349 4706
@@ -4364,51 +4721,59 @@ undesirable if you actually intend to use them.
4364@cindex Displaying eight-bit characters 4721@cindex Displaying eight-bit characters
4365@cindex Eight-bit characters, displaying 4722@cindex Eight-bit characters, displaying
4366 4723
4367See @inforef{Single-Byte European Support, Single-byte European 4724@inforef{Single-Byte Character Support, Single-byte Character Set
4368Character Support, emacs}. On a non-window-system display you typically 4725Support, emacs}. On a Unix, when Emacs runs on a character terminal
4369need to use @code{set-terminal-coding-system} to tell Emacs what the 4726display or is invoked with @samp{emacs -nw}, you typically need to use
4370terminal can display, even after setting the language environment. 4727@code{set-terminal-coding-system} to tell Emacs what the terminal can
4371Otherwise non-ASCII characters will display as @samp{?}. 4728display, even after setting the language environment; otherwise
4729non-ASCII characters will display as @samp{?}. On other operating
4730systems, such as MS-DOS and MS-Windows, Emacs queries the OS about the
4731character set supported by the display, and sets up the required
4732terminal coding system automatically.
4372 4733
4373@node Inputting eight-bit characters, Kanji and Chinese characters, Emacs does not display 8-bit characters, Alternate character sets 4734@node Inputting eight-bit characters, Kanji and Chinese characters, Emacs does not display 8-bit characters, Alternate character sets
4374@section How do I input eight-bit characters? 4735@section How do I input eight-bit characters?
4375@cindex Entering eight-bit characters 4736@cindex Entering eight-bit characters
4376@cindex Eight-bit characters, entering 4737@cindex Eight-bit characters, entering
4738@cindex Input, 8-bit characters
4377 4739
4378Various methods are available for input of eight-bit characters. See 4740Various methods are available for input of eight-bit characters. See
4379@inforef{Single-Byte European Support, Single-byte European Character 4741@inforef{Single-Byte Character Support, Single-byte Character Set
4380Support, emacs}. For more sophisticated methods, see @inforef{Input 4742Support, emacs}. For more sophisticated methods, @inforef{Input
4381Methods, Input Methods, emacs}. 4743Methods, Input Methods, emacs}.
4382 4744
4383@node Kanji and Chinese characters, Right-to-left alphabets, Inputting eight-bit characters, Alternate character sets 4745@node Kanji and Chinese characters, Right-to-left alphabets, Inputting eight-bit characters, Alternate character sets
4384@section Where can I get an Emacs that handles kanji, Chinese, or other character sets? 4746@section Where can I get an Emacs that handles kanji, Chinese, or other Far-Eastern character sets?
4385@cindex Kanji, handling with Emacs 4747@cindex Kanji, handling with Emacs
4386@cindex Chinese, handling with Emacs 4748@cindex Chinese, handling with Emacs
4387@cindex Japanese, handling with Emacs 4749@cindex Japanese, handling with Emacs
4388@cindex Korean, handling with Emacs 4750@cindex Korean, handling with Emacs
4389 4751
4390Emacs 20 now includes many of the features of MULE, the Multilingual 4752Emacs 20 and later includes many of the features of MULE, the MULtilingual
4391Enhancement of Emacs. @xref{Installing Emacs}, for information on where 4753Enhancement to Emacs. @xref{Installing Emacs}, for information on where
4392to find and download Emacs. 4754to find and download the latest version of Emacs.
4393 4755
4394@node Right-to-left alphabets, , Kanji and Chinese characters, Alternate character sets 4756@node Right-to-left alphabets, , Kanji and Chinese characters, Alternate character sets
4395@section Where is an Emacs that can handle Semitic (right-to-left) alphabets? 4757@section Where is an Emacs that can handle Semitic (right-to-left) alphabets?
4396@cindex Right-to-left alphabets 4758@cindex Right-to-left alphabets
4397@cindex Hebrew, handling with Emacs 4759@cindex Hebrew, handling with Emacs
4398@cindex Semitic alphabets 4760@cindex Semitic alphabets
4761@cindex Arabic alphabets
4399 4762
4400Emacs 20 supports Hebrew characters (ISO 8859-8), but does not yet 4763Emacs 20 and later supports Hebrew characters (ISO 8859-8), but does not
4401support right-to-left character entry. 4764yet support right-to-left character entry and display.
4402 4765
4403@email{joel@@exc.com, Joel M. Hoffman} has written a Lisp package called 4766@email{joel@@exc.com, Joel M. Hoffman} has written a Lisp package called
4404@file{hebrew.el} that allows right-to-left editing of Hebrew. It 4767@file{hebrew.el} that allows right-to-left editing of Hebrew. It
4405reportedly works out of the box with Emacs 19, but requires patches for 4768reportedly works out of the box with Emacs 19, but requires patches for
4406Emacs 18. Write to Joel if you want the patches or package. 4769Emacs 18. Write to Joel if you want the patches or package.
4407 4770
4408@file{hebrew.el} requires a Hebrew screen font, but no other Hardware support. 4771@c FIXME: Should we mention Ehud Karni's package?
4772
4773@file{hebrew.el} requires a Hebrew screen font, but no other hardware support.
4409Joel has a screen font for PCs running MS-DOS and Linux. 4774Joel has a screen font for PCs running MS-DOS and Linux.
4410 4775
4411You might also try to query archie for files named with "hebrew"; 4776You might also try to query archie for files named with @file{hebrew};
4412several ftp sites in Israel may also have the necessary files. 4777several ftp sites in Israel may also have the necessary files.
4413 4778
4414@c ------------------------------------------------------------ 4779@c ------------------------------------------------------------
@@ -4445,6 +4810,7 @@ several ftp sites in Israel may also have the necessary files.
4445@cindex Prefix in mail/news followups, changing 4810@cindex Prefix in mail/news followups, changing
4446@cindex Included text prefix, changing 4811@cindex Included text prefix, changing
4447@cindex Setting the included text character 4812@cindex Setting the included text character
4813@cindex Quoting in mail messages
4448 4814
4449If you read mail with Rmail or news with Gnus, set the variable 4815If you read mail with Rmail or news with Gnus, set the variable
4450@code{mail-yank-prefix}. For VM, set @code{vm-included-text-prefix}. 4816@code{mail-yank-prefix}. For VM, set @code{vm-included-text-prefix}.
@@ -4475,8 +4841,10 @@ yourself by putting
4475(setq mail-self-blind t) 4841(setq mail-self-blind t)
4476@end lisp 4842@end lisp
4477 4843
4478in your @file{.emacs} file. You can automatically include an "FCC:" field by 4844@noindent
4479putting something like the following in your @file{.emacs} file: 4845in your @file{.emacs} file. You can automatically include an @samp{FCC}
4846field by putting something like the following in your @file{.emacs}
4847file:
4480 4848
4481@lisp 4849@lisp
4482(setq mail-archive-file-name (expand-file-name "~/outgoing")) 4850(setq mail-archive-file-name (expand-file-name "~/outgoing"))
@@ -4488,7 +4856,7 @@ by VM, but not always by Rmail. @xref{Learning how to do something}.
4488If you use @code{mh-e}, add an @samp{FCC} or @samp{BCC} field to your 4856If you use @code{mh-e}, add an @samp{FCC} or @samp{BCC} field to your
4489components file. 4857components file.
4490 4858
4491It does not work to put "set record filename" in the @file{.mailrc} 4859It does not work to put @samp{set record filename} in the @file{.mailrc}
4492file. 4860file.
4493 4861
4494@node Expanding aliases when sending mail, Rmail thinks all messages are one big one, Saving a copy of outgoing mail, Mail and news 4862@node Expanding aliases when sending mail, Rmail thinks all messages are one big one, Saving a copy of outgoing mail, Mail and news
@@ -4508,14 +4876,15 @@ like this one:
4508To: Willy Smith <wks@@xpnsv.lwyrs.com> 4876To: Willy Smith <wks@@xpnsv.lwyrs.com>
4509@end example 4877@end example
4510 4878
4511However, you do not need to --- and probably should not, unless your 4879However, you do not need to---and probably should not, unless your
4512system's version of @file{/usr/ucb/mail} (aka mailx) supports RFC822 4880system's version of @file{/usr/ucb/mail} (a.k.a.@: @code{mailx})
4513-- separate addresses with commas in your @file{~/.mailrc} file. 4881supports RFC822---separate addresses with commas in your
4882@file{~/.mailrc} file.
4514 4883
4515@item 4884@item
4516Emacs normally only reads the @file{.mailrc} file once per session, 4885Emacs normally only reads the @file{.mailrc} file once per session,
4517when you start to compose your first mail message. If you edit 4886when you start to compose your first mail message. If you edit
4518.mailrc, you can type @kbd{M-x rebuild-mail-abbrevs @key{RET}} to 4887@file{.mailrc}, you can type @kbd{M-x rebuild-mail-abbrevs @key{RET}} to
4519make Emacs reread @file{~/.mailrc}. 4888make Emacs reread @file{~/.mailrc}.
4520 4889
4521@item 4890@item
@@ -4529,7 +4898,7 @@ type them in. To enable this feature, execute the following:
4529Note that the aliases are expanded automatically only after you type 4898Note that the aliases are expanded automatically only after you type
4530@key{RET} or a punctuation character (e.g. @kbd{,}). You can force their 4899@key{RET} or a punctuation character (e.g. @kbd{,}). You can force their
4531expansion by moving point to the end of the alias and typing @kbd{C-x a e} 4900expansion by moving point to the end of the alias and typing @kbd{C-x a e}
4532@kbd{M-x expand-abbrev}. 4901(@kbd{M-x expand-abbrev}).
4533@end itemize 4902@end itemize
4534 4903
4535@node Rmail thinks all messages are one big one, Sorting the messages in an Rmail folder, Expanding aliases when sending mail, Mail and news 4904@node Rmail thinks all messages are one big one, Sorting the messages in an Rmail folder, Expanding aliases when sending mail, Mail and news
@@ -4557,18 +4926,18 @@ and their key bindings.
4557@cindex Rmail and @file{/usr/spool/mail} 4926@cindex Rmail and @file{/usr/spool/mail}
4558@cindex @file{/usr/spool/mail} and Rmail 4927@cindex @file{/usr/spool/mail} and Rmail
4559 4928
4560This is the behavior of the @file{movemail} program which Rmail uses. 4929This is the behavior of the @code{movemail} program which Rmail uses.
4561This indicates that @file{movemail} is configured to use lock files. 4930This indicates that @code{movemail} is configured to use lock files.
4562 4931
4563RMS writes: 4932RMS writes:
4564 4933
4565@quotation 4934@quotation
4566Certain systems require lock files to interlock access to mail files. 4935Certain systems require lock files to interlock access to mail files.
4567On these systems, @file{movemail} must write lock files, or you risk losing 4936On these systems, @code{movemail} must write lock files, or you risk losing
4568mail. You simply must arrange to let @file{movemail} write them. 4937mail. You simply must arrange to let @code{movemail} write them.
4569 4938
4570Other systems use the flock system call to interlock access. On these 4939Other systems use the @code{flock} system call to interlock access. On
4571systems, you should configure @file{movemail} to use @code{flock}. 4940these systems, you should configure @code{movemail} to use @code{flock}.
4572@end quotation 4941@end quotation
4573 4942
4574@node Recovering mail files when Rmail munges them, Replying to the sender of a message, Rmail writes to /usr/spool/mail, Mail and news 4943@node Recovering mail files when Rmail munges them, Replying to the sender of a message, Rmail writes to /usr/spool/mail, Mail and news
@@ -4577,14 +4946,17 @@ systems, you should configure @file{movemail} to use @code{flock}.
4577@cindex Rmail munged my files 4946@cindex Rmail munged my files
4578@cindex Mail files, recovering those munged by Rmail 4947@cindex Mail files, recovering those munged by Rmail
4579 4948
4580If you have just done @code{rmail-input} on a file and you don't want to 4949If you have just done @kbd{M-x rmail-input} on a file and you don't want
4581save it in Rmail's format (called BABYL), just kill the buffer (with 4950to save it in Rmail's format (called BABYL), just kill the buffer (with
4582@kbd{C-x k}). 4951@kbd{C-x k}).
4583 4952
4953@cindex Exporting messages as Unix mail files
4584If you typed @kbd{M-x rmail} and it read some messages out of your inbox 4954If you typed @kbd{M-x rmail} and it read some messages out of your inbox
4585and you want to put them in a Unix mail file, use @kbd{C-o} on each 4955and you want to put them in a Unix mail file, use @kbd{C-o} on each
4586message. 4956message.
4587 4957
4958@cindex Converting from BABYL to Unix mail format
4959@cindex @code{unrmail} command
4588If you want to convert an existing file from BABYL format to Unix mail 4960If you want to convert an existing file from BABYL format to Unix mail
4589format, use the command @kbd{M-x unrmail}: it will prompt you for the 4961format, use the command @kbd{M-x unrmail}: it will prompt you for the
4590input and output file names. 4962input and output file names.
@@ -4626,7 +4998,9 @@ MacDonald Hall Jackson} at
4626 4998
4627@uref{http://bmrc.berkeley.edu/~trey/emacs/mime.html} 4999@uref{http://bmrc.berkeley.edu/~trey/emacs/mime.html}
4628 5000
4629Version 6.x of VM supports MIME. @xref{VM}. 5001Version 6.x of VM supports MIME. @xref{VM}. Gnus supports MIME in mail
5002and news messages as of version 5.8.1 (Pterodactyl). Rmail has limited
5003support for single-part MIME messages beginning with Emacs 20.3.
4630 5004
4631@node Automatically starting a mail or news reader, Reading news with Emacs, MIME with Emacs mail packages, Mail and news 5005@node Automatically starting a mail or news reader, Reading news with Emacs, MIME with Emacs mail packages, Mail and news
4632@section How do I make Emacs automatically start my mail/news reader? 5006@section How do I make Emacs automatically start my mail/news reader?
@@ -4640,6 +5014,7 @@ To start Emacs in Gnus:
4640emacs -f gnus 5014emacs -f gnus
4641@end example 5015@end example
4642 5016
5017@noindent
4643in Rmail: 5018in Rmail:
4644 5019
4645@example 5020@example
@@ -4655,7 +5030,7 @@ gnus
4655 5030
4656It is probably unwise to automatically start your mail or news reader 5031It is probably unwise to automatically start your mail or news reader
4657from your @file{.emacs} file. This would cause problems if you needed to run 5032from your @file{.emacs} file. This would cause problems if you needed to run
4658two copies of Emacs at one time. Also, this would make it difficult for 5033two copies of Emacs at the same time. Also, this would make it difficult for
4659you to start Emacs quickly when you needed to. 5034you to start Emacs quickly when you needed to.
4660 5035
4661@node Reading news with Emacs, Gnus does not work with NNTP, Automatically starting a mail or news reader, Mail and news 5036@node Reading news with Emacs, Gnus does not work with NNTP, Automatically starting a mail or news reader, Mail and news
@@ -4664,7 +5039,8 @@ you to start Emacs quickly when you needed to.
4664@cindex Usenet reader in Emacs 5039@cindex Usenet reader in Emacs
4665@cindex Gnus newsreader 5040@cindex Gnus newsreader
4666 5041
4667Use @kbd{M-x gnus}. It is documented in Info (@pxref{Learning how to do something}). 5042Use @kbd{M-x gnus}. It is documented in Info (@pxref{Learning how to do
5043something}).
4668 5044
4669@node Gnus does not work with NNTP, Viewing articles with embedded underlining, Reading news with Emacs, Mail and news 5045@node Gnus does not work with NNTP, Viewing articles with embedded underlining, Reading news with Emacs, Mail and news
4670@section Why doesn't Gnus work via NNTP? 5046@section Why doesn't Gnus work via NNTP?
@@ -4684,8 +5060,8 @@ You can work around the bug inside Emacs like this:
4684 5060
4685You can find out what version of NNTP your news server is running by 5061You can find out what version of NNTP your news server is running by
4686telnetting to the NNTP port (usually 119) on the news server machine 5062telnetting to the NNTP port (usually 119) on the news server machine
4687(i.e., "telnet server-machine 119"). The server should give its version 5063(i.e., @kbd{telnet server-machine 119}). The server should give its
4688number in the welcome message. Type "quit" to get out. 5064version number in the welcome message. Type @kbd{quit} to get out.
4689 5065
4690@xref{Spontaneous entry into isearch-mode}, for some additional ideas. 5066@xref{Spontaneous entry into isearch-mode}, for some additional ideas.
4691 5067
@@ -4701,9 +5077,9 @@ Underlining appears like this:
4701_^Hu_^Hn_^Hd_^He_^Hr_^Hl_^Hi_^Hn_^Hi_^Hn_^Hg 5077_^Hu_^Hn_^Hd_^He_^Hr_^Hl_^Hi_^Hn_^Hi_^Hn_^Hg
4702@end example 5078@end example
4703 5079
4704@email{amanda@@iesd.auc.dk, Per Abrahamsen} suggests using the following 5080@email{abraham@@dina.kvl.dk, Per Abrahamsen} suggests using the following
4705code, which uses the underline face to turn such text into true 5081code, which uses the underline face to turn such text into true
4706underlining: 5082underlining, inconjunction with Gnus:
4707 5083
4708@lisp 5084@lisp
4709(defun gnus-article-prepare-overstrike () 5085(defun gnus-article-prepare-overstrike ()
@@ -4731,6 +5107,8 @@ underlining:
4731(add-hook 'gnus-article-prepare-hook 'gnus-article-prepare-overstrike) 5107(add-hook 'gnus-article-prepare-hook 'gnus-article-prepare-overstrike)
4732@end lisp 5108@end lisp
4733 5109
5110Latest versions of Gnus do such a conversion automatically.
5111
4734If you prefer to do away with underlining altogether, you can 5112If you prefer to do away with underlining altogether, you can
4735destructively remove it with @kbd{M-x ununderline-region}; do this 5113destructively remove it with @kbd{M-x ununderline-region}; do this
4736automatically via 5114automatically via
@@ -4790,7 +5168,7 @@ to the end of the @file{*Newsgroup*} buffer.
4790@cindex Control header, killing articles based on 5168@cindex Control header, killing articles based on
4791 5169
4792Gnus will complain that the @samp{Newsgroups}, @samp{Keywords}, and 5170Gnus will complain that the @samp{Newsgroups}, @samp{Keywords}, and
4793@samp{Control} headers are "Unknown header" fields. 5171@samp{Control} headers are ``Unknown header'' fields.
4794 5172
4795For the @samp{Newsgroups} header, there is an easy workaround: kill on the 5173For the @samp{Newsgroups} header, there is an easy workaround: kill on the
4796@samp{Xref} header instead, which will be present on any cross-posted article 5174@samp{Xref} header instead, which will be present on any cross-posted article
@@ -4831,19 +5209,20 @@ the variable @code{gnus-use-cross-reference}.
4831 5209
4832@quotation 5210@quotation
4833The problem is almost always interaction between NNTP and C News. NNTP 5211The problem is almost always interaction between NNTP and C News. NNTP
4834POST asks C News's inews to not background itself but rather hang around 5212POST asks C News's @code{inews} to not background itself but rather hang
4835and give its exit status so it knows whether the post was successful. 5213around and give its exit status so it knows whether the post was successful.
4836(That wait will on some systems not return the exit status of the 5214(That wait will on some systems not return the exit status of the
4837waited for job is a different sort of problem.) It ends up taking a 5215waited for job is a different sort of problem.) It ends up taking a
4838long time because inews is calling relaynews, which often waits for 5216long time because @code{inews} is calling @code{relaynews}, which often
4839another relaynews to free the lock on the news system so it can file the 5217waits for another @code{relaynews} to free the lock on the news system
4840article. 5218so it can file the article.
4841 5219
4842My preferred solution is to change inews to not call relaynews, but 5220My preferred solution is to change @code{inews} to not call
4843rather use newsspool. This loses some error-catching functionality, but 5221@code{relaynews}, but rather use @code{newsspool}. This loses some
4844is for the most part safe as inews will detect a lot of the errors on 5222error-catching functionality, but is for the most part safe as
4845its own. The C News folks have sped up inews, too, so speed should look 5223@code{inews} will detect a lot of the errors on its own. The C News
4846better to most folks as that update propagates around. 5224folks have sped up @code{inews}, too, so speed should look better to
5225most folks as that update propagates around.
4847@end quotation 5226@end quotation
4848 5227
4849@node Learning more about Gnus, , Gnus hangs for a long time, Mail and news 5228@node Learning more about Gnus, , Gnus hangs for a long time, Mail and news