* image-mode.el (image-mode): Fix last fix.
[bpt/emacs.git] / lispref / vol1.texi
CommitLineData
81e2e271
RS
1This file is obsolete, and no longer part of the Emacs Lisp Reference Manual.
2It is still present in CVS in case we ever want to use some of it again.
3
4@c This is part of the GNU Emacs Lisp Reference Manual.
651f374c 5@c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2002, 2003,
ceb4c4d3 6@c 2004, 2005, 2006 Free Software Foundation, Inc.
81e2e271
RS
7@c See the file elisp.texi for copying conditions.
8
cddd92e8
EZ
9\input texinfo @c -*-texinfo-*-
10@c %**start of header
11@setfilename elisp
12@settitle GNU Emacs Lisp Reference Manual: Volume 1
13@smallbook
14@c %**end of header
15
16
17@tex
18%%%% Experiment with smaller skip before sections and subsections.
19%%%% --rjc 30mar92
20
21\global\secheadingskip = 17pt plus 6pt minus 3pt
22\global\subsecheadingskip = 14pt plus 6pt minus 3pt
23
24% The defaults are:
25% \secheadingskip = 21pt plus 8pt minus 4pt
26% \subsecheadingskip = 17pt plus 8pt minus 4pt
27@end tex
28
29@finalout
30@c tex
31@c \overfullrule=0pt
32@c end tex
33
177c0ea7 34@c Start volume 1 chapter numbering on chapter 1;
cddd92e8
EZ
35@c this must be listed as chapno 0.
36@tex
37\global\chapno=0
38@end tex
39
40@c ================================================================
41@c Note: I was unable to figure out how to get .aux files copied
42@c properly in the time I had. Hence need to copy .aux file before
43@c running Tex. --rjc
44
45@tex
46
47\message{}
48\message{Redefining contents commands...}
49\message{}
50
51% Special @contents command
52
53% This inputs fixed up table of contents file rather than create new one.
54\global\def\contents{%
55 \startcontents{Table of Contents}%
56 \input elisp1-toc-ready.toc
57 \endgroup
58 \vfill \eject
59}
60
61% Special @summarycontents command
62% This inputs fixed up table of contents file rather than create new one.
63\global\def\summarycontents{%
64 \startcontents{Short Contents}%
65 %
66 \let\chapentry = \shortchapentry
67 \let\unnumbchapentry = \shortunnumberedentry
68 % We want a true roman here for the page numbers.
69 \secfonts
70 \let\rm=\shortcontrm \let\bf=\shortcontbf \let\sl=\shortcontsl
71 \rm
72 \advance\baselineskip by 1pt % Open it up a little.
73 \def\secentry ##1##2##3##4{}
74 \def\unnumbsecentry ##1##2{}
75 \def\subsecentry ##1##2##3##4##5{}
76 \def\unnumbsubsecentry ##1##2{}
77 \def\subsubsecentry ##1##2##3##4##5##6{}
78 \def\unnumbsubsubsecentry ##1##2{}
79 \input elisp1-toc-ready.toc
80 \endgroup
81 \vfill \eject
82}
83
84\message{}
85\message{Formatting special two volume edition...Volume 1...}
86\message{}
87@end tex
88@c ================================================================
89
90
91@c ==> This `elisp-small.texi' is a `smallbook' version of the manual.
92
93@c ==== Following are acceptable over and underfull hboxes in TeX ====
94
95@c -----
96@c [163] [164] [165] [166]) (loading.texi Chapter 13 [167] [168] [169]
97@c Overfull \hbox (20.5428pt too wide) in paragraph at lines 131--131
177c0ea7 98@c []@ninett
cddd92e8
EZ
99@c setenv EMAC-SLOAD-PATH .:/user/bil/emacs:/usr/local/lib/emacs/lisp[]
100@c -----
101@c (minibuf.texi Chapter 17 [206] [207] [208] [209] [210] [211] [212] [213]
102@c [214] [215]
103@c Overfull \hbox (2.09094pt too wide) in paragraph at lines 550--560
177c0ea7
JB
104@c @texttt map[] @textrm if @textsl require-match @textrm is
105@c @texttt nil[]@textrm , or else with the keymap @texttt minibuffer-
cddd92e8
EZ
106@c -----
107@c (locals.texi Appendix @char 68 [533] [534]
108@c Underfull \hbox (badness 2512) in paragraph at lines 4--4
177c0ea7 109@c []@chaprm Appendix DStandard Buffer-Local
cddd92e8
EZ
110
111@c -------------------------------------------------------------------
112
113@c
114@c Combine indices.
115@synindex cp fn
116@syncodeindex vr fn
117@syncodeindex ky fn
118@syncodeindex pg fn
119@syncodeindex tp fn
120@c oops: texinfo-format-buffer ignores synindex
121@c
122
123@ifinfo
124This file documents GNU Emacs Lisp.
125
126@c The edition number appears in several places in this file
127@c and also in the file intro.texi.
128This is edition 2.4 of the GNU Emacs Lisp Reference
129Manual. It corresponds to Emacs Version 19.29.
130@c Please REMEMBER to update edition number in *four* places in this file
131@c and also in *one* place in ==> intro.texi <==
132@c huh? i only found three real places where the edition is stated, and
133@c one place where it is not stated explicitly ("this info file is newer
134@c than the foobar edition"). --mew 13sep93
135
136Published by the Free Software Foundation
364c38d3
LK
13751 Franklin Street, Fifth Floor
138Boston, MA 02110-1301 USA
cddd92e8
EZ
139@end ifinfo
140
141@setchapternewpage odd
142
143@iftex
144@shorttitlepage The GNU Emacs Lisp Reference Manual: Volume 1
145@end iftex
146@titlepage
147@sp 1
148@center @titlefont{The}
149@sp 1
150@center @titlefont{GNU Emacs Lisp}
151@sp 1
152@center @titlefont{Reference Manual}
153@sp 2
154@center GNU Emacs Version 19.29
155@center for Unix Users
156@sp 1
157@center Edition 2.4, June 1995
158@sp 2
159@center @titlefont{Volume 1}
160@sp 3
177c0ea7 161@center by Bil Lewis, Dan LaLiberte,
cddd92e8
EZ
162@center and the GNU Manual Group
163@page
164@vskip 0pt plus 1filll
177c0ea7 165Copyright @copyright{} 1990, 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
cddd92e8
EZ
166
167@sp 2
168Edition 2.4 @*
169Revised for Emacs Version 19.29,@*
170June, 1995.@*
171@sp 2
172ISBN 1-882114-71-X
173
174@sp 2
175Published by the Free Software Foundation @*
086add15
LK
17651 Franklin Street, Fifth Floor @*
177Boston, MA 02110-1301 USA
cddd92e8
EZ
178
179@sp 1
180Permission is granted to make and distribute verbatim copies of this
181manual provided the copyright notice and this permission notice are
182preserved on all copies.
183
184Permission is granted to copy and distribute modified versions of this
185manual under the conditions for verbatim copying, provided also that the
186section entitled ``GNU General Public License'' is included
187exactly as in the original, and provided that the entire resulting
188derived work is distributed under the terms of a permission notice
189identical to this one.
190
191Permission is granted to copy and distribute translations of this manual
192into another language, under the above conditions for modified versions,
193except that the section entitled ``GNU General Public License'' may be
194included in a translation approved by the Free Software Foundation
195instead of in the original English.
196
197@sp 2
198Cover art by Etienne Suvasa.
199@end titlepage
200@page
201
202@node Top, Copying, (dir), (dir)
203
204@ifinfo
205This Info file contains edition 2.4 of the GNU Emacs Lisp Reference
206Manual, corresponding to GNU Emacs version 19.29.
207@end ifinfo
208
209@menu
210* Copying:: Conditions for copying and changing GNU Emacs.
211* Introduction:: Introduction and conventions used.
212
213* Lisp Data Types:: Data types of objects in Emacs Lisp.
214* Numbers:: Numbers and arithmetic functions.
215* Strings and Characters:: Strings, and functions that work on them.
216* Lists:: Lists, cons cells, and related functions.
217* Sequences Arrays Vectors:: Lists, strings and vectors are called sequences.
218 Certain functions act on any kind of sequence.
219 The description of vectors is here as well.
220* Symbols:: Symbols represent names, uniquely.
221
222* Evaluation:: How Lisp expressions are evaluated.
223* Control Structures:: Conditionals, loops, nonlocal exits.
224* Variables:: Using symbols in programs to stand for values.
225* Functions:: A function is a Lisp program
226 that can be invoked from other functions.
227* Macros:: Macros are a way to extend the Lisp language.
228
229* Loading:: Reading files of Lisp code into Lisp.
230* Byte Compilation:: Compilation makes programs run faster.
231* Debugging:: Tools and tips for debugging Lisp programs.
232
233* Read and Print:: Converting Lisp objects to text and back.
234* Minibuffers:: Using the minibuffer to read input.
235* Command Loop:: How the editor command loop works,
236 and how you can call its subroutines.
237* Keymaps:: Defining the bindings from keys to commands.
238* Modes:: Defining major and minor modes.
239* Documentation:: Writing and using documentation strings.
240
241* Files:: Accessing files.
242* Backups and Auto-Saving:: Controlling how backups and auto-save
243 files are made.
244* Buffers:: Creating and using buffer objects.
245* Windows:: Manipulating windows and displaying buffers.
246* Frames:: Making multiple X windows.
247* Positions:: Buffer positions and motion functions.
248* Markers:: Markers represent positions and update
249 automatically when the text is changed.
250
251* Text:: Examining and changing text in buffers.
252* Searching and Matching:: Searching buffers for strings or regexps.
253* Syntax Tables:: The syntax table controls word and list parsing.
254* Abbrevs:: How Abbrev mode works, and its data structures.
255
256* Processes:: Running and communicating with subprocesses.
257* System Interface:: Getting the user id, system type, environment
258 variables, and other such things.
259* Display:: Parameters controlling screen usage.
260 The bell. Waiting for input.
cddd92e8
EZ
261
262Appendices
263
264* Tips:: Advice for writing Lisp programs.
265* GNU Emacs Internals:: Building and dumping Emacs;
266 internal data structures.
267* Standard Errors:: List of all error symbols.
268* Standard Buffer-Local Variables:: List of variables local in all buffers.
269* Standard Keymaps:: List of standard keymaps.
270* Standard Hooks:: List of standard hook variables.
271
272* Index:: Index including concepts, functions, variables,
273 and other terms.
274
275 --- The Detailed Node Listing ---
276
277Here are other nodes that are inferiors of those already listed,
278mentioned here so you can get to them in one step:
279
280Introduction
281
282* Caveats:: Flaws and a request for help.
283* Lisp History:: Emacs Lisp is descended from Maclisp.
284* Conventions:: How the manual is formatted.
285* Acknowledgements:: The authors, editors, and sponsors of this manual.
286
287Conventions
288
289* Some Terms:: Explanation of terms we use in this manual.
290* nil and t:: How the symbols @code{nil} and @code{t} are used.
291* Evaluation Notation:: The format we use for examples of evaluation.
292* Printing Notation:: The format we use for examples that print output.
293* Error Messages:: The format we use for examples of errors.
294* Buffer Text Notation:: The format we use for buffer contents in examples.
295* Format of Descriptions:: Notation for describing functions, variables, etc.
296
297Format of Descriptions
298
177c0ea7
JB
299* A Sample Function Description::
300* A Sample Variable Description::
cddd92e8
EZ
301
302Lisp Data Types
303
304* Printed Representation:: How Lisp objects are represented as text.
305* Comments:: Comments and their formatting conventions.
306* Programming Types:: Types found in all Lisp systems.
307* Editing Types:: Types specific to Emacs.
308* Type Predicates:: Tests related to types.
309* Equality Predicates:: Tests of equality between any two objects.
310
311Programming Types
312
313* Integer Type:: Numbers without fractional parts.
314* Floating Point Type:: Numbers with fractional parts and with a large range.
315* Character Type:: The representation of letters, numbers and
316 control characters.
317* Sequence Type:: Both lists and arrays are classified as sequences.
318* Cons Cell Type:: Cons cells, and lists (which are made from cons cells).
319* Array Type:: Arrays include strings and vectors.
320* String Type:: An (efficient) array of characters.
321* Vector Type:: One-dimensional arrays.
322* Symbol Type:: A multi-use object that refers to a function,
323 variable, property list, or itself.
324* Function Type:: A piece of executable code you can call from elsewhere.
325* Macro Type:: A method of expanding an expression into another
326 expression, more fundamental but less pretty.
327* Primitive Function Type:: A function written in C, callable from Lisp.
328* Byte-Code Type:: A function written in Lisp, then compiled.
329* Autoload Type:: A type used for automatically loading seldom-used
330 functions.
331
332List Type
333
334* Dotted Pair Notation:: An alternative syntax for lists.
335* Association List Type:: A specially constructed list.
336
337Editing Types
338
339* Buffer Type:: The basic object of editing.
340* Window Type:: What makes buffers visible.
341* Window Configuration Type::Save what the screen looks like.
342* Marker Type:: A position in a buffer.
343* Process Type:: A process running on the underlying OS.
344* Stream Type:: Receive or send characters.
345* Keymap Type:: What function a keystroke invokes.
346* Syntax Table Type:: What a character means.
347
348Numbers
349
350* Integer Basics:: Representation and range of integers.
351* Float Basics:: Representation and range of floating point.
352* Predicates on Numbers:: Testing for numbers.
353* Comparison of Numbers:: Equality and inequality predicates.
354* Arithmetic Operations:: How to add, subtract, multiply and divide.
355* Bitwise Operations:: Logical and, or, not, shifting.
356* Numeric Conversions:: Converting float to integer and vice versa.
357* Math Functions:: Trig, exponential and logarithmic functions.
358* Random Numbers:: Obtaining random integers, predictable or not.
359
360Strings and Characters
361
362* String Basics:: Basic properties of strings and characters.
363* Predicates for Strings:: Testing whether an object is a string or char.
364* Creating Strings:: Functions to allocate new strings.
365* Text Comparison:: Comparing characters or strings.
366* String Conversion:: Converting characters or strings and vice versa.
367* Formatting Strings:: @code{format}: Emacs's analog of @code{printf}.
368* Character Case:: Case conversion functions.
369
370Lists
371
372* Cons Cells:: How lists are made out of cons cells.
373* Lists as Boxes:: Graphical notation to explain lists.
374* List-related Predicates:: Is this object a list? Comparing two lists.
375* List Elements:: Extracting the pieces of a list.
376* Building Lists:: Creating list structure.
377* Modifying Lists:: Storing new pieces into an existing list.
378* Sets And Lists:: A list can represent a finite mathematical set.
379* Association Lists:: A list can represent a finite relation or mapping.
380
381Modifying Existing List Structure
382
383* Setcar:: Replacing an element in a list.
384* Setcdr:: Replacing part of the list backbone.
385 This can be used to remove or add elements.
386* Rearrangement:: Reordering the elements in a list; combining lists.
387
388Sequences, Arrays, and Vectors
389
390* Sequence Functions:: Functions that accept any kind of sequence.
391* Arrays:: Characteristics of arrays in Emacs Lisp.
392* Array Functions:: Functions specifically for arrays.
393* Vectors:: Functions specifically for vectors.
394
395Symbols
396
397* Symbol Components:: Symbols have names, values, function definitions
398 and property lists.
399* Definitions:: A definition says how a symbol will be used.
400* Creating Symbols:: How symbols are kept unique.
401* Property Lists:: Each symbol has a property list
402 for recording miscellaneous information.
403
404Evaluation
405
406* Intro Eval:: Evaluation in the scheme of things.
407* Eval:: How to invoke the Lisp interpreter explicitly.
408* Forms:: How various sorts of objects are evaluated.
177c0ea7 409* Quoting:: Avoiding evaluation (to put constants in
cddd92e8
EZ
410 the program).
411
412Kinds of Forms
413
414* Self-Evaluating Forms:: Forms that evaluate to themselves.
415* Symbol Forms:: Symbols evaluate as variables.
416* Classifying Lists:: How to distinguish various sorts of list forms.
417* Function Forms:: Forms that call functions.
418* Macro Forms:: Forms that call macros.
2b9fa4a7 419* Special Forms:: "Special forms" are idiosyncratic primitives,
cddd92e8
EZ
420 most of them extremely important.
421* Autoloading:: Functions set up to load files
422 containing their real definitions.
423
424Control Structures
425
426* Sequencing:: Evaluation in textual order.
427* Conditionals:: @code{if}, @code{cond}.
428* Combining Conditions:: @code{and}, @code{or}, @code{not}.
429* Iteration:: @code{while} loops.
430* Nonlocal Exits:: Jumping out of a sequence.
431
432Nonlocal Exits
433
434* Catch and Throw:: Nonlocal exits for the program's own purposes.
435* Examples of Catch:: Showing how such nonlocal exits can be written.
436* Errors:: How errors are signaled and handled.
437* Cleanups:: Arranging to run a cleanup form if an
438 error happens.
439
440Errors
441
442* Signaling Errors:: How to report an error.
443* Processing of Errors:: What Emacs does when you report an error.
444* Handling Errors:: How you can trap errors and continue execution.
445* Error Symbols:: How errors are classified for trapping them.
446
447Variables
448
449* Global Variables:: Variable values that exist permanently, everywhere.
450* Constant Variables:: Certain "variables" have values that never change.
451* Local Variables:: Variable values that exist only temporarily.
452* Void Variables:: Symbols that lack values.
453* Defining Variables:: A definition says a symbol is used as a variable.
454* Accessing Variables:: Examining values of variables whose names
455 are known only at run time.
456* Setting Variables:: Storing new values in variables.
457* Variable Scoping:: How Lisp chooses among local and global values.
458* Buffer-Local Variables:: Variable values in effect only in one buffer.
459
460Scoping Rules for Variable Bindings
461
177c0ea7 462* Scope:: Scope means where in the program a value
cddd92e8
EZ
463 is visible. Comparison with other languages.
464* Extent:: Extent means how long in time a value exists.
465* Impl of Scope:: Two ways to implement dynamic scoping.
177c0ea7 466* Using Scoping:: How to use dynamic scoping carefully and
cddd92e8
EZ
467 avoid problems.
468
469Buffer-Local Variables
470
471* Intro to Buffer-Local:: Introduction and concepts.
472* Creating Buffer-Local:: Creating and destroying buffer-local bindings.
473* Default Value:: The default value is seen in buffers
474 that don't have their own local values.
475
476Functions
477
478* What Is a Function:: Lisp functions vs primitives; terminology.
479* Lambda Expressions:: How functions are expressed as Lisp objects.
480* Function Names:: A symbol can serve as the name of a function.
481* Defining Functions:: Lisp expressions for defining functions.
482* Calling Functions:: How to use an existing function.
483* Mapping Functions:: Applying a function to each element of a list, etc.
177c0ea7 484* Anonymous Functions:: Lambda-expressions are functions with no names.
cddd92e8
EZ
485* Function Cells:: Accessing or setting the function definition
486 of a symbol.
487* Related Topics:: Cross-references to specific Lisp primitives
177c0ea7 488 that have a special bearing on how
cddd92e8
EZ
489 functions work.
490
491Lambda Expressions
492
493* Lambda Components:: The parts of a lambda expression.
494* Simple Lambda:: A simple example.
495* Argument List:: Details and special features of argument lists.
496* Function Documentation:: How to put documentation in a function.
497
498Macros
499
500* Simple Macro:: A basic example.
501* Expansion:: How, when and why macros are expanded.
502* Compiling Macros:: How macros are expanded by the compiler.
503* Defining Macros:: How to write a macro definition.
504* Backquote:: Easier construction of list structure.
505* Problems with Macros:: Don't evaluate the macro arguments too many times.
506 Don't hide the user's variables.
507
508Loading
509
510* How Programs Do Loading:: The @code{load} function and others.
511* Autoload:: Setting up a function to autoload.
512* Named Features:: Loading a library if it isn't already loaded.
513* Repeated Loading:: Precautions about loading a file twice.
514
515Byte Compilation
516
517* Compilation Functions:: Byte compilation functions.
518* Disassembly:: Disassembling byte-code; how to read byte-code.
519
520Debugging Lisp Programs
521
522* Debugger:: How the Emacs Lisp debugger is implemented.
523* Syntax Errors:: How to find syntax errors.
177c0ea7 524* Compilation Errors:: How to find errors that show up in
cddd92e8
EZ
525 byte compilation.
526* Edebug:: A source-level Emacs Lisp debugger.
177c0ea7 527
cddd92e8
EZ
528The Lisp Debugger
529
530* Error Debugging:: Entering the debugger when an error happens.
531* Function Debugging:: Entering it when a certain function is called.
532* Explicit Debug:: Entering it at a certain point in the program.
533* Using Debugger:: What the debugger does; what you see while in it.
534* Debugger Commands:: Commands used while in the debugger.
535* Invoking the Debugger:: How to call the function @code{debug}.
536* Internals of Debugger:: Subroutines of the debugger, and global variables.
537
538Debugging Invalid Lisp Syntax
539
540* Excess Open:: How to find a spurious open paren or missing close.
541* Excess Close:: How to find a spurious close paren or missing open.
542
543Reading and Printing Lisp Objects
544
545* Streams Intro:: Overview of streams, reading and printing.
177c0ea7 546* Input Streams:: Various data types that can be used as
cddd92e8
EZ
547 input streams.
548* Input Functions:: Functions to read Lisp objects from text.
177c0ea7 549* Output Streams:: Various data types that can be used as
cddd92e8
EZ
550 output streams.
551* Output Functions:: Functions to print Lisp objects as text.
552
553Minibuffers
554
555* Intro to Minibuffers:: Basic information about minibuffers.
556* Text from Minibuffer:: How to read a straight text string.
557* Object from Minibuffer:: How to read a Lisp object or expression.
558* Completion:: How to invoke and customize completion.
559* Yes-or-No Queries:: Asking a question with a simple answer.
560* Minibuffer Misc:: Various customization hooks and variables.
561
562Completion
563
564* Basic Completion:: Low-level functions for completing strings.
565 (These are too low level to use the minibuffer.)
566* Minibuffer Completion:: Invoking the minibuffer with completion.
567* Completion Commands:: Minibuffer commands that do completion.
568* High-Level Completion:: Convenient special cases of completion
569 (reading buffer name, file name, etc.)
570* Reading File Names:: Using completion to read file names.
571* Programmed Completion:: Finding the completions for a given file name.
572
573Command Loop
574
575* Command Overview:: How the command loop reads commands.
576* Defining Commands:: Specifying how a function should read arguments.
577* Interactive Call:: Calling a command, so that it will read arguments.
578* Command Loop Info:: Variables set by the command loop for you to examine.
579* Input Events:: What input looks like when you read it.
580* Reading Input:: How to read input events from the keyboard or mouse.
581* Waiting:: Waiting for user input or elapsed time.
582* Quitting:: How @kbd{C-g} works. How to catch or defer quitting.
583* Prefix Command Arguments:: How the commands to set prefix args work.
584* Recursive Editing:: Entering a recursive edit,
585 and why you usually shouldn't.
586* Disabling Commands:: How the command loop handles disabled commands.
587* Command History:: How the command history is set up, and how accessed.
588* Keyboard Macros:: How keyboard macros are implemented.
589
590Defining Commands
591
592* Using Interactive:: General rules for @code{interactive}.
593* Interactive Codes:: The standard letter-codes for reading arguments
594 in various ways.
595* Interactive Examples:: Examples of how to read interactive arguments.
596
597Keymaps
598
599* Keymap Terminology:: Definitions of terms pertaining to keymaps.
600* Format of Keymaps:: What a keymap looks like as a Lisp object.
601* Creating Keymaps:: Functions to create and copy keymaps.
602* Inheritance and Keymaps:: How one keymap can inherit the bindings
603 of another keymap.
604* Prefix Keys:: Defining a key with a keymap as its definition.
605* Menu Keymaps:: A keymap can define a menu for X
606 or for use from the terminal.
607* Active Keymaps:: Each buffer has a local keymap
608 to override the standard (global) bindings.
609 Each minor mode can also override them.
610* Key Lookup:: How extracting elements from keymaps works.
611* Functions for Key Lookup:: How to request key lookup.
612* Changing Key Bindings:: Redefining a key in a keymap.
613* Key Binding Commands:: Interactive interfaces for redefining keys.
614* Scanning Keymaps:: Looking through all keymaps, for printing help.
615
616Major and Minor Modes
617
618* Major Modes:: Defining major modes.
619* Minor Modes:: Defining minor modes.
620* Mode Line Format:: Customizing the text that appears in the mode line.
177c0ea7 621* Hooks:: How to use hooks; how to write code that
cddd92e8
EZ
622 provides hooks.
623
624Major Modes
625
626* Major Mode Conventions:: Coding conventions for keymaps, etc.
627* Example Major Modes:: Text mode and Lisp modes.
628* Auto Major Mode:: How Emacs chooses the major mode automatically.
629* Mode Help:: Finding out how to use a mode.
630
631Minor Modes
632
633* Minor Mode Conventions:: Tips for writing a minor mode.
634* Keymaps and Minor Modes:: How a minor mode can have its own keymap.
635
636Mode Line Format
637
638* Mode Line Data:: The data structure that controls the mode line.
639* Mode Line Variables:: Variables used in that data structure.
640* %-Constructs:: Putting information into a mode line.
641
642Documentation
643
644* Documentation Basics:: Good style for doc strings.
645 Where to put them. How Emacs stores them.
646* Accessing Documentation:: How Lisp programs can access doc strings.
647* Keys in Documentation:: Substituting current key bindings.
648* Describing Characters:: Making printable descriptions of
649 non-printing characters and key sequences.
650* Help Functions:: Subroutines used by Emacs help facilities.
651
652Files
653
654* Visiting Files:: Reading files into Emacs buffers for editing.
655* Saving Buffers:: Writing changed buffers back into files.
656* Reading from Files:: Reading files into other buffers.
657* Writing to Files:: Writing new files from parts of buffers.
658* File Locks:: Locking and unlocking files, to prevent
659 simultaneous editing by two people.
660* Information about Files:: Testing existence, accessibility, size of files.
661* Contents of Directories:: Getting a list of the files in a directory.
662* Changing File Attributes:: Renaming files, changing protection, etc.
663* File Names:: Decomposing and expanding file names.
664
665Visiting Files
666
667* Visiting Functions:: The usual interface functions for visiting.
668* Subroutines of Visiting:: Lower-level subroutines that they use.
669
670Information about Files
671
672* Testing Accessibility:: Is a given file readable? Writable?
673* Kinds of Files:: Is it a directory? A link?
674* File Attributes:: How large is it? Any other names? Etc.
675
676File Names
677
678* File Name Components:: The directory part of a file name, and the rest.
679* Directory Names:: A directory's name as a directory
680 is different from its name as a file.
177c0ea7 681* Relative File Names:: Some file names are relative to a
cddd92e8
EZ
682 current directory.
683* File Name Expansion:: Converting relative file names to absolute ones.
684* Unique File Names:: Generating names for temporary files.
685* File Name Completion:: Finding the completions for a given file name.
686
687Backups and Auto-Saving
688
177c0ea7 689* Backup Files:: How backup files are made; how their names
cddd92e8
EZ
690 are chosen.
691* Auto-Saving:: How auto-save files are made; how their
692 names are chosen.
177c0ea7 693* Reverting:: @code{revert-buffer}, and how to customize
cddd92e8
EZ
694 what it does.
695
696Backup Files
697
698* Making Backups:: How Emacs makes backup files, and when.
177c0ea7 699* Rename or Copy:: Two alternatives: renaming the old file
cddd92e8
EZ
700 or copying it.
701* Numbered Backups:: Keeping multiple backups for each source file.
702* Backup Names:: How backup file names are computed; customization.
703
704Buffers
705
706* Buffer Basics:: What is a buffer?
707* Buffer Names:: Accessing and changing buffer names.
708* Buffer File Name:: The buffer file name indicates which file
709 is visited.
710* Buffer Modification:: A buffer is @dfn{modified} if it needs to be saved.
711* Modification Time:: Determining whether the visited file was changed
2b9fa4a7 712 "behind Emacs's back".
cddd92e8
EZ
713* Read Only Buffers:: Modifying text is not allowed in a
714 read-only buffer.
715* The Buffer List:: How to look at all the existing buffers.
716* Creating Buffers:: Functions that create buffers.
717* Killing Buffers:: Buffers exist until explicitly killed.
718* Current Buffer:: Designating a buffer as current
719 so primitives will access its contents.
720
721Windows
722
723* Basic Windows:: Basic information on using windows.
724* Splitting Windows:: Splitting one window into two windows.
725* Deleting Windows:: Deleting a window gives its space to other windows.
726* Selecting Windows:: The selected window is the one that you edit in.
727* Cyclic Window Ordering:: Moving around the existing windows.
728* Buffers and Windows:: Each window displays the contents of a buffer.
729* Displaying Buffers:: Higher-lever functions for displaying a buffer
730 and choosing a window for it.
731* Window Point:: Each window has its own location of point.
732* Window Start:: The display-start position controls which text
177c0ea7 733 is on-screen in the window.
cddd92e8
EZ
734* Vertical Scrolling:: Moving text up and down in the window.
735* Horizontal Scrolling:: Moving text sideways on the window.
736* Size of Window:: Accessing the size of a window.
737* Resizing Windows:: Changing the size of a window.
738* Window Configurations:: Saving and restoring the state of the screen.
739
740Frames
741
742* Creating Frames:: Creating additional frames.
743* Multiple Displays:: Creating frames on other X displays.
744* Frame Parameters:: Controlling frame size, position, font, etc.
745* Frame Titles:: Automatic updating of frame titles.
746* Deleting Frames:: Frames last until explicitly deleted.
747* Finding All Frames:: How to examine all existing frames.
748* Frames and Windows:: A frame contains windows;
749 display of text always works through windows.
750* Minibuffers and Frames:: How a frame finds the minibuffer to use.
751* Input Focus:: Specifying the selected frame.
752* Visibility of Frames:: Frames may be visible or invisible, or icons.
753* Raising and Lowering:: Raising a frame makes it hide other X windows;
754 lowering it makes the others hide them.
755* Frame Configurations:: Saving the state of all frames.
756* Mouse Tracking:: Getting events that say when the mouse moves.
757* Mouse Position:: Asking where the mouse is, or moving it.
758* Pop-Up Menus:: Displaying a menu for the user to select from.
759* Dialog Boxes:: Displaying a box to ask yes or no.
760* Pointer Shapes:: Specifying the shape of the mouse pointer.
761* X Selections:: Transferring text to and from other X clients.
762* Color Names:: Getting the definitions of color names.
763* Resources:: Getting resource values from the server.
764* Server Data:: Getting info about the X server.
765
766Positions
767
768* Point:: The special position where editing takes place.
769* Motion:: Changing point.
770* Excursions:: Temporary motion and buffer changes.
771* Narrowing:: Restricting editing to a portion of the buffer.
772
773Motion
774
775* Character Motion:: Moving in terms of characters.
776* Word Motion:: Moving in terms of words.
777* Buffer End Motion:: Moving to the beginning or end of the buffer.
778* Text Lines:: Moving in terms of lines of text.
779* Screen Lines:: Moving in terms of lines as displayed.
780* List Motion:: Moving by parsing lists and sexps.
781* Skipping Characters:: Skipping characters belonging to a certain set.
782
783Markers
784
785* Overview of Markers:: The components of a marker, and how it relocates.
786* Predicates on Markers:: Testing whether an object is a marker.
787* Creating Markers:: Making empty markers or markers at certain places.
788* Information from Markers:: Finding the marker's buffer or character
177c0ea7 789 position.
cddd92e8 790* Changing Markers:: Moving the marker to a new buffer or position.
2b9fa4a7
RS
791* The Mark:: How "the mark" is implemented with a marker.
792* The Region:: How to access "the region".
cddd92e8
EZ
793
794Text
795
796* Near Point:: Examining text in the vicinity of point.
797* Buffer Contents:: Examining text in a general fashion.
798* Insertion:: Adding new text to a buffer.
799* Commands for Insertion:: User-level commands to insert text.
800* Deletion:: Removing text from a buffer.
801* User-Level Deletion:: User-level commands to delete text.
802* The Kill Ring:: Where removed text sometimes is saved for
803 later use.
804* Undo:: Undoing changes to the text of a buffer.
805* Auto Filling:: How auto-fill mode is implemented to break lines.
806* Filling:: Functions for explicit filling.
807* Margins:: How to specify margins for filling commands.
808* Sorting:: Functions for sorting parts of the buffer.
809* Indentation:: Functions to insert or adjust indentation.
810* Columns:: Computing horizontal positions, and using them.
811* Case Changes:: Case conversion of parts of the buffer.
812* Substitution:: Replacing a given character wherever it appears.
813* Registers:: How registers are implemented. Accessing
814 the text or position stored in a register.
177c0ea7 815
cddd92e8
EZ
816The Kill Ring
817
818* Kill Ring Concepts:: What text looks like in the kill ring.
819* Kill Functions:: Functions that kill text.
820* Yank Commands:: Commands that access the kill ring.
821* Low-Level Kill Ring:: Functions and variables for kill ring access.
822* Internals of Kill Ring:: Variables that hold kill-ring data.
823
824Indentation
825
826* Primitive Indent:: Functions used to count and insert indentation.
827* Mode-Specific Indent:: Customize indentation for different modes.
828* Region Indent:: Indent all the lines in a region.
829* Relative Indent:: Indent the current line based on previous lines.
830* Indent Tabs:: Adjustable, typewriter-like tab stops.
831* Motion by Indent:: Move to first non-blank character.
832
833Searching and Matching
834
835* String Search:: Search for an exact match.
836* Regular Expressions:: Describing classes of strings.
837* Regexp Search:: Searching for a match for a regexp.
838* Match Data:: Finding out which part of the text matched
839 various parts of a regexp, after regexp search.
840* Saving Match Data:: Saving and restoring this information.
841* Standard Regexps:: Useful regexps for finding sentences, pages,...
842* Searching and Case:: Case-independent or case-significant searching.
843
844Regular Expressions
845
846* Syntax of Regexps:: Rules for writing regular expressions.
847* Regexp Example:: Illustrates regular expression syntax.
848
849Syntax Tables
850
851* Syntax Descriptors:: How characters are classified.
852* Syntax Table Functions:: How to create, examine and alter syntax tables.
853* Parsing Expressions:: Parsing balanced expressions
854 using the syntax table.
855* Standard Syntax Tables:: Syntax tables used by various major modes.
856* Syntax Table Internals:: How syntax table information is stored.
857
858Syntax Descriptors
859
860* Syntax Class Table:: Table of syntax classes.
861* Syntax Flags:: Additional flags each character can have.
862
863Abbrevs And Abbrev Expansion
864
865* Abbrev Mode:: Setting up Emacs for abbreviation.
866* Tables: Abbrev Tables. Creating and working with abbrev tables.
867* Defining Abbrevs:: Specifying abbreviations and their expansions.
868* Files: Abbrev Files. Saving abbrevs in files.
869* Expansion: Abbrev Expansion. Controlling expansion; expansion subroutines.
870* Standard Abbrev Tables:: Abbrev tables used by various major modes.
871
872Processes
873
874* Subprocess Creation:: Functions that start subprocesses.
875* Synchronous Processes:: Details of using synchronous subprocesses.
876* Asynchronous Processes:: Starting up an asynchronous subprocess.
877* Deleting Processes:: Eliminating an asynchronous subprocess.
878* Process Information:: Accessing run-status and other attributes.
879* Input to Processes:: Sending input to an asynchronous subprocess.
880* Signals to Processes:: Stopping, continuing or interrupting
881 an asynchronous subprocess.
882* Output from Processes:: Collecting output from an asynchronous subprocess.
883* Sentinels:: Sentinels run when process run-status changes.
884* Network:: Opening network connections.
885
886Receiving Output from Processes
887
888* Process Buffers:: If no filter, output is put in a buffer.
889* Filter Functions:: Filter functions accept output from the process.
890* Accepting Output:: How to wait until process output arrives.
891
892Operating System Interface
893
894* Starting Up:: Customizing Emacs start-up processing.
895* Getting Out:: How exiting works (permanent or temporary).
896* System Environment:: Distinguish the name and kind of system.
897* Terminal Input:: Recording terminal input for debugging.
898* Terminal Output:: Recording terminal output for debugging.
899* Flow Control:: How to turn output flow control on or off.
900* Batch Mode:: Running Emacs without terminal interaction.
901
902Starting Up Emacs
903
904* Start-up Summary:: Sequence of actions Emacs performs at start-up.
905* Init File:: Details on reading the init file (@file{.emacs}).
906* Terminal-Specific:: How the terminal-specific Lisp file is read.
907* Command Line Arguments:: How command line arguments are processed,
908 and how you can customize them.
909
910Getting out of Emacs
911
912* Killing Emacs:: Exiting Emacs irreversibly.
913* Suspending Emacs:: Exiting Emacs reversibly.
914
915Emacs Display
916
917* Refresh Screen:: Clearing the screen and redrawing everything on it.
918* Truncation:: Folding or wrapping long text lines.
919* The Echo Area:: Where messages are displayed.
920* Selective Display:: Hiding part of the buffer text.
921* Overlay Arrow:: Display of an arrow to indicate position.
922* Temporary Displays:: Displays that go away automatically.
923* Waiting:: Forcing display update and waiting for user.
924* Blinking:: How Emacs shows the matching open parenthesis.
925* Usual Display:: How control characters are displayed.
926* Beeping:: Audible signal to the user.
927* Window Systems:: Which window system is being used.
928
929GNU Emacs Internals
930
931* Building Emacs:: How to preload Lisp libraries into Emacs.
932* Pure Storage:: A kludge to make preloaded Lisp functions sharable.
933* Garbage Collection:: Reclaiming space for Lisp objects no longer used.
934* Object Internals:: Data formats of buffers, windows, processes.
935* Writing Emacs Primitives:: Writing C code for Emacs.
936
937Object Internals
938
939* Buffer Internals:: Components of a buffer structure.
940* Window Internals:: Components of a window structure.
941* Process Internals:: Components of a process structure.
942@end menu
943
944@c ================ Volume 1 ================
945
946@include intro.texi
947@include objects.texi
948@include numbers.texi
949@include strings.texi
950
951@include lists.texi
952@include sequences.texi
953@include symbols.texi
954@include eval.texi
955
956@include control.texi
957@include variables.texi
958@include functions.texi
959@include macros.texi
960
961@include loading.texi
962@include compile.texi
963@include debugging.texi
964@include streams.texi
965
966@include minibuf.texi
967@include commands.texi
968@include keymaps.texi
969@include modes.texi
970
971@c ================ Beginning of Volume 2 ================
972
973@c include help.texi
974@c include files.texi
975@c include backups.texi
976@c include buffers.texi
977
978@c include windows.texi
979@c include frames.texi
980@c include positions.texi
981@c include markers.texi
982@c include text.texi
983
984@c include searching.texi
985@c include syntax.texi
986@c include abbrevs.texi
987
988@c include processes.texi
989@c include os.texi
990@c include display.texi
cddd92e8
EZ
991
992@c MOVE to Emacs Manual: include misc-modes.texi
993
994@c appendices
995
996@c REMOVE this: include non-hacker.texi
997
998@c include tips.texi
999@c include internals.texi
1000@c include errors.texi
1001@c include locals.texi
1002@c include maps.texi
1003@c include hooks.texi
1004@c include anti.texi
1005
1006@include index-vol1.texi
1007
1008@page
1009@c Print the tables of contents
1010@summarycontents
1011@contents
1012@c That's all
1013
1014@bye
1015
1016\f
1017These words prevent "local variables" above from confusing Emacs.
ab5796a9
MB
1018
1019@ignore
1020 arch-tag: 9594760d-8801-4d1b-aeb9-f3b3166b5be2
1021@end ignore