(Coding System Basics): Describe about rondtrip
[bpt/emacs.git] / lispref / elisp.texi
index 7dbc809..894ebb2 100644 (file)
@@ -4,54 +4,17 @@
 @settitle GNU Emacs Lisp Reference Manual
 @c %**end of header
 
-@smallbook
-
-@ifinfo
-This version is the edition 2.5 of the GNU Emacs Lisp
-Reference Manual.  It corresponds to Emacs Version 20.3
-@c Please REMEMBER to update edition number in *four* places in this file
-@c                 and also in *one* place in intro.texi
-
-Published by the Free Software Foundation
-59 Temple Place, Suite 330
-Boston, MA  02111-1307  USA
-
-Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998 Free Software Foundation, Inc. 
-
-Permission is granted to make and distribute verbatim copies of this
-manual provided the copyright notice and this permission notice are
-preserved on all copies.
+@c Versino of the manual.
+@set VERSION 2.9
 
-@ignore
-Permission is granted to process this file through TeX and print the
-results, provided the printed document carries copying permission notice
-identical to this one except for the removal of this paragraph (this
-paragraph not being relevant to the printed manual).
+@dircategory Emacs
+@direntry
+* Elisp: (elisp).      The Emacs Lisp Reference Manual.
+@end direntry
 
-@end ignore
-Permission is granted to copy and distribute modified versions of this
-manual under the conditions for verbatim copying, provided that the
-entire resulting derived work is distributed under the terms of a
-permission notice identical to this one.
-
-Permission is granted to copy and distribute translations of this manual
-into another language, under the above conditions for modified versions,
-except that this permission notice may be stated in a translation
-approved by the Foundation.
-
-Permission is granted to copy and distribute modified versions of this
-manual under the conditions for verbatim copying, provided also that the
-section entitled ``GNU General Public License'' is included exactly as
-in the original, and provided that the entire resulting derived work is
-distributed under the terms of a permission notice identical to this
-one.
-
-Permission is granted to copy and distribute translations of this manual
-into another language, under the above conditions for modified versions,
-except that the section entitled ``GNU General Public License'' may be
-included in a translation approved by the Free Software Foundation
-instead of in the original English.
-@end ifinfo
+@smallbook
+@setchapternewpage odd
+@finalout
 
 @c Combine indices.
 @synindex cp fn
@@ -61,65 +24,82 @@ instead of in the original English.
 @c We use the "type index" to index new functions and variables.
 @c @syncodeindex tp fn
 
-@setchapternewpage odd
-@finalout
+@ifnottex
+This Info file contains edition @value{VERSION} of the GNU Emacs Lisp
+Reference Manual, corresponding to Emacs version 22.1.
+@c Please REMEMBER to update edition number in *four* places in this file
+@c                 and also in *one* place in intro.texi and *one* in README.
+
+Published by the Free Software Foundation
+59 Temple Place, Suite 330
+Boston, MA  02111-1307  USA
+
+Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2005,@*
+              2000, 2002 Free Software Foundation, Inc.
+
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.1 or
+any later version published by the Free Software Foundation; with the
+Invariant Sections being ``GNU General Public License'', with the Front-Cover texts being
+``A GNU Manual'', and with the Back-Cover Texts as in (a) below.  A copy
+of the license is included in the section entitled ``GNU Free
+Documentation License''.
+
+(a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
+this GNU Manual, like GNU software.  Copies published by the Free
+Software Foundation raise funds for GNU development.''
+@end ifnottex
 
 @titlepage
 @title GNU Emacs Lisp Reference Manual
-@subtitle GNU Emacs Version 20
-@subtitle for Unix Users
+@subtitle For Emacs Version 22
 @c The edition number appears in several places in this file
 @c and also in the file intro.texi.
-@subtitle Revision 2.5, February 1998
+@subtitle Revision @value{VERSION}, January 2002
 
 @author by Bil Lewis, Dan LaLiberte, Richard Stallman
 @author and the GNU Manual Group
 @page
 @vskip 0pt plus 1filll
-Copyright @copyright{} 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998 Free Software Foundation, Inc. 
+Copyright @copyright{} 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998,@*
+1999, 2000, 2002 Free Software Foundation, Inc.
 
 @sp 2
-Edition 2.5 @*
-Revised for Emacs Version 20.3,@*
-February 1998.@*
+Edition @value{VERSION} @*
+Revised for Emacs Version 22.1,@*
+January 2002.@*
 @sp 2
-ISBN 1-882114-71-X
+ISBN 1-882114-73-6
 
 @sp 2
 Published by the Free Software Foundation @*
 59 Temple Place, Suite 330@*
 Boston, MA  02111-1307  USA
 
-Permission is granted to make and distribute verbatim copies of this
-manual provided the copyright notice and this permission notice are
-preserved on all copies.
-
-Permission is granted to copy and distribute modified versions of this
-manual under the conditions for verbatim copying, provided also that the
-section entitled ``GNU General Public License'' is included
-exactly as in the original, and provided that the entire resulting
-derived work is distributed under the terms of a permission notice
-identical to this one.
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.1 or
+any later version published by the Free Software Foundation; with the
+Invariant Sections being ``Copying'', with the Front-Cover texts being
+``A GNU Manual'', and with the Back-Cover Texts as in (a) below.  A copy
+of the license is included in the section entitled ``GNU Free
+Documentation License''.
 
-Permission is granted to copy and distribute translations of this manual
-into another language, under the above conditions for modified versions,
-except that the section entitled ``GNU General Public License'' may be
-included in a translation approved by the Free Software Foundation
-instead of in the original English.
+(a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
+this GNU Manual, like GNU software.  Copies published by the Free
+Software Foundation raise funds for GNU development.''
 
 Cover art by Etienne Suvasa.
 @end titlepage
 @page
 
-@node Top, Copying, (dir), (dir)
+@node Top, Introduction, (dir), (dir)
 
-@ifinfo
-This Info file contains edition 2.5 of the GNU Emacs Lisp
-Reference Manual, corresponding to GNU Emacs version 20.3.
-@end ifinfo
+@ifnottex
+This Info file contains edition @value{VERSION} of the GNU Emacs Lisp
+Reference Manual, corresponding to GNU Emacs version 22.1.
+@end ifnottex
 
 @menu
-* Copying::                 Conditions for copying and changing GNU Emacs.
 * Introduction::            Introduction and conventions used.
 * Standards: Coding Conventions.    Coding conventions for Emacs Lisp.
 
@@ -130,6 +110,7 @@ Reference Manual, corresponding to GNU Emacs version 20.3.
 * Sequences Arrays Vectors::  Lists, strings and vectors are called sequences.
                                 Certain functions act on any kind of sequence.
                                 The description of vectors is here as well.
+* Hash Tables::             Very fast lookup-tables.
 * Symbols::                 Symbols represent names, uniquely.
 
 * Evaluation::              How Lisp expressions are evaluated.
@@ -170,14 +151,15 @@ Reference Manual, corresponding to GNU Emacs version 20.3.
 * Abbrevs::                 How Abbrev mode works, and its data structures.
 
 * Processes::               Running and communicating with subprocesses.
+* Display::                Features for controlling the screen display.
 * System Interface::        Getting the user id, system type, environment
                               variables, and other such things.
-* Display::                Parameters controlling screen usage.
-                              The bell.  Waiting for input.
-* Calendar::               Customizing the calendar and diary.
 
 Appendices
 
+* Antinews::                Info for users downgrading to Emacs 20.
+* GNU Free Documentation License:: The license for this documentation
+* GPL::                     Conditions for copying and changing GNU Emacs.
 * Tips::                    Advice and coding conventions for Emacs Lisp.
 * GNU Emacs Internals::     Building and dumping Emacs;
                               internal data structures.
@@ -190,7 +172,7 @@ Appendices
 * Index::                   Index including concepts, functions, variables,
                               and other terms.
 
-* New Symbols::             New functions and variables in Emacs 20.
+* New Symbols::             New functions and variables in Emacs 22.
 
       --- The Detailed Node Listing ---
 
@@ -224,8 +206,8 @@ Tips and Conventions
 
 Format of Descriptions
 
-* A Sample Function Description::       
-* A Sample Variable Description::   
+* A Sample Function Description::
+* A Sample Variable Description::
 
 Lisp Data Types
 
@@ -241,7 +223,7 @@ Programming Types
 * Integer Type::        Numbers without fractional parts.
 * Floating Point Type:: Numbers with fractional parts and with a large range.
 * Character Type::      The representation of letters, numbers and
-                        control characters.
+                          control characters.
 * Sequence Type::       Both lists and arrays are classified as sequences.
 * Cons Cell Type::      Cons cells, and lists (which are made from cons cells).
 * Array Type::          Arrays include strings and vectors.
@@ -255,7 +237,7 @@ Programming Types
 * Primitive Function Type::     A function written in C, callable from Lisp.
 * Byte-Code Type::      A function written in Lisp, then compiled.
 * Autoload Type::       A type used for automatically loading seldom-used
-                        functions.
+                          functions.
 
 List Type
 
@@ -271,7 +253,7 @@ Editing Types
 * Process Type::            A process running on the underlying OS.
 * Stream Type::             Receive or send characters.
 * Keymap Type::             What function a keystroke invokes.
-* Overlay Type::        How an overlay is represented.
+* Overlay Type::            How an overlay is represented.
 
 Numbers
 
@@ -292,13 +274,12 @@ Strings and Characters
 * Creating Strings::        Functions to allocate new strings.
 * Text Comparison::         Comparing characters or strings.
 * String Conversion::       Converting characters or strings and vice versa.
-* Formatting Strings::      @code{format}: Emacs's analog of @code{printf}.
+* Formatting Strings::      @code{format}: Emacs's analogue of @code{printf}.
 * Case Conversion::         Case conversion functions.
 
 Lists
 
 * Cons Cells::              How lists are made out of cons cells.
-* Lists as Boxes::          Graphical notation to explain lists.
 * List-related Predicates:: Is this object a list?  Comparing two lists.
 * List Elements::           Extracting the pieces of a list.
 * Building Lists::          Creating list structure.
@@ -334,7 +315,7 @@ Evaluation
 * Intro Eval::              Evaluation in the scheme of things.
 * Eval::                    How to invoke the Lisp interpreter explicitly.
 * Forms::                   How various sorts of objects are evaluated.
-* Quoting::                 Avoiding evaluation (to put constants in 
+* Quoting::                 Avoiding evaluation (to put constants in
                               the program).
 
 Kinds of Forms
@@ -387,11 +368,11 @@ Variables
 
 Scoping Rules for Variable Bindings
 
-* Scope::                   Scope means where in the program a value 
+* Scope::                   Scope means where in the program a value
                               is visible.  Comparison with other languages.
 * Extent::                  Extent means how long in time a value exists.
 * Impl of Scope::           Two ways to implement dynamic scoping.
-* Using Scoping::           How to use dynamic scoping carefully and 
+* Using Scoping::           How to use dynamic scoping carefully and
                               avoid problems.
 
 Buffer-Local Variables
@@ -409,11 +390,11 @@ Functions
 * Defining Functions::      Lisp expressions for defining functions.
 * Calling Functions::       How to use an existing function.
 * Mapping Functions::       Applying a function to each element of a list, etc.
-* Anonymous Functions::     Lambda-expressions are functions with no names.    
+* Anonymous Functions::     Lambda-expressions are functions with no names.
 * Function Cells::          Accessing or setting the function definition
                               of a symbol.
 * Related Topics::          Cross-references to specific Lisp primitives
-                              that have a special bearing on how 
+                              that have a special bearing on how
                               functions work.
 
 Lambda Expressions
@@ -432,13 +413,20 @@ Macros
 * Backquote::               Easier construction of list structure.
 * Problems with Macros::    Don't evaluate the macro arguments too many times.
                               Don't hide the user's variables.
+* Indenting Macros::        Specifying how to indent macro calls.
 
 Loading
 
 * How Programs Do Loading:: The @code{load} function and others.
+* Library Search::          Finding a library to load.
+* Loading Non-ASCII::       Non-@acronym{ASCII} characters in Emacs Lisp files.
 * Autoload::                Setting up a function to autoload.
-* Named Features::          Loading a library if it isn't already loaded.
 * Repeated Loading::        Precautions about loading a file twice.
+* Named Features::          Loading a library if it isn't already loaded.
+* Where Defined::           Finding which file defined a certain symbol.
+* Unloading::              How to ``unload'' a library that was loaded.
+* Hooks for Loading::      Providing code to be run when
+                             particular libraries are loaded.
 
 Byte Compilation
 
@@ -454,18 +442,18 @@ Advising Functions
 * Enabling Advice::         You can enable or disable each piece of advice.
 * Preactivation::           Preactivation is a way of speeding up the
                               loading of compiled advice.
-* Argument Access::         How advice can access the function's arguments.
-* Subr Arguments::          Accessing arguments when advising a primitive.
+* Argument Access in Advice:: How advice can access the function's arguments.
+* Advising Primitives::     Accessing arguments when advising a primitive.
 * Combined Definition::     How advice is implemented.
 
 Debugging Lisp Programs
 
 * Debugger::                How the Emacs Lisp debugger is implemented.
 * Syntax Errors::           How to find syntax errors.
-* Compilation Errors::      How to find errors that show up in 
+* Compilation Errors::      How to find errors that show up in
                               byte compilation.
 * Edebug::                  A source-level Emacs Lisp debugger.
-                                
+
 The Lisp Debugger
 
 * Error Debugging::         Entering the debugger when an error happens.
@@ -484,10 +472,10 @@ Debugging Invalid Lisp Syntax
 Reading and Printing Lisp Objects
 
 * Streams Intro::           Overview of streams, reading and printing.
-* Input Streams::           Various data types that can be used as 
+* Input Streams::           Various data types that can be used as
                               input streams.
 * Input Functions::         Functions to read Lisp objects from text.
-* Output Streams::          Various data types that can be used as 
+* Output Streams::          Various data types that can be used as
                               output streams.
 * Output Functions::        Functions to print Lisp objects as text.
 
@@ -543,14 +531,15 @@ Keymaps
 * Inheritance and Keymaps::    How one keymap can inherit the bindings
                                  of another keymap.
 * Prefix Keys::                 Defining a key with a keymap as its definition.
-* Menu Keymaps::               A keymap can define a menu for X windows
+* Menu Keymaps::               A keymap can define a menu for X
                                  or for use from the terminal.
 * Active Keymaps::             Each buffer has a local keymap
                                   to override the standard (global) bindings.
-                               Each minor mode can also override them.
+                                 Each minor mode can also override them.
 * Key Lookup::                  How extracting elements from keymaps works.
 * Functions for Key Lookup::    How to request key lookup.
 * Changing Key Bindings::       Redefining a key in a keymap.
+* Remapping Commands::          Bindings that translate one command to another.
 * Key Binding Commands::        Interactive interfaces for redefining keys.
 * Scanning Keymaps::            Looking through all keymaps, for printing help.
 
@@ -559,7 +548,7 @@ Major and Minor Modes
 * Major Modes::             Defining major modes.
 * Minor Modes::             Defining minor modes.
 * Mode Line Format::        Customizing the text that appears in the mode line.
-* Hooks::                   How to use hooks; how to write code that 
+* Hooks::                   How to use hooks; how to write code that
                               provides hooks.
 
 Major Modes
@@ -619,7 +608,7 @@ File Names
 * File Name Components::    The directory part of a file name, and the rest.
 * Directory Names::         A directory's name as a directory
                               is different from its name as a file.
-* Relative File Names::     Some file names are relative to a 
+* Relative File Names::     Some file names are relative to a
                               current directory.
 * File Name Expansion::     Converting relative file names to absolute ones.
 * Unique File Names::       Generating names for temporary files.
@@ -627,17 +616,17 @@ File Names
 
 Backups and Auto-Saving
 
-* Backup Files::            How backup files are made; how their names 
+* Backup Files::            How backup files are made; how their names
                               are chosen.
 * Auto-Saving::             How auto-save files are made; how their
                               names are chosen.
-* Reverting::               @code{revert-buffer}, and how to customize 
+* Reverting::               @code{revert-buffer}, and how to customize
                               what it does.
 
 Backup Files
 
 * Making Backups::          How Emacs makes backup files, and when.
-* Rename or Copy::          Two alternatives: renaming the old file 
+* Rename or Copy::          Two alternatives: renaming the old file
                               or copying it.
 * Numbered Backups::        Keeping multiple backups for each source file.
 * Backup Names::            How backup file names are computed; customization.
@@ -671,7 +660,7 @@ Windows
                               and choosing a window for it.
 * Window Point::            Each window has its own location of point.
 * Window Start::            The display-start position controls which text
-                              is on-screen in the window. 
+                              is on-screen in the window.
 * Vertical Scrolling::      Moving text up and down in the window.
 * Horizontal Scrolling::    Moving text sideways on the window.
 * Size of Window::          Accessing the size of a window.
@@ -692,17 +681,17 @@ Frames
 * Input Focus::                    Specifying the selected frame.
 * Visibility of Frames::    Frames may be visible or invisible, or icons.
 * Raising and Lowering::    Raising a frame makes it hide other X windows;
-                             lowering it makes the others hide them.
+                             lowering it puts it underneath the others.
 * Frame Configurations::    Saving the state of all frames.
 * Mouse Tracking::         Getting events that say when the mouse moves.
 * Mouse Position::         Asking where the mouse is, or moving it.
 * Pop-Up Menus::           Displaying a menu for the user to select from.
 * Dialog Boxes::            Displaying a box to ask yes or no.
 * Pointer Shapes::          Specifying the shape of the mouse pointer.
-* Window System Selections::Transferring text to and from other X clients.
+* Window System Selections::Transferring text to and from other windows.
 * Color Names::                    Getting the definitions of color names.
 * Resources::              Getting resource values from the server.
-* Server Data::                    Getting info about the X server.
+* Display Feature Testing:: Determining the features of a terminal.
 
 Positions
 
@@ -727,7 +716,7 @@ Markers
 * Predicates on Markers::   Testing whether an object is a marker.
 * Creating Markers::        Making empty markers or markers at certain places.
 * Information from Markers::  Finding the marker's buffer or character
-                                position. 
+                                position.
 * Moving Markers::          Moving the marker to a new buffer or position.
 * The Mark::                How ``the mark'' is implemented with a marker.
 * The Region::              How to access ``the region''.
@@ -755,12 +744,16 @@ Text
 * Transposition::           Swapping two portions of a buffer.
 * Registers::               How registers are implemented.  Accessing
                               the text or position stored in a register.
+* Atomic Changes::          Installing several buffer changes ``atomically''.
+* Base 64::                 Conversion to or from base 64 encoding.
+* MD5 Checksum::            Compute the MD5 ``message digest''/``checksum''.
 * Change Hooks::            Supplying functions to be run when text is changed.
-                              
+
 The Kill Ring
 
 * Kill Ring Concepts::      What text looks like in the kill ring.
 * Kill Functions::          Functions that kill text.
+* Yanking::                 How yanking is done.
 * Yank Commands::           Commands that access the kill ring.
 * Low-Level Kill Ring::            Functions and variables for kill ring access.
 * Internals of Kill Ring::  Variables that hold kill-ring data.
@@ -787,9 +780,31 @@ Text Properties
                               them back.
 * Lazy Properties::         Computing text properties in a lazy fashion
                               only when text is examined.
+* Clickable Text::          Using text properties to make regions of text
+                              do something when you click on them.
+* Fields::                  The @code{field} property defines
+                              fields within the buffer.
 * Not Intervals::          Why text properties do not use
                              Lisp-visible text intervals.
 
+Non-ASCII Characters
+
+* Text Representations::    Unibyte and multibyte representations
+* Converting Representations::  Converting unibyte to multibyte and vice versa.
+* Selecting a Representation::  Treating a byte sequence as unibyte or multi.
+* Character Codes::         How unibyte and multibyte relate to
+                                codes of individual characters.
+* Character Sets::          The space of possible characters codes
+                                is divided into various character sets.
+* Chars and Bytes::         More information about multibyte encodings.
+* Splitting Characters::    Converting a character to its byte sequence.
+* Scanning Charsets::       Which character sets are used in a buffer?
+* Translation of Characters::   Translation tables are used for conversion.
+* Coding Systems::          Coding systems are conversions for saving files.
+* Input Methods::           Input methods allow users to enter various
+                                non-ASCII characters without special keyboards.
+* Locales::                 Interacting with the POSIX locale.
+
 Searching and Matching
 
 * String Search::           Search for an exact match.
@@ -847,6 +862,7 @@ Receiving Output from Processes
 
 * Process Buffers::         If no filter, output is put in a buffer.
 * Filter Functions::        Filter functions accept output from the process.
+* Decoding Output::         Filters can get unibyte or multibyte strings.
 * Accepting Output::        How to wait until process output arrives.
 
 Operating System Interface
@@ -856,15 +872,14 @@ Operating System Interface
 * System Environment::      Distinguish the name and kind of system.
 * Terminal Input::          Recording terminal input for debugging.
 * Terminal Output::         Recording terminal output for debugging.
-* Flow Control::            How to turn output flow control on or off.
 * Batch Mode::              Running Emacs without terminal interaction.
 
 Starting Up Emacs
 
-* Start-up Summary::        Sequence of actions Emacs performs at start-up.
+* Startup Summary::         Sequence of actions Emacs performs at start-up.
 * Init File::               Details on reading the init file (@file{.emacs}).
 * Terminal-Specific::       How the terminal-specific Lisp file is read.
-* Command Line Arguments::  How command line arguments are processed,
+* Command-Line Arguments::  How command line arguments are processed,
                               and how you can customize them.
 
 Getting out of Emacs
@@ -877,12 +892,21 @@ Emacs Display
 * Refresh Screen::          Clearing the screen and redrawing everything on it.
 * Truncation::              Folding or wrapping long text lines.
 * The Echo Area::           Where messages are displayed.
+* Warnings::                Displaying warning messages for the user.
 * Selective Display::       Hiding part of the buffer text.
 * Overlay Arrow::           Display of an arrow to indicate position.
 * Temporary Displays::      Displays that go away automatically.
-* Waiting::                 Forcing display update and waiting for user.
+* Overlays::               Use overlays to highlight parts of the buffer.
+* Width::                   How wide a character or string is on the screen.
+* Faces::                  A face defines a graphics style
+                              for text characters: font, colors, etc.
+* Fringes::                 Controlling window fringes.
+* Display Property::        Enabling special display features.
+* Images::                  Displaying images in Emacs buffers.
 * Blinking::                How Emacs shows the matching open parenthesis.
-* Usual Display::          How control characters are displayed.
+* Inverse Video::          Specifying how the screen looks.
+* Usual Display::          The usual conventions for displaying nonprinting chars.
+* Display Tables::         How to specify other conventions.
 * Beeping::                 Audible signal to the user.
 * Window Systems::          Which window system is being used.
 
@@ -908,6 +932,7 @@ Object Internals
 
 @include lists.texi
 @include sequences.texi
+@include hash.texi
 @include symbols.texi
 @include eval.texi
 
@@ -946,9 +971,8 @@ Object Internals
 @include abbrevs.texi
 @include processes.texi
 
-@include os.texi
 @include display.texi
-@include calendar.texi
+@include os.texi
 
 @c MOVE to Emacs Manual:  include misc-modes.texi
 
@@ -956,6 +980,9 @@ Object Internals
 
 @c  REMOVE this:  include non-hacker.texi
 
+@include anti.texi
+@include doclicense.texi
+@include gpl.texi
 @include tips.texi
 @include internals.texi
 @include errors.texi
@@ -979,3 +1006,7 @@ Object Internals
 
 \f
 These words prevent "local variables" above from confusing Emacs.
+
+@ignore
+   arch-tag: f7e9a219-a0e1-4776-b631-08eaa1d49b34
+@end ignore