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