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