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--2018 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 * Text Quoting Style:: Quotation marks in doc strings and messages.
944 * Describing Characters:: Making printable descriptions of
945 non-printing characters and key sequences.
946 * Help Functions:: Subroutines used by Emacs help facilities.
950 * Visiting Files:: Reading files into Emacs buffers for editing.
951 * Saving Buffers:: Writing changed buffers back into files.
952 * Reading from Files:: Reading files into buffers without visiting.
953 * Writing to Files:: Writing new files from parts of buffers.
954 * File Locks:: Locking and unlocking files, to prevent
955 simultaneous editing by two people.
956 * Information about Files:: Testing existence, accessibility, size of files.
957 * Changing Files:: Renaming files, changing permissions, etc.
958 * File Names:: Decomposing and expanding file names.
959 * Contents of Directories:: Getting a list of the files in a directory.
960 * Create/Delete Dirs:: Creating and Deleting Directories.
961 * Magic File Names:: Special handling for certain file names.
962 * Format Conversion:: Conversion to and from various file formats.
966 * Visiting Functions:: The usual interface functions for visiting.
967 * Subroutines of Visiting:: Lower-level subroutines that they use.
969 Information about Files
971 * Testing Accessibility:: Is a given file readable? Writable?
972 * Kinds of Files:: Is it a directory? A symbolic link?
973 * Truenames:: Eliminating symbolic links from a file name.
974 * File Attributes:: File sizes, modification times, etc.
975 * Extended Attributes:: Extended file attributes for access control.
976 * Locating Files:: How to find a file in standard places.
980 * File Name Components:: The directory part of a file name, and the rest.
981 * Relative File Names:: Some file names are relative to a current directory.
982 * Directory Names:: A directory's name as a directory
983 is different from its name as a file.
984 * File Name Expansion:: Converting relative file names to absolute ones.
985 * Unique File Names:: Generating names for temporary files.
986 * File Name Completion:: Finding the completions for a given file name.
987 * Standard File Names:: If your package uses a fixed file name,
988 how to handle various operating systems simply.
990 File Format Conversion
992 * Format Conversion Overview:: @code{insert-file-contents} and @code{write-region}.
993 * Format Conversion Round-Trip:: Using @code{format-alist}.
994 * Format Conversion Piecemeal:: Specifying non-paired conversion.
996 Backups and Auto-Saving
998 * Backup Files:: How backup files are made; how their names
1000 * Auto-Saving:: How auto-save files are made; how their
1002 * Reverting:: @code{revert-buffer}, and how to customize
1007 * Making Backups:: How Emacs makes backup files, and when.
1008 * Rename or Copy:: Two alternatives: renaming the old file
1010 * Numbered Backups:: Keeping multiple backups for each source file.
1011 * Backup Names:: How backup file names are computed; customization.
1015 * Buffer Basics:: What is a buffer?
1016 * Current Buffer:: Designating a buffer as current
1017 so that primitives will access its contents.
1018 * Buffer Names:: Accessing and changing buffer names.
1019 * Buffer File Name:: The buffer file name indicates which file
1021 * Buffer Modification:: A buffer is @dfn{modified} if it needs to be saved.
1022 * Modification Time:: Determining whether the visited file was changed
1023 behind Emacs's back.
1024 * Read Only Buffers:: Modifying text is not allowed in a
1026 * Buffer List:: How to look at all the existing buffers.
1027 * Creating Buffers:: Functions that create buffers.
1028 * Killing Buffers:: Buffers exist until explicitly killed.
1029 * Indirect Buffers:: An indirect buffer shares text with some
1031 * Swapping Text:: Swapping text between two buffers.
1032 * Buffer Gap:: The gap in the buffer.
1036 * Basic Windows:: Basic information on using windows.
1037 * Windows and Frames:: Relating windows to the frame they appear on.
1038 * Window Sizes:: Accessing a window's size.
1039 * Resizing Windows:: Changing the sizes of windows.
1040 * Preserving Window Sizes:: Preserving the size of windows.
1041 * Splitting Windows:: Splitting one window into two windows.
1042 * Deleting Windows:: Deleting a window gives its space to other windows.
1043 * Recombining Windows:: Preserving the frame layout when splitting and
1045 * Selecting Windows:: The selected window is the one that you edit in.
1046 * Cyclic Window Ordering:: Moving around the existing windows.
1047 * Buffers and Windows:: Each window displays the contents of a buffer.
1048 * Switching Buffers:: Higher-level functions for switching to a buffer.
1049 * Choosing Window:: How to choose a window for displaying a buffer.
1050 * Display Action Functions:: Subroutines for @code{display-buffer}.
1051 * Choosing Window Options:: Extra options affecting how buffers are displayed.
1052 * Window History:: Each window remembers the buffers displayed in it.
1053 * Dedicated Windows:: How to avoid displaying another buffer in
1055 * Quitting Windows:: How to restore the state prior to displaying a
1057 * Side Windows:: Special windows on a frame's sides.
1058 * Atomic Windows:: Preserving parts of the window layout.
1059 * Window Point:: Each window has its own location of point.
1060 * Window Start and End:: Buffer positions indicating which text is
1061 on-screen in a window.
1062 * Textual Scrolling:: Moving text up and down through the window.
1063 * Vertical Scrolling:: Moving the contents up and down on the window.
1064 * Horizontal Scrolling:: Moving the contents sideways on the window.
1065 * Coordinates and Windows:: Converting coordinates to windows.
1066 * Mouse Window Auto-selection:: Automatically selecting windows with the mouse.
1067 * Window Configurations:: Saving and restoring the state of the screen.
1068 * Window Parameters:: Associating additional information with windows.
1069 * Window Hooks:: Hooks for scrolling, window size changes,
1070 redisplay going past a certain point,
1071 or window configuration changes.
1075 * Displaying Buffers in Side Windows:: An action function for displaying
1076 buffers in side windows.
1077 * Side Window Options and Functions:: Further tuning of side windows.
1078 * Frame Layouts with Side Windows:: Setting up frame layouts with side
1083 * Creating Frames:: Creating additional frames.
1084 * Multiple Terminals:: Displaying on several different devices.
1085 * Frame Geometry:: Geometric properties of frames.
1086 * Frame Parameters:: Controlling frame size, position, font, etc.
1087 * Terminal Parameters:: Parameters common for all frames on terminal.
1088 * Frame Titles:: Automatic updating of frame titles.
1089 * Deleting Frames:: Frames last until explicitly deleted.
1090 * Finding All Frames:: How to examine all existing frames.
1091 * Minibuffers and Frames:: How a frame finds the minibuffer to use.
1092 * Input Focus:: Specifying the selected frame.
1093 * Visibility of Frames:: Frames may be visible or invisible, or icons.
1094 * Raising and Lowering:: Raising, Lowering and Restacking Frames.
1095 * Frame Configurations:: Saving the state of all frames.
1096 * Child Frames:: Making a frame the child of another.
1097 * Mouse Tracking:: Getting events that say when the mouse moves.
1098 * Mouse Position:: Asking where the mouse is, or moving it.
1099 * Pop-Up Menus:: Displaying a menu for the user to select from.
1100 * Dialog Boxes:: Displaying a box to ask yes or no.
1101 * Pointer Shape:: Specifying the shape of the mouse pointer.
1102 * Window System Selections::Transferring text to and from other X clients.
1103 * Drag and Drop:: Internals of Drag-and-Drop implementation.
1104 * Color Names:: Getting the definitions of color names.
1105 * Text Terminal Colors:: Defining colors for text terminals.
1106 * Resources:: Getting resource values from the server.
1107 * Display Feature Testing:: Determining the features of a terminal.
1111 * Frame Layout:: Basic layout of frames.
1112 * Frame Font:: The default font of a frame and how to set it.
1113 * Frame Position:: The position of a frame on its display.
1114 * Frame Size:: Specifying and retrieving a frame's size.
1115 * Implied Frame Resizing:: Implied resizing of frames and how to prevent it.
1119 * Parameter Access:: How to change a frame's parameters.
1120 * Initial Parameters:: Specifying frame parameters when you make a frame.
1121 * Window Frame Parameters:: List of frame parameters for window systems.
1122 * Geometry:: Parsing geometry specifications.
1124 Window Frame Parameters
1126 * Basic Parameters:: Parameters that are fundamental.
1127 * Position Parameters:: The position of the frame on the screen.
1128 * Size Parameters:: Frame's size.
1129 * Layout Parameters:: Size of parts of the frame, and
1130 enabling or disabling some parts.
1131 * Buffer Parameters:: Which buffers have been or should be shown.
1132 * Frame Interaction Parameters:: Parameters for interacting with other
1134 * Mouse Dragging Parameters:: Parameters for resizing and moving
1135 frames with the mouse.
1136 * Management Parameters:: Communicating with the window manager.
1137 * Cursor Parameters:: Controlling the cursor appearance.
1138 * Font and Color Parameters:: Fonts and colors for the frame text.
1142 * Point:: The special position where editing takes place.
1143 * Motion:: Changing point.
1144 * Excursions:: Temporary motion and buffer changes.
1145 * Narrowing:: Restricting editing to a portion of the buffer.
1149 * Character Motion:: Moving in terms of characters.
1150 * Word Motion:: Moving in terms of words.
1151 * Buffer End Motion:: Moving to the beginning or end of the buffer.
1152 * Text Lines:: Moving in terms of lines of text.
1153 * Screen Lines:: Moving in terms of lines as displayed.
1154 * List Motion:: Moving by parsing lists and sexps.
1155 * Skipping Characters:: Skipping characters belonging to a certain set.
1159 * Overview of Markers:: The components of a marker, and how it relocates.
1160 * Predicates on Markers:: Testing whether an object is a marker.
1161 * Creating Markers:: Making empty markers or markers at certain places.
1162 * Information from Markers::Finding the marker's buffer or character position.
1163 * Marker Insertion Types:: Two ways a marker can relocate when you
1164 insert where it points.
1165 * Moving Markers:: Moving the marker to a new buffer or position.
1166 * The Mark:: How the mark is implemented with a marker.
1167 * The Region:: How to access the region.
1171 * Near Point:: Examining text in the vicinity of point.
1172 * Buffer Contents:: Examining text in a general fashion.
1173 * Comparing Text:: Comparing substrings of buffers.
1174 * Insertion:: Adding new text to a buffer.
1175 * Commands for Insertion:: User-level commands to insert text.
1176 * Deletion:: Removing text from a buffer.
1177 * User-Level Deletion:: User-level commands to delete text.
1178 * The Kill Ring:: Where removed text sometimes is saved for
1180 * Undo:: Undoing changes to the text of a buffer.
1181 * Maintaining Undo:: How to enable and disable undo information.
1182 How to control how much information is kept.
1183 * Filling:: Functions for explicit filling.
1184 * Margins:: How to specify margins for filling commands.
1185 * Adaptive Fill:: Adaptive Fill mode chooses a fill prefix
1187 * Auto Filling:: How auto-fill mode is implemented to break lines.
1188 * Sorting:: Functions for sorting parts of the buffer.
1189 * Columns:: Computing horizontal positions, and using them.
1190 * Indentation:: Functions to insert or adjust indentation.
1191 * Case Changes:: Case conversion of parts of the buffer.
1192 * Text Properties:: Assigning Lisp property lists to text characters.
1193 * Substitution:: Replacing a given character wherever it appears.
1194 * Registers:: How registers are implemented. Accessing
1195 the text or position stored in a register.
1196 * Transposition:: Swapping two portions of a buffer.
1197 * Decompression:: Dealing with compressed data.
1198 * Base 64:: Conversion to or from base 64 encoding.
1199 * Checksum/Hash:: Computing cryptographic hashes.
1200 * GnuTLS Cryptography:: Cryptographic algorithms imported from GnuTLS.
1201 * Parsing HTML/XML:: Parsing HTML and XML.
1202 * Atomic Changes:: Installing several buffer changes atomically.
1203 * Change Hooks:: Supplying functions to be run when text is changed.
1207 * Kill Ring Concepts:: What text looks like in the kill ring.
1208 * Kill Functions:: Functions that kill text.
1209 * Yanking:: How yanking is done.
1210 * Yank Commands:: Commands that access the kill ring.
1211 * Low-Level Kill Ring:: Functions and variables for kill ring access.
1212 * Internals of Kill Ring:: Variables that hold kill ring data.
1216 * Primitive Indent:: Functions used to count and insert indentation.
1217 * Mode-Specific Indent:: Customize indentation for different modes.
1218 * Region Indent:: Indent all the lines in a region.
1219 * Relative Indent:: Indent the current line based on previous lines.
1220 * Indent Tabs:: Adjustable, typewriter-like tab stops.
1221 * Motion by Indent:: Move to first non-blank character.
1225 * Examining Properties:: Looking at the properties of one character.
1226 * Changing Properties:: Setting the properties of a range of text.
1227 * Property Search:: Searching for where a property changes value.
1228 * Special Properties:: Particular properties with special meanings.
1229 * Format Properties:: Properties for representing formatting of text.
1230 * Sticky Properties:: How inserted text gets properties from
1232 * Lazy Properties:: Computing text properties in a lazy fashion
1233 only when text is examined.
1234 * Clickable Text:: Using text properties to make regions of text
1235 do something when you click on them.
1236 * Fields:: The @code{field} property defines
1237 fields within the buffer.
1238 * Not Intervals:: Why text properties do not use
1239 Lisp-visible text intervals.
1241 Parsing HTML and XML
1243 * Document Object Model:: Access, manipulate and search the @acronym{DOM}.
1245 Non-@acronym{ASCII} Characters
1247 * Text Representations:: How Emacs represents text.
1248 * Disabling Multibyte:: Controlling whether to use multibyte characters.
1249 * Converting Representations:: Converting unibyte to multibyte and vice versa.
1250 * Selecting a Representation:: Treating a byte sequence as unibyte or multi.
1251 * Character Codes:: How unibyte and multibyte relate to
1252 codes of individual characters.
1253 * Character Properties:: Character attributes that define their
1254 behavior and handling.
1255 * Character Sets:: The space of possible character codes
1256 is divided into various character sets.
1257 * Scanning Charsets:: Which character sets are used in a buffer?
1258 * Translation of Characters:: Translation tables are used for conversion.
1259 * Coding Systems:: Coding systems are conversions for saving files.
1260 * Input Methods:: Input methods allow users to enter various
1261 non-ASCII characters without special keyboards.
1262 * Locales:: Interacting with the POSIX locale.
1266 * Coding System Basics:: Basic concepts.
1267 * Encoding and I/O:: How file I/O functions handle coding systems.
1268 * Lisp and Coding Systems:: Functions to operate on coding system names.
1269 * User-Chosen Coding Systems:: Asking the user to choose a coding system.
1270 * Default Coding Systems:: Controlling the default choices.
1271 * Specifying Coding Systems:: Requesting a particular coding system
1272 for a single file operation.
1273 * Explicit Encoding:: Encoding or decoding text without doing I/O.
1274 * Terminal I/O Encoding:: Use of encoding for terminal I/O.
1276 Searching and Matching
1278 * String Search:: Search for an exact match.
1279 * Searching and Case:: Case-independent or case-significant searching.
1280 * Regular Expressions:: Describing classes of strings.
1281 * Regexp Search:: Searching for a match for a regexp.
1282 * POSIX Regexps:: Searching POSIX-style for the longest match.
1283 * Match Data:: Finding out which part of the text matched,
1284 after a string or regexp search.
1285 * Search and Replace:: Commands that loop, searching and replacing.
1286 * Standard Regexps:: Useful regexps for finding sentences, pages,...
1290 * Syntax of Regexps:: Rules for writing regular expressions.
1291 * Regexp Example:: Illustrates regular expression syntax.
1292 * Regexp Functions:: Functions for operating on regular expressions.
1294 Syntax of Regular Expressions
1296 * Regexp Special:: Special characters in regular expressions.
1297 * Char Classes:: Character classes used in regular expressions.
1298 * Regexp Backslash:: Backslash-sequences in regular expressions.
1302 * Replacing Match:: Replacing a substring that was matched.
1303 * Simple Match Data:: Accessing single items of match data,
1304 such as where a particular subexpression started.
1305 * Entire Match Data:: Accessing the entire match data at once, as a list.
1306 * Saving Match Data:: Saving and restoring the match data.
1310 * Syntax Basics:: Basic concepts of syntax tables.
1311 * Syntax Descriptors:: How characters are classified.
1312 * Syntax Table Functions:: How to create, examine and alter syntax tables.
1313 * Syntax Properties:: Overriding syntax with text properties.
1314 * Motion and Syntax:: Moving over characters with certain syntaxes.
1315 * Parsing Expressions:: Parsing balanced expressions
1316 using the syntax table.
1317 * Syntax Table Internals:: How syntax table information is stored.
1318 * Categories:: Another way of classifying character syntax.
1322 * Syntax Class Table:: Table of syntax classes.
1323 * Syntax Flags:: Additional flags each character can have.
1327 * Motion via Parsing:: Motion functions that work by parsing.
1328 * Position Parse:: Determining the syntactic state of a position.
1329 * Parser State:: How Emacs represents a syntactic state.
1330 * Low-Level Parsing:: Parsing across a specified region.
1331 * Control Parsing:: Parameters that affect parsing.
1333 Abbrevs and Abbrev Expansion
1335 * Abbrev Tables:: Creating and working with abbrev tables.
1336 * Defining Abbrevs:: Specifying abbreviations and their expansions.
1337 * Abbrev Files:: Saving abbrevs in files.
1338 * Abbrev Expansion:: Controlling expansion; expansion subroutines.
1339 * Standard Abbrev Tables:: Abbrev tables used by various major modes.
1340 * Abbrev Properties:: How to read and set abbrev properties.
1341 Which properties have which effect.
1342 * Abbrev Table Properties:: How to read and set abbrev table properties.
1343 Which properties have which effect.
1347 * Basic Thread Functions:: Basic thread functions.
1348 * Mutexes:: Mutexes allow exclusive access to data.
1349 * Condition Variables:: Inter-thread events.
1353 * Subprocess Creation:: Functions that start subprocesses.
1354 * Shell Arguments:: Quoting an argument to pass it to a shell.
1355 * Synchronous Processes:: Details of using synchronous subprocesses.
1356 * Asynchronous Processes:: Starting up an asynchronous subprocess.
1357 * Deleting Processes:: Eliminating an asynchronous subprocess.
1358 * Process Information:: Accessing run-status and other attributes.
1359 * Input to Processes:: Sending input to an asynchronous subprocess.
1360 * Signals to Processes:: Stopping, continuing or interrupting
1361 an asynchronous subprocess.
1362 * Output from Processes:: Collecting output from an asynchronous subprocess.
1363 * Sentinels:: Sentinels run when process run-status changes.
1364 * Query Before Exit:: Whether to query if exiting will kill a process.
1365 * System Processes:: Accessing other processes running on your system.
1366 * Transaction Queues:: Transaction-based communication with subprocesses.
1367 * Network:: Opening network connections.
1368 * Network Servers:: Network servers let Emacs accept net connections.
1369 * Datagrams:: UDP network connections.
1370 * Low-Level Network:: Lower-level but more general function
1371 to create connections and servers.
1372 * Misc Network:: Additional relevant functions for net connections.
1373 * Serial Ports:: Communicating with serial ports.
1374 * Byte Packing:: Using bindat to pack and unpack binary data.
1376 Receiving Output from Processes
1378 * Process Buffers:: By default, output is put in a buffer.
1379 * Filter Functions:: Filter functions accept output from the process.
1380 * Decoding Output:: Filters can get unibyte or multibyte strings.
1381 * Accepting Output:: How to wait until process output arrives.
1383 Low-Level Network Access
1385 * Network Processes:: Using @code{make-network-process}.
1386 * Network Options:: Further control over network connections.
1387 * Network Feature Testing:: Determining which network features work on
1388 the machine you are using.
1390 Packing and Unpacking Byte Arrays
1392 * Bindat Spec:: Describing data layout.
1393 * Bindat Functions:: Doing the unpacking and packing.
1394 * Bindat Examples:: Samples of what bindat.el can do for you!
1398 * Refresh Screen:: Clearing the screen and redrawing everything on it.
1399 * Forcing Redisplay:: Forcing redisplay.
1400 * Truncation:: Folding or wrapping long text lines.
1401 * The Echo Area:: Displaying messages at the bottom of the screen.
1402 * Warnings:: Displaying warning messages for the user.
1403 * Invisible Text:: Hiding part of the buffer text.
1404 * Selective Display:: Hiding part of the buffer text (the old way).
1405 * Temporary Displays:: Displays that go away automatically.
1406 * Overlays:: Use overlays to highlight parts of the buffer.
1407 * Size of Displayed Text:: How large displayed text is.
1408 * Line Height:: Controlling the height of lines.
1409 * Faces:: A face defines a graphics style
1410 for text characters: font, colors, etc.
1411 * Fringes:: Controlling window fringes.
1412 * Scroll Bars:: Controlling scroll bars.
1413 * Window Dividers:: Separating windows visually.
1414 * Display Property:: Enabling special display features.
1415 * Images:: Displaying images in Emacs buffers.
1416 * Buttons:: Adding clickable buttons to Emacs buffers.
1417 * Abstract Display:: Emacs's Widget for Object Collections.
1418 * Blinking:: How Emacs shows the matching open parenthesis.
1419 * Character Display:: How Emacs displays individual characters.
1420 * Beeping:: Audible signal to the user.
1421 * Window Systems:: Which window system is being used.
1422 * Tooltips:: Tooltip display in Emacs.
1423 * Bidirectional Display:: Display of bidirectional scripts, such as
1428 * Displaying Messages:: Explicitly displaying text in the echo area.
1429 * Progress:: Informing user about progress of a long operation.
1430 * Logging Messages:: Echo area messages are logged for the user.
1431 * Echo Area Customization:: Controlling the echo area.
1435 * Warning Basics:: Warnings concepts and functions to report them.
1436 * Warning Variables:: Variables programs bind to customize
1438 * Warning Options:: Variables users set to control display of warnings.
1439 * Delayed Warnings:: Deferring a warning until the end of a command.
1443 * Managing Overlays:: Creating and moving overlays.
1444 * Overlay Properties:: How to read and set properties.
1445 What properties do to the screen display.
1446 * Finding Overlays:: Searching for overlays.
1450 * Face Attributes:: What is in a face?
1451 * Defining Faces:: How to define a face.
1452 * Attribute Functions:: Functions to examine and set face attributes.
1453 * Displaying Faces:: How Emacs combines the faces specified for
1455 * Face Remapping:: Remapping faces to alternative definitions.
1456 * Face Functions:: How to define and examine faces.
1457 * Auto Faces:: Hook for automatic face assignment.
1458 * Basic Faces:: Faces that are defined by default.
1459 * Font Selection:: Finding the best available font for a face.
1460 * Font Lookup:: Looking up the names of available fonts
1461 and information about them.
1462 * Fontsets:: A fontset is a collection of fonts
1463 that handle a range of character sets.
1464 * Low-Level Font:: Lisp representation for character display fonts.
1468 * Fringe Size/Pos:: Specifying where to put the window fringes.
1469 * Fringe Indicators:: Displaying indicator icons in the window fringes.
1470 * Fringe Cursors:: Displaying cursors in the right fringe.
1471 * Fringe Bitmaps:: Specifying bitmaps for fringe indicators.
1472 * Customizing Bitmaps:: Specifying your own bitmaps to use in the fringes.
1473 * Overlay Arrow:: Display of an arrow to indicate position.
1475 The @code{display} Property
1477 * Replacing Specs:: Display specs that replace the text.
1478 * Specified Space:: Displaying one space with a specified width.
1479 * Pixel Specification:: Specifying space width or height in pixels.
1480 * Other Display Specs:: Displaying an image; adjusting the height,
1481 spacing, and other properties of text.
1482 * Display Margins:: Displaying text or images to the side of
1487 * Image Formats:: Supported image formats.
1488 * Image Descriptors:: How to specify an image for use in @code{:display}.
1489 * XBM Images:: Special features for XBM format.
1490 * XPM Images:: Special features for XPM format.
1491 * ImageMagick Images:: Special features available through ImageMagick.
1492 * Other Image Types:: Various other formats are supported.
1493 * Defining Images:: Convenient ways to define an image for later use.
1494 * Showing Images:: Convenient ways to display an image once
1496 * Multi-Frame Images:: Some images contain more than one frame.
1497 * Image Cache:: Internal mechanisms of image display.
1501 * Button Properties:: Button properties with special meanings.
1502 * Button Types:: Defining common properties for classes of buttons.
1503 * Making Buttons:: Adding buttons to Emacs buffers.
1504 * Manipulating Buttons:: Getting and setting properties of buttons.
1505 * Button Buffer Commands:: Buffer-wide commands and bindings for buttons.
1509 * Abstract Display Functions:: Functions in the Ewoc package.
1510 * Abstract Display Example:: Example of using Ewoc.
1514 * Usual Display:: The usual conventions for displaying characters.
1515 * Display Tables:: What a display table consists of.
1516 * Active Display Table:: How Emacs selects a display table to use.
1517 * Glyphs:: How to define a glyph, and what glyphs mean.
1518 * Glyphless Chars:: How glyphless characters are drawn.
1520 Operating System Interface
1522 * Starting Up:: Customizing Emacs startup processing.
1523 * Getting Out:: How exiting works (permanent or temporary).
1524 * System Environment:: Distinguish the name and kind of system.
1525 * User Identification:: Finding the name and user id of the user.
1526 * Time of Day:: Getting the current time.
1527 * Time Conversion:: Converting a time from numeric form to
1528 calendrical data and vice versa.
1529 * Time Parsing:: Converting a time from numeric form to text
1531 * Processor Run Time:: Getting the run time used by Emacs.
1532 * Time Calculations:: Adding, subtracting, comparing times, etc.
1533 * Timers:: Setting a timer to call a function at a
1535 * Idle Timers:: Setting a timer to call a function when Emacs has
1536 been idle for a certain length of time.
1537 * Terminal Input:: Accessing and recording terminal input.
1538 * Terminal Output:: Controlling and recording terminal output.
1539 * Sound Output:: Playing sounds on the computer's speaker.
1540 * X11 Keysyms:: Operating on key symbols for X Windows.
1541 * Batch Mode:: Running Emacs without terminal interaction.
1542 * Session Management:: Saving and restoring state with
1543 X Session Management.
1544 * Desktop Notifications:: Desktop notifications.
1545 * File Notifications:: File notifications.
1546 * Dynamic Libraries:: On-demand loading of support libraries.
1547 * Security Considerations:: Running Emacs in an unfriendly environment.
1551 * Startup Summary:: Sequence of actions Emacs performs at startup.
1552 * Init File:: Details on reading the init file.
1553 * Terminal-Specific:: How the terminal-specific Lisp file is read.
1554 * Command-Line Arguments:: How command-line arguments are processed,
1555 and how you can customize them.
1557 Getting Out of Emacs
1559 * Killing Emacs:: Exiting Emacs irreversibly.
1560 * Suspending Emacs:: Exiting Emacs reversibly.
1564 * Input Modes:: Options for how input is processed.
1565 * Recording Input:: Saving histories of recent or all input events.
1567 Preparing Lisp code for distribution
1569 * Packaging Basics:: The basic concepts of Emacs Lisp packages.
1570 * Simple Packages:: How to package a single .el file.
1571 * Multi-file Packages:: How to package multiple files.
1572 * Package Archives:: Maintaining package archives.
1574 Tips and Conventions
1576 * Coding Conventions:: Conventions for clean and robust programs.
1577 * Key Binding Conventions:: Which keys should be bound by which programs.
1578 * Programming Tips:: Making Emacs code fit smoothly in Emacs.
1579 * Compilation Tips:: Making compiled code run fast.
1580 * Warning Tips:: Turning off compiler warnings.
1581 * Documentation Tips:: Writing readable documentation strings.
1582 * Comment Tips:: Conventions for writing comments.
1583 * Library Headers:: Standard headers for library packages.
1587 * Building Emacs:: How the dumped Emacs is made.
1588 * Pure Storage:: Kludge to make preloaded Lisp functions shareable.
1589 * Garbage Collection:: Reclaiming space for Lisp objects no longer used.
1590 * Stack-allocated Objects:: Temporary conses and strings on C stack.
1591 * Memory Usage:: Info about total size of Lisp objects made so far.
1592 * C Dialect:: What C variant Emacs is written in.
1593 * Writing Emacs Primitives:: Writing C code for Emacs.
1594 * Object Internals:: Data formats of buffers, windows, processes.
1595 * C Integer Types:: How C integer types are used inside Emacs.
1599 * Buffer Internals:: Components of a buffer structure.
1600 * Window Internals:: Components of a window structure.
1601 * Process Internals:: Components of a process structure.
1607 @include objects.texi
1608 @include numbers.texi
1609 @include strings.texi
1612 @include sequences.texi
1613 @include records.texi
1615 @include symbols.texi
1618 @include control.texi
1619 @include variables.texi
1620 @include functions.texi
1621 @include macros.texi
1623 @include customize.texi
1624 @include loading.texi
1625 @include compile.texi
1627 @c This includes edebug.texi.
1628 @include debugging.texi
1629 @include streams.texi
1630 @include minibuf.texi
1631 @include commands.texi
1633 @include keymaps.texi
1638 @include backups.texi
1642 @c ================ Beginning of Volume 2 ================
1645 @include buffers.texi
1646 @include windows.texi
1647 @include frames.texi
1649 @include positions.texi
1650 @include markers.texi
1652 @include nonascii.texi
1654 @include searching.texi
1655 @include syntax.texi
1656 @include abbrevs.texi
1657 @include threads.texi
1658 @include processes.texi
1660 @include display.texi
1663 @include package.texi
1668 @node GNU Free Documentation License
1669 @appendix GNU Free Documentation License
1670 @include doclicense.texi
1672 @appendix GNU General Public License
1675 @include internals.texi
1676 @include errors.texi
1686 @unnumbered New Symbols Since the Previous Edition
1694 These words prevent "local variables" above from confusing Emacs.