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