comparison lispref/elisp-vol2.texi @ 4781:6cb9d6d6a46d

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