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