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