]> code.delx.au - gnu-emacs/blob - doc/lispref/elisp.texi
Minor edits for Face Attributes section of display.texi
[gnu-emacs] / doc / lispref / elisp.texi
1 \input texinfo @c -*-texinfo-*-
2 @c %**start of header
3 @setfilename elisp
4
5 @ifset VOL1
6 @set volflag
7 @set voltitle Volume 1
8 @end ifset
9
10 @ifset VOL2
11 @set volflag
12 @set voltitle Volume 2
13 @end ifset
14
15 @ifset volflag
16 @settitle GNU Emacs Lisp Reference Manual: @value{voltitle}
17 @end ifset
18 @ifclear volflag
19 @settitle GNU Emacs Lisp Reference Manual
20 @end ifclear
21
22 @c %**end of header
23
24 @c See two-volume-cross-refs.txt.
25 @tex
26 @ifset VOL1
27 \message{Formatting for two volume edition...Volume 1...}
28 %
29 % Read special toc file, set up in two-volume.make.
30 \gdef\tocreadfilename{elisp1-toc-ready.toc}
31 %
32 % Don't make outlines, they're not needed and \readdatafile can't pay
33 % attention to the special definition above.
34 \global\let\pdfmakeoutlines=\relax
35 %
36 % Start volume 1 chapter numbering at 1; this must be listed as chapno0.
37 \global\chapno=0
38 @end ifset
39 @ifset VOL2
40 \message{Formatting for two volume edition...Volume 2...}
41 %
42 % Read special toc file, set up in two-volume.make.
43 \gdef\tocreadfilename{elisp2-toc-ready.toc}
44 %
45 % Don't make outlines, they're not needed and \readdatafile can't pay
46 % attention to the special definition above.
47 \global\let\pdfmakeoutlines=\relax
48 %
49 % Start volume 2 chapter numbering at 27; this must be listed as chapno26
50 \global\chapno=26
51 @end ifset
52 @end tex
53
54
55 @c Version of the manual and of Emacs.
56 @c (See comments for EDITION in emacs.texi)
57 @set VERSION 3.1
58 @include emacsver.texi
59 @set DATE May 2012
60
61 @c in general, keep the following line commented out, unless doing a
62 @c copy of this manual that will be published. The manual should go
63 @c onto the distribution in the full, 8.5 x 11" size.
64 @c @smallbook
65
66 @ifset volflag
67 @smallbook
68 @end ifset
69
70 @ifset smallbook
71 @smallbook
72 @end ifset
73
74 @c per rms and peterb, use 10pt fonts for the main text, mostly to
75 @c save on paper cost.
76 @c Do this inside @tex for now, so current makeinfo does not complain.
77 @tex
78 @ifset smallbook
79 @fonttextsize 10
80 \global\let\urlcolor=\Black % don't print links in grayscale
81 \global\let\linkcolor=\Black
82 @end ifset
83 \global\hbadness=6666 % don't worry about not-too-underfull boxes
84 @end tex
85
86 @c Combine indices.
87 @synindex cp fn
88 @syncodeindex vr fn
89 @syncodeindex ky fn
90 @syncodeindex pg fn
91 @c We use the "type index" to index new functions and variables.
92 @c @syncodeindex tp fn
93
94 @copying
95 @iftex
96 This is edition @value{VERSION} of the @cite{GNU Emacs Lisp Reference Manual},@*
97 @end iftex
98 @ifnottex
99 This is the @cite{GNU Emacs Lisp Reference Manual}
100 @end ifnottex
101 corresponding to Emacs version @value{EMACSVER}.
102
103 Copyright @copyright{} 1990-1996, 1998-2012 Free Software Foundation, Inc.
104
105 @quotation
106 Permission is granted to copy, distribute and/or modify this document
107 under the terms of the GNU Free Documentation License, Version 1.3 or
108 any later version published by the Free Software Foundation; with the
109 Invariant Sections being ``GNU General Public License,'' with the
110 Front-Cover texts being ``A GNU Manual,'' and with the Back-Cover
111 Texts as in (a) below. A copy of the license is included in the
112 section entitled ``GNU Free Documentation License.''
113
114 (a) The FSF's Back-Cover Text is: ``You have the freedom to copy and
115 modify this GNU manual. Buying copies from the FSF supports it in
116 developing GNU and promoting software freedom.''
117 @end quotation
118 @end copying
119
120 @documentencoding ISO-8859-1
121
122 @dircategory GNU Emacs Lisp
123 @direntry
124 * Elisp: (elisp). The Emacs Lisp Reference Manual.
125 @end direntry
126
127 @titlepage
128 @title GNU Emacs Lisp Reference Manual
129 @ifset volflag
130 @subtitle @value{voltitle}
131 @end ifset
132 @subtitle For Emacs Version @value{EMACSVER}
133 @subtitle Revision @value{VERSION}, @value{DATE}
134
135 @author by Bil Lewis, Dan LaLiberte, Richard Stallman,
136 @author the GNU Manual Group, et al.
137 @page
138 @vskip 0pt plus 1filll
139 @insertcopying
140
141 @sp 2
142 Published by the Free Software Foundation @*
143 51 Franklin St, Fifth Floor @*
144 Boston, MA 02110-1301 @*
145 USA @*
146 ISBN 1-882114-74-4
147
148 @sp 2
149 Cover art by Etienne Suvasa.
150 @end titlepage
151
152
153 @c Print the tables of contents
154 @summarycontents
155 @contents
156
157
158 @ifnottex
159 @node Top
160 @top Emacs Lisp
161
162 @insertcopying
163 @end ifnottex
164
165 @menu
166 * Introduction:: Introduction and conventions used.
167
168 * Lisp Data Types:: Data types of objects in Emacs Lisp.
169 * Numbers:: Numbers and arithmetic functions.
170 * Strings and Characters:: Strings, and functions that work on them.
171 * Lists:: Lists, cons cells, and related functions.
172 * Sequences Arrays Vectors:: Lists, strings and vectors are called sequences.
173 Certain functions act on any kind of sequence.
174 The description of vectors is here as well.
175 * Hash Tables:: Very fast lookup-tables.
176 * Symbols:: Symbols represent names, uniquely.
177
178 * Evaluation:: How Lisp expressions are evaluated.
179 * Control Structures:: Conditionals, loops, nonlocal exits.
180 * Variables:: Using symbols in programs to stand for values.
181 * Functions:: A function is a Lisp program
182 that can be invoked from other functions.
183 * Macros:: Macros are a way to extend the Lisp language.
184 * Customization:: Making variables and faces customizable.
185
186 * Loading:: Reading files of Lisp code into Lisp.
187 * Byte Compilation:: Compilation makes programs run faster.
188 * Advising Functions:: Adding to the definition of a function.
189 * Debugging:: Tools and tips for debugging Lisp programs.
190
191 * Read and Print:: Converting Lisp objects to text and back.
192 * Minibuffers:: Using the minibuffer to read input.
193 * Command Loop:: How the editor command loop works,
194 and how you can call its subroutines.
195 * Keymaps:: Defining the bindings from keys to commands.
196 * Modes:: Defining major and minor modes.
197 * Documentation:: Writing and using documentation strings.
198
199 * Files:: Accessing files.
200 * Backups and Auto-Saving:: Controlling how backups and auto-save
201 files are made.
202 * Buffers:: Creating and using buffer objects.
203 * Windows:: Manipulating windows and displaying buffers.
204 * Frames:: Making multiple system-level windows.
205 * Positions:: Buffer positions and motion functions.
206 * Markers:: Markers represent positions and update
207 automatically when the text is changed.
208
209 * Text:: Examining and changing text in buffers.
210 * Non-ASCII Characters:: Non-ASCII text in buffers and strings.
211 * Searching and Matching:: Searching buffers for strings or regexps.
212 * Syntax Tables:: The syntax table controls word and list parsing.
213 * Abbrevs:: How Abbrev mode works, and its data structures.
214
215 * Processes:: Running and communicating with subprocesses.
216 * Display:: Features for controlling the screen display.
217 * System Interface:: Getting the user id, system type, environment
218 variables, and other such things.
219
220 * Packaging:: Preparing Lisp code for distribution.
221
222 Appendices
223
224 * Antinews:: Info for users downgrading to Emacs 23.
225 * GNU Free Documentation License:: The license for this documentation.
226 * GPL:: Conditions for copying and changing GNU Emacs.
227 * Tips:: Advice and coding conventions for Emacs Lisp.
228 * GNU Emacs Internals:: Building and dumping Emacs;
229 internal data structures.
230 * Standard Errors:: List of some standard error symbols.
231 * Standard Keymaps:: List of some standard keymaps.
232 * Standard Hooks:: List of some standard hook variables.
233
234 * Index:: Index including concepts, functions, variables,
235 and other terms.
236
237 @ignore
238 * New Symbols:: New functions and variables in Emacs @value{EMACSVER}.
239 @end ignore
240
241 @c Do NOT modify the following 3 lines! They must have this form to
242 @c be correctly identified by `texinfo-multiple-files-update'. In
243 @c particular, the detailed menu header line MUST be identical to the
244 @c value of `texinfo-master-menu-header'. See texnfo-upd.el.
245
246 @detailmenu
247 --- The Detailed Node Listing ---
248 ---------------------------------
249
250 Here are other nodes that are subnodes of those already listed,
251 mentioned here so you can get to them in one step:
252
253 Introduction
254
255 * Caveats:: Flaws and a request for help.
256 * Lisp History:: Emacs Lisp is descended from Maclisp.
257 * Conventions:: How the manual is formatted.
258 * Version Info:: Which Emacs version is running?
259 * Acknowledgements:: The authors, editors, and sponsors of this manual.
260
261 Conventions
262
263 * Some Terms:: Explanation of terms we use in this manual.
264 * nil and t:: How the symbols @code{nil} and @code{t} are used.
265 * Evaluation Notation:: The format we use for examples of evaluation.
266 * Printing Notation:: The format we use when examples print text.
267 * Error Messages:: The format we use for examples of errors.
268 * Buffer Text Notation:: The format we use for buffer contents in examples.
269 * Format of Descriptions:: Notation for describing functions, variables, etc.
270
271 Format of Descriptions
272
273 * A Sample Function Description:: A description of an imaginary
274 function, @code{foo}.
275 * A Sample Variable Description:: A description of an imaginary
276 variable, @code{electric-future-map}.
277
278 Lisp Data Types
279
280 * Printed Representation:: How Lisp objects are represented as text.
281 * Comments:: Comments and their formatting conventions.
282 * Programming Types:: Types found in all Lisp systems.
283 * Editing Types:: Types specific to Emacs.
284 * Circular Objects:: Read syntax for circular structure.
285 * Type Predicates:: Tests related to types.
286 * Equality Predicates:: Tests of equality between any two objects.
287
288 Programming Types
289
290 * Integer Type:: Numbers without fractional parts.
291 * Floating Point Type:: Numbers with fractional parts and with a large range.
292 * Character Type:: The representation of letters, numbers and
293 control characters.
294 * Symbol Type:: A multi-use object that refers to a function,
295 variable, or property list, and has a unique identity.
296 * Sequence Type:: Both lists and arrays are classified as sequences.
297 * Cons Cell Type:: Cons cells, and lists (which are made from cons cells).
298 * Array Type:: Arrays include strings and vectors.
299 * String Type:: An (efficient) array of characters.
300 * Vector Type:: One-dimensional arrays.
301 * Char-Table Type:: One-dimensional sparse arrays indexed by characters.
302 * Bool-Vector Type:: One-dimensional arrays of @code{t} or @code{nil}.
303 * Hash Table Type:: Super-fast lookup tables.
304 * Function Type:: A piece of executable code you can call from elsewhere.
305 * Macro Type:: A method of expanding an expression into another
306 expression, more fundamental but less pretty.
307 * Primitive Function Type:: A function written in C, callable from Lisp.
308 * Byte-Code Type:: A function written in Lisp, then compiled.
309 * Autoload Type:: A type used for automatically loading seldom-used
310 functions.
311
312 Character Type
313
314 * Basic Char Syntax:: Syntax for regular characters.
315 * General Escape Syntax:: How to specify characters by their codes.
316 * Ctl-Char Syntax:: Syntax for control characters.
317 * Meta-Char Syntax:: Syntax for meta-characters.
318 * Other Char Bits:: Syntax for hyper-, super-, and alt-characters.
319
320 Cons Cell and List Types
321
322 * Box Diagrams:: Drawing pictures of lists.
323 * Dotted Pair Notation:: A general syntax for cons cells.
324 * Association List Type:: A specially constructed list.
325
326 String Type
327
328 * Syntax for Strings:: How to specify Lisp strings.
329 * Non-ASCII in Strings:: International characters in strings.
330 * Nonprinting Characters:: Literal unprintable characters in strings.
331 * Text Props and Strings:: Strings with text properties.
332
333 Editing Types
334
335 * Buffer Type:: The basic object of editing.
336 * Marker Type:: A position in a buffer.
337 * Window Type:: Buffers are displayed in windows.
338 * Frame Type:: Windows subdivide frames.
339 * Terminal Type:: A terminal device displays frames.
340 * Window Configuration Type:: Recording the way a frame is subdivided.
341 * Frame Configuration Type:: Recording the status of all frames.
342 * Process Type:: A subprocess of Emacs running on the underlying OS.
343 * Stream Type:: Receive or send characters.
344 * Keymap Type:: What function a keystroke invokes.
345 * Overlay Type:: How an overlay is represented.
346 * Font Type:: Fonts for displaying text.
347
348 Numbers
349
350 * Integer Basics:: Representation and range of integers.
351 * Float Basics:: Representation and range of floating point.
352 * Predicates on Numbers:: Testing for numbers.
353 * Comparison of Numbers:: Equality and inequality predicates.
354 * Numeric Conversions:: Converting float to integer and vice versa.
355 * Arithmetic Operations:: How to add, subtract, multiply and divide.
356 * Rounding Operations:: Explicitly rounding floating point numbers.
357 * Bitwise Operations:: Logical and, or, not, shifting.
358 * Math Functions:: Trig, exponential and logarithmic functions.
359 * Random Numbers:: Obtaining random integers, predictable or not.
360
361 Strings and Characters
362
363 * String Basics:: Basic properties of strings and characters.
364 * Predicates for Strings:: Testing whether an object is a string or char.
365 * Creating Strings:: Functions to allocate new strings.
366 * Modifying Strings:: Altering the contents of an existing string.
367 * Text Comparison:: Comparing characters or strings.
368 * String Conversion:: Converting to and from characters and strings.
369 * Formatting Strings:: @code{format}: Emacs's analogue of @code{printf}.
370 * Case Conversion:: Case conversion functions.
371 * Case Tables:: Customizing case conversion.
372
373 Lists
374
375 * Cons Cells:: How lists are made out of cons cells.
376 * List-related Predicates:: Is this object a list? Comparing two lists.
377 * List Elements:: Extracting the pieces of a list.
378 * Building Lists:: Creating list structure.
379 * List Variables:: Modifying lists stored in variables.
380 * Modifying Lists:: Storing new pieces into an existing list.
381 * Sets And Lists:: A list can represent a finite mathematical set.
382 * Association Lists:: A list can represent a finite relation or mapping.
383
384 Modifying Existing List Structure
385
386 * Setcar:: Replacing an element in a list.
387 * Setcdr:: Replacing part of the list backbone.
388 This can be used to remove or add elements.
389 * Rearrangement:: Reordering the elements in a list; combining lists.
390
391 Sequences, Arrays, and Vectors
392
393 * Sequence Functions:: Functions that accept any kind of sequence.
394 * Arrays:: Characteristics of arrays in Emacs Lisp.
395 * Array Functions:: Functions specifically for arrays.
396 * Vectors:: Special characteristics of Emacs Lisp vectors.
397 * Vector Functions:: Functions specifically for vectors.
398 * Char-Tables:: How to work with char-tables.
399 * Bool-Vectors:: How to work with bool-vectors.
400 * Rings:: Managing a fixed-size ring of objects.
401
402 Hash Tables
403
404 * Creating Hash:: Functions to create hash tables.
405 * Hash Access:: Reading and writing the hash table contents.
406 * Defining Hash:: Defining new comparison methods.
407 * Other Hash:: Miscellaneous.
408
409 Symbols
410
411 * Symbol Components:: Symbols have names, values, function definitions
412 and property lists.
413 * Definitions:: A definition says how a symbol will be used.
414 * Creating Symbols:: How symbols are kept unique.
415 * Property Lists:: Each symbol has a property list
416 for recording miscellaneous information.
417
418 Property Lists
419
420 * Plists and Alists:: Comparison of the advantages of property
421 lists and association lists.
422 * Symbol Plists:: Functions to access symbols' property lists.
423 * Other Plists:: Accessing property lists stored elsewhere.
424
425 Evaluation
426
427 * Intro Eval:: Evaluation in the scheme of things.
428 * Forms:: How various sorts of objects are evaluated.
429 * Quoting:: Avoiding evaluation (to put constants in
430 the program).
431 * Backquote:: Easier construction of list structure.
432 * Eval:: How to invoke the Lisp interpreter explicitly.
433
434 Kinds of Forms
435
436 * Self-Evaluating Forms:: Forms that evaluate to themselves.
437 * Symbol Forms:: Symbols evaluate as variables.
438 * Classifying Lists:: How to distinguish various sorts of list forms.
439 * Function Indirection:: When a symbol appears as the car of a list,
440 we find the real function via the symbol.
441 * Function Forms:: Forms that call functions.
442 * Macro Forms:: Forms that call macros.
443 * Special Forms:: "Special forms" are idiosyncratic primitives,
444 most of them extremely important.
445 * Autoloading:: Functions set up to load files
446 containing their real definitions.
447
448 Control Structures
449
450 * Sequencing:: Evaluation in textual order.
451 * Conditionals:: @code{if}, @code{cond}, @code{when}, @code{unless}.
452 * Combining Conditions:: @code{and}, @code{or}, @code{not}.
453 * Iteration:: @code{while} loops.
454 * Nonlocal Exits:: Jumping out of a sequence.
455
456 Nonlocal Exits
457
458 * Catch and Throw:: Nonlocal exits for the program's own purposes.
459 * Examples of Catch:: Showing how such nonlocal exits can be written.
460 * Errors:: How errors are signaled and handled.
461 * Cleanups:: Arranging to run a cleanup form if an
462 error happens.
463
464 Errors
465
466 * Signaling Errors:: How to report an error.
467 * Processing of Errors:: What Emacs does when you report an error.
468 * Handling Errors:: How you can trap errors and continue execution.
469 * Error Symbols:: How errors are classified for trapping them.
470
471 Variables
472
473 * Global Variables:: Variable values that exist permanently, everywhere.
474 * Constant Variables:: Certain "variables" have values that never change.
475 * Local Variables:: Variable values that exist only temporarily.
476 * Void Variables:: Symbols that lack values.
477 * Defining Variables:: A definition says a symbol is used as a variable.
478 * Tips for Defining:: Things you should think about when you
479 define a variable.
480 * Accessing Variables:: Examining values of variables whose names
481 are known only at run time.
482 * Setting Variables:: Storing new values in variables.
483 * Variable Scoping:: How Lisp chooses among local and global values.
484 * Buffer-Local Variables:: Variable values in effect only in one buffer.
485 * File Local Variables:: Handling local variable lists in files.
486 * Directory Local Variables:: Local variables common to all files in a
487 directory.
488 * Variable Aliases:: Variables that are aliases for other variables.
489 * Variables with Restricted Values:: Non-constant variables whose value can
490 @emph{not} be an arbitrary Lisp object.
491
492 Scoping Rules for Variable Bindings
493
494 * Dynamic Binding:: The default for binding local variables in Emacs.
495 * Dynamic Binding Tips:: Avoiding problems with dynamic binding.
496 * Lexical Binding:: A different type of local variable binding.
497 * Using Lexical Binding:: How to enable lexical binding.
498
499 Buffer-Local Variables
500
501 * Intro to Buffer-Local:: Introduction and concepts.
502 * Creating Buffer-Local:: Creating and destroying buffer-local bindings.
503 * Default Value:: The default value is seen in buffers
504 that don't have their own buffer-local values.
505
506 Functions
507
508 * What Is a Function:: Lisp functions vs. primitives; terminology.
509 * Lambda Expressions:: How functions are expressed as Lisp objects.
510 * Function Names:: A symbol can serve as the name of a function.
511 * Defining Functions:: Lisp expressions for defining functions.
512 * Calling Functions:: How to use an existing function.
513 * Mapping Functions:: Applying a function to each element of a list, etc.
514 * Anonymous Functions:: Lambda expressions are functions with no names.
515 * Function Cells:: Accessing or setting the function definition
516 of a symbol.
517 * Closures:: Functions that enclose a lexical environment.
518 * Obsolete Functions:: Declaring functions obsolete.
519 * Inline Functions:: Defining functions that the compiler
520 will expand inline.
521 * Declaring Functions:: Telling the compiler that a function is defined.
522 * Function Safety:: Determining whether a function is safe to call.
523 * Related Topics:: Cross-references to specific Lisp primitives
524 that have a special bearing on how
525 functions work.
526
527 Lambda Expressions
528
529 * Lambda Components:: The parts of a lambda expression.
530 * Simple Lambda:: A simple example.
531 * Argument List:: Details and special features of argument lists.
532 * Function Documentation:: How to put documentation in a function.
533
534 Macros
535
536 * Simple Macro:: A basic example.
537 * Expansion:: How, when and why macros are expanded.
538 * Compiling Macros:: How macros are expanded by the compiler.
539 * Defining Macros:: How to write a macro definition.
540 * Problems with Macros:: Don't evaluate the macro arguments too many times.
541 Don't hide the user's variables.
542 * Indenting Macros:: Specifying how to indent macro calls.
543
544 Common Problems Using Macros
545
546 * Wrong Time:: Do the work in the expansion, not in the macro.
547 * Argument Evaluation:: The expansion should evaluate each macro arg once.
548 * Surprising Local Vars:: Local variable bindings in the expansion
549 require special care.
550 * Eval During Expansion:: Don't evaluate them; put them in the expansion.
551 * Repeated Expansion:: Avoid depending on how many times expansion is done.
552
553 Customization Settings
554
555 * Common Keywords:: Common keyword arguments for all kinds of
556 customization declarations.
557 * Group Definitions:: Writing customization group definitions.
558 * Variable Definitions:: Declaring user options.
559 * Customization Types:: Specifying the type of a user option.
560 * Applying Customizations:: Functions to apply customization settings.
561 * Custom Themes:: Writing Custom themes.
562
563 Customization Types
564
565 * Simple Types:: Simple customization types: sexp, integer, etc.
566 * Composite Types:: Build new types from other types or data.
567 * Splicing into Lists:: Splice elements into list with @code{:inline}.
568 * Type Keywords:: Keyword-argument pairs in a customization type.
569 * Defining New Types:: Give your type a name.
570
571 Loading
572
573 * How Programs Do Loading:: The @code{load} function and others.
574 * Load Suffixes:: Details about the suffixes that @code{load} tries.
575 * Library Search:: Finding a library to load.
576 * Loading Non-ASCII:: Non-@acronym{ASCII} characters in Emacs Lisp files.
577 * Autoload:: Setting up a function to autoload.
578 * Repeated Loading:: Precautions about loading a file twice.
579 * Named Features:: Loading a library if it isn't already loaded.
580 * Where Defined:: Finding which file defined a certain symbol.
581 * Unloading:: How to "unload" a library that was loaded.
582 * Hooks for Loading:: Providing code to be run when
583 particular libraries are loaded.
584
585 Byte Compilation
586
587 * Speed of Byte-Code:: An example of speedup from byte compilation.
588 * Compilation Functions:: Byte compilation functions.
589 * Docs and Compilation:: Dynamic loading of documentation strings.
590 * Dynamic Loading:: Dynamic loading of individual functions.
591 * Eval During Compile:: Code to be evaluated when you compile.
592 * Compiler Errors:: Handling compiler error messages.
593 * Byte-Code Objects:: The data type used for byte-compiled functions.
594 * Disassembly:: Disassembling byte-code; how to read byte-code.
595
596 Advising Emacs Lisp Functions
597
598 * Simple Advice:: A simple example to explain the basics of advice.
599 * Defining Advice:: Detailed description of @code{defadvice}.
600 * Around-Advice:: Wrapping advice around a function's definition.
601 * Computed Advice:: ...is to @code{defadvice} as @code{fset} is to @code{defun}.
602 * Activation of Advice:: Advice doesn't do anything until you activate it.
603 * Enabling Advice:: You can enable or disable each piece of advice.
604 * Preactivation:: Preactivation is a way of speeding up the
605 loading of compiled advice.
606 * Argument Access in Advice:: How advice can access the function's arguments.
607 * Combined Definition:: How advice is implemented.
608
609 Debugging Lisp Programs
610
611 * Debugger:: A debugger for the Emacs Lisp evaluator.
612 * Edebug:: A source-level Emacs Lisp debugger.
613 * Syntax Errors:: How to find syntax errors.
614 * Test Coverage:: Ensuring you have tested all branches in your code.
615
616 The Lisp Debugger
617
618 * Error Debugging:: Entering the debugger when an error happens.
619 * Infinite Loops:: Stopping and debugging a program that doesn't exit.
620 * Function Debugging:: Entering it when a certain function is called.
621 * Explicit Debug:: Entering it at a certain point in the program.
622 * Using Debugger:: What the debugger does; what you see while in it.
623 * Debugger Commands:: Commands used while in the debugger.
624 * Invoking the Debugger:: How to call the function @code{debug}.
625 * Internals of Debugger:: Subroutines of the debugger, and global variables.
626
627 Edebug
628
629 * Using Edebug:: Introduction to use of Edebug.
630 * Instrumenting:: You must instrument your code
631 in order to debug it with Edebug.
632 * Edebug Execution Modes:: Execution modes, stopping more or less often.
633 * Jumping:: Commands to jump to a specified place.
634 * Edebug Misc:: Miscellaneous commands.
635 * Breaks:: Setting breakpoints to make the program stop.
636 * Trapping Errors:: Trapping errors with Edebug.
637 * Edebug Views:: Views inside and outside of Edebug.
638 * Edebug Eval:: Evaluating expressions within Edebug.
639 * Eval List:: Expressions whose values are displayed
640 each time you enter Edebug.
641 * Printing in Edebug:: Customization of printing.
642 * Trace Buffer:: How to produce trace output in a buffer.
643 * Coverage Testing:: How to test evaluation coverage.
644 * The Outside Context:: Data that Edebug saves and restores.
645 * Edebug and Macros:: Specifying how to handle macro calls.
646 * Edebug Options:: Option variables for customizing Edebug.
647
648 Breaks
649
650 * Breakpoints:: Breakpoints at stop points.
651 * Global Break Condition:: Breaking on an event.
652 * Source Breakpoints:: Embedding breakpoints in source code.
653
654 The Outside Context
655
656 * Checking Whether to Stop::When Edebug decides what to do.
657 * Edebug Display Update:: When Edebug updates the display.
658 * Edebug Recursive Edit:: When Edebug stops execution.
659
660 Edebug and Macros
661
662 * Instrumenting Macro Calls::The basic problem.
663 * Specification List:: How to specify complex patterns of evaluation.
664 * Backtracking:: What Edebug does when matching fails.
665 * Specification Examples:: To help understand specifications.
666
667 Debugging Invalid Lisp Syntax
668
669 * Excess Open:: How to find a spurious open paren or missing close.
670 * Excess Close:: How to find a spurious close paren or missing open.
671
672 Reading and Printing Lisp Objects
673
674 * Streams Intro:: Overview of streams, reading and printing.
675 * Input Streams:: Various data types that can be used as
676 input streams.
677 * Input Functions:: Functions to read Lisp objects from text.
678 * Output Streams:: Various data types that can be used as
679 output streams.
680 * Output Functions:: Functions to print Lisp objects as text.
681 * Output Variables:: Variables that control what the printing
682 functions do.
683
684 Minibuffers
685
686 * Intro to Minibuffers:: Basic information about minibuffers.
687 * Text from Minibuffer:: How to read a straight text string.
688 * Object from Minibuffer:: How to read a Lisp object or expression.
689 * Minibuffer History:: Recording previous minibuffer inputs
690 so the user can reuse them.
691 * Initial Input:: Specifying initial contents for the minibuffer.
692 * Completion:: How to invoke and customize completion.
693 * Yes-or-No Queries:: Asking a question with a simple answer.
694 * Multiple Queries:: Asking a series of similar questions.
695 * Reading a Password:: Reading a password from the terminal.
696 * Minibuffer Commands:: Commands used as key bindings in minibuffers.
697 * Minibuffer Windows:: Operating on the special minibuffer windows.
698 * Minibuffer Contents:: How such commands access the minibuffer text.
699 * Recursive Mini:: Whether recursive entry to minibuffer is allowed.
700 * Minibuffer Misc:: Various customization hooks and variables.
701
702 Completion
703
704 * Basic Completion:: Low-level functions for completing strings.
705 * Minibuffer Completion:: Invoking the minibuffer with completion.
706 * Completion Commands:: Minibuffer commands that do completion.
707 * High-Level Completion:: Convenient special cases of completion
708 (reading buffer names, variable names, etc.).
709 * Reading File Names:: Using completion to read file names and
710 shell commands.
711 * Completion Variables:: Variables controlling completion behavior.
712 * Programmed Completion:: Writing your own completion function.
713 * Completion in Buffers:: Completing text in ordinary buffers.
714
715 Command Loop
716
717 * Command Overview:: How the command loop reads commands.
718 * Defining Commands:: Specifying how a function should read arguments.
719 * Interactive Call:: Calling a command, so that it will read arguments.
720 * Distinguish Interactive:: Making a command distinguish interactive calls.
721 * Command Loop Info:: Variables set by the command loop for you to examine.
722 * Adjusting Point:: Adjustment of point after a command.
723 * Input Events:: What input looks like when you read it.
724 * Reading Input:: How to read input events from the keyboard or mouse.
725 * Special Events:: Events processed immediately and individually.
726 * Waiting:: Waiting for user input or elapsed time.
727 * Quitting:: How @kbd{C-g} works. How to catch or defer quitting.
728 * Prefix Command Arguments:: How the commands to set prefix args work.
729 * Recursive Editing:: Entering a recursive edit,
730 and why you usually shouldn't.
731 * Disabling Commands:: How the command loop handles disabled commands.
732 * Command History:: How the command history is set up, and how accessed.
733 * Keyboard Macros:: How keyboard macros are implemented.
734
735 Defining Commands
736
737 * Using Interactive:: General rules for @code{interactive}.
738 * Interactive Codes:: The standard letter-codes for reading arguments
739 in various ways.
740 * Interactive Examples:: Examples of how to read interactive arguments.
741
742 Input Events
743
744 * Keyboard Events:: Ordinary characters--keys with symbols on them.
745 * Function Keys:: Function keys--keys with names, not symbols.
746 * Mouse Events:: Overview of mouse events.
747 * Click Events:: Pushing and releasing a mouse button.
748 * Drag Events:: Moving the mouse before releasing the button.
749 * Button-Down Events:: A button was pushed and not yet released.
750 * Repeat Events:: Double and triple click (or drag, or down).
751 * Motion Events:: Just moving the mouse, not pushing a button.
752 * Focus Events:: Moving the mouse between frames.
753 * Misc Events:: Other events the system can generate.
754 * Event Examples:: Examples of the lists for mouse events.
755 * Classifying Events:: Finding the modifier keys in an event symbol.
756 Event types.
757 * Accessing Mouse:: Functions to extract info from mouse events.
758 * Accessing Scroll:: Functions to get info from scroll bar events.
759 * Strings of Events:: Special considerations for putting
760 keyboard character events in a string.
761
762 Reading Input
763
764 * Key Sequence Input:: How to read one key sequence.
765 * Reading One Event:: How to read just one event.
766 * Event Mod:: How Emacs modifies events as they are read.
767 * Invoking the Input Method:: How reading an event uses the input method.
768 * Quoted Character Input:: Asking the user to specify a character.
769 * Event Input Misc:: How to reread or throw away input events.
770
771 Keymaps
772
773 * Key Sequences:: Key sequences as Lisp objects.
774 * Keymap Basics:: Basic concepts of keymaps.
775 * Format of Keymaps:: What a keymap looks like as a Lisp object.
776 * Creating Keymaps:: Functions to create and copy keymaps.
777 * Inheritance and Keymaps:: How one keymap can inherit the bindings
778 of another keymap.
779 * Prefix Keys:: Defining a key with a keymap as its definition.
780 * Active Keymaps:: How Emacs searches the active keymaps
781 for a key binding.
782 * Searching Keymaps:: A pseudo-Lisp summary of searching active maps.
783 * Controlling Active Maps:: Each buffer has a local keymap
784 to override the standard (global) bindings.
785 A minor mode can also override them.
786 * Key Lookup:: Finding a key's binding in one keymap.
787 * Functions for Key Lookup:: How to request key lookup.
788 * Changing Key Bindings:: Redefining a key in a keymap.
789 * Remapping Commands:: A keymap can translate one command to another.
790 * Translation Keymaps:: Keymaps for translating sequences of events.
791 * Key Binding Commands:: Interactive interfaces for redefining keys.
792 * Scanning Keymaps:: Looking through all keymaps, for printing help.
793 * Menu Keymaps:: Defining a menu as a keymap.
794
795 Menu Keymaps
796
797 * Defining Menus:: How to make a keymap that defines a menu.
798 * Mouse Menus:: How users actuate the menu with the mouse.
799 * Keyboard Menus:: How users actuate the menu with the keyboard.
800 * Menu Example:: Making a simple menu.
801 * Menu Bar:: How to customize the menu bar.
802 * Tool Bar:: A tool bar is a row of images.
803 * Modifying Menus:: How to add new items to a menu.
804
805 Defining Menus
806
807 * Simple Menu Items:: A simple kind of menu key binding,
808 limited in capabilities.
809 * Extended Menu Items:: More powerful menu item definitions
810 let you specify keywords to enable
811 various features.
812 * Menu Separators:: Drawing a horizontal line through a menu.
813 * Alias Menu Items:: Using command aliases in menu items.
814 * Toolkit Differences:: Not all toolkits provide the same features.
815
816 Major and Minor Modes
817
818 * Hooks:: How to use hooks; how to write code that provides hooks.
819 * Major Modes:: Defining major modes.
820 * Minor Modes:: Defining minor modes.
821 * Mode Line Format:: Customizing the text that appears in the mode line.
822 * Imenu:: Providing a menu of definitions made in a buffer.
823 * Font Lock Mode:: How modes can highlight text according to syntax.
824 * Auto-Indentation:: How to teach Emacs to indent for a major mode.
825 * Desktop Save Mode:: How modes can have buffer state saved between
826 Emacs sessions.
827
828 Hooks
829
830 * Running Hooks:: How to run a hook.
831 * Setting Hooks:: How to put functions on a hook, or remove them.
832
833 Major Modes
834
835 * Major Mode Conventions:: Coding conventions for keymaps, etc.
836 * Auto Major Mode:: How Emacs chooses the major mode automatically.
837 * Mode Help:: Finding out how to use a mode.
838 * Derived Modes:: Defining a new major mode based on another major
839 mode.
840 * Basic Major Modes:: Modes that other modes are often derived from.
841 * Mode Hooks:: Hooks run at the end of major mode functions.
842 * Tabulated List Mode:: Parent mode for buffers containing tabulated data.
843 * Generic Modes:: Defining a simple major mode that supports
844 comment syntax and Font Lock mode.
845 * Example Major Modes:: Text mode and Lisp modes.
846
847 Minor Modes
848
849 * Minor Mode Conventions:: Tips for writing a minor mode.
850 * Keymaps and Minor Modes:: How a minor mode can have its own keymap.
851 * Defining Minor Modes:: A convenient facility for defining minor modes.
852
853 Mode Line Format
854
855 * Mode Line Basics:: Basic ideas of mode line control.
856 * Mode Line Data:: The data structure that controls the mode line.
857 * Mode Line Top:: The top level variable, mode-line-format.
858 * Mode Line Variables:: Variables used in that data structure.
859 * %-Constructs:: Putting information into a mode line.
860 * Properties in Mode:: Using text properties in the mode line.
861 * Header Lines:: Like a mode line, but at the top.
862 * Emulating Mode Line:: Formatting text as the mode line would.
863
864 Font Lock Mode
865
866 * Font Lock Basics:: Overview of customizing Font Lock.
867 * Search-based Fontification:: Fontification based on regexps.
868 * Customizing Keywords:: Customizing search-based fontification.
869 * Other Font Lock Variables:: Additional customization facilities.
870 * Levels of Font Lock:: Each mode can define alternative levels
871 so that the user can select more or less.
872 * Precalculated Fontification:: How Lisp programs that produce the buffer
873 contents can also specify how to fontify it.
874 * Faces for Font Lock:: Special faces specifically for Font Lock.
875 * Syntactic Font Lock:: Fontification based on syntax tables.
876 * Multiline Font Lock:: How to coerce Font Lock into properly
877 highlighting multiline constructs.
878
879 Multiline Font Lock Constructs
880
881 * Font Lock Multiline:: Marking multiline chunks with a text property.
882 * Region to Refontify:: Controlling which region gets refontified
883 after a buffer change.
884
885 Automatic Indentation of code
886
887 * SMIE:: A simple minded indentation engine.
888
889 Simple Minded Indentation Engine
890
891 * SMIE setup:: SMIE setup and features.
892 * Operator Precedence Grammars:: A very simple parsing technique.
893 * SMIE Grammar:: Defining the grammar of a language.
894 * SMIE Lexer:: Defining tokens.
895 * SMIE Tricks:: Working around the parser's limitations.
896 * SMIE Indentation:: Specifying indentation rules.
897 * SMIE Indentation Helpers:: Helper functions for indentation rules.
898 * SMIE Indentation Example:: Sample indentation rules.
899
900 Documentation
901
902 * Documentation Basics:: Where doc strings are defined and stored.
903 * Accessing Documentation:: How Lisp programs can access doc strings.
904 * Keys in Documentation:: Substituting current key bindings.
905 * Describing Characters:: Making printable descriptions of
906 non-printing characters and key sequences.
907 * Help Functions:: Subroutines used by Emacs help facilities.
908
909 Files
910
911 * Visiting Files:: Reading files into Emacs buffers for editing.
912 * Saving Buffers:: Writing changed buffers back into files.
913 * Reading from Files:: Reading files into buffers without visiting.
914 * Writing to Files:: Writing new files from parts of buffers.
915 * File Locks:: Locking and unlocking files, to prevent
916 simultaneous editing by two people.
917 * Information about Files:: Testing existence, accessibility, size of files.
918 * Changing Files:: Renaming files, changing permissions, etc.
919 * File Names:: Decomposing and expanding file names.
920 * Contents of Directories:: Getting a list of the files in a directory.
921 * Create/Delete Dirs:: Creating and Deleting Directories.
922 * Magic File Names:: Special handling for certain file names.
923 * Format Conversion:: Conversion to and from various file formats.
924
925 Visiting Files
926
927 * Visiting Functions:: The usual interface functions for visiting.
928 * Subroutines of Visiting:: Lower-level subroutines that they use.
929
930 Information about Files
931
932 * Testing Accessibility:: Is a given file readable? Writable?
933 * Kinds of Files:: Is it a directory? A symbolic link?
934 * Truenames:: Eliminating symbolic links from a file name.
935 * File Attributes:: How large is it? Any other names? Etc.
936 * Locating Files:: How to find a file in standard places.
937
938 File Names
939
940 * File Name Components:: The directory part of a file name, and the rest.
941 * Relative File Names:: Some file names are relative to a current directory.
942 * Directory Names:: A directory's name as a directory
943 is different from its name as a file.
944 * File Name Expansion:: Converting relative file names to absolute ones.
945 * Unique File Names:: Generating names for temporary files.
946 * File Name Completion:: Finding the completions for a given file name.
947 * Standard File Names:: If your package uses a fixed file name,
948 how to handle various operating systems simply.
949
950 File Format Conversion
951
952 * Format Conversion Overview:: @code{insert-file-contents} and @code{write-region}.
953 * Format Conversion Round-Trip:: Using @code{format-alist}.
954 * Format Conversion Piecemeal:: Specifying non-paired conversion.
955
956 Backups and Auto-Saving
957
958 * Backup Files:: How backup files are made; how their names
959 are chosen.
960 * Auto-Saving:: How auto-save files are made; how their
961 names are chosen.
962 * Reverting:: @code{revert-buffer}, and how to customize
963 what it does.
964
965 Backup Files
966
967 * Making Backups:: How Emacs makes backup files, and when.
968 * Rename or Copy:: Two alternatives: renaming the old file
969 or copying it.
970 * Numbered Backups:: Keeping multiple backups for each source file.
971 * Backup Names:: How backup file names are computed; customization.
972
973 Buffers
974
975 * Buffer Basics:: What is a buffer?
976 * Current Buffer:: Designating a buffer as current
977 so that primitives will access its contents.
978 * Buffer Names:: Accessing and changing buffer names.
979 * Buffer File Name:: The buffer file name indicates which file
980 is visited.
981 * Buffer Modification:: A buffer is @dfn{modified} if it needs to be saved.
982 * Modification Time:: Determining whether the visited file was changed
983 "behind Emacs's back".
984 * Read Only Buffers:: Modifying text is not allowed in a
985 read-only buffer.
986 * The Buffer List:: How to look at all the existing buffers.
987 * Creating Buffers:: Functions that create buffers.
988 * Killing Buffers:: Buffers exist until explicitly killed.
989 * Indirect Buffers:: An indirect buffer shares text with some
990 other buffer.
991 * Swapping Text:: Swapping text between two buffers.
992 * Buffer Gap:: The gap in the buffer.
993
994 Windows
995
996 * Basic Windows:: Basic information on using windows.
997 * Windows and Frames:: Relating windows to the frame they appear on.
998 * Window Sizes:: Accessing a window's size.
999 * Resizing Windows:: Changing the sizes of windows.
1000 * Splitting Windows:: Splitting one window into two windows.
1001 * Deleting Windows:: Deleting a window gives its space to other windows.
1002 * Selecting Windows:: The selected window is the one that you edit in.
1003 * Cyclic Window Ordering:: Moving around the existing windows.
1004 * Buffers and Windows:: Each window displays the contents of a buffer.
1005 * Switching Buffers:: Higher-level functions for switching to a buffer.
1006 * Choosing Window:: How to choose a window for displaying a buffer.
1007 * Display Action Functions:: Subroutines for @code{display-buffer}.
1008 * Choosing Window Options:: Extra options affecting how buffers are displayed.
1009 * Window History:: Each window remembers the buffers displayed in it.
1010 * Dedicated Windows:: How to avoid displaying another buffer in
1011 a specific window.
1012 * Quitting Windows:: How to restore the state prior to displaying a
1013 buffer.
1014 * Window Point:: Each window has its own location of point.
1015 * Window Start and End:: Buffer positions indicating which text is
1016 on-screen in a window.
1017 * Textual Scrolling:: Moving text up and down through the window.
1018 * Vertical Scrolling:: Moving the contents up and down on the window.
1019 * Horizontal Scrolling:: Moving the contents sideways on the window.
1020 * Coordinates and Windows:: Converting coordinates to windows.
1021 * Window Configurations:: Saving and restoring the state of the screen.
1022 * Window Parameters:: Associating additional information with windows.
1023 * Window Hooks:: Hooks for scrolling, window size changes,
1024 redisplay going past a certain point,
1025 or window configuration changes.
1026
1027 Frames
1028
1029 * Creating Frames:: Creating additional frames.
1030 * Multiple Terminals:: Displaying on several different devices.
1031 * Frame Parameters:: Controlling frame size, position, font, etc.
1032 * Terminal Parameters:: Parameters common for all frames on terminal.
1033 * Frame Titles:: Automatic updating of frame titles.
1034 * Deleting Frames:: Frames last until explicitly deleted.
1035 * Finding All Frames:: How to examine all existing frames.
1036 * Minibuffers and Frames:: How a frame finds the minibuffer to use.
1037 * Input Focus:: Specifying the selected frame.
1038 * Visibility of Frames:: Frames may be visible or invisible, or icons.
1039 * Raising and Lowering:: Raising a frame makes it hide other windows;
1040 lowering it makes the others hide it.
1041 * Frame Configurations:: Saving the state of all frames.
1042 * Mouse Tracking:: Getting events that say when the mouse moves.
1043 * Mouse Position:: Asking where the mouse is, or moving it.
1044 * Pop-Up Menus:: Displaying a menu for the user to select from.
1045 * Dialog Boxes:: Displaying a box to ask yes or no.
1046 * Pointer Shape:: Specifying the shape of the mouse pointer.
1047 * Window System Selections::Transferring text to and from other X clients.
1048 * Drag and Drop:: Internals of Drag-and-Drop implementation.
1049 * Color Names:: Getting the definitions of color names.
1050 * Text Terminal Colors:: Defining colors for text terminals.
1051 * Resources:: Getting resource values from the server.
1052 * Display Feature Testing:: Determining the features of a terminal.
1053
1054 Frame Parameters
1055
1056 * Parameter Access:: How to change a frame's parameters.
1057 * Initial Parameters:: Specifying frame parameters when you make a frame.
1058 * Window Frame Parameters:: List of frame parameters for window systems.
1059 * Size and Position:: Changing the size and position of a frame.
1060 * Geometry:: Parsing geometry specifications.
1061
1062 Window Frame Parameters
1063
1064 * Basic Parameters:: Parameters that are fundamental.
1065 * Position Parameters:: The position of the frame on the screen.
1066 * Size Parameters:: Frame's size.
1067 * Layout Parameters:: Size of parts of the frame, and
1068 enabling or disabling some parts.
1069 * Buffer Parameters:: Which buffers have been or should be shown.
1070 * Management Parameters:: Communicating with the window manager.
1071 * Cursor Parameters:: Controlling the cursor appearance.
1072 * Font and Color Parameters:: Fonts and colors for the frame text.
1073
1074 Positions
1075
1076 * Point:: The special position where editing takes place.
1077 * Motion:: Changing point.
1078 * Excursions:: Temporary motion and buffer changes.
1079 * Narrowing:: Restricting editing to a portion of the buffer.
1080
1081 Motion
1082
1083 * Character Motion:: Moving in terms of characters.
1084 * Word Motion:: Moving in terms of words.
1085 * Buffer End Motion:: Moving to the beginning or end of the buffer.
1086 * Text Lines:: Moving in terms of lines of text.
1087 * Screen Lines:: Moving in terms of lines as displayed.
1088 * List Motion:: Moving by parsing lists and sexps.
1089 * Skipping Characters:: Skipping characters belonging to a certain set.
1090
1091 Markers
1092
1093 * Overview of Markers:: The components of a marker, and how it relocates.
1094 * Predicates on Markers:: Testing whether an object is a marker.
1095 * Creating Markers:: Making empty markers or markers at certain places.
1096 * Information from Markers::Finding the marker's buffer or character position.
1097 * Marker Insertion Types:: Two ways a marker can relocate when you
1098 insert where it points.
1099 * Moving Markers:: Moving the marker to a new buffer or position.
1100 * The Mark:: How "the mark" is implemented with a marker.
1101 * The Region:: How to access "the region".
1102
1103 Text
1104
1105 * Near Point:: Examining text in the vicinity of point.
1106 * Buffer Contents:: Examining text in a general fashion.
1107 * Comparing Text:: Comparing substrings of buffers.
1108 * Insertion:: Adding new text to a buffer.
1109 * Commands for Insertion:: User-level commands to insert text.
1110 * Deletion:: Removing text from a buffer.
1111 * User-Level Deletion:: User-level commands to delete text.
1112 * The Kill Ring:: Where removed text sometimes is saved for
1113 later use.
1114 * Undo:: Undoing changes to the text of a buffer.
1115 * Maintaining Undo:: How to enable and disable undo information.
1116 How to control how much information is kept.
1117 * Filling:: Functions for explicit filling.
1118 * Margins:: How to specify margins for filling commands.
1119 * Adaptive Fill:: Adaptive Fill mode chooses a fill prefix
1120 from context.
1121 * Auto Filling:: How auto-fill mode is implemented to break lines.
1122 * Sorting:: Functions for sorting parts of the buffer.
1123 * Columns:: Computing horizontal positions, and using them.
1124 * Indentation:: Functions to insert or adjust indentation.
1125 * Case Changes:: Case conversion of parts of the buffer.
1126 * Text Properties:: Assigning Lisp property lists to text characters.
1127 * Substitution:: Replacing a given character wherever it appears.
1128 * Transposition:: Swapping two portions of a buffer.
1129 * Registers:: How registers are implemented. Accessing
1130 the text or position stored in a register.
1131 * Base 64:: Conversion to or from base 64 encoding.
1132 * Checksum/Hash:: Computing cryptographic hashes.
1133 * Parsing HTML/XML:: Parsing HTML and XML.
1134 * Atomic Changes:: Installing several buffer changes "atomically".
1135 * Change Hooks:: Supplying functions to be run when text is changed.
1136
1137 The Kill Ring
1138
1139 * Kill Ring Concepts:: What text looks like in the kill ring.
1140 * Kill Functions:: Functions that kill text.
1141 * Yanking:: How yanking is done.
1142 * Yank Commands:: Commands that access the kill ring.
1143 * Low-Level Kill Ring:: Functions and variables for kill ring access.
1144 * Internals of Kill Ring:: Variables that hold kill ring data.
1145
1146 Indentation
1147
1148 * Primitive Indent:: Functions used to count and insert indentation.
1149 * Mode-Specific Indent:: Customize indentation for different modes.
1150 * Region Indent:: Indent all the lines in a region.
1151 * Relative Indent:: Indent the current line based on previous lines.
1152 * Indent Tabs:: Adjustable, typewriter-like tab stops.
1153 * Motion by Indent:: Move to first non-blank character.
1154
1155 Text Properties
1156
1157 * Examining Properties:: Looking at the properties of one character.
1158 * Changing Properties:: Setting the properties of a range of text.
1159 * Property Search:: Searching for where a property changes value.
1160 * Special Properties:: Particular properties with special meanings.
1161 * Format Properties:: Properties for representing formatting of text.
1162 * Sticky Properties:: How inserted text gets properties from
1163 neighboring text.
1164 * Lazy Properties:: Computing text properties in a lazy fashion
1165 only when text is examined.
1166 * Clickable Text:: Using text properties to make regions of text
1167 do something when you click on them.
1168 * Fields:: The @code{field} property defines
1169 fields within the buffer.
1170 * Not Intervals:: Why text properties do not use
1171 Lisp-visible text intervals.
1172
1173 Non-@acronym{ASCII} Characters
1174
1175 * Text Representations:: How Emacs represents text.
1176 * Converting Representations:: Converting unibyte to multibyte and vice versa.
1177 * Selecting a Representation:: Treating a byte sequence as unibyte or multi.
1178 * Character Codes:: How unibyte and multibyte relate to
1179 codes of individual characters.
1180 * Character Properties:: Character attributes that define their
1181 behavior and handling.
1182 * Character Sets:: The space of possible character codes
1183 is divided into various character sets.
1184 * Scanning Charsets:: Which character sets are used in a buffer?
1185 * Translation of Characters:: Translation tables are used for conversion.
1186 * Coding Systems:: Coding systems are conversions for saving files.
1187 * Input Methods:: Input methods allow users to enter various
1188 non-ASCII characters without special keyboards.
1189 * Locales:: Interacting with the POSIX locale.
1190
1191 Coding Systems
1192
1193 * Coding System Basics:: Basic concepts.
1194 * Encoding and I/O:: How file I/O functions handle coding systems.
1195 * Lisp and Coding Systems:: Functions to operate on coding system names.
1196 * User-Chosen Coding Systems:: Asking the user to choose a coding system.
1197 * Default Coding Systems:: Controlling the default choices.
1198 * Specifying Coding Systems:: Requesting a particular coding system
1199 for a single file operation.
1200 * Explicit Encoding:: Encoding or decoding text without doing I/O.
1201 * Terminal I/O Encoding:: Use of encoding for terminal I/O.
1202 * MS-DOS File Types:: How DOS "text" and "binary" files
1203 relate to coding systems.
1204
1205 Searching and Matching
1206
1207 * String Search:: Search for an exact match.
1208 * Searching and Case:: Case-independent or case-significant searching.
1209 * Regular Expressions:: Describing classes of strings.
1210 * Regexp Search:: Searching for a match for a regexp.
1211 * POSIX Regexps:: Searching POSIX-style for the longest match.
1212 * Match Data:: Finding out which part of the text matched,
1213 after a string or regexp search.
1214 * Search and Replace:: Commands that loop, searching and replacing.
1215 * Standard Regexps:: Useful regexps for finding sentences, pages,...
1216
1217 Regular Expressions
1218
1219 * Syntax of Regexps:: Rules for writing regular expressions.
1220 * Regexp Example:: Illustrates regular expression syntax.
1221 * Regexp Functions:: Functions for operating on regular expressions.
1222
1223 Syntax of Regular Expressions
1224
1225 * Regexp Special:: Special characters in regular expressions.
1226 * Char Classes:: Character classes used in regular expressions.
1227 * Regexp Backslash:: Backslash-sequences in regular expressions.
1228
1229 The Match Data
1230
1231 * Replacing Match:: Replacing a substring that was matched.
1232 * Simple Match Data:: Accessing single items of match data,
1233 such as where a particular subexpression started.
1234 * Entire Match Data:: Accessing the entire match data at once, as a list.
1235 * Saving Match Data:: Saving and restoring the match data.
1236
1237 Syntax Tables
1238
1239 * Syntax Basics:: Basic concepts of syntax tables.
1240 * Syntax Descriptors:: How characters are classified.
1241 * Syntax Table Functions:: How to create, examine and alter syntax tables.
1242 * Syntax Properties:: Overriding syntax with text properties.
1243 * Motion and Syntax:: Moving over characters with certain syntaxes.
1244 * Parsing Expressions:: Parsing balanced expressions
1245 using the syntax table.
1246 * Standard Syntax Tables:: Syntax tables used by various major modes.
1247 * Syntax Table Internals:: How syntax table information is stored.
1248 * Categories:: Another way of classifying character syntax.
1249
1250 Syntax Descriptors
1251
1252 * Syntax Class Table:: Table of syntax classes.
1253 * Syntax Flags:: Additional flags each character can have.
1254
1255 Parsing Expressions
1256
1257 * Motion via Parsing:: Motion functions that work by parsing.
1258 * Position Parse:: Determining the syntactic state of a position.
1259 * Parser State:: How Emacs represents a syntactic state.
1260 * Low-Level Parsing:: Parsing across a specified region.
1261 * Control Parsing:: Parameters that affect parsing.
1262
1263 Abbrevs and Abbrev Expansion
1264
1265 * Abbrev Tables:: Creating and working with abbrev tables.
1266 * Defining Abbrevs:: Specifying abbreviations and their expansions.
1267 * Abbrev Files:: Saving abbrevs in files.
1268 * Abbrev Expansion:: Controlling expansion; expansion subroutines.
1269 * Standard Abbrev Tables:: Abbrev tables used by various major modes.
1270 * Abbrev Properties:: How to read and set abbrev properties.
1271 Which properties have which effect.
1272 * Abbrev Table Properties:: How to read and set abbrev table properties.
1273 Which properties have which effect.
1274
1275 Processes
1276
1277 * Subprocess Creation:: Functions that start subprocesses.
1278 * Shell Arguments:: Quoting an argument to pass it to a shell.
1279 * Synchronous Processes:: Details of using synchronous subprocesses.
1280 * Asynchronous Processes:: Starting up an asynchronous subprocess.
1281 * Deleting Processes:: Eliminating an asynchronous subprocess.
1282 * Process Information:: Accessing run-status and other attributes.
1283 * Input to Processes:: Sending input to an asynchronous subprocess.
1284 * Signals to Processes:: Stopping, continuing or interrupting
1285 an asynchronous subprocess.
1286 * Output from Processes:: Collecting output from an asynchronous subprocess.
1287 * Sentinels:: Sentinels run when process run-status changes.
1288 * Query Before Exit:: Whether to query if exiting will kill a process.
1289 * System Processes:: Accessing other processes running on your system.
1290 * Transaction Queues:: Transaction-based communication with subprocesses.
1291 * Network:: Opening network connections.
1292 * Network Servers:: Network servers let Emacs accept net connections.
1293 * Datagrams:: UDP network connections.
1294 * Low-Level Network:: Lower-level but more general function
1295 to create connections and servers.
1296 * Misc Network:: Additional relevant functions for net connections.
1297 * Serial Ports:: Communicating with serial ports.
1298 * Byte Packing:: Using bindat to pack and unpack binary data.
1299
1300 Receiving Output from Processes
1301
1302 * Process Buffers:: If no filter, output is put in a buffer.
1303 * Filter Functions:: Filter functions accept output from the process.
1304 * Decoding Output:: Filters can get unibyte or multibyte strings.
1305 * Accepting Output:: How to wait until process output arrives.
1306
1307 Low-Level Network Access
1308
1309 * Network Processes:: Using @code{make-network-process}.
1310 * Network Options:: Further control over network connections.
1311 * Network Feature Testing:: Determining which network features work on
1312 the machine you are using.
1313
1314 Packing and Unpacking Byte Arrays
1315
1316 * Bindat Spec:: Describing data layout.
1317 * Bindat Functions:: Doing the unpacking and packing.
1318 * Bindat Examples:: Samples of what bindat.el can do for you!
1319
1320 Emacs Display
1321
1322 * Refresh Screen:: Clearing the screen and redrawing everything on it.
1323 * Forcing Redisplay:: Forcing redisplay.
1324 * Truncation:: Folding or wrapping long text lines.
1325 * The Echo Area:: Displaying messages at the bottom of the screen.
1326 * Warnings:: Displaying warning messages for the user.
1327 * Invisible Text:: Hiding part of the buffer text.
1328 * Selective Display:: Hiding part of the buffer text (the old way).
1329 * Temporary Displays:: Displays that go away automatically.
1330 * Overlays:: Use overlays to highlight parts of the buffer.
1331 * Width:: How wide a character or string is on the screen.
1332 * Line Height:: Controlling the height of lines.
1333 * Faces:: A face defines a graphics style
1334 for text characters: font, colors, etc.
1335 * Fringes:: Controlling window fringes.
1336 * Scroll Bars:: Controlling vertical scroll bars.
1337 * Display Property:: Enabling special display features.
1338 * Images:: Displaying images in Emacs buffers.
1339 * Buttons:: Adding clickable buttons to Emacs buffers.
1340 * Abstract Display:: Emacs's Widget for Object Collections.
1341 * Blinking:: How Emacs shows the matching open parenthesis.
1342 * Character Display:: How Emacs displays individual characters.
1343 * Beeping:: Audible signal to the user.
1344 * Window Systems:: Which window system is being used.
1345 * Bidirectional Display:: Display of bidirectional scripts, such as
1346 Arabic and Farsi.
1347
1348 The Echo Area
1349
1350 * Displaying Messages:: Explicitly displaying text in the echo area.
1351 * Progress:: Informing user about progress of a long operation.
1352 * Logging Messages:: Echo area messages are logged for the user.
1353 * Echo Area Customization:: Controlling the echo area.
1354
1355 Reporting Warnings
1356
1357 * Warning Basics:: Warnings concepts and functions to report them.
1358 * Warning Variables:: Variables programs bind to customize
1359 their warnings.
1360 * Warning Options:: Variables users set to control display of warnings.
1361 * Delayed Warnings:: Deferring a warning until the end of a command.
1362
1363 Overlays
1364
1365 * Managing Overlays:: Creating and moving overlays.
1366 * Overlay Properties:: How to read and set properties.
1367 What properties do to the screen display.
1368 * Finding Overlays:: Searching for overlays.
1369
1370 Faces
1371
1372 * Defining Faces:: How to define a face.
1373 * Face Attributes:: What is in a face?
1374 * Attribute Functions:: Functions to examine and set face attributes.
1375 * Displaying Faces:: How Emacs combines the faces specified for
1376 a character.
1377 * Face Remapping:: Remapping faces to alternative definitions.
1378 * Face Functions:: How to define and examine faces.
1379 * Auto Faces:: Hook for automatic face assignment.
1380 * Basic Faces:: Faces that are defined by default.
1381 * Font Selection:: Finding the best available font for a face.
1382 * Font Lookup:: Looking up the names of available fonts
1383 and information about them.
1384 * Fontsets:: A fontset is a collection of fonts
1385 that handle a range of character sets.
1386 * Low-Level Font:: Lisp representation for character display fonts.
1387
1388 Fringes
1389
1390 * Fringe Size/Pos:: Specifying where to put the window fringes.
1391 * Fringe Indicators:: Displaying indicator icons in the window fringes.
1392 * Fringe Cursors:: Displaying cursors in the right fringe.
1393 * Fringe Bitmaps:: Specifying bitmaps for fringe indicators.
1394 * Customizing Bitmaps:: Specifying your own bitmaps to use in the fringes.
1395 * Overlay Arrow:: Display of an arrow to indicate position.
1396
1397 The @code{display} Property
1398
1399 * Replacing Specs:: Display specs that replace the text.
1400 * Specified Space:: Displaying one space with a specified width.
1401 * Pixel Specification:: Specifying space width or height in pixels.
1402 * Other Display Specs:: Displaying an image; adjusting the height,
1403 spacing, and other properties of text.
1404 * Display Margins:: Displaying text or images to the side of
1405 the main text.
1406
1407 Images
1408
1409 * Image Formats:: Supported image formats.
1410 * Image Descriptors:: How to specify an image for use in @code{:display}.
1411 * XBM Images:: Special features for XBM format.
1412 * XPM Images:: Special features for XPM format.
1413 * GIF Images:: Special features for GIF format.
1414 * TIFF Images:: Special features for TIFF format.
1415 * PostScript Images:: Special features for PostScript format.
1416 * ImageMagick Images:: Special features available through ImageMagick.
1417 * Other Image Types:: Various other formats are supported.
1418 * Defining Images:: Convenient ways to define an image for later use.
1419 * Showing Images:: Convenient ways to display an image once
1420 it is defined.
1421 * Animated Images:: Some image formats can be animated.
1422 * Image Cache:: Internal mechanisms of image display.
1423
1424 Buttons
1425
1426 * Button Properties:: Button properties with special meanings.
1427 * Button Types:: Defining common properties for classes of buttons.
1428 * Making Buttons:: Adding buttons to Emacs buffers.
1429 * Manipulating Buttons:: Getting and setting properties of buttons.
1430 * Button Buffer Commands:: Buffer-wide commands and bindings for buttons.
1431
1432 Abstract Display
1433
1434 * Abstract Display Functions:: Functions in the Ewoc package.
1435 * Abstract Display Example:: Example of using Ewoc.
1436
1437 Character Display
1438
1439 * Usual Display:: The usual conventions for displaying characters.
1440 * Display Tables:: What a display table consists of.
1441 * Active Display Table:: How Emacs selects a display table to use.
1442 * Glyphs:: How to define a glyph, and what glyphs mean.
1443 * Glyphless Chars:: How glyphless characters are drawn.
1444
1445 Operating System Interface
1446
1447 * Starting Up:: Customizing Emacs startup processing.
1448 * Getting Out:: How exiting works (permanent or temporary).
1449 * System Environment:: Distinguish the name and kind of system.
1450 * User Identification:: Finding the name and user id of the user.
1451 * Time of Day:: Getting the current time.
1452 * Time Conversion:: Converting a time from numeric form to
1453 calendrical data and vice versa.
1454 * Time Parsing:: Converting a time from numeric form to text
1455 and vice versa.
1456 * Processor Run Time:: Getting the run time used by Emacs.
1457 * Time Calculations:: Adding, subtracting, comparing times, etc.
1458 * Timers:: Setting a timer to call a function at a
1459 certain time.
1460 * Idle Timers:: Setting a timer to call a function when Emacs has
1461 been idle for a certain length of time.
1462 * Terminal Input:: Accessing and recording terminal input.
1463 * Terminal Output:: Controlling and recording terminal output.
1464 * Sound Output:: Playing sounds on the computer's speaker.
1465 * X11 Keysyms:: Operating on key symbols for X Windows.
1466 * Batch Mode:: Running Emacs without terminal interaction.
1467 * Session Management:: Saving and restoring state with
1468 X Session Management.
1469 * Notifications:: Desktop notifications.
1470 * Dynamic Libraries:: On-demand loading of support libraries.
1471
1472 Starting Up Emacs
1473
1474 * Startup Summary:: Sequence of actions Emacs performs at startup.
1475 * Init File:: Details on reading the init file.
1476 * Terminal-Specific:: How the terminal-specific Lisp file is read.
1477 * Command-Line Arguments:: How command-line arguments are processed,
1478 and how you can customize them.
1479
1480 Getting Out of Emacs
1481
1482 * Killing Emacs:: Exiting Emacs irreversibly.
1483 * Suspending Emacs:: Exiting Emacs reversibly.
1484
1485 Terminal Input
1486
1487 * Input Modes:: Options for how input is processed.
1488 * Recording Input:: Saving histories of recent or all input events.
1489
1490 Preparing Lisp code for distribution
1491
1492 * Packaging Basics:: The basic concepts of Emacs Lisp packages.
1493 * Simple Packages:: How to package a single .el file.
1494 * Multi-file Packages:: How to package multiple files.
1495 * Package Archives:: Maintaining package archives.
1496
1497 Tips and Conventions
1498
1499 * Coding Conventions:: Conventions for clean and robust programs.
1500 * Key Binding Conventions:: Which keys should be bound by which programs.
1501 * Programming Tips:: Making Emacs code fit smoothly in Emacs.
1502 * Compilation Tips:: Making compiled code run fast.
1503 * Warning Tips:: Turning off compiler warnings.
1504 * Documentation Tips:: Writing readable documentation strings.
1505 * Comment Tips:: Conventions for writing comments.
1506 * Library Headers:: Standard headers for library packages.
1507
1508 GNU Emacs Internals
1509
1510 * Building Emacs:: How the dumped Emacs is made.
1511 * Pure Storage:: Kludge to make preloaded Lisp functions shareable.
1512 * Garbage Collection:: Reclaiming space for Lisp objects no longer used.
1513 * Memory Usage:: Info about total size of Lisp objects made so far.
1514 * Writing Emacs Primitives:: Writing C code for Emacs.
1515 * Object Internals:: Data formats of buffers, windows, processes.
1516
1517 Object Internals
1518
1519 * Buffer Internals:: Components of a buffer structure.
1520 * Window Internals:: Components of a window structure.
1521 * Process Internals:: Components of a process structure.
1522 @end detailmenu
1523 @end menu
1524
1525 @ifclear VOL2
1526 @include intro.texi
1527 @include objects.texi
1528 @include numbers.texi
1529 @include strings.texi
1530
1531 @include lists.texi
1532 @include sequences.texi
1533 @include hash.texi
1534 @include symbols.texi
1535 @include eval.texi
1536
1537 @include control.texi
1538 @include variables.texi
1539 @include functions.texi
1540 @include macros.texi
1541
1542 @include customize.texi
1543 @include loading.texi
1544 @include compile.texi
1545 @include advice.texi
1546
1547 @c This includes edebug.texi.
1548 @include debugging.texi
1549 @include streams.texi
1550 @include minibuf.texi
1551 @include commands.texi
1552
1553 @include keymaps.texi
1554 @include modes.texi
1555 @include help.texi
1556 @include files.texi
1557
1558 @include backups.texi
1559
1560 @end ifclear
1561
1562 @c ================ Beginning of Volume 2 ================
1563 @ifclear VOL1
1564
1565 @include buffers.texi
1566 @include windows.texi
1567 @include frames.texi
1568
1569 @include positions.texi
1570 @include markers.texi
1571 @include text.texi
1572 @include nonascii.texi
1573
1574 @include searching.texi
1575 @include syntax.texi
1576 @include abbrevs.texi
1577 @include processes.texi
1578
1579 @include display.texi
1580 @include os.texi
1581
1582 @include package.texi
1583
1584 @c appendices
1585
1586 @include anti.texi
1587 @include doclicense.texi
1588 @include gpl.texi
1589 @include tips.texi
1590 @include internals.texi
1591 @include errors.texi
1592 @include maps.texi
1593 @include hooks.texi
1594
1595 @include index.texi
1596
1597 @end ifclear
1598
1599 @ignore
1600 @node New Symbols
1601 @unnumbered New Symbols Since the Previous Edition
1602
1603 @printindex tp
1604 @end ignore
1605
1606 @bye
1607
1608 \f
1609 These words prevent "local variables" above from confusing Emacs.