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
|
|
9 This version is the edition 2.3 of the GNU Emacs Lisp
|
|
10 Reference Manual. It corresponds to Emacs Version 19.23.
|
|
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
|
|
18 Copyright (C) 1990, 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
|
|
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.
|
|
71 @subtitle Second Edition, June 1993
|
|
72 @subtitle Revision 2.3, April 1994
|
|
73
|
|
74 @author by Bil Lewis, Dan LaLiberte, Richard Stallman
|
|
75 @author and the GNU Manual Group
|
|
76 @page
|
|
77 @vskip 0pt plus 1filll
|
|
78 Copyright @copyright{} 1990, 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
|
|
79
|
|
80 @sp 2
|
|
81 Second Edition @*
|
|
82 Revised for Emacs Version 19.23,@*
|
|
83 April 1994.@*
|
|
84 @sp 2
|
|
85 ISBN 1-882114-40-X
|
|
86
|
|
87 @sp 2
|
|
88 Published by the Free Software Foundation @*
|
|
89 675 Massachusetts Avenue @*
|
|
90 Cambridge, MA 02139 USA
|
|
91
|
|
92 Permission is granted to make and distribute verbatim copies of this
|
|
93 manual provided the copyright notice and this permission notice are
|
|
94 preserved on all copies.
|
|
95
|
|
96 Permission is granted to copy and distribute modified versions of this
|
|
97 manual under the conditions for verbatim copying, provided also that the
|
|
98 section entitled ``GNU General Public License'' is included
|
|
99 exactly as in the original, and provided that the entire resulting
|
|
100 derived work is distributed under the terms of a permission notice
|
|
101 identical to this one.
|
|
102
|
|
103 Permission is granted to copy and distribute translations of this manual
|
|
104 into another language, under the above conditions for modified versions,
|
|
105 except that the section entitled ``GNU General Public License'' may be
|
|
106 included in a translation approved by the Free Software Foundation
|
|
107 instead of in the original English.
|
|
108
|
|
109 Cover art by Etienne Suvasa.
|
|
110 @end titlepage
|
|
111 @page
|
|
112
|
|
113 @node Top, Copying, (dir), (dir)
|
|
114
|
|
115 @ifinfo
|
|
116 This Info file contains edition 2.3 of the GNU Emacs Lisp
|
|
117 Reference Manual, corresponding to GNU Emacs version 19.23.
|
|
118 @end ifinfo
|
|
119
|
|
120 @menu
|
|
121 * Copying:: Conditions for copying and changing GNU Emacs.
|
|
122 * Introduction:: Introduction and conventions used.
|
|
123
|
|
124 * Types of Lisp Object:: Data types in Emacs Lisp.
|
|
125 * Numbers:: Numbers and arithmetic functions.
|
|
126 * Strings and Characters:: Strings, and functions that work on them.
|
|
127 * Lists:: Lists, cons cells, and related functions.
|
|
128 * Sequences Arrays Vectors:: Lists, strings and vectors are called sequences.
|
|
129 Certain functions act on any kind of sequence.
|
|
130 The description of vectors is here as well.
|
|
131 * Symbols:: Symbols represent names, uniquely.
|
|
132
|
|
133 * Evaluation:: How Lisp expressions are evaluated.
|
|
134 * Control Structures:: Conditionals, loops, nonlocal exits.
|
|
135 * Variables:: Using symbols in programs to stand for values.
|
|
136 * Functions:: A function is a Lisp program
|
|
137 that can be invoked from other functions.
|
|
138 * Macros:: Macros are a way to extend the Lisp language.
|
|
139
|
|
140 * Loading:: Reading files of Lisp code into Lisp.
|
|
141 * Byte Compilation:: Compilation makes programs run faster.
|
|
142 * Debugging:: Tools and tips for debugging Lisp programs.
|
|
143
|
|
144 * Streams:: Converting Lisp objects to text and back.
|
|
145 * Minibuffers:: Using the minibuffer to read input.
|
|
146 * Command Loop:: How the editor command loop works,
|
|
147 and how you can call its subroutines.
|
|
148 * Keymaps:: Defining the bindings from keys to commands.
|
|
149 * Modes:: Defining major and minor modes.
|
|
150 * Documentation:: Writing and using documentation strings.
|
|
151
|
|
152 * Files:: Accessing files.
|
|
153 * Backups and Auto-Saving:: Controlling how backups and auto-save
|
|
154 files are made.
|
|
155 * Buffers:: Creating and using buffer objects.
|
|
156 * Windows:: Manipulating windows and displaying buffers.
|
|
157 * Frames:: Making multiple X windows.
|
|
158 * Positions:: Buffer positions and motion functions.
|
|
159 * Markers:: Markers represent positions and update
|
|
160 automatically when the text is changed.
|
|
161
|
|
162 * Text:: Examining and changing text in buffers.
|
|
163 * Searching and Matching:: Searching buffers for strings or regexps.
|
|
164 * Syntax Tables:: The syntax table controls word and list parsing.
|
|
165 * Abbrevs:: How Abbrev mode works, and its data structures.
|
|
166
|
|
167 * Processes:: Running and communicating with subprocesses.
|
|
168 * System Interface:: Getting the user id, system type, environment
|
|
169 variables, and other such things.
|
|
170 * Display:: Parameters controlling screen usage.
|
|
171 The bell. Waiting for input.
|
|
172 * Calendar:: Customizing the calendar and diary.
|
|
173
|
|
174 Appendices
|
|
175
|
|
176 * Tips:: Advice for writing Lisp programs.
|
|
177 * GNU Emacs Internals:: Building and dumping Emacs;
|
|
178 internal data structures.
|
|
179 * Standard Errors:: List of all error symbols.
|
|
180 * Standard Buffer-Local Variables:: List of variables local in all buffers.
|
|
181 * Standard Keymaps:: List of standard keymaps.
|
|
182 * Standard Hooks:: List of standard hook variables.
|
|
183
|
|
184 * Antinews:: Information about Emacs 18.
|
|
185
|
|
186 * Index:: Index including concepts, functions, variables,
|
|
187 and other terms.
|
|
188
|
|
189 --- The Detailed Node Listing ---
|
|
190
|
|
191 Here are other nodes that are inferiors of those already listed,
|
|
192 mentioned here so you can get to them in one step:
|
|
193
|
|
194 Introduction
|
|
195
|
|
196 * Caveats:: Flaws and a request for help.
|
|
197 * Lisp History:: Emacs Lisp is descended from Maclisp.
|
|
198 * Conventions:: How the manual is formatted.
|
|
199 * Acknowledgements:: The authors, editors, and sponsors of this manual.
|
|
200
|
|
201 Conventions
|
|
202
|
|
203 * Some Terms:: Explanation of terms we use in this manual.
|
|
204 * nil and t:: How the symbols @code{nil} and @code{t} are used.
|
|
205 * Evaluation Notation:: The format we use for examples of evaluation.
|
|
206 * Printing Notation:: The format we use for examples that print output.
|
|
207 * Error Messages:: The format we use for examples of errors.
|
|
208 * Buffer Text Notation:: The format we use for buffer contents in examples.
|
|
209 * Format of Descriptions:: Notation for describing functions, variables, etc.
|
|
210
|
|
211 Format of Descriptions
|
|
212
|
|
213 * A Sample Function Description::
|
|
214 * A Sample Variable Description::
|
|
215
|
|
216 Lisp Data Types
|
|
217
|
|
218 * Printed Representation:: How Lisp objects are represented as text.
|
|
219 * Comments:: Comments and their formatting conventions.
|
|
220 * Programming Types:: Types found in all Lisp systems.
|
|
221 * Editing Types:: Types specific to Emacs.
|
|
222 * Type Predicates:: Tests related to types.
|
|
223 * Equality Predicates:: Tests of equality between any two objects.
|
|
224
|
|
225 Programming Types
|
|
226
|
|
227 * Integer Type:: Numbers without fractional parts.
|
|
228 * Floating Point Type:: Numbers with fractional parts and with a large range.
|
|
229 * Character Type:: The representation of letters, numbers and
|
|
230 control characters.
|
|
231 * Sequence Type:: Both lists and arrays are classified as sequences.
|
|
232 * List Type:: Lists gave Lisp its name (not to mention reputation).
|
|
233 * Array Type:: Arrays include strings and vectors.
|
|
234 * String Type:: An (efficient) array of characters.
|
|
235 * Vector Type:: One-dimensional arrays.
|
|
236 * Symbol Type:: A multi-use object that refers to a function,
|
|
237 variable, property list, or itself.
|
|
238 * Lisp Function Type:: A piece of executable code you can call from elsewhere.
|
|
239 * Lisp Macro Type:: A method of expanding an expression into another
|
|
240 expression, more fundamental but less pretty.
|
|
241 * Primitive Function Type:: A function written in C, callable from Lisp.
|
|
242 * Byte-Code Type:: A function written in Lisp, then compiled.
|
|
243 * Autoload Type:: A type used for automatically loading seldom-used
|
|
244 functions.
|
|
245
|
|
246 List Type
|
|
247
|
|
248 * Dotted Pair Notation:: An alternative syntax for lists.
|
|
249 * Association List Type:: A specially constructed list.
|
|
250
|
|
251 Editing Types
|
|
252
|
|
253 * Buffer Type:: The basic object of editing.
|
|
254 * Window Type:: What makes buffers visible.
|
|
255 * Window Configuration Type::Save what the screen looks like.
|
|
256 * Marker Type:: A position in a buffer.
|
|
257 * Process Type:: A process running on the underlying OS.
|
|
258 * Stream Type:: Receive or send characters.
|
|
259 * Keymap Type:: What function a keystroke invokes.
|
|
260 * Syntax Table Type:: What a character means.
|
|
261
|
|
262 Numbers
|
|
263
|
|
264 * Integer Basics:: Representation and range of integers.
|
|
265 * Float Basics:: Representation and range of floating point.
|
|
266 * Predicates on Numbers:: Testing for numbers.
|
|
267 * Comparison of Numbers:: Equality and inequality predicates.
|
|
268 * Arithmetic Operations:: How to add, subtract, multiply and divide.
|
|
269 * Bitwise Operations:: Logical and, or, not, shifting.
|
|
270 * Numeric Conversions:: Converting float to integer and vice versa.
|
|
271 * Transcendental Functions:: Trig, exponential and logarithmic functions.
|
|
272 * Random Numbers:: Obtaining random integers, predictable or not.
|
|
273
|
|
274 Strings and Characters
|
|
275
|
|
276 * String Basics:: Basic properties of strings and characters.
|
|
277 * Predicates for Strings:: Testing whether an object is a string or char.
|
|
278 * Creating Strings:: Functions to allocate new strings.
|
|
279 * Text Comparison:: Comparing characters or strings.
|
|
280 * String Conversion:: Converting characters or strings and vice versa.
|
|
281 * Formatting Strings:: @code{format}: Emacs's analog of @code{printf}.
|
|
282 * Character Case:: Case conversion functions.
|
|
283
|
|
284 Lists
|
|
285
|
|
286 * Cons Cells:: How lists are made out of cons cells.
|
|
287 * Lists as Boxes:: Graphical notation to explain lists.
|
|
288 * List-related Predicates:: Is this object a list? Comparing two lists.
|
|
289 * List Elements:: Extracting the pieces of a list.
|
|
290 * Building Lists:: Creating list structure.
|
|
291 * Modifying Lists:: Storing new pieces into an existing list.
|
|
292 * Sets And Lists:: A list can represent a finite mathematical set.
|
|
293 * Association Lists:: A list can represent a finite relation or mapping.
|
|
294
|
|
295 Modifying Existing List Structure
|
|
296
|
|
297 * Setcar:: Replacing an element in a list.
|
|
298 * Setcdr:: Replacing part of the list backbone.
|
|
299 This can be used to remove or add elements.
|
|
300 * Rearrangement:: Reordering the elements in a list; combining lists.
|
|
301
|
|
302 Sequences, Arrays, and Vectors
|
|
303
|
|
304 * Sequence Functions:: Functions that accept any kind of sequence.
|
|
305 * Arrays:: Characteristics of arrays in Emacs Lisp.
|
|
306 * Array Functions:: Functions specifically for arrays.
|
|
307 * Vectors:: Functions specifically for vectors.
|
|
308
|
|
309 Symbols
|
|
310
|
|
311 * Symbol Components:: Symbols have names, values, function definitions
|
|
312 and property lists.
|
|
313 * Definitions:: A definition says how a symbol will be used.
|
|
314 * Creating Symbols:: How symbols are kept unique.
|
|
315 * Property Lists:: Each symbol has a property list
|
|
316 for recording miscellaneous information.
|
|
317
|
|
318 Evaluation
|
|
319
|
|
320 * Intro Eval:: Evaluation in the scheme of things.
|
|
321 * Eval:: How to invoke the Lisp interpreter explicitly.
|
|
322 * Forms:: How various sorts of objects are evaluated.
|
|
323 * Quoting:: Avoiding evaluation (to put constants in
|
|
324 the program).
|
|
325
|
|
326 Kinds of Forms
|
|
327
|
|
328 * Self-Evaluating Forms:: Forms that evaluate to themselves.
|
|
329 * Symbol Forms:: Symbols evaluate as variables.
|
|
330 * Classifying Lists:: How to distinguish various sorts of list forms.
|
|
331 * Function Forms:: Forms that call functions.
|
|
332 * Macro Forms:: Forms that call macros.
|
|
333 * Special Forms:: ``Special forms'' are idiosyncratic primitives,
|
|
334 most of them extremely important.
|
|
335 * Autoloading:: Functions set up to load files
|
|
336 containing their real definitions.
|
|
337
|
|
338 Control Structures
|
|
339
|
|
340 * Sequencing:: Evaluation in textual order.
|
|
341 * Conditionals:: @code{if}, @code{cond}.
|
|
342 * Combining Conditions:: @code{and}, @code{or}, @code{not}.
|
|
343 * Iteration:: @code{while} loops.
|
|
344 * Nonlocal Exits:: Jumping out of a sequence.
|
|
345
|
|
346 Nonlocal Exits
|
|
347
|
|
348 * Catch and Throw:: Nonlocal exits for the program's own purposes.
|
|
349 * Examples of Catch:: Showing how such nonlocal exits can be written.
|
|
350 * Errors:: How errors are signaled and handled.
|
|
351 * Cleanups:: Arranging to run a cleanup form if an
|
|
352 error happens.
|
|
353
|
|
354 Errors
|
|
355
|
|
356 * Signaling Errors:: How to report an error.
|
|
357 * Processing of Errors:: What Emacs does when you report an error.
|
|
358 * Handling Errors:: How you can trap errors and continue execution.
|
|
359 * Error Names:: How errors are classified for trapping them.
|
|
360
|
|
361 Variables
|
|
362
|
|
363 * Global Variables:: Variable values that exist permanently, everywhere.
|
|
364 * Constant Variables:: Certain "variables" have values that never change.
|
|
365 * Local Variables:: Variable values that exist only temporarily.
|
|
366 * Void Variables:: Symbols that lack values.
|
|
367 * Defining Variables:: A definition says a symbol is used as a variable.
|
|
368 * Accessing Variables:: Examining values of variables whose names
|
|
369 are known only at run time.
|
|
370 * Setting Variables:: Storing new values in variables.
|
|
371 * Variable Scoping:: How Lisp chooses among local and global values.
|
|
372 * Buffer-Local Variables:: Variable values in effect only in one buffer.
|
|
373
|
|
374 Scoping Rules for Variable Bindings
|
|
375
|
|
376 * Scope:: Scope means where in the program a value
|
|
377 is visible. Comparison with other languages.
|
|
378 * Extent:: Extent means how long in time a value exists.
|
|
379 * Impl of Scope:: Two ways to implement dynamic scoping.
|
|
380 * Using Scoping:: How to use dynamic scoping carefully and
|
|
381 avoid problems.
|
|
382
|
|
383 Buffer-Local Variables
|
|
384
|
|
385 * Intro to Buffer-Local:: Introduction and concepts.
|
|
386 * Creating Buffer-Local:: Creating and destroying buffer-local bindings.
|
|
387 * Default Value:: The default value is seen in buffers
|
|
388 that don't have their own local values.
|
|
389
|
|
390 Functions
|
|
391
|
|
392 * What Is a Function:: Lisp functions vs primitives; terminology.
|
|
393 * Lambda Expressions:: How functions are expressed as Lisp objects.
|
|
394 * Function Names:: A symbol can serve as the name of a function.
|
|
395 * Defining Functions:: Lisp expressions for defining functions.
|
|
396 * Calling Functions:: How to use an existing function.
|
|
397 * Mapping Functions:: Applying a function to each element of a list, etc.
|
|
398 * Anonymous Functions:: Lambda-expressions are functions with no names.
|
|
399 * Function Cells:: Accessing or setting the function definition
|
|
400 of a symbol.
|
|
401 * Related Topics:: Cross-references to specific Lisp primitives
|
|
402 that have a special bearing on how
|
|
403 functions work.
|
|
404
|
|
405 Lambda Expressions
|
|
406
|
|
407 * Lambda Components:: The parts of a lambda expression.
|
|
408 * Simple Lambda:: A simple example.
|
|
409 * Argument List:: Details and special features of argument lists.
|
|
410 * Function Documentation:: How to put documentation in a function.
|
|
411
|
|
412 Macros
|
|
413
|
|
414 * Simple Macro:: A basic example.
|
|
415 * Expansion:: How, when and why macros are expanded.
|
|
416 * Compiling Macros:: How macros are expanded by the compiler.
|
|
417 * Defining Macros:: How to write a macro definition.
|
|
418 * Backquote:: Easier construction of list structure.
|
|
419 * Problems with Macros:: Don't evaluate the macro arguments too many times.
|
|
420 Don't hide the user's variables.
|
|
421
|
|
422 Loading
|
|
423
|
|
424 * How Programs Do Loading:: The @code{load} function and others.
|
|
425 * Autoload:: Setting up a function to autoload.
|
|
426 * Features:: Loading a library if it isn't already loaded.
|
|
427 * Repeated Loading:: Precautions about loading a file twice.
|
|
428
|
|
429 Byte Compilation
|
|
430
|
|
431 * Compilation Functions:: Byte compilation functions.
|
|
432 * Disassembly:: Disassembling byte-code; how to read byte-code.
|
|
433
|
|
434 Debugging Lisp Programs
|
|
435
|
|
436 * Debugger:: How the Emacs Lisp debugger is implemented.
|
|
437 * Syntax Errors:: How to find syntax errors.
|
|
438 * Compilation Errors:: How to find errors that show up in
|
|
439 byte compilation.
|
|
440 * Edebug:: A source-level Emacs Lisp debugger.
|
|
441
|
|
442 The Lisp Debugger
|
|
443
|
|
444 * Error Debugging:: Entering the debugger when an error happens.
|
|
445 * Function Debugging:: Entering it when a certain function is called.
|
|
446 * Explicit Debug:: Entering it at a certain point in the program.
|
|
447 * Using Debugger:: What the debugger does; what you see while in it.
|
|
448 * Debugger Commands:: Commands used while in the debugger.
|
|
449 * Invoking the Debugger:: How to call the function @code{debug}.
|
|
450 * Internals of Debugger:: Subroutines of the debugger, and global variables.
|
|
451
|
|
452 Debugging Invalid Lisp Syntax
|
|
453
|
|
454 * Excess Open:: How to find a spurious open paren or missing close.
|
|
455 * Excess Close:: How to find a spurious close paren or missing open.
|
|
456
|
|
457 Reading and Printing Lisp Objects
|
|
458
|
|
459 * Streams Intro:: Overview of streams, reading and printing.
|
|
460 * Input Streams:: Various data types that can be used as
|
|
461 input streams.
|
|
462 * Input Functions:: Functions to read Lisp objects from text.
|
|
463 * Output Streams:: Various data types that can be used as
|
|
464 output streams.
|
|
465 * Output Functions:: Functions to print Lisp objects as text.
|
|
466
|
|
467 Minibuffers
|
|
468
|
|
469 * Intro to Minibuffers:: Basic information about minibuffers.
|
|
470 * Text from Minibuffer:: How to read a straight text string.
|
|
471 * Object from Minibuffer:: How to read a Lisp object or expression.
|
|
472 * Completion:: How to invoke and customize completion.
|
|
473 * Yes-or-No Queries:: Asking a question with a simple answer.
|
|
474 * Minibuffer Misc:: Various customization hooks and variables.
|
|
475
|
|
476 Completion
|
|
477
|
|
478 * Basic Completion:: Low-level functions for completing strings.
|
|
479 (These are too low level to use the minibuffer.)
|
|
480 * Minibuffer Completion:: Invoking the minibuffer with completion.
|
|
481 * Completion Commands:: Minibuffer commands that do completion.
|
|
482 * High-Level Completion:: Convenient special cases of completion
|
|
483 (reading buffer name, file name, etc.)
|
|
484 * Reading File Names:: Using completion to read file names.
|
|
485 * Programmed Completion:: Finding the completions for a given file name.
|
|
486
|
|
487 Command Loop
|
|
488
|
|
489 * Command Overview:: How the command loop reads commands.
|
|
490 * Defining Commands:: Specifying how a function should read arguments.
|
|
491 * Interactive Call:: Calling a command, so that it will read arguments.
|
|
492 * Command Loop Info:: Variables set by the command loop for you to examine.
|
|
493 * Input Events:: What input looks like when you read it.
|
|
494 * Reading Input:: How to read input events from the keyboard or mouse.
|
|
495 * Waiting:: Waiting for user input or elapsed time.
|
|
496 * Quitting:: How @kbd{C-g} works. How to catch or defer quitting.
|
|
497 * Prefix Command Arguments:: How the commands to set prefix args work.
|
|
498 * Recursive Editing:: Entering a recursive edit,
|
|
499 and why you usually shouldn't.
|
|
500 * Disabling Commands:: How the command loop handles disabled commands.
|
|
501 * Command History:: How the command history is set up, and how accessed.
|
|
502 * Keyboard Macros:: How keyboard macros are implemented.
|
|
503
|
|
504 Defining Commands
|
|
505
|
|
506 * Using Interactive:: General rules for @code{interactive}.
|
|
507 * Interactive Codes:: The standard letter-codes for reading arguments
|
|
508 in various ways.
|
|
509 * Interactive Examples:: Examples of how to read interactive arguments.
|
|
510
|
|
511 Keymaps
|
|
512
|
|
513 * Keymap Terminology:: Definitions of terms pertaining to keymaps.
|
|
514 * Format of Keymaps:: What a keymap looks like as a Lisp object.
|
|
515 * Creating Keymaps:: Functions to create and copy keymaps.
|
|
516 * Inheritance and Keymaps:: How one keymap can inherit the bindings
|
|
517 of another keymap.
|
|
518 * Prefix Keys:: Defining a key with a keymap as its definition.
|
|
519 * Menu Keymaps:: A keymap can define a menu for X windows
|
|
520 or for use from the terminal.
|
|
521 * Active Keymaps:: Each buffer has a local keymap
|
|
522 to override the standard (global) bindings.
|
|
523 Each minor mode can also override them.
|
|
524 * Key Lookup:: How extracting elements from keymaps works.
|
|
525 * Functions for Key Lookup:: How to request key lookup.
|
|
526 * Changing Key Bindings:: Redefining a key in a keymap.
|
|
527 * Key Binding Commands:: Interactive interfaces for redefining keys.
|
|
528 * Scanning Keymaps:: Looking through all keymaps, for printing help.
|
|
529
|
|
530 Major and Minor Modes
|
|
531
|
|
532 * Major Modes:: Defining major modes.
|
|
533 * Minor Modes:: Defining minor modes.
|
|
534 * Mode Line Format:: Customizing the text that appears in the mode line.
|
|
535 * Hooks:: How to use hooks; how to write code that
|
|
536 provides hooks.
|
|
537
|
|
538 Major Modes
|
|
539
|
|
540 * Major Mode Conventions:: Coding conventions for keymaps, etc.
|
|
541 * Example Major Modes:: Text mode and Lisp modes.
|
|
542 * Auto Major Mode:: How Emacs chooses the major mode automatically.
|
|
543 * Mode Help:: Finding out how to use a mode.
|
|
544
|
|
545 Minor Modes
|
|
546
|
|
547 * Minor Mode Conventions:: Tips for writing a minor mode.
|
|
548 * Keymaps and Minor Modes:: How a minor mode can have its own keymap.
|
|
549
|
|
550 Mode Line Format
|
|
551
|
|
552 * Mode Line Data:: The data structure that controls the mode line.
|
|
553 * Mode Line Variables:: Variables used in that data structure.
|
|
554 * %-Constructs:: Putting information into a mode line.
|
|
555
|
|
556 Documentation
|
|
557
|
|
558 * Documentation Basics:: Good style for doc strings.
|
|
559 Where to put them. How Emacs stores them.
|
|
560 * Accessing Documentation:: How Lisp programs can access doc strings.
|
|
561 * Keys in Documentation:: Substituting current key bindings.
|
|
562 * Describing Characters:: Making printable descriptions of
|
|
563 non-printing characters and key sequences.
|
|
564 * Help Functions:: Subroutines used by Emacs help facilities.
|
|
565
|
|
566 Files
|
|
567
|
|
568 * Visiting Files:: Reading files into Emacs buffers for editing.
|
|
569 * Saving Buffers:: Writing changed buffers back into files.
|
|
570 * Reading from Files:: Reading files into other buffers.
|
|
571 * Writing to Files:: Writing new files from parts of buffers.
|
|
572 * File Locks:: Locking and unlocking files, to prevent
|
|
573 simultaneous editing by two people.
|
|
574 * Information about Files:: Testing existence, accessibility, size of files.
|
|
575 * Contents of Directories:: Getting a list of the files in a directory.
|
|
576 * Changing File Attributes:: Renaming files, changing protection, etc.
|
|
577 * File Names:: Decomposing and expanding file names.
|
|
578
|
|
579 Visiting Files
|
|
580
|
|
581 * Visiting Functions:: The usual interface functions for visiting.
|
|
582 * Subroutines of Visiting:: Lower-level subroutines that they use.
|
|
583
|
|
584 Information about Files
|
|
585
|
|
586 * Testing Accessibility:: Is a given file readable? Writable?
|
|
587 * Kinds of Files:: Is it a directory? A link?
|
|
588 * File Attributes:: How large is it? Any other names? Etc.
|
|
589
|
|
590 File Names
|
|
591
|
|
592 * File Name Components:: The directory part of a file name, and the rest.
|
|
593 * Directory Names:: A directory's name as a directory
|
|
594 is different from its name as a file.
|
|
595 * Relative File Names:: Some file names are relative to a
|
|
596 current directory.
|
|
597 * File Name Expansion:: Converting relative file names to absolute ones.
|
|
598 * Unique File Names:: Generating names for temporary files.
|
|
599 * File Name Completion:: Finding the completions for a given file name.
|
|
600
|
|
601 Backups and Auto-Saving
|
|
602
|
|
603 * Backup Files:: How backup files are made; how their names
|
|
604 are chosen.
|
|
605 * Auto-Saving:: How auto-save files are made; how their
|
|
606 names are chosen.
|
|
607 * Reverting:: @code{revert-buffer}, and how to customize
|
|
608 what it does.
|
|
609
|
|
610 Backup Files
|
|
611
|
|
612 * Making Backups:: How Emacs makes backup files, and when.
|
|
613 * Rename or Copy:: Two alternatives: renaming the old file
|
|
614 or copying it.
|
|
615 * Numbered Backups:: Keeping multiple backups for each source file.
|
|
616 * Backup Names:: How backup file names are computed; customization.
|
|
617
|
|
618 Buffers
|
|
619
|
|
620 * Buffer Basics:: What is a buffer?
|
|
621 * Buffer Names:: Accessing and changing buffer names.
|
|
622 * Buffer File Name:: The buffer file name indicates which file
|
|
623 is visited.
|
|
624 * Buffer Modification:: A buffer is @dfn{modified} if it needs to be saved.
|
|
625 * Modification Time:: Determining whether the visited file was changed
|
|
626 ``behind Emacs's back''.
|
|
627 * Read Only Buffers:: Modifying text is not allowed in a
|
|
628 read-only buffer.
|
|
629 * The Buffer List:: How to look at all the existing buffers.
|
|
630 * Creating Buffers:: Functions that create buffers.
|
|
631 * Killing Buffers:: Buffers exist until explicitly killed.
|
|
632 * Current Buffer:: Designating a buffer as current
|
|
633 so primitives will access its contents.
|
|
634
|
|
635 Windows
|
|
636
|
|
637 * Basic Windows:: Basic information on using windows.
|
|
638 * Splitting Windows:: Splitting one window into two windows.
|
|
639 * Deleting Windows:: Deleting a window gives its space to other windows.
|
|
640 * Selecting Windows:: The selected window is the one that you edit in.
|
|
641 * Cyclic Window Ordering:: Moving around the existing windows.
|
|
642 * Buffers and Windows:: Each window displays the contents of a buffer.
|
|
643 * Displaying Buffers:: Higher-lever functions for displaying a buffer
|
|
644 and choosing a window for it.
|
|
645 * Window Point:: Each window has its own location of point.
|
|
646 * Window Start:: The display-start position controls which text
|
|
647 is on-screen in the window.
|
|
648 * Vertical Scrolling:: Moving text up and down in the window.
|
|
649 * Horizontal Scrolling:: Moving text sideways on the window.
|
|
650 * Size of Window:: Accessing the size of a window.
|
|
651 * Resizing Windows:: Changing the size of a window.
|
|
652 * Window Configurations:: Saving and restoring the state of the screen.
|
|
653
|
|
654 Positions
|
|
655
|
|
656 * Point:: The special position where editing takes place.
|
|
657 * Motion:: Changing point.
|
|
658 * Excursions:: Temporary motion and buffer changes.
|
|
659 * Narrowing:: Restricting editing to a portion of the buffer.
|
|
660
|
|
661 Motion
|
|
662
|
|
663 * Character Motion:: Moving in terms of characters.
|
|
664 * Word Motion:: Moving in terms of words.
|
|
665 * Buffer End Motion:: Moving to the beginning or end of the buffer.
|
|
666 * Text Lines:: Moving in terms of lines of text.
|
|
667 * Screen Lines:: Moving in terms of lines as displayed.
|
|
668 * Vertical Motion:: Implementation of @code{next-line} and
|
|
669 @code{previous-line}.
|
|
670 * List Motion:: Moving by parsing lists and sexps.
|
|
671 * Skipping Characters:: Skipping characters belonging to a certain set.
|
|
672
|
|
673 Markers
|
|
674
|
|
675 * Overview of Markers:: The components of a marker, and how it relocates.
|
|
676 * Predicates on Markers:: Testing whether an object is a marker.
|
|
677 * Creating Markers:: Making empty markers or markers at certain places.
|
|
678 * Information from Markers:: Finding the marker's buffer or character
|
|
679 position.
|
|
680 * Changing Markers:: Moving the marker to a new buffer or position.
|
|
681 * The Mark:: How ``the mark'' is implemented with a marker.
|
|
682 * The Region:: How to access ``the region''.
|
|
683
|
|
684 Text
|
|
685
|
|
686 * Near Point:: Examining text in the vicinity of point.
|
|
687 * Buffer Contents:: Examining text in a general fashion.
|
|
688 * Insertion:: Adding new text to a buffer.
|
|
689 * Commands for Insertion:: User-level commands to insert text.
|
|
690 * Deletion:: Removing text from a buffer.
|
|
691 * User-Level Deletion:: User-level commands to delete text.
|
|
692 * The Kill Ring:: Where removed text sometimes is saved for
|
|
693 later use.
|
|
694 * Undo:: Undoing changes to the text of a buffer.
|
|
695 * Auto Filling:: How auto-fill mode is implemented to break lines.
|
|
696 * Filling:: Functions for explicit filling.
|
|
697 * Sorting:: Functions for sorting parts of the buffer.
|
|
698 * Indentation:: Functions to insert or adjust indentation.
|
|
699 * Columns:: Computing horizontal positions, and using them.
|
|
700 * Case Changes:: Case conversion of parts of the buffer.
|
|
701 * Substitution:: Replacing a given character wherever it appears.
|
|
702 * Underlining:: Inserting or deleting underlining-by-overstrike.
|
|
703 * Registers:: How registers are implemented. Accessing
|
|
704 the text or position stored in a register.
|
|
705
|
|
706 The Kill Ring
|
|
707
|
|
708 * Kill Ring Concepts:: What text looks like in the kill ring.
|
|
709 * Kill Functions:: Functions that kill text.
|
|
710 * Yank Commands:: Commands that access the kill ring.
|
|
711 * Low Level Kill Ring:: Functions and variables for kill ring access.
|
|
712 * Internals of Kill Ring:: Variables that hold kill-ring data.
|
|
713
|
|
714 Indentation
|
|
715
|
|
716 * Primitive Indent:: Functions used to count and insert indentation.
|
|
717 * Mode-Specific Indent:: Customize indentation for different modes.
|
|
718 * Region Indent:: Indent all the lines in a region.
|
|
719 * Relative Indent:: Indent the current line based on previous lines.
|
|
720 * Indent Tabs:: Adjustable, typewriter-like tab stops.
|
|
721 * Motion by Indent:: Move to first non-blank character.
|
|
722
|
|
723 Searching and Matching
|
|
724
|
|
725 * String Search:: Search for an exact match.
|
|
726 * Regular Expressions:: Describing classes of strings.
|
|
727 * Regexp Search:: Searching for a match for a regexp.
|
|
728 * Match Data:: Finding out which part of the text matched
|
|
729 various parts of a regexp, after regexp search.
|
|
730 * Saving Match Data:: Saving and restoring this information.
|
|
731 * Standard Regexps:: Useful regexps for finding sentences, pages,...
|
|
732 * Searching and Case:: Case-independent or case-significant searching.
|
|
733
|
|
734 Regular Expressions
|
|
735
|
|
736 * Syntax of Regexps:: Rules for writing regular expressions.
|
|
737 * Regexp Example:: Illustrates regular expression syntax.
|
|
738
|
|
739 Syntax Tables
|
|
740
|
|
741 * Syntax Descriptors:: How characters are classified.
|
|
742 * Syntax Table Functions:: How to create, examine and alter syntax tables.
|
|
743 * Parsing Expressions:: Parsing balanced expressions
|
|
744 using the syntax table.
|
|
745 * Standard Syntax Tables:: Syntax tables used by various major modes.
|
|
746 * Syntax Table Internals:: How syntax table information is stored.
|
|
747
|
|
748 Syntax Descriptors
|
|
749
|
|
750 * Syntax Class Table:: Table of syntax classes.
|
|
751 * Syntax Flags:: Additional flags each character can have.
|
|
752
|
|
753 Abbrevs And Abbrev Expansion
|
|
754
|
|
755 * Abbrev Mode:: Setting up Emacs for abbreviation.
|
|
756 * Tables: Abbrev Tables. Creating and working with abbrev tables.
|
|
757 * Defining Abbrevs:: Specifying abbreviations and their expansions.
|
|
758 * Files: Abbrev Files. Saving abbrevs in files.
|
|
759 * Expansion: Abbrev Expansion. Controlling expansion; expansion subroutines.
|
|
760 * Standard Abbrev Tables:: Abbrev tables used by various major modes.
|
|
761
|
|
762 Processes
|
|
763
|
|
764 * Subprocess Creation:: Functions that start subprocesses.
|
|
765 * Synchronous Processes:: Details of using synchronous subprocesses.
|
|
766 * Asynchronous Processes:: Starting up an asynchronous subprocess.
|
|
767 * Deleting Processes:: Eliminating an asynchronous subprocess.
|
|
768 * Process Information:: Accessing run-status and other attributes.
|
|
769 * Input to Processes:: Sending input to an asynchronous subprocess.
|
|
770 * Signals to Processes:: Stopping, continuing or interrupting
|
|
771 an asynchronous subprocess.
|
|
772 * Output from Processes:: Collecting output from an asynchronous subprocess.
|
|
773 * Sentinels:: Sentinels run when process run-status changes.
|
|
774 * TCP:: Opening network connections.
|
|
775
|
|
776 Receiving Output from Processes
|
|
777
|
|
778 * Process Buffers:: If no filter, output is put in a buffer.
|
|
779 * Filter Functions:: Filter functions accept output from the process.
|
|
780 * Accepting Output:: How to wait until process output arrives.
|
|
781
|
|
782 Operating System Interface
|
|
783
|
|
784 * Starting Up:: Customizing Emacs start-up processing.
|
|
785 * Getting Out:: How exiting works (permanent or temporary).
|
|
786 * System Environment:: Distinguish the name and kind of system.
|
|
787 * Terminal Input:: Recording terminal input for debugging.
|
|
788 * Terminal Output:: Recording terminal output for debugging.
|
|
789 * Flow Control:: How to turn output flow control on or off.
|
|
790 * Batch Mode:: Running Emacs without terminal interaction.
|
|
791
|
|
792 Starting Up Emacs
|
|
793
|
|
794 * Start-up Summary:: Sequence of actions Emacs performs at start-up.
|
|
795 * Init File:: Details on reading the init file (@file{.emacs}).
|
|
796 * Terminal-Specific:: How the terminal-specific Lisp file is read.
|
|
797 * Command Line Arguments:: How command line arguments are processed,
|
|
798 and how you can customize them.
|
|
799
|
|
800 Getting out of Emacs
|
|
801
|
|
802 * Killing Emacs:: Exiting Emacs irreversibly.
|
|
803 * Suspending Emacs:: Exiting Emacs reversibly.
|
|
804
|
|
805 Emacs Display
|
|
806
|
|
807 * Refresh Screen:: Clearing the screen and redrawing everything on it.
|
|
808 * Truncation:: Folding or wrapping long text lines.
|
|
809 * The Echo Area:: Where messages are displayed.
|
|
810 * Selective Display:: Hiding part of the buffer text.
|
|
811 * Overlay Arrow:: Display of an arrow to indicate position.
|
|
812 * Temporary Displays:: Displays that go away automatically.
|
|
813 * Waiting:: Forcing display update and waiting for user.
|
|
814 * Blinking:: How Emacs shows the matching open parenthesis.
|
|
815 * Usual Display:: How control characters are displayed.
|
|
816 * Beeping:: Audible signal to the user.
|
|
817 * Window Systems:: Which window system is being used.
|
|
818
|
|
819 GNU Emacs Internals
|
|
820
|
|
821 * Building Emacs:: How to preload Lisp libraries into Emacs.
|
|
822 * Pure Storage:: A kludge to make preloaded Lisp functions sharable.
|
|
823 * Garbage Collection:: Reclaiming space for Lisp objects no longer used.
|
|
824 * Object Internals:: Data formats of buffers, windows, processes.
|
|
825 * Writing Emacs Primitives:: Writing C code for Emacs.
|
|
826
|
|
827 Object Internals
|
|
828
|
|
829 * Buffer Internals:: Components of a buffer structure.
|
|
830 * Window Internals:: Components of a window structure.
|
|
831 * Process Internals:: Components of a process structure.
|
|
832 @end menu
|
|
833
|
|
834 @include intro.texi
|
|
835 @include objects.texi
|
|
836 @include numbers.texi
|
|
837 @include strings.texi
|
|
838
|
|
839 @include lists.texi
|
|
840 @include sequences.texi
|
|
841 @include symbols.texi
|
|
842 @include eval.texi
|
|
843
|
|
844 @include control.texi
|
|
845 @include variables.texi
|
|
846 @include functions.texi
|
|
847 @include macros.texi
|
|
848
|
|
849 @include loading.texi
|
|
850 @include compile.texi
|
|
851 @include debugging.texi
|
|
852 @include streams.texi
|
|
853
|
|
854 @include minibuf.texi
|
|
855 @include commands.texi
|
|
856 @include keymaps.texi
|
|
857 @include modes.texi
|
|
858
|
|
859 @include help.texi
|
|
860 @include files.texi
|
|
861 @include backups.texi
|
|
862 @include buffers.texi
|
|
863
|
|
864 @include windows.texi
|
|
865 @include frames.texi
|
|
866 @include positions.texi
|
|
867 @include markers.texi
|
|
868 @include text.texi
|
|
869
|
|
870 @include searching.texi
|
|
871 @include syntax.texi
|
|
872 @include abbrevs.texi
|
|
873
|
|
874 @include processes.texi
|
|
875 @include os.texi
|
|
876 @include display.texi
|
|
877 @include calendar.texi
|
|
878
|
|
879 @c MOVE to Emacs Manual: include misc-modes.texi
|
|
880
|
|
881 @c appendices
|
|
882
|
|
883 @c REMOVE this: include non-hacker.texi
|
|
884
|
|
885 @include tips.texi
|
|
886 @include internals.texi
|
|
887 @include errors.texi
|
|
888 @include locals.texi
|
|
889 @include maps.texi
|
|
890 @include hooks.texi
|
|
891 @include anti.texi
|
|
892
|
|
893 @include index.texi
|
|
894
|
|
895 @c Print the tables of contents
|
|
896 @summarycontents
|
|
897 @contents
|
|
898 @c That's all
|
|
899
|
|
900 @bye
|
|
901
|
|
902
|
|
903 These words prevent "local variables" above from confusing Emacs.
|