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