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