Mercurial > emacs
annotate lispref/elisp.texi @ 16903:b1239a1ef6f2
Initial revision
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Tue, 21 Jan 1997 00:35:48 +0000 |
parents | 940b9fcc1da6 |
children | d2c67029b824 |
rev | line source |
---|---|
6451 | 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 | |
16735 | 8 This version is the edition 2.4.2 of the GNU Emacs Lisp |
16701
e7e2a025de92
Update edition to 2.4b.
Richard M. Stallman <rms@gnu.org>
parents:
15725
diff
changeset
|
9 Reference Manual. It corresponds to Emacs Version 19.34. |
6451 | 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 | |
15725 | 14 59 Temple Place, Suite 330 |
15 Boston, MA 02111-1307 USA | |
6451 | 16 |
15725 | 17 Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996 Free Software Foundation, Inc. |
6451 | 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 @syncodeindex tp fn | |
60 | |
61 @setchapternewpage odd | |
62 @finalout | |
63 | |
64 @titlepage | |
65 @title GNU Emacs Lisp Reference Manual | |
66 @subtitle GNU Emacs Version 19 | |
67 @subtitle for Unix Users | |
68 @c The edition number appears in several places in this file | |
69 @c and also in the file intro.texi. | |
16735 | 70 @subtitle Revision 2.4.2, December 1996 |
6451 | 71 |
72 @author by Bil Lewis, Dan LaLiberte, Richard Stallman | |
73 @author and the GNU Manual Group | |
74 @page | |
75 @vskip 0pt plus 1filll | |
15725 | 76 Copyright @copyright{} 1990, 1991, 1992, 1993, 1994, 1995, 1996 Free Software Foundation, Inc. |
6451 | 77 |
78 @sp 2 | |
16735 | 79 Edition 2.4.2 @* |
16701
e7e2a025de92
Update edition to 2.4b.
Richard M. Stallman <rms@gnu.org>
parents:
15725
diff
changeset
|
80 Revised for Emacs Version 19.34,@* |
15725 | 81 July 1996.@* |
6451 | 82 @sp 2 |
12067 | 83 ISBN 1-882114-71-X |
6451 | 84 |
85 @sp 2 | |
86 Published by the Free Software Foundation @* | |
15725 | 87 59 Temple Place, Suite 330@* |
88 Boston, MA 02111-1307 USA | |
6451 | 89 |
90 Permission is granted to make and distribute verbatim copies of this | |
91 manual provided the copyright notice and this permission notice are | |
92 preserved on all copies. | |
93 | |
94 Permission is granted to copy and distribute modified versions of this | |
95 manual under the conditions for verbatim copying, provided also that the | |
96 section entitled ``GNU General Public License'' is included | |
97 exactly as in the original, and provided that the entire resulting | |
98 derived work is distributed under the terms of a permission notice | |
99 identical to this one. | |
100 | |
101 Permission is granted to copy and distribute translations of this manual | |
102 into another language, under the above conditions for modified versions, | |
103 except that the section entitled ``GNU General Public License'' may be | |
104 included in a translation approved by the Free Software Foundation | |
105 instead of in the original English. | |
106 | |
107 Cover art by Etienne Suvasa. | |
108 @end titlepage | |
109 @page | |
110 | |
111 @node Top, Copying, (dir), (dir) | |
112 | |
113 @ifinfo | |
16735 | 114 This Info file contains edition 2.4.2 of the GNU Emacs Lisp |
16701
e7e2a025de92
Update edition to 2.4b.
Richard M. Stallman <rms@gnu.org>
parents:
15725
diff
changeset
|
115 Reference Manual, corresponding to GNU Emacs version 19.34. |
6451 | 116 @end ifinfo |
117 | |
118 @menu | |
119 * Copying:: Conditions for copying and changing GNU Emacs. | |
120 * Introduction:: Introduction and conventions used. | |
121 | |
7337
cd57cd335fff
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
6451
diff
changeset
|
122 * Lisp Data Types:: Data types of objects in Emacs Lisp. |
6451 | 123 * Numbers:: Numbers and arithmetic functions. |
124 * Strings and Characters:: Strings, and functions that work on them. | |
125 * Lists:: Lists, cons cells, and related functions. | |
126 * Sequences Arrays Vectors:: Lists, strings and vectors are called sequences. | |
127 Certain functions act on any kind of sequence. | |
128 The description of vectors is here as well. | |
129 * Symbols:: Symbols represent names, uniquely. | |
130 | |
131 * Evaluation:: How Lisp expressions are evaluated. | |
132 * Control Structures:: Conditionals, loops, nonlocal exits. | |
133 * Variables:: Using symbols in programs to stand for values. | |
134 * Functions:: A function is a Lisp program | |
135 that can be invoked from other functions. | |
136 * Macros:: Macros are a way to extend the Lisp language. | |
137 | |
138 * Loading:: Reading files of Lisp code into Lisp. | |
139 * Byte Compilation:: Compilation makes programs run faster. | |
140 * Debugging:: Tools and tips for debugging Lisp programs. | |
141 | |
7337
cd57cd335fff
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
6451
diff
changeset
|
142 * Read and Print:: Converting Lisp objects to text and back. |
6451 | 143 * Minibuffers:: Using the minibuffer to read input. |
144 * Command Loop:: How the editor command loop works, | |
145 and how you can call its subroutines. | |
146 * Keymaps:: Defining the bindings from keys to commands. | |
147 * Modes:: Defining major and minor modes. | |
148 * Documentation:: Writing and using documentation strings. | |
149 | |
150 * Files:: Accessing files. | |
151 * Backups and Auto-Saving:: Controlling how backups and auto-save | |
152 files are made. | |
153 * Buffers:: Creating and using buffer objects. | |
154 * Windows:: Manipulating windows and displaying buffers. | |
155 * Frames:: Making multiple X windows. | |
156 * Positions:: Buffer positions and motion functions. | |
157 * Markers:: Markers represent positions and update | |
158 automatically when the text is changed. | |
159 | |
160 * Text:: Examining and changing text in buffers. | |
161 * Searching and Matching:: Searching buffers for strings or regexps. | |
162 * Syntax Tables:: The syntax table controls word and list parsing. | |
163 * Abbrevs:: How Abbrev mode works, and its data structures. | |
164 | |
165 * Processes:: Running and communicating with subprocesses. | |
166 * System Interface:: Getting the user id, system type, environment | |
167 variables, and other such things. | |
168 * Display:: Parameters controlling screen usage. | |
169 The bell. Waiting for input. | |
170 * Calendar:: Customizing the calendar and diary. | |
171 | |
172 Appendices | |
173 | |
174 * Tips:: Advice for writing Lisp programs. | |
175 * GNU Emacs Internals:: Building and dumping Emacs; | |
176 internal data structures. | |
177 * Standard Errors:: List of all error symbols. | |
178 * Standard Buffer-Local Variables:: List of variables local in all buffers. | |
179 * Standard Keymaps:: List of standard keymaps. | |
180 * Standard Hooks:: List of standard hook variables. | |
181 | |
182 * Index:: Index including concepts, functions, variables, | |
183 and other terms. | |
184 | |
185 --- The Detailed Node Listing --- | |
186 | |
187 Here are other nodes that are inferiors of those already listed, | |
188 mentioned here so you can get to them in one step: | |
189 | |
190 Introduction | |
191 | |
192 * Caveats:: Flaws and a request for help. | |
193 * Lisp History:: Emacs Lisp is descended from Maclisp. | |
194 * Conventions:: How the manual is formatted. | |
195 * Acknowledgements:: The authors, editors, and sponsors of this manual. | |
196 | |
197 Conventions | |
198 | |
199 * Some Terms:: Explanation of terms we use in this manual. | |
200 * nil and t:: How the symbols @code{nil} and @code{t} are used. | |
201 * Evaluation Notation:: The format we use for examples of evaluation. | |
202 * Printing Notation:: The format we use for examples that print output. | |
203 * Error Messages:: The format we use for examples of errors. | |
204 * Buffer Text Notation:: The format we use for buffer contents in examples. | |
205 * Format of Descriptions:: Notation for describing functions, variables, etc. | |
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. | |
7337
cd57cd335fff
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
6451
diff
changeset
|
228 * Cons Cell Type:: Cons cells, and lists (which are made from cons cells). |
6451 | 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. | |
7337
cd57cd335fff
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
6451
diff
changeset
|
234 * Function Type:: A piece of executable code you can call from elsewhere. |
cd57cd335fff
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
6451
diff
changeset
|
235 * Macro Type:: A method of expanding an expression into another |
6451 | 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 * Syntax Table Type:: What a character means. | |
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. | |
12067 | 267 * Math Functions:: Trig, exponential and logarithmic functions. |
6451 | 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 analog of @code{printf}. | |
278 * Character Case:: Case conversion functions. | |
279 | |
280 Lists | |
281 | |
282 * Cons Cells:: How lists are made out of cons cells. | |
283 * Lists as Boxes:: Graphical notation to explain lists. | |
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. | |
7337
cd57cd335fff
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
6451
diff
changeset
|
355 * Error Symbols:: How errors are classified for trapping them. |
6451 | 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 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 | |
418 Loading | |
419 | |
420 * How Programs Do Loading:: The @code{load} function and others. | |
421 * Autoload:: Setting up a function to autoload. | |
12098 | 422 * Named Features:: Loading a library if it isn't already loaded. |
6451 | 423 * Repeated Loading:: Precautions about loading a file twice. |
424 | |
425 Byte Compilation | |
426 | |
427 * Compilation Functions:: Byte compilation functions. | |
428 * Disassembly:: Disassembling byte-code; how to read byte-code. | |
429 | |
430 Debugging Lisp Programs | |
431 | |
432 * Debugger:: How the Emacs Lisp debugger is implemented. | |
433 * Syntax Errors:: How to find syntax errors. | |
434 * Compilation Errors:: How to find errors that show up in | |
435 byte compilation. | |
436 * Edebug:: A source-level Emacs Lisp debugger. | |
437 | |
438 The Lisp Debugger | |
439 | |
440 * Error Debugging:: Entering the debugger when an error happens. | |
441 * Function Debugging:: Entering it when a certain function is called. | |
442 * Explicit Debug:: Entering it at a certain point in the program. | |
443 * Using Debugger:: What the debugger does; what you see while in it. | |
444 * Debugger Commands:: Commands used while in the debugger. | |
445 * Invoking the Debugger:: How to call the function @code{debug}. | |
446 * Internals of Debugger:: Subroutines of the debugger, and global variables. | |
447 | |
448 Debugging Invalid Lisp Syntax | |
449 | |
450 * Excess Open:: How to find a spurious open paren or missing close. | |
451 * Excess Close:: How to find a spurious close paren or missing open. | |
452 | |
453 Reading and Printing Lisp Objects | |
454 | |
455 * Streams Intro:: Overview of streams, reading and printing. | |
456 * Input Streams:: Various data types that can be used as | |
457 input streams. | |
458 * Input Functions:: Functions to read Lisp objects from text. | |
459 * Output Streams:: Various data types that can be used as | |
460 output streams. | |
461 * Output Functions:: Functions to print Lisp objects as text. | |
462 | |
463 Minibuffers | |
464 | |
465 * Intro to Minibuffers:: Basic information about minibuffers. | |
466 * Text from Minibuffer:: How to read a straight text string. | |
467 * Object from Minibuffer:: How to read a Lisp object or expression. | |
468 * Completion:: How to invoke and customize completion. | |
469 * Yes-or-No Queries:: Asking a question with a simple answer. | |
470 * Minibuffer Misc:: Various customization hooks and variables. | |
471 | |
472 Completion | |
473 | |
474 * Basic Completion:: Low-level functions for completing strings. | |
475 (These are too low level to use the minibuffer.) | |
476 * Minibuffer Completion:: Invoking the minibuffer with completion. | |
477 * Completion Commands:: Minibuffer commands that do completion. | |
478 * High-Level Completion:: Convenient special cases of completion | |
479 (reading buffer name, file name, etc.) | |
480 * Reading File Names:: Using completion to read file names. | |
481 * Programmed Completion:: Finding the completions for a given file name. | |
482 | |
483 Command Loop | |
484 | |
485 * Command Overview:: How the command loop reads commands. | |
486 * Defining Commands:: Specifying how a function should read arguments. | |
487 * Interactive Call:: Calling a command, so that it will read arguments. | |
488 * Command Loop Info:: Variables set by the command loop for you to examine. | |
489 * Input Events:: What input looks like when you read it. | |
490 * Reading Input:: How to read input events from the keyboard or mouse. | |
491 * Waiting:: Waiting for user input or elapsed time. | |
492 * Quitting:: How @kbd{C-g} works. How to catch or defer quitting. | |
493 * Prefix Command Arguments:: How the commands to set prefix args work. | |
494 * Recursive Editing:: Entering a recursive edit, | |
495 and why you usually shouldn't. | |
496 * Disabling Commands:: How the command loop handles disabled commands. | |
497 * Command History:: How the command history is set up, and how accessed. | |
498 * Keyboard Macros:: How keyboard macros are implemented. | |
499 | |
500 Defining Commands | |
501 | |
502 * Using Interactive:: General rules for @code{interactive}. | |
503 * Interactive Codes:: The standard letter-codes for reading arguments | |
504 in various ways. | |
505 * Interactive Examples:: Examples of how to read interactive arguments. | |
506 | |
507 Keymaps | |
508 | |
509 * Keymap Terminology:: Definitions of terms pertaining to keymaps. | |
510 * Format of Keymaps:: What a keymap looks like as a Lisp object. | |
511 * Creating Keymaps:: Functions to create and copy keymaps. | |
512 * Inheritance and Keymaps:: How one keymap can inherit the bindings | |
513 of another keymap. | |
514 * Prefix Keys:: Defining a key with a keymap as its definition. | |
515 * Menu Keymaps:: A keymap can define a menu for X windows | |
516 or for use from the terminal. | |
517 * Active Keymaps:: Each buffer has a local keymap | |
518 to override the standard (global) bindings. | |
519 Each minor mode can also override them. | |
520 * Key Lookup:: How extracting elements from keymaps works. | |
521 * Functions for Key Lookup:: How to request key lookup. | |
522 * Changing Key Bindings:: Redefining a key in a keymap. | |
523 * Key Binding Commands:: Interactive interfaces for redefining keys. | |
524 * Scanning Keymaps:: Looking through all keymaps, for printing help. | |
525 | |
526 Major and Minor Modes | |
527 | |
528 * Major Modes:: Defining major modes. | |
529 * Minor Modes:: Defining minor modes. | |
530 * Mode Line Format:: Customizing the text that appears in the mode line. | |
531 * Hooks:: How to use hooks; how to write code that | |
532 provides hooks. | |
533 | |
534 Major Modes | |
535 | |
536 * Major Mode Conventions:: Coding conventions for keymaps, etc. | |
537 * Example Major Modes:: Text mode and Lisp modes. | |
538 * Auto Major Mode:: How Emacs chooses the major mode automatically. | |
539 * Mode Help:: Finding out how to use a mode. | |
540 | |
541 Minor Modes | |
542 | |
543 * Minor Mode Conventions:: Tips for writing a minor mode. | |
544 * Keymaps and Minor Modes:: How a minor mode can have its own keymap. | |
545 | |
546 Mode Line Format | |
547 | |
548 * Mode Line Data:: The data structure that controls the mode line. | |
549 * Mode Line Variables:: Variables used in that data structure. | |
550 * %-Constructs:: Putting information into a mode line. | |
551 | |
552 Documentation | |
553 | |
554 * Documentation Basics:: Good style for doc strings. | |
555 Where to put them. How Emacs stores them. | |
556 * Accessing Documentation:: How Lisp programs can access doc strings. | |
557 * Keys in Documentation:: Substituting current key bindings. | |
558 * Describing Characters:: Making printable descriptions of | |
559 non-printing characters and key sequences. | |
560 * Help Functions:: Subroutines used by Emacs help facilities. | |
561 | |
562 Files | |
563 | |
564 * Visiting Files:: Reading files into Emacs buffers for editing. | |
565 * Saving Buffers:: Writing changed buffers back into files. | |
566 * Reading from Files:: Reading files into other buffers. | |
567 * Writing to Files:: Writing new files from parts of buffers. | |
568 * File Locks:: Locking and unlocking files, to prevent | |
569 simultaneous editing by two people. | |
570 * Information about Files:: Testing existence, accessibility, size of files. | |
571 * Contents of Directories:: Getting a list of the files in a directory. | |
572 * Changing File Attributes:: Renaming files, changing protection, etc. | |
573 * File Names:: Decomposing and expanding file names. | |
574 | |
575 Visiting Files | |
576 | |
577 * Visiting Functions:: The usual interface functions for visiting. | |
578 * Subroutines of Visiting:: Lower-level subroutines that they use. | |
579 | |
580 Information about Files | |
581 | |
582 * Testing Accessibility:: Is a given file readable? Writable? | |
583 * Kinds of Files:: Is it a directory? A link? | |
584 * File Attributes:: How large is it? Any other names? Etc. | |
585 | |
586 File Names | |
587 | |
588 * File Name Components:: The directory part of a file name, and the rest. | |
589 * Directory Names:: A directory's name as a directory | |
590 is different from its name as a file. | |
591 * Relative File Names:: Some file names are relative to a | |
592 current directory. | |
593 * File Name Expansion:: Converting relative file names to absolute ones. | |
594 * Unique File Names:: Generating names for temporary files. | |
595 * File Name Completion:: Finding the completions for a given file name. | |
596 | |
597 Backups and Auto-Saving | |
598 | |
599 * Backup Files:: How backup files are made; how their names | |
600 are chosen. | |
601 * Auto-Saving:: How auto-save files are made; how their | |
602 names are chosen. | |
603 * Reverting:: @code{revert-buffer}, and how to customize | |
604 what it does. | |
605 | |
606 Backup Files | |
607 | |
608 * Making Backups:: How Emacs makes backup files, and when. | |
609 * Rename or Copy:: Two alternatives: renaming the old file | |
610 or copying it. | |
611 * Numbered Backups:: Keeping multiple backups for each source file. | |
612 * Backup Names:: How backup file names are computed; customization. | |
613 | |
614 Buffers | |
615 | |
616 * Buffer Basics:: What is a buffer? | |
617 * Buffer Names:: Accessing and changing buffer names. | |
618 * Buffer File Name:: The buffer file name indicates which file | |
619 is visited. | |
620 * Buffer Modification:: A buffer is @dfn{modified} if it needs to be saved. | |
621 * Modification Time:: Determining whether the visited file was changed | |
622 ``behind Emacs's back''. | |
623 * Read Only Buffers:: Modifying text is not allowed in a | |
624 read-only buffer. | |
625 * The Buffer List:: How to look at all the existing buffers. | |
626 * Creating Buffers:: Functions that create buffers. | |
627 * Killing Buffers:: Buffers exist until explicitly killed. | |
628 * Current Buffer:: Designating a buffer as current | |
629 so primitives will access its contents. | |
630 | |
631 Windows | |
632 | |
633 * Basic Windows:: Basic information on using windows. | |
634 * Splitting Windows:: Splitting one window into two windows. | |
635 * Deleting Windows:: Deleting a window gives its space to other windows. | |
636 * Selecting Windows:: The selected window is the one that you edit in. | |
637 * Cyclic Window Ordering:: Moving around the existing windows. | |
638 * Buffers and Windows:: Each window displays the contents of a buffer. | |
639 * Displaying Buffers:: Higher-lever functions for displaying a buffer | |
640 and choosing a window for it. | |
641 * Window Point:: Each window has its own location of point. | |
642 * Window Start:: The display-start position controls which text | |
643 is on-screen in the window. | |
644 * Vertical Scrolling:: Moving text up and down in the window. | |
15725 | 645 * Scrolling Hooks:: Hooks that run when you scroll a window. |
6451 | 646 * Horizontal Scrolling:: Moving text sideways on the window. |
647 * Size of Window:: Accessing the size of a window. | |
648 * Resizing Windows:: Changing the size of a window. | |
649 * Window Configurations:: Saving and restoring the state of the screen. | |
650 | |
12098 | 651 Frames |
652 | |
653 * Creating Frames:: Creating additional frames. | |
654 * Multiple Displays:: Creating frames on other X displays. | |
655 * Frame Parameters:: Controlling frame size, position, font, etc. | |
656 * Frame Titles:: Automatic updating of frame titles. | |
657 * Deleting Frames:: Frames last until explicitly deleted. | |
658 * Finding All Frames:: How to examine all existing frames. | |
659 * Frames and Windows:: A frame contains windows; | |
660 display of text always works through windows. | |
661 * Minibuffers and Frames:: How a frame finds the minibuffer to use. | |
662 * Input Focus:: Specifying the selected frame. | |
663 * Visibility of Frames:: Frames may be visible or invisible, or icons. | |
664 * Raising and Lowering:: Raising a frame makes it hide other X windows; | |
665 lowering it makes the others hide them. | |
666 * Frame Configurations:: Saving the state of all frames. | |
667 * Mouse Tracking:: Getting events that say when the mouse moves. | |
668 * Mouse Position:: Asking where the mouse is, or moving it. | |
669 * Pop-Up Menus:: Displaying a menu for the user to select from. | |
670 * Dialog Boxes:: Displaying a box to ask yes or no. | |
671 * Pointer Shapes:: Specifying the shape of the mouse pointer. | |
672 * X Selections:: Transferring text to and from other X clients. | |
673 * Color Names:: Getting the definitions of color names. | |
674 * Resources:: Getting resource values from the server. | |
675 * Server Data:: Getting info about the X server. | |
676 | |
6451 | 677 Positions |
678 | |
679 * Point:: The special position where editing takes place. | |
680 * Motion:: Changing point. | |
681 * Excursions:: Temporary motion and buffer changes. | |
682 * Narrowing:: Restricting editing to a portion of the buffer. | |
683 | |
684 Motion | |
685 | |
686 * Character Motion:: Moving in terms of characters. | |
687 * Word Motion:: Moving in terms of words. | |
688 * Buffer End Motion:: Moving to the beginning or end of the buffer. | |
689 * Text Lines:: Moving in terms of lines of text. | |
690 * Screen Lines:: Moving in terms of lines as displayed. | |
691 * List Motion:: Moving by parsing lists and sexps. | |
692 * Skipping Characters:: Skipping characters belonging to a certain set. | |
693 | |
694 Markers | |
695 | |
696 * Overview of Markers:: The components of a marker, and how it relocates. | |
697 * Predicates on Markers:: Testing whether an object is a marker. | |
698 * Creating Markers:: Making empty markers or markers at certain places. | |
699 * Information from Markers:: Finding the marker's buffer or character | |
700 position. | |
701 * Changing Markers:: Moving the marker to a new buffer or position. | |
702 * The Mark:: How ``the mark'' is implemented with a marker. | |
703 * The Region:: How to access ``the region''. | |
704 | |
705 Text | |
706 | |
707 * Near Point:: Examining text in the vicinity of point. | |
708 * Buffer Contents:: Examining text in a general fashion. | |
709 * Insertion:: Adding new text to a buffer. | |
710 * Commands for Insertion:: User-level commands to insert text. | |
711 * Deletion:: Removing text from a buffer. | |
712 * User-Level Deletion:: User-level commands to delete text. | |
713 * The Kill Ring:: Where removed text sometimes is saved for | |
714 later use. | |
715 * Undo:: Undoing changes to the text of a buffer. | |
716 * Auto Filling:: How auto-fill mode is implemented to break lines. | |
717 * Filling:: Functions for explicit filling. | |
12098 | 718 * Margins:: How to specify margins for filling commands. |
6451 | 719 * Sorting:: Functions for sorting parts of the buffer. |
720 * Indentation:: Functions to insert or adjust indentation. | |
721 * Columns:: Computing horizontal positions, and using them. | |
722 * Case Changes:: Case conversion of parts of the buffer. | |
15725 | 723 * Text Properties:: Assigning Lisp property lists to text characters. |
6451 | 724 * Substitution:: Replacing a given character wherever it appears. |
15725 | 725 * Transposition:: Swapping two portions of a buffer. |
6451 | 726 * Registers:: How registers are implemented. Accessing |
727 the text or position stored in a register. | |
15725 | 728 * Change Hooks:: Supplying functions to be run when text is changed. |
6451 | 729 |
730 The Kill Ring | |
731 | |
732 * Kill Ring Concepts:: What text looks like in the kill ring. | |
733 * Kill Functions:: Functions that kill text. | |
734 * Yank Commands:: Commands that access the kill ring. | |
12067 | 735 * Low-Level Kill Ring:: Functions and variables for kill ring access. |
6451 | 736 * Internals of Kill Ring:: Variables that hold kill-ring data. |
737 | |
738 Indentation | |
739 | |
740 * Primitive Indent:: Functions used to count and insert indentation. | |
741 * Mode-Specific Indent:: Customize indentation for different modes. | |
742 * Region Indent:: Indent all the lines in a region. | |
743 * Relative Indent:: Indent the current line based on previous lines. | |
744 * Indent Tabs:: Adjustable, typewriter-like tab stops. | |
745 * Motion by Indent:: Move to first non-blank character. | |
746 | |
15725 | 747 Text Properties |
748 | |
749 * Examining Properties:: Looking at the properties of one character. | |
750 * Changing Properties:: Setting the properties of a range of text. | |
751 * Property Search:: Searching for where a property changes value. | |
752 * Special Properties:: Particular properties with special meanings. | |
753 * Format Properties:: Properties for representing formatting of text. | |
754 * Sticky Properties:: How inserted text gets properties from | |
755 neighboring text. | |
756 * Saving Properties:: Saving text properties in files, and reading | |
757 them back. | |
758 * Lazy Properties:: Computing text properties in a lazy fashion | |
759 only when text is examined. | |
760 * Not Intervals:: Why text properties do not use | |
761 Lisp-visible text intervals. | |
762 | |
6451 | 763 Searching and Matching |
764 | |
765 * String Search:: Search for an exact match. | |
766 * Regular Expressions:: Describing classes of strings. | |
767 * Regexp Search:: Searching for a match for a regexp. | |
768 * Match Data:: Finding out which part of the text matched | |
769 various parts of a regexp, after regexp search. | |
770 * Saving Match Data:: Saving and restoring this information. | |
771 * Standard Regexps:: Useful regexps for finding sentences, pages,... | |
772 * Searching and Case:: Case-independent or case-significant searching. | |
773 | |
774 Regular Expressions | |
775 | |
776 * Syntax of Regexps:: Rules for writing regular expressions. | |
777 * Regexp Example:: Illustrates regular expression syntax. | |
778 | |
779 Syntax Tables | |
780 | |
781 * Syntax Descriptors:: How characters are classified. | |
782 * Syntax Table Functions:: How to create, examine and alter syntax tables. | |
783 * Parsing Expressions:: Parsing balanced expressions | |
784 using the syntax table. | |
785 * Standard Syntax Tables:: Syntax tables used by various major modes. | |
786 * Syntax Table Internals:: How syntax table information is stored. | |
787 | |
788 Syntax Descriptors | |
789 | |
790 * Syntax Class Table:: Table of syntax classes. | |
791 * Syntax Flags:: Additional flags each character can have. | |
792 | |
793 Abbrevs And Abbrev Expansion | |
794 | |
795 * Abbrev Mode:: Setting up Emacs for abbreviation. | |
796 * Tables: Abbrev Tables. Creating and working with abbrev tables. | |
797 * Defining Abbrevs:: Specifying abbreviations and their expansions. | |
798 * Files: Abbrev Files. Saving abbrevs in files. | |
799 * Expansion: Abbrev Expansion. Controlling expansion; expansion subroutines. | |
800 * Standard Abbrev Tables:: Abbrev tables used by various major modes. | |
801 | |
802 Processes | |
803 | |
804 * Subprocess Creation:: Functions that start subprocesses. | |
805 * Synchronous Processes:: Details of using synchronous subprocesses. | |
806 * Asynchronous Processes:: Starting up an asynchronous subprocess. | |
807 * Deleting Processes:: Eliminating an asynchronous subprocess. | |
808 * Process Information:: Accessing run-status and other attributes. | |
809 * Input to Processes:: Sending input to an asynchronous subprocess. | |
810 * Signals to Processes:: Stopping, continuing or interrupting | |
811 an asynchronous subprocess. | |
812 * Output from Processes:: Collecting output from an asynchronous subprocess. | |
813 * Sentinels:: Sentinels run when process run-status changes. | |
12098 | 814 * Network:: Opening network connections. |
6451 | 815 |
816 Receiving Output from Processes | |
817 | |
818 * Process Buffers:: If no filter, output is put in a buffer. | |
819 * Filter Functions:: Filter functions accept output from the process. | |
820 * Accepting Output:: How to wait until process output arrives. | |
821 | |
822 Operating System Interface | |
823 | |
824 * Starting Up:: Customizing Emacs start-up processing. | |
825 * Getting Out:: How exiting works (permanent or temporary). | |
826 * System Environment:: Distinguish the name and kind of system. | |
827 * Terminal Input:: Recording terminal input for debugging. | |
828 * Terminal Output:: Recording terminal output for debugging. | |
829 * Flow Control:: How to turn output flow control on or off. | |
830 * Batch Mode:: Running Emacs without terminal interaction. | |
831 | |
832 Starting Up Emacs | |
833 | |
834 * Start-up Summary:: Sequence of actions Emacs performs at start-up. | |
835 * Init File:: Details on reading the init file (@file{.emacs}). | |
836 * Terminal-Specific:: How the terminal-specific Lisp file is read. | |
837 * Command Line Arguments:: How command line arguments are processed, | |
838 and how you can customize them. | |
839 | |
840 Getting out of Emacs | |
841 | |
842 * Killing Emacs:: Exiting Emacs irreversibly. | |
843 * Suspending Emacs:: Exiting Emacs reversibly. | |
844 | |
845 Emacs Display | |
846 | |
847 * Refresh Screen:: Clearing the screen and redrawing everything on it. | |
848 * Truncation:: Folding or wrapping long text lines. | |
849 * The Echo Area:: Where messages are displayed. | |
850 * Selective Display:: Hiding part of the buffer text. | |
851 * Overlay Arrow:: Display of an arrow to indicate position. | |
852 * Temporary Displays:: Displays that go away automatically. | |
853 * Waiting:: Forcing display update and waiting for user. | |
854 * Blinking:: How Emacs shows the matching open parenthesis. | |
855 * Usual Display:: How control characters are displayed. | |
856 * Beeping:: Audible signal to the user. | |
857 * Window Systems:: Which window system is being used. | |
858 | |
859 GNU Emacs Internals | |
860 | |
861 * Building Emacs:: How to preload Lisp libraries into Emacs. | |
862 * Pure Storage:: A kludge to make preloaded Lisp functions sharable. | |
863 * Garbage Collection:: Reclaiming space for Lisp objects no longer used. | |
864 * Object Internals:: Data formats of buffers, windows, processes. | |
865 * Writing Emacs Primitives:: Writing C code for Emacs. | |
866 | |
867 Object Internals | |
868 | |
869 * Buffer Internals:: Components of a buffer structure. | |
870 * Window Internals:: Components of a window structure. | |
871 * Process Internals:: Components of a process structure. | |
872 @end menu | |
873 | |
874 @include intro.texi | |
875 @include objects.texi | |
876 @include numbers.texi | |
877 @include strings.texi | |
878 | |
879 @include lists.texi | |
880 @include sequences.texi | |
881 @include symbols.texi | |
882 @include eval.texi | |
883 | |
884 @include control.texi | |
885 @include variables.texi | |
886 @include functions.texi | |
887 @include macros.texi | |
888 | |
889 @include loading.texi | |
890 @include compile.texi | |
891 @include debugging.texi | |
892 @include streams.texi | |
893 | |
894 @include minibuf.texi | |
895 @include commands.texi | |
896 @include keymaps.texi | |
897 @include modes.texi | |
898 | |
899 @include help.texi | |
900 @include files.texi | |
901 @include backups.texi | |
902 @include buffers.texi | |
903 | |
904 @include windows.texi | |
905 @include frames.texi | |
906 @include positions.texi | |
907 @include markers.texi | |
908 @include text.texi | |
909 | |
910 @include searching.texi | |
911 @include syntax.texi | |
912 @include abbrevs.texi | |
913 | |
914 @include processes.texi | |
915 @include os.texi | |
916 @include display.texi | |
917 @include calendar.texi | |
918 | |
919 @c MOVE to Emacs Manual: include misc-modes.texi | |
920 | |
921 @c appendices | |
922 | |
923 @c REMOVE this: include non-hacker.texi | |
924 | |
925 @include tips.texi | |
926 @include internals.texi | |
927 @include errors.texi | |
928 @include locals.texi | |
929 @include maps.texi | |
930 @include hooks.texi | |
931 | |
932 @include index.texi | |
933 | |
934 @c Print the tables of contents | |
935 @summarycontents | |
936 @contents | |
937 @c That's all | |
938 | |
939 @bye | |
940 | |
941 | |
942 These words prevent "local variables" above from confusing Emacs. |