Mercurial > emacs
annotate lispref/elisp.texi @ 13468:2c8da6b3b9e0
(server-log): Record the current time.
End with newline whenever STRING doesn't end with one.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Fri, 10 Nov 1995 17:01:59 +0000 |
parents | a6eb5f12b0f3 |
children | bf32c17c153b |
rev | line source |
---|---|
6451 | 1 \input texinfo @c -*-texinfo-*- |
2 @c %**start of header | |
3 @setfilename elisp | |
4 @smallbook | |
5 @settitle GNU Emacs Lisp Reference Manual | |
6 @c %**end of header | |
7 | |
8 @ifinfo | |
12067 | 9 This version is the edition 2.4 of the GNU Emacs Lisp |
10 Reference Manual. It corresponds to Emacs Version 19.29. | |
6451 | 11 @c Please REMEMBER to update edition number in *four* places in this file |
12 @c and also in *one* place in intro.texi | |
13 | |
14 Published by the Free Software Foundation | |
15 675 Massachusetts Avenue | |
16 Cambridge, MA 02139 USA | |
17 | |
12067 | 18 Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc. |
6451 | 19 |
20 Permission is granted to make and distribute verbatim copies of this | |
21 manual provided the copyright notice and this permission notice are | |
22 preserved on all copies. | |
23 | |
24 @ignore | |
25 Permission is granted to process this file through TeX and print the | |
26 results, provided the printed document carries copying permission notice | |
27 identical to this one except for the removal of this paragraph (this | |
28 paragraph not being relevant to the printed manual). | |
29 | |
30 @end ignore | |
31 Permission is granted to copy and distribute modified versions of this | |
32 manual under the conditions for verbatim copying, provided that the | |
33 entire resulting derived work is distributed under the terms of a | |
34 permission notice identical to this one. | |
35 | |
36 Permission is granted to copy and distribute translations of this manual | |
37 into another language, under the above conditions for modified versions, | |
38 except that this permission notice may be stated in a translation | |
39 approved by the Foundation. | |
40 | |
41 Permission is granted to copy and distribute modified versions of this | |
42 manual under the conditions for verbatim copying, provided also that the | |
43 section entitled ``GNU General Public License'' is included exactly as | |
44 in the original, and provided that the entire resulting derived work is | |
45 distributed under the terms of a permission notice identical to this | |
46 one. | |
47 | |
48 Permission is granted to copy and distribute translations of this manual | |
49 into another language, under the above conditions for modified versions, | |
50 except that the section entitled ``GNU General Public License'' may be | |
51 included in a translation approved by the Free Software Foundation | |
52 instead of in the original English. | |
53 @end ifinfo | |
54 | |
55 @c Combine indices. | |
56 @synindex cp fn | |
57 @syncodeindex vr fn | |
58 @syncodeindex ky fn | |
59 @syncodeindex pg fn | |
60 @syncodeindex tp fn | |
61 | |
62 @setchapternewpage odd | |
63 @finalout | |
64 | |
65 @titlepage | |
66 @title GNU Emacs Lisp Reference Manual | |
67 @subtitle GNU Emacs Version 19 | |
68 @subtitle for Unix Users | |
69 @c The edition number appears in several places in this file | |
70 @c and also in the file intro.texi. | |
12067 | 71 @subtitle Revision 2.4, June 1995 |
6451 | 72 |
73 @author by Bil Lewis, Dan LaLiberte, Richard Stallman | |
74 @author and the GNU Manual Group | |
75 @page | |
76 @vskip 0pt plus 1filll | |
12067 | 77 Copyright @copyright{} 1990, 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc. |
6451 | 78 |
79 @sp 2 | |
12067 | 80 Edition 2.4 @* |
81 Revised for Emacs Version 19.29,@* | |
82 June, 1995.@* | |
6451 | 83 @sp 2 |
12067 | 84 ISBN 1-882114-71-X |
6451 | 85 |
86 @sp 2 | |
87 Published by the Free Software Foundation @* | |
88 675 Massachusetts Avenue @* | |
89 Cambridge, MA 02139 USA | |
90 | |
91 Permission is granted to make and distribute verbatim copies of this | |
92 manual provided the copyright notice and this permission notice are | |
93 preserved on all copies. | |
94 | |
95 Permission is granted to copy and distribute modified versions of this | |
96 manual under the conditions for verbatim copying, provided also that the | |
97 section entitled ``GNU General Public License'' is included | |
98 exactly as in the original, and provided that the entire resulting | |
99 derived work is distributed under the terms of a permission notice | |
100 identical to this one. | |
101 | |
102 Permission is granted to copy and distribute translations of this manual | |
103 into another language, under the above conditions for modified versions, | |
104 except that the section entitled ``GNU General Public License'' may be | |
105 included in a translation approved by the Free Software Foundation | |
106 instead of in the original English. | |
107 | |
108 Cover art by Etienne Suvasa. | |
109 @end titlepage | |
110 @page | |
111 | |
112 @node Top, Copying, (dir), (dir) | |
113 | |
114 @ifinfo | |
12067 | 115 This Info file contains edition 2.4 of the GNU Emacs Lisp |
116 Reference Manual, corresponding to GNU Emacs version 19.29. | |
6451 | 117 @end ifinfo |
118 | |
119 @menu | |
120 * Copying:: Conditions for copying and changing GNU Emacs. | |
121 * Introduction:: Introduction and conventions used. | |
122 | |
7337
cd57cd335fff
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
6451
diff
changeset
|
123 * Lisp Data Types:: Data types of objects in Emacs Lisp. |
6451 | 124 * Numbers:: Numbers and arithmetic functions. |
125 * Strings and Characters:: Strings, and functions that work on them. | |
126 * Lists:: Lists, cons cells, and related functions. | |
127 * Sequences Arrays Vectors:: Lists, strings and vectors are called sequences. | |
128 Certain functions act on any kind of sequence. | |
129 The description of vectors is here as well. | |
130 * Symbols:: Symbols represent names, uniquely. | |
131 | |
132 * Evaluation:: How Lisp expressions are evaluated. | |
133 * Control Structures:: Conditionals, loops, nonlocal exits. | |
134 * Variables:: Using symbols in programs to stand for values. | |
135 * Functions:: A function is a Lisp program | |
136 that can be invoked from other functions. | |
137 * Macros:: Macros are a way to extend the Lisp language. | |
138 | |
139 * Loading:: Reading files of Lisp code into Lisp. | |
140 * Byte Compilation:: Compilation makes programs run faster. | |
141 * Debugging:: Tools and tips for debugging Lisp programs. | |
142 | |
7337
cd57cd335fff
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
6451
diff
changeset
|
143 * Read and Print:: Converting Lisp objects to text and back. |
6451 | 144 * Minibuffers:: Using the minibuffer to read input. |
145 * Command Loop:: How the editor command loop works, | |
146 and how you can call its subroutines. | |
147 * Keymaps:: Defining the bindings from keys to commands. | |
148 * Modes:: Defining major and minor modes. | |
149 * Documentation:: Writing and using documentation strings. | |
150 | |
151 * Files:: Accessing files. | |
152 * Backups and Auto-Saving:: Controlling how backups and auto-save | |
153 files are made. | |
154 * Buffers:: Creating and using buffer objects. | |
155 * Windows:: Manipulating windows and displaying buffers. | |
156 * Frames:: Making multiple X windows. | |
157 * Positions:: Buffer positions and motion functions. | |
158 * Markers:: Markers represent positions and update | |
159 automatically when the text is changed. | |
160 | |
161 * Text:: Examining and changing text in buffers. | |
162 * Searching and Matching:: Searching buffers for strings or regexps. | |
163 * Syntax Tables:: The syntax table controls word and list parsing. | |
164 * Abbrevs:: How Abbrev mode works, and its data structures. | |
165 | |
166 * Processes:: Running and communicating with subprocesses. | |
167 * System Interface:: Getting the user id, system type, environment | |
168 variables, and other such things. | |
169 * Display:: Parameters controlling screen usage. | |
170 The bell. Waiting for input. | |
171 * Calendar:: Customizing the calendar and diary. | |
172 | |
173 Appendices | |
174 | |
175 * Tips:: Advice for writing Lisp programs. | |
176 * GNU Emacs Internals:: Building and dumping Emacs; | |
177 internal data structures. | |
178 * Standard Errors:: List of all error symbols. | |
179 * Standard Buffer-Local Variables:: List of variables local in all buffers. | |
180 * Standard Keymaps:: List of standard keymaps. | |
181 * Standard Hooks:: List of standard hook variables. | |
182 | |
183 * Index:: Index including concepts, functions, variables, | |
184 and other terms. | |
185 | |
186 --- The Detailed Node Listing --- | |
187 | |
188 Here are other nodes that are inferiors of those already listed, | |
189 mentioned here so you can get to them in one step: | |
190 | |
191 Introduction | |
192 | |
193 * Caveats:: Flaws and a request for help. | |
194 * Lisp History:: Emacs Lisp is descended from Maclisp. | |
195 * Conventions:: How the manual is formatted. | |
196 * Acknowledgements:: The authors, editors, and sponsors of this manual. | |
197 | |
198 Conventions | |
199 | |
200 * Some Terms:: Explanation of terms we use in this manual. | |
201 * nil and t:: How the symbols @code{nil} and @code{t} are used. | |
202 * Evaluation Notation:: The format we use for examples of evaluation. | |
203 * Printing Notation:: The format we use for examples that print output. | |
204 * Error Messages:: The format we use for examples of errors. | |
205 * Buffer Text Notation:: The format we use for buffer contents in examples. | |
206 * Format of Descriptions:: Notation for describing functions, variables, etc. | |
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. | |
7337
cd57cd335fff
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
6451
diff
changeset
|
229 * Cons Cell Type:: Cons cells, and lists (which are made from cons cells). |
6451 | 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. | |
7337
cd57cd335fff
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
6451
diff
changeset
|
235 * 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
|
236 * Macro Type:: A method of expanding an expression into another |
6451 | 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 * Syntax Table Type:: What a character means. | |
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. | |
12067 | 268 * Math Functions:: Trig, exponential and logarithmic functions. |
6451 | 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 analog of @code{printf}. | |
279 * Character Case:: Case conversion functions. | |
280 | |
281 Lists | |
282 | |
283 * Cons Cells:: How lists are made out of cons cells. | |
284 * Lists as Boxes:: Graphical notation to explain lists. | |
285 * List-related Predicates:: Is this object a list? Comparing two lists. | |
286 * List Elements:: Extracting the pieces of a list. | |
287 * Building Lists:: Creating list structure. | |
288 * Modifying Lists:: Storing new pieces into an existing list. | |
289 * Sets And Lists:: A list can represent a finite mathematical set. | |
290 * Association Lists:: A list can represent a finite relation or mapping. | |
291 | |
292 Modifying Existing List Structure | |
293 | |
294 * Setcar:: Replacing an element in a list. | |
295 * Setcdr:: Replacing part of the list backbone. | |
296 This can be used to remove or add elements. | |
297 * Rearrangement:: Reordering the elements in a list; combining lists. | |
298 | |
299 Sequences, Arrays, and Vectors | |
300 | |
301 * Sequence Functions:: Functions that accept any kind of sequence. | |
302 * Arrays:: Characteristics of arrays in Emacs Lisp. | |
303 * Array Functions:: Functions specifically for arrays. | |
304 * Vectors:: Functions specifically for vectors. | |
305 | |
306 Symbols | |
307 | |
308 * Symbol Components:: Symbols have names, values, function definitions | |
309 and property lists. | |
310 * Definitions:: A definition says how a symbol will be used. | |
311 * Creating Symbols:: How symbols are kept unique. | |
312 * Property Lists:: Each symbol has a property list | |
313 for recording miscellaneous information. | |
314 | |
315 Evaluation | |
316 | |
317 * Intro Eval:: Evaluation in the scheme of things. | |
318 * Eval:: How to invoke the Lisp interpreter explicitly. | |
319 * Forms:: How various sorts of objects are evaluated. | |
320 * Quoting:: Avoiding evaluation (to put constants in | |
321 the program). | |
322 | |
323 Kinds of Forms | |
324 | |
325 * Self-Evaluating Forms:: Forms that evaluate to themselves. | |
326 * Symbol Forms:: Symbols evaluate as variables. | |
327 * Classifying Lists:: How to distinguish various sorts of list forms. | |
328 * Function Forms:: Forms that call functions. | |
329 * Macro Forms:: Forms that call macros. | |
330 * Special Forms:: ``Special forms'' are idiosyncratic primitives, | |
331 most of them extremely important. | |
332 * Autoloading:: Functions set up to load files | |
333 containing their real definitions. | |
334 | |
335 Control Structures | |
336 | |
337 * Sequencing:: Evaluation in textual order. | |
338 * Conditionals:: @code{if}, @code{cond}. | |
339 * Combining Conditions:: @code{and}, @code{or}, @code{not}. | |
340 * Iteration:: @code{while} loops. | |
341 * Nonlocal Exits:: Jumping out of a sequence. | |
342 | |
343 Nonlocal Exits | |
344 | |
345 * Catch and Throw:: Nonlocal exits for the program's own purposes. | |
346 * Examples of Catch:: Showing how such nonlocal exits can be written. | |
347 * Errors:: How errors are signaled and handled. | |
348 * Cleanups:: Arranging to run a cleanup form if an | |
349 error happens. | |
350 | |
351 Errors | |
352 | |
353 * Signaling Errors:: How to report an error. | |
354 * Processing of Errors:: What Emacs does when you report an error. | |
355 * 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
|
356 * Error Symbols:: How errors are classified for trapping them. |
6451 | 357 |
358 Variables | |
359 | |
360 * Global Variables:: Variable values that exist permanently, everywhere. | |
361 * Constant Variables:: Certain "variables" have values that never change. | |
362 * Local Variables:: Variable values that exist only temporarily. | |
363 * Void Variables:: Symbols that lack values. | |
364 * Defining Variables:: A definition says a symbol is used as a variable. | |
365 * Accessing Variables:: Examining values of variables whose names | |
366 are known only at run time. | |
367 * Setting Variables:: Storing new values in variables. | |
368 * Variable Scoping:: How Lisp chooses among local and global values. | |
369 * Buffer-Local Variables:: Variable values in effect only in one buffer. | |
370 | |
371 Scoping Rules for Variable Bindings | |
372 | |
373 * Scope:: Scope means where in the program a value | |
374 is visible. Comparison with other languages. | |
375 * Extent:: Extent means how long in time a value exists. | |
376 * Impl of Scope:: Two ways to implement dynamic scoping. | |
377 * Using Scoping:: How to use dynamic scoping carefully and | |
378 avoid problems. | |
379 | |
380 Buffer-Local Variables | |
381 | |
382 * Intro to Buffer-Local:: Introduction and concepts. | |
383 * Creating Buffer-Local:: Creating and destroying buffer-local bindings. | |
384 * Default Value:: The default value is seen in buffers | |
385 that don't have their own local values. | |
386 | |
387 Functions | |
388 | |
389 * What Is a Function:: Lisp functions vs primitives; terminology. | |
390 * Lambda Expressions:: How functions are expressed as Lisp objects. | |
391 * Function Names:: A symbol can serve as the name of a function. | |
392 * Defining Functions:: Lisp expressions for defining functions. | |
393 * Calling Functions:: How to use an existing function. | |
394 * Mapping Functions:: Applying a function to each element of a list, etc. | |
395 * Anonymous Functions:: Lambda-expressions are functions with no names. | |
396 * Function Cells:: Accessing or setting the function definition | |
397 of a symbol. | |
398 * Related Topics:: Cross-references to specific Lisp primitives | |
399 that have a special bearing on how | |
400 functions work. | |
401 | |
402 Lambda Expressions | |
403 | |
404 * Lambda Components:: The parts of a lambda expression. | |
405 * Simple Lambda:: A simple example. | |
406 * Argument List:: Details and special features of argument lists. | |
407 * Function Documentation:: How to put documentation in a function. | |
408 | |
409 Macros | |
410 | |
411 * Simple Macro:: A basic example. | |
412 * Expansion:: How, when and why macros are expanded. | |
413 * Compiling Macros:: How macros are expanded by the compiler. | |
414 * Defining Macros:: How to write a macro definition. | |
415 * Backquote:: Easier construction of list structure. | |
416 * Problems with Macros:: Don't evaluate the macro arguments too many times. | |
417 Don't hide the user's variables. | |
418 | |
419 Loading | |
420 | |
421 * How Programs Do Loading:: The @code{load} function and others. | |
422 * Autoload:: Setting up a function to autoload. | |
12098 | 423 * Named Features:: Loading a library if it isn't already loaded. |
6451 | 424 * Repeated Loading:: Precautions about loading a file twice. |
425 | |
426 Byte Compilation | |
427 | |
428 * Compilation Functions:: Byte compilation functions. | |
429 * Disassembly:: Disassembling byte-code; how to read byte-code. | |
430 | |
431 Debugging Lisp Programs | |
432 | |
433 * Debugger:: How the Emacs Lisp debugger is implemented. | |
434 * Syntax Errors:: How to find syntax errors. | |
435 * Compilation Errors:: How to find errors that show up in | |
436 byte compilation. | |
437 * Edebug:: A source-level Emacs Lisp debugger. | |
438 | |
439 The Lisp Debugger | |
440 | |
441 * Error Debugging:: Entering the debugger when an error happens. | |
442 * Function Debugging:: Entering it when a certain function is called. | |
443 * Explicit Debug:: Entering it at a certain point in the program. | |
444 * Using Debugger:: What the debugger does; what you see while in it. | |
445 * Debugger Commands:: Commands used while in the debugger. | |
446 * Invoking the Debugger:: How to call the function @code{debug}. | |
447 * Internals of Debugger:: Subroutines of the debugger, and global variables. | |
448 | |
449 Debugging Invalid Lisp Syntax | |
450 | |
451 * Excess Open:: How to find a spurious open paren or missing close. | |
452 * Excess Close:: How to find a spurious close paren or missing open. | |
453 | |
454 Reading and Printing Lisp Objects | |
455 | |
456 * Streams Intro:: Overview of streams, reading and printing. | |
457 * Input Streams:: Various data types that can be used as | |
458 input streams. | |
459 * Input Functions:: Functions to read Lisp objects from text. | |
460 * Output Streams:: Various data types that can be used as | |
461 output streams. | |
462 * Output Functions:: Functions to print Lisp objects as text. | |
463 | |
464 Minibuffers | |
465 | |
466 * Intro to Minibuffers:: Basic information about minibuffers. | |
467 * Text from Minibuffer:: How to read a straight text string. | |
468 * Object from Minibuffer:: How to read a Lisp object or expression. | |
469 * Completion:: How to invoke and customize completion. | |
470 * Yes-or-No Queries:: Asking a question with a simple answer. | |
471 * Minibuffer Misc:: Various customization hooks and variables. | |
472 | |
473 Completion | |
474 | |
475 * Basic Completion:: Low-level functions for completing strings. | |
476 (These are too low level to use the minibuffer.) | |
477 * Minibuffer Completion:: Invoking the minibuffer with completion. | |
478 * Completion Commands:: Minibuffer commands that do completion. | |
479 * High-Level Completion:: Convenient special cases of completion | |
480 (reading buffer name, file name, etc.) | |
481 * Reading File Names:: Using completion to read file names. | |
482 * Programmed Completion:: Finding the completions for a given file name. | |
483 | |
484 Command Loop | |
485 | |
486 * Command Overview:: How the command loop reads commands. | |
487 * Defining Commands:: Specifying how a function should read arguments. | |
488 * Interactive Call:: Calling a command, so that it will read arguments. | |
489 * Command Loop Info:: Variables set by the command loop for you to examine. | |
490 * Input Events:: What input looks like when you read it. | |
491 * Reading Input:: How to read input events from the keyboard or mouse. | |
492 * Waiting:: Waiting for user input or elapsed time. | |
493 * Quitting:: How @kbd{C-g} works. How to catch or defer quitting. | |
494 * Prefix Command Arguments:: How the commands to set prefix args work. | |
495 * Recursive Editing:: Entering a recursive edit, | |
496 and why you usually shouldn't. | |
497 * Disabling Commands:: How the command loop handles disabled commands. | |
498 * Command History:: How the command history is set up, and how accessed. | |
499 * Keyboard Macros:: How keyboard macros are implemented. | |
500 | |
501 Defining Commands | |
502 | |
503 * Using Interactive:: General rules for @code{interactive}. | |
504 * Interactive Codes:: The standard letter-codes for reading arguments | |
505 in various ways. | |
506 * Interactive Examples:: Examples of how to read interactive arguments. | |
507 | |
508 Keymaps | |
509 | |
510 * Keymap Terminology:: Definitions of terms pertaining to keymaps. | |
511 * Format of Keymaps:: What a keymap looks like as a Lisp object. | |
512 * Creating Keymaps:: Functions to create and copy keymaps. | |
513 * Inheritance and Keymaps:: How one keymap can inherit the bindings | |
514 of another keymap. | |
515 * Prefix Keys:: Defining a key with a keymap as its definition. | |
516 * Menu Keymaps:: A keymap can define a menu for X windows | |
517 or for use from the terminal. | |
518 * Active Keymaps:: Each buffer has a local keymap | |
519 to override the standard (global) bindings. | |
520 Each minor mode can also override them. | |
521 * Key Lookup:: How extracting elements from keymaps works. | |
522 * Functions for Key Lookup:: How to request key lookup. | |
523 * Changing Key Bindings:: Redefining a key in a keymap. | |
524 * Key Binding Commands:: Interactive interfaces for redefining keys. | |
525 * Scanning Keymaps:: Looking through all keymaps, for printing help. | |
526 | |
527 Major and Minor Modes | |
528 | |
529 * Major Modes:: Defining major modes. | |
530 * Minor Modes:: Defining minor modes. | |
531 * Mode Line Format:: Customizing the text that appears in the mode line. | |
532 * Hooks:: How to use hooks; how to write code that | |
533 provides hooks. | |
534 | |
535 Major Modes | |
536 | |
537 * Major Mode Conventions:: Coding conventions for keymaps, etc. | |
538 * Example Major Modes:: Text mode and Lisp modes. | |
539 * Auto Major Mode:: How Emacs chooses the major mode automatically. | |
540 * Mode Help:: Finding out how to use a mode. | |
541 | |
542 Minor Modes | |
543 | |
544 * Minor Mode Conventions:: Tips for writing a minor mode. | |
545 * Keymaps and Minor Modes:: How a minor mode can have its own keymap. | |
546 | |
547 Mode Line Format | |
548 | |
549 * Mode Line Data:: The data structure that controls the mode line. | |
550 * Mode Line Variables:: Variables used in that data structure. | |
551 * %-Constructs:: Putting information into a mode line. | |
552 | |
553 Documentation | |
554 | |
555 * Documentation Basics:: Good style for doc strings. | |
556 Where to put them. How Emacs stores them. | |
557 * Accessing Documentation:: How Lisp programs can access doc strings. | |
558 * Keys in Documentation:: Substituting current key bindings. | |
559 * Describing Characters:: Making printable descriptions of | |
560 non-printing characters and key sequences. | |
561 * Help Functions:: Subroutines used by Emacs help facilities. | |
562 | |
563 Files | |
564 | |
565 * Visiting Files:: Reading files into Emacs buffers for editing. | |
566 * Saving Buffers:: Writing changed buffers back into files. | |
567 * Reading from Files:: Reading files into other buffers. | |
568 * Writing to Files:: Writing new files from parts of buffers. | |
569 * File Locks:: Locking and unlocking files, to prevent | |
570 simultaneous editing by two people. | |
571 * Information about Files:: Testing existence, accessibility, size of files. | |
572 * Contents of Directories:: Getting a list of the files in a directory. | |
573 * Changing File Attributes:: Renaming files, changing protection, etc. | |
574 * File Names:: Decomposing and expanding file names. | |
575 | |
576 Visiting Files | |
577 | |
578 * Visiting Functions:: The usual interface functions for visiting. | |
579 * Subroutines of Visiting:: Lower-level subroutines that they use. | |
580 | |
581 Information about Files | |
582 | |
583 * Testing Accessibility:: Is a given file readable? Writable? | |
584 * Kinds of Files:: Is it a directory? A link? | |
585 * File Attributes:: How large is it? Any other names? Etc. | |
586 | |
587 File Names | |
588 | |
589 * File Name Components:: The directory part of a file name, and the rest. | |
590 * Directory Names:: A directory's name as a directory | |
591 is different from its name as a file. | |
592 * Relative File Names:: Some file names are relative to a | |
593 current directory. | |
594 * File Name Expansion:: Converting relative file names to absolute ones. | |
595 * Unique File Names:: Generating names for temporary files. | |
596 * File Name Completion:: Finding the completions for a given file name. | |
597 | |
598 Backups and Auto-Saving | |
599 | |
600 * Backup Files:: How backup files are made; how their names | |
601 are chosen. | |
602 * Auto-Saving:: How auto-save files are made; how their | |
603 names are chosen. | |
604 * Reverting:: @code{revert-buffer}, and how to customize | |
605 what it does. | |
606 | |
607 Backup Files | |
608 | |
609 * Making Backups:: How Emacs makes backup files, and when. | |
610 * Rename or Copy:: Two alternatives: renaming the old file | |
611 or copying it. | |
612 * Numbered Backups:: Keeping multiple backups for each source file. | |
613 * Backup Names:: How backup file names are computed; customization. | |
614 | |
615 Buffers | |
616 | |
617 * Buffer Basics:: What is a buffer? | |
618 * Buffer Names:: Accessing and changing buffer names. | |
619 * Buffer File Name:: The buffer file name indicates which file | |
620 is visited. | |
621 * Buffer Modification:: A buffer is @dfn{modified} if it needs to be saved. | |
622 * Modification Time:: Determining whether the visited file was changed | |
623 ``behind Emacs's back''. | |
624 * Read Only Buffers:: Modifying text is not allowed in a | |
625 read-only buffer. | |
626 * The Buffer List:: How to look at all the existing buffers. | |
627 * Creating Buffers:: Functions that create buffers. | |
628 * Killing Buffers:: Buffers exist until explicitly killed. | |
629 * Current Buffer:: Designating a buffer as current | |
630 so primitives will access its contents. | |
631 | |
632 Windows | |
633 | |
634 * Basic Windows:: Basic information on using windows. | |
635 * Splitting Windows:: Splitting one window into two windows. | |
636 * Deleting Windows:: Deleting a window gives its space to other windows. | |
637 * Selecting Windows:: The selected window is the one that you edit in. | |
638 * Cyclic Window Ordering:: Moving around the existing windows. | |
639 * Buffers and Windows:: Each window displays the contents of a buffer. | |
640 * Displaying Buffers:: Higher-lever functions for displaying a buffer | |
641 and choosing a window for it. | |
642 * Window Point:: Each window has its own location of point. | |
643 * Window Start:: The display-start position controls which text | |
644 is on-screen in the window. | |
645 * Vertical Scrolling:: Moving text up and down in the window. | |
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. | |
723 * Substitution:: Replacing a given character wherever it appears. | |
724 * Registers:: How registers are implemented. Accessing | |
725 the text or position stored in a register. | |
726 | |
727 The Kill Ring | |
728 | |
729 * Kill Ring Concepts:: What text looks like in the kill ring. | |
730 * Kill Functions:: Functions that kill text. | |
731 * Yank Commands:: Commands that access the kill ring. | |
12067 | 732 * Low-Level Kill Ring:: Functions and variables for kill ring access. |
6451 | 733 * Internals of Kill Ring:: Variables that hold kill-ring data. |
734 | |
735 Indentation | |
736 | |
737 * Primitive Indent:: Functions used to count and insert indentation. | |
738 * Mode-Specific Indent:: Customize indentation for different modes. | |
739 * Region Indent:: Indent all the lines in a region. | |
740 * Relative Indent:: Indent the current line based on previous lines. | |
741 * Indent Tabs:: Adjustable, typewriter-like tab stops. | |
742 * Motion by Indent:: Move to first non-blank character. | |
743 | |
744 Searching and Matching | |
745 | |
746 * String Search:: Search for an exact match. | |
747 * Regular Expressions:: Describing classes of strings. | |
748 * Regexp Search:: Searching for a match for a regexp. | |
749 * Match Data:: Finding out which part of the text matched | |
750 various parts of a regexp, after regexp search. | |
751 * Saving Match Data:: Saving and restoring this information. | |
752 * Standard Regexps:: Useful regexps for finding sentences, pages,... | |
753 * Searching and Case:: Case-independent or case-significant searching. | |
754 | |
755 Regular Expressions | |
756 | |
757 * Syntax of Regexps:: Rules for writing regular expressions. | |
758 * Regexp Example:: Illustrates regular expression syntax. | |
759 | |
760 Syntax Tables | |
761 | |
762 * Syntax Descriptors:: How characters are classified. | |
763 * Syntax Table Functions:: How to create, examine and alter syntax tables. | |
764 * Parsing Expressions:: Parsing balanced expressions | |
765 using the syntax table. | |
766 * Standard Syntax Tables:: Syntax tables used by various major modes. | |
767 * Syntax Table Internals:: How syntax table information is stored. | |
768 | |
769 Syntax Descriptors | |
770 | |
771 * Syntax Class Table:: Table of syntax classes. | |
772 * Syntax Flags:: Additional flags each character can have. | |
773 | |
774 Abbrevs And Abbrev Expansion | |
775 | |
776 * Abbrev Mode:: Setting up Emacs for abbreviation. | |
777 * Tables: Abbrev Tables. Creating and working with abbrev tables. | |
778 * Defining Abbrevs:: Specifying abbreviations and their expansions. | |
779 * Files: Abbrev Files. Saving abbrevs in files. | |
780 * Expansion: Abbrev Expansion. Controlling expansion; expansion subroutines. | |
781 * Standard Abbrev Tables:: Abbrev tables used by various major modes. | |
782 | |
783 Processes | |
784 | |
785 * Subprocess Creation:: Functions that start subprocesses. | |
786 * Synchronous Processes:: Details of using synchronous subprocesses. | |
787 * Asynchronous Processes:: Starting up an asynchronous subprocess. | |
788 * Deleting Processes:: Eliminating an asynchronous subprocess. | |
789 * Process Information:: Accessing run-status and other attributes. | |
790 * Input to Processes:: Sending input to an asynchronous subprocess. | |
791 * Signals to Processes:: Stopping, continuing or interrupting | |
792 an asynchronous subprocess. | |
793 * Output from Processes:: Collecting output from an asynchronous subprocess. | |
794 * Sentinels:: Sentinels run when process run-status changes. | |
12098 | 795 * Network:: Opening network connections. |
6451 | 796 |
797 Receiving Output from Processes | |
798 | |
799 * Process Buffers:: If no filter, output is put in a buffer. | |
800 * Filter Functions:: Filter functions accept output from the process. | |
801 * Accepting Output:: How to wait until process output arrives. | |
802 | |
803 Operating System Interface | |
804 | |
805 * Starting Up:: Customizing Emacs start-up processing. | |
806 * Getting Out:: How exiting works (permanent or temporary). | |
807 * System Environment:: Distinguish the name and kind of system. | |
808 * Terminal Input:: Recording terminal input for debugging. | |
809 * Terminal Output:: Recording terminal output for debugging. | |
810 * Flow Control:: How to turn output flow control on or off. | |
811 * Batch Mode:: Running Emacs without terminal interaction. | |
812 | |
813 Starting Up Emacs | |
814 | |
815 * Start-up Summary:: Sequence of actions Emacs performs at start-up. | |
816 * Init File:: Details on reading the init file (@file{.emacs}). | |
817 * Terminal-Specific:: How the terminal-specific Lisp file is read. | |
818 * Command Line Arguments:: How command line arguments are processed, | |
819 and how you can customize them. | |
820 | |
821 Getting out of Emacs | |
822 | |
823 * Killing Emacs:: Exiting Emacs irreversibly. | |
824 * Suspending Emacs:: Exiting Emacs reversibly. | |
825 | |
826 Emacs Display | |
827 | |
828 * Refresh Screen:: Clearing the screen and redrawing everything on it. | |
829 * Truncation:: Folding or wrapping long text lines. | |
830 * The Echo Area:: Where messages are displayed. | |
831 * Selective Display:: Hiding part of the buffer text. | |
832 * Overlay Arrow:: Display of an arrow to indicate position. | |
833 * Temporary Displays:: Displays that go away automatically. | |
834 * Waiting:: Forcing display update and waiting for user. | |
835 * Blinking:: How Emacs shows the matching open parenthesis. | |
836 * Usual Display:: How control characters are displayed. | |
837 * Beeping:: Audible signal to the user. | |
838 * Window Systems:: Which window system is being used. | |
839 | |
840 GNU Emacs Internals | |
841 | |
842 * Building Emacs:: How to preload Lisp libraries into Emacs. | |
843 * Pure Storage:: A kludge to make preloaded Lisp functions sharable. | |
844 * Garbage Collection:: Reclaiming space for Lisp objects no longer used. | |
845 * Object Internals:: Data formats of buffers, windows, processes. | |
846 * Writing Emacs Primitives:: Writing C code for Emacs. | |
847 | |
848 Object Internals | |
849 | |
850 * Buffer Internals:: Components of a buffer structure. | |
851 * Window Internals:: Components of a window structure. | |
852 * Process Internals:: Components of a process structure. | |
853 @end menu | |
854 | |
855 @include intro.texi | |
856 @include objects.texi | |
857 @include numbers.texi | |
858 @include strings.texi | |
859 | |
860 @include lists.texi | |
861 @include sequences.texi | |
862 @include symbols.texi | |
863 @include eval.texi | |
864 | |
865 @include control.texi | |
866 @include variables.texi | |
867 @include functions.texi | |
868 @include macros.texi | |
869 | |
870 @include loading.texi | |
871 @include compile.texi | |
872 @include debugging.texi | |
873 @include streams.texi | |
874 | |
875 @include minibuf.texi | |
876 @include commands.texi | |
877 @include keymaps.texi | |
878 @include modes.texi | |
879 | |
880 @include help.texi | |
881 @include files.texi | |
882 @include backups.texi | |
883 @include buffers.texi | |
884 | |
885 @include windows.texi | |
886 @include frames.texi | |
887 @include positions.texi | |
888 @include markers.texi | |
889 @include text.texi | |
890 | |
891 @include searching.texi | |
892 @include syntax.texi | |
893 @include abbrevs.texi | |
894 | |
895 @include processes.texi | |
896 @include os.texi | |
897 @include display.texi | |
898 @include calendar.texi | |
899 | |
900 @c MOVE to Emacs Manual: include misc-modes.texi | |
901 | |
902 @c appendices | |
903 | |
904 @c REMOVE this: include non-hacker.texi | |
905 | |
906 @include tips.texi | |
907 @include internals.texi | |
908 @include errors.texi | |
909 @include locals.texi | |
910 @include maps.texi | |
911 @include hooks.texi | |
912 | |
913 @include index.texi | |
914 | |
915 @c Print the tables of contents | |
916 @summarycontents | |
917 @contents | |
918 @c That's all | |
919 | |
920 @bye | |
921 | |
922 | |
923 These words prevent "local variables" above from confusing Emacs. |