]> code.delx.au - gnu-emacs/blobdiff - doc/lispref/text.texi
Get rid of funvec.
[gnu-emacs] / doc / lispref / text.texi
index b1a8653def5dd42072b0a219ee76807422991518..3ff2697dd374b86e7d9101cff581a7a349d51bdf 100644 (file)
@@ -1,7 +1,6 @@
 @c -*-texinfo-*-
 @c This is part of the GNU Emacs Lisp Reference Manual.
 @c -*-texinfo-*-
 @c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2000, 2001,
-@c   2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+@c Copyright (C) 1990-1995, 1998-2011  Free Software Foundation, Inc.
 @c See the file elisp.texi for copying conditions.
 @setfilename ../../info/text
 @node Text, Non-ASCII Characters, Markers, Top
 @c See the file elisp.texi for copying conditions.
 @setfilename ../../info/text
 @node Text, Non-ASCII Characters, Markers, Top
@@ -42,7 +41,7 @@ the character after point.
 * The Kill Ring::    Where removed text sometimes is saved for later use.
 * Undo::             Undoing changes to the text of a buffer.
 * Maintaining Undo:: How to enable and disable undo information.
 * The Kill Ring::    Where removed text sometimes is saved for later use.
 * Undo::             Undoing changes to the text of a buffer.
 * Maintaining Undo:: How to enable and disable undo information.
-                       How to control how much information is kept.
+                        How to control how much information is kept.
 * Filling::          Functions for explicit filling.
 * Margins::          How to specify margins for filling commands.
 * Adaptive Fill::    Adaptive Fill mode chooses a fill prefix from context.
 * Filling::          Functions for explicit filling.
 * Margins::          How to specify margins for filling commands.
 * Adaptive Fill::    Adaptive Fill mode chooses a fill prefix from context.
@@ -58,6 +57,7 @@ the character after point.
                        position stored in a register.
 * Base 64::          Conversion to or from base 64 encoding.
 * MD5 Checksum::     Compute the MD5 "message digest"/"checksum".
                        position stored in a register.
 * Base 64::          Conversion to or from base 64 encoding.
 * MD5 Checksum::     Compute the MD5 "message digest"/"checksum".
+* Parsing HTML::     Parsing HTML and XML.
 * Atomic Changes::   Installing several buffer changes "atomically".
 * Change Hooks::     Supplying functions to be run when text is changed.
 @end menu
 * Atomic Changes::   Installing several buffer changes "atomically".
 * Change Hooks::     Supplying functions to be run when text is changed.
 @end menu
@@ -85,7 +85,7 @@ buffer is @samp{@@}:
 
 @example
 @group
 
 @example
 @group
-(char-to-string (char-after 1))
+(string (char-after 1))
      @result{} "@@"
 @end group
 @end example
      @result{} "@@"
 @end group
 @end example
@@ -120,9 +120,9 @@ but there is no peace.
 @end group
 
 @group
 @end group
 
 @group
-(char-to-string (preceding-char))
+(string (preceding-char))
      @result{} "a"
      @result{} "a"
-(char-to-string (following-char))
+(string (following-char))
      @result{} "c"
 @end group
 @end example
      @result{} "c"
 @end group
 @end example
@@ -487,6 +487,9 @@ it except to install it on a keymap.
 
 In an interactive call, @var{count} is the numeric prefix argument.
 
 
 In an interactive call, @var{count} is the numeric prefix argument.
 
+Self-insertion translates the input character through
+@code{translation-table-for-input}.  @xref{Translation of Characters}.
+
 This command calls @code{auto-fill-function} whenever that is
 non-@code{nil} and the character inserted is in the table
 @code{auto-fill-chars} (@pxref{Auto Filling}).
 This command calls @code{auto-fill-function} whenever that is
 non-@code{nil} and the character inserted is in the table
 @code{auto-fill-chars} (@pxref{Auto Filling}).
@@ -818,7 +821,7 @@ would be difficult to change the terminology now.
 * Kill Functions::         Functions that kill text.
 * Yanking::                How yanking is done.
 * Yank Commands::          Commands that access 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.
+* Low-Level Kill Ring::    Functions and variables for kill ring access.
 * Internals of Kill Ring:: Variables that hold kill ring data.
 @end menu
 
 * Internals of Kill Ring:: Variables that hold kill ring data.
 @end menu
 
@@ -861,7 +864,7 @@ adds it to the most recent element.  It determines automatically (using
 @code{last-command}) whether the previous command was a kill command,
 and if so appends the killed text to the most recent entry.
 
 @code{last-command}) whether the previous command was a kill command,
 and if so appends the killed text to the most recent entry.
 
-@deffn Command kill-region start end &optional yank-handler
+@deffn Command kill-region start end
 This function kills the text in the region defined by @var{start} and
 @var{end}.  The text is deleted but saved in the kill ring, along with
 its text properties.  The value is always @code{nil}.
 This function kills the text in the region defined by @var{start} and
 @var{end}.  The text is deleted but saved in the kill ring, along with
 its text properties.  The value is always @code{nil}.
@@ -869,17 +872,10 @@ its text properties.  The value is always @code{nil}.
 In an interactive call, @var{start} and @var{end} are point and
 the mark.
 
 In an interactive call, @var{start} and @var{end} are point and
 the mark.
 
-@c Emacs 19 feature
 If the buffer or text is read-only, @code{kill-region} modifies the kill
 ring just the same, then signals an error without modifying the buffer.
 This is convenient because it lets the user use a series of kill
 commands to copy text from a read-only buffer into the kill ring.
 If the buffer or text is read-only, @code{kill-region} modifies the kill
 ring just the same, then signals an error without modifying the buffer.
 This is convenient because it lets the user use a series of kill
 commands to copy text from a read-only buffer into the kill ring.
-
-If @var{yank-handler} is non-@code{nil}, this puts that value onto
-the string of killed text, as a @code{yank-handler} text property.
-@xref{Yanking}.  Note that if @var{yank-handler} is @code{nil}, any
-@code{yank-handler} properties present on the killed text are copied
-onto the kill ring, like other text properties.
 @end deffn
 
 @defopt kill-read-only-ok
 @end deffn
 
 @defopt kill-read-only-ok
@@ -896,10 +892,10 @@ from the buffer.  It returns @code{nil}.
 The command does not set @code{this-command} to @code{kill-region}, so a
 subsequent kill command does not append to the same kill ring entry.
 
 The command does not set @code{this-command} to @code{kill-region}, so a
 subsequent kill command does not append to the same kill ring entry.
 
-Don't call @code{copy-region-as-kill} in Lisp programs unless you aim to
-support Emacs 18.  For newer Emacs versions, it is better to use
-@code{kill-new} or @code{kill-append} instead.  @xref{Low-Level Kill
-Ring}.
+@c FIXME Why is it better?  Why isn't copy-region-as-kill obsolete then?
+@c Why is it used in many places in Emacs?
+In Lisp programs, it is better to use @code{kill-new} or
+@code{kill-append} instead of this command.  @xref{Low-Level Kill Ring}.
 @end deffn
 
 @node Yanking
 @end deffn
 
 @node Yanking
@@ -975,14 +971,14 @@ property (@pxref{Yanking}).
 
 @deffn Command yank &optional arg
 @cindex inserting killed text
 
 @deffn Command yank &optional arg
 @cindex inserting killed text
-This command inserts before point the text at the front of the
-kill ring.  It positions the mark at the beginning of that text, and
-point at the end.
+This command inserts before point the text at the front of the kill
+ring.  It sets the mark at the beginning of that text, using
+@code{push-mark} (@pxref{The Mark}), and puts point at the end.
 
 If @var{arg} is a non-@code{nil} list (which occurs interactively when
 the user types @kbd{C-u} with no digits), then @code{yank} inserts the
 text as described above, but puts point before the yanked text and
 
 If @var{arg} is a non-@code{nil} list (which occurs interactively when
 the user types @kbd{C-u} with no digits), then @code{yank} inserts the
 text as described above, but puts point before the yanked text and
-puts the mark after it.
+sets the mark after it.
 
 If @var{arg} is a number, then @code{yank} inserts the @var{arg}th
 most recently killed text---the @var{arg}th element of the kill ring
 
 If @var{arg} is a number, then @code{yank} inserts the @var{arg}th
 most recently killed text---the @var{arg}th element of the kill ring
@@ -1037,8 +1033,8 @@ text property, if there is one.
 @subsection Low-Level Kill Ring
 
   These functions and variables provide access to the kill ring at a
 @subsection Low-Level Kill Ring
 
   These functions and variables provide access to the kill ring at a
-lower level, but still convenient for use in Lisp programs, because they
-take care of interaction with window system selections
+lower level, but are still convenient for use in Lisp programs,
+because they take care of interaction with window system selections
 (@pxref{Window System Selections}).
 
 @defun current-kill n &optional do-not-move
 (@pxref{Window System Selections}).
 
 @defun current-kill n &optional do-not-move
@@ -1054,15 +1050,17 @@ If @var{n} is zero, indicating a request for the latest kill,
 @code{current-kill} calls the value of
 @code{interprogram-paste-function} (documented below) before
 consulting the kill ring.  If that value is a function and calling it
 @code{current-kill} calls the value of
 @code{interprogram-paste-function} (documented below) before
 consulting the kill ring.  If that value is a function and calling it
-returns a string, @code{current-kill} pushes that string onto the kill
-ring and returns it.  It also sets the yanking pointer to point to
-that new entry, regardless of the value of @var{do-not-move}.
-Otherwise, @code{current-kill} does not treat a zero value for @var{n}
-specially: it returns the entry pointed at by the yanking pointer and
-does not move the yanking pointer.
+returns a string or a list of several string, @code{current-kill}
+pushes the strings onto the kill ring and returns the first string.
+It also sets the yanking pointer to point to the kill-ring entry of
+the first string returned by @code{interprogram-paste-function},
+regardless of the value of @var{do-not-move}.  Otherwise,
+@code{current-kill} does not treat a zero value for @var{n} specially:
+it returns the entry pointed at by the yanking pointer and does not
+move the yanking pointer.
 @end defun
 
 @end defun
 
-@defun kill-new string &optional replace yank-handler
+@defun kill-new string &optional replace
 This function pushes the text @var{string} onto the kill ring and
 makes the yanking pointer point to it.  It discards the oldest entry
 if appropriate.  It also invokes the value of
 This function pushes the text @var{string} onto the kill ring and
 makes the yanking pointer point to it.  It discards the oldest entry
 if appropriate.  It also invokes the value of
@@ -1071,25 +1069,15 @@ if appropriate.  It also invokes the value of
 If @var{replace} is non-@code{nil}, then @code{kill-new} replaces the
 first element of the kill ring with @var{string}, rather than pushing
 @var{string} onto the kill ring.
 If @var{replace} is non-@code{nil}, then @code{kill-new} replaces the
 first element of the kill ring with @var{string}, rather than pushing
 @var{string} onto the kill ring.
-
-If @var{yank-handler} is non-@code{nil}, this puts that value onto
-the string of killed text, as a @code{yank-handler} property.
-@xref{Yanking}.  Note that if @var{yank-handler} is @code{nil}, then
-@code{kill-new} copies any @code{yank-handler} properties present on
-@var{string} onto the kill ring, as it does with other text properties.
 @end defun
 
 @end defun
 
-@defun kill-append string before-p &optional yank-handler
+@defun kill-append string before-p
 This function appends the text @var{string} to the first entry in the
 kill ring and makes the yanking pointer point to the combined entry.
 Normally @var{string} goes at the end of the entry, but if
 @var{before-p} is non-@code{nil}, it goes at the beginning.  This
 function also invokes the value of @code{interprogram-cut-function}
 This function appends the text @var{string} to the first entry in the
 kill ring and makes the yanking pointer point to the combined entry.
 Normally @var{string} goes at the end of the entry, but if
 @var{before-p} is non-@code{nil}, it goes at the beginning.  This
 function also invokes the value of @code{interprogram-cut-function}
-(see below).  This handles @var{yank-handler} just like
-@code{kill-new}, except that if @var{yank-handler} is different from
-the @code{yank-handler} property of the first entry of the kill ring,
-@code{kill-append} pushes the concatenated string onto the kill ring,
-instead of replacing the original first entry with it.
+(see below).
 @end defun
 
 @defvar interprogram-paste-function
 @end defun
 
 @defvar interprogram-paste-function
@@ -1102,24 +1090,31 @@ If the value is a function, @code{current-kill} calls it to get the
 then that value is used as the ``most recent kill.''  If it returns
 @code{nil}, then the front of the kill ring is used.
 
 then that value is used as the ``most recent kill.''  If it returns
 @code{nil}, then the front of the kill ring is used.
 
-The normal use of this hook is to get the window system's primary
+To facilitate support for window systems that support multiple
+selections, this function may also return a list of strings.  In that
+case, the first string is used as the ``most recent kill'', and all
+the other strings are pushed onto the kill ring, for easy access by
+@code{yank-pop}.
+
+The normal use of this function is to get the window system's primary
 selection as the most recent kill, even if the selection belongs to
 selection as the most recent kill, even if the selection belongs to
-another application.  @xref{Window System Selections}.
+another application.  @xref{Window System Selections}.  However, if
+the selection was provided by the current Emacs session, this function
+should return @code{nil}.  (If it is hard to tell whether Emacs or
+some other program provided the selection, it should be good enough to
+use @code{string=} to compare it with the last text Emacs provided.)
 @end defvar
 
 @defvar interprogram-cut-function
 This variable provides a way of communicating killed text to other
 programs, when you are using a window system.  Its value should be
 @end defvar
 
 @defvar interprogram-cut-function
 This variable provides a way of communicating killed text to other
 programs, when you are using a window system.  Its value should be
-@code{nil} or a function of one required and one optional argument.
+@code{nil} or a function of one required argument.
 
 If the value is a function, @code{kill-new} and @code{kill-append} call
 
 If the value is a function, @code{kill-new} and @code{kill-append} call
-it with the new first element of the kill ring as the first argument.
-The second, optional, argument has the same meaning as the @var{push}
-argument to @code{x-set-cut-buffer} (@pxref{Definition of
-x-set-cut-buffer}) and only affects the second and later cut buffers.
+it with the new first element of the kill ring as the argument.
 
 
-The normal use of this hook is to set the window system's primary
-selection (and first cut buffer) from the newly killed text.
+The normal use of this function is to set the window system's primary
+selection from the newly killed text.
 @xref{Window System Selections}.
 @end defvar
 
 @xref{Window System Selections}.
 @end defvar
 
@@ -1283,13 +1278,16 @@ This function places a boundary element in the undo list.  The undo
 command stops at such a boundary, and successive undo commands undo
 to earlier and earlier boundaries.  This function returns @code{nil}.
 
 command stops at such a boundary, and successive undo commands undo
 to earlier and earlier boundaries.  This function returns @code{nil}.
 
-The editor command loop automatically creates an undo boundary before
-each key sequence is executed.  Thus, each undo normally undoes the
-effects of one command.  Self-inserting input characters are an
-exception.  The command loop makes a boundary for the first such
-character; the next 19 consecutive self-inserting input characters do
-not make boundaries, and then the 20th does, and so on as long as
-self-inserting characters continue.
+The editor command loop automatically calls @code{undo-boundary} just
+before executing each key sequence, so that each undo normally undoes
+the effects of one command.  As an exception, the command
+@code{self-insert-command}, which produces self-inserting input
+characters (@pxref{Commands for Insertion}), may remove the boundary
+inserted by the command loop: a boundary is accepted for the first
+such character, the next 19 consecutive self-inserting input
+characters do not have boundaries, and then the 20th does; and so on
+as long as the self-inserting characters continue.  Hence, sequences
+of consecutive character insertions can be undone as a group.
 
 All buffer modifications add a boundary whenever the previous undoable
 change was made in some other buffer.  This is to ensure that
 
 All buffer modifications add a boundary whenever the previous undoable
 change was made in some other buffer.  This is to ensure that
@@ -1434,9 +1432,12 @@ This command fills the paragraph at or after point.  If
 @var{justify} is non-@code{nil}, each line is justified as well.
 It uses the ordinary paragraph motion commands to find paragraph
 boundaries.  @xref{Paragraphs,,, emacs, The GNU Emacs Manual}.
 @var{justify} is non-@code{nil}, each line is justified as well.
 It uses the ordinary paragraph motion commands to find paragraph
 boundaries.  @xref{Paragraphs,,, emacs, The GNU Emacs Manual}.
-Interactively, when @var{region} is non-@code{nil} in Transient Mark
-mode and the mark is active, this command calls @code{fill-region}
-on the active region.
+
+When @var{region} is non-@code{nil}, then if Transient Mark mode is
+enabled and the mark is active, this command calls @code{fill-region}
+to fill all the paragraphs in the region, instead of filling only the
+current paragraph.  When this command is called interactively,
+@var{region} is @code{t}.
 @end deffn
 
 @deffn Command fill-region start end &optional justify nosqueeze to-eop
 @end deffn
 
 @deffn Command fill-region start end &optional justify nosqueeze to-eop
@@ -1552,9 +1553,9 @@ characters that can end a sentence without following spaces.
 @end defopt
 
 @defvar fill-paragraph-function
 @end defopt
 
 @defvar fill-paragraph-function
-This variable provides a way for major modes to override the filling of
-paragraphs.  If the value is non-@code{nil}, @code{fill-paragraph} calls
-this function to do the work.  If the function returns a non-@code{nil}
+This variable provides a way to override the filling of paragraphs.
+If its value is non-@code{nil}, @code{fill-paragraph} calls this
+function to do the work.  If the function returns a non-@code{nil}
 value, @code{fill-paragraph} assumes the job is done, and immediately
 returns that value.
 
 value, @code{fill-paragraph} assumes the job is done, and immediately
 returns that value.
 
@@ -1568,6 +1569,17 @@ way, it can do so as follows:
 @end example
 @end defvar
 
 @end example
 @end defvar
 
+@defvar fill-forward-paragraph-function
+This variable provides a way to override how the filling functions,
+such as @code{fill-region} and @code{fill-paragraph}, move forward to
+the next paragraph.  Its value should be a function, which is called
+with a single argument @var{n}, the number of paragraphs to move, and
+should return the difference between @var{n} and the number of
+paragraphs actually moved.  The default value of this variable is
+@code{forward-paragraph}.  @xref{Paragraphs,,, emacs, The GNU Emacs
+Manual}.
+@end defvar
+
 @defvar use-hard-newlines
 If this variable is non-@code{nil}, the filling functions do not delete
 newlines that have the @code{hard} text property.  These ``hard
 @defvar use-hard-newlines
 If this variable is non-@code{nil}, the filling functions do not delete
 newlines that have the @code{hard} text property.  These ``hard
@@ -1600,15 +1612,9 @@ As a practical matter, if you are writing text for other people to
 read, you should set @code{fill-column} to no more than 70.  Otherwise
 the line will be too long for people to read comfortably, and this can
 make the text seem clumsy.
 read, you should set @code{fill-column} to no more than 70.  Otherwise
 the line will be too long for people to read comfortably, and this can
 make the text seem clumsy.
-@end defopt
-
-@defvar default-fill-column
-The value of this variable is the default value for @code{fill-column} in
-buffers that do not override it.  This is the same as
-@code{(default-value 'fill-column)}.
 
 
-The default value for @code{default-fill-column} is 70.
-@end defvar
+The default value for @code{fill-column} is 70.
+@end defopt
 
 @deffn Command set-left-margin from to margin
 This sets the @code{left-margin} property on the text from @var{from} to
 
 @deffn Command set-left-margin from to margin
 This sets the @code{left-margin} property on the text from @var{from} to
@@ -1661,20 +1667,20 @@ may involve either inserting or deleting whitespace.)  This function
 is value of @code{indent-line-function} in Paragraph-Indent Text mode.
 @end defun
 
 is value of @code{indent-line-function} in Paragraph-Indent Text mode.
 @end defun
 
-@defvar left-margin
+@defopt left-margin
 This variable specifies the base left margin column.  In Fundamental
 mode, @kbd{C-j} indents to this column.  This variable automatically
 becomes buffer-local when set in any fashion.
 This variable specifies the base left margin column.  In Fundamental
 mode, @kbd{C-j} indents to this column.  This variable automatically
 becomes buffer-local when set in any fashion.
-@end defvar
+@end defopt
 
 
-@defvar fill-nobreak-predicate
+@defopt fill-nobreak-predicate
 This variable gives major modes a way to specify not to break a line
 at certain places.  Its value should be a list of functions.  Whenever
 filling considers breaking the line at a certain place in the buffer,
 it calls each of these functions with no arguments and with point
 located at that place.  If any of the functions returns
 non-@code{nil}, then the line won't be broken there.
 This variable gives major modes a way to specify not to break a line
 at certain places.  Its value should be a list of functions.  Whenever
 filling considers breaking the line at a certain place in the buffer,
 it calls each of these functions with no arguments and with point
 located at that place.  If any of the functions returns
 non-@code{nil}, then the line won't be broken there.
-@end defvar
+@end defopt
 
 @node Adaptive Fill
 @section Adaptive Fill Mode
 
 @node Adaptive Fill
 @section Adaptive Fill Mode
@@ -2100,14 +2106,17 @@ For an example of using @code{current-column}, see the description of
 @code{count-lines} in @ref{Text Lines}.
 @end defun
 
 @code{count-lines} in @ref{Text Lines}.
 @end defun
 
-@defun move-to-column column &optional force
+@deffn Command move-to-column column &optional force
 This function moves point to @var{column} in the current line.  The
 calculation of @var{column} takes into account the widths of the
 displayed representations of the characters between the start of the
 line and point.
 
 This function moves point to @var{column} in the current line.  The
 calculation of @var{column} takes into account the widths of the
 displayed representations of the characters between the start of the
 line and point.
 
-If column @var{column} is beyond the end of the line, point moves to the
-end of the line.  If @var{column} is negative, point moves to the
+When called interactively, @var{column} is the value of prefix numeric
+argument.  If @var{column} is not an integer, an error is signaled.
+
+If column @var{column} is beyond the end of the line, point moves to
+the end of the line.  If @var{column} is negative, point moves to the
 beginning of the line.
 
 If it is impossible to move to column @var{column} because that is in
 beginning of the line.
 
 If it is impossible to move to column @var{column} because that is in
@@ -2122,10 +2131,8 @@ The argument @var{force} also has an effect if the line isn't long
 enough to reach column @var{column}; if it is @code{t}, that means to
 add whitespace at the end of the line to reach that column.
 
 enough to reach column @var{column}; if it is @code{t}, that means to
 add whitespace at the end of the line to reach that column.
 
-If @var{column} is not an integer, an error is signaled.
-
 The return value is the column number actually moved to.
 The return value is the column number actually moved to.
-@end defun
+@end deffn
 
 @node Indentation
 @section Indentation
 
 @node Indentation
 @section Indentation
@@ -2194,11 +2201,11 @@ The functions in this section return unpredictable values.
 @defvar indent-line-function
 This variable's value is the function to be used by @key{TAB} (and
 various commands) to indent the current line.  The command
 @defvar indent-line-function
 This variable's value is the function to be used by @key{TAB} (and
 various commands) to indent the current line.  The command
-@code{indent-according-to-mode} does no more than call this function.
+@code{indent-according-to-mode} does little more than call this function.
 
 In Lisp mode, the value is the symbol @code{lisp-indent-line}; in C
 mode, @code{c-indent-line}; in Fortran mode, @code{fortran-indent-line}.
 
 In Lisp mode, the value is the symbol @code{lisp-indent-line}; in C
 mode, @code{c-indent-line}; in Fortran mode, @code{fortran-indent-line}.
-The default value is @code{indent-relative}.
+The default value is @code{indent-relative}.  @xref{Auto-Indentation}.
 @end defvar
 
 @deffn Command indent-according-to-mode
 @end defvar
 
 @deffn Command indent-according-to-mode
@@ -2206,15 +2213,17 @@ This command calls the function in @code{indent-line-function} to
 indent the current line in a way appropriate for the current major mode.
 @end deffn
 
 indent the current line in a way appropriate for the current major mode.
 @end deffn
 
-@deffn Command indent-for-tab-command
-This command calls the function in @code{indent-line-function} to indent
-the current line; however, if that function is
-@code{indent-to-left-margin}, @code{insert-tab} is called instead.  (That
-is a trivial command that inserts a tab character.)
+@deffn Command indent-for-tab-command &optional rigid
+This command calls the function in @code{indent-line-function} to
+indent the current line; however, if that function is
+@code{indent-to-left-margin}, @code{insert-tab} is called instead.
+(That is a trivial command that inserts a tab character.)  If
+@var{rigid} is non-@code{nil}, this function also rigidly indents the
+entire balanced expression that starts at the beginning of the current
+line, to reflect change in indentation of the current line.
 @end deffn
 
 @deffn Command newline-and-indent
 @end deffn
 
 @deffn Command newline-and-indent
-@comment !!SourceFile simple.el
 This function inserts a newline, then indents the new line (the one
 following the newline just inserted) according to the major mode.
 
 This function inserts a newline, then indents the new line (the one
 following the newline just inserted) according to the major mode.
 
@@ -2245,7 +2254,7 @@ by @code{left-margin}.
   This section describes commands that indent all the lines in the
 region.  They return unpredictable values.
 
   This section describes commands that indent all the lines in the
 region.  They return unpredictable values.
 
-@deffn Command indent-region start end to-column
+@deffn Command indent-region start end &optional to-column
 This command indents each nonblank line starting between @var{start}
 (inclusive) and @var{end} (exclusive).  If @var{to-column} is
 @code{nil}, @code{indent-region} indents each nonblank line by calling
 This command indents each nonblank line starting between @var{start}
 (inclusive) and @var{end} (exclusive).  If @var{to-column} is
 @code{nil}, @code{indent-region} indents each nonblank line by calling
@@ -2283,7 +2292,6 @@ a different meaning and does not use this variable.
 @end defvar
 
 @deffn Command indent-rigidly start end count
 @end defvar
 
 @deffn Command indent-rigidly start end count
-@comment !!SourceFile indent.el
 This command indents all lines starting between @var{start}
 (inclusive) and @var{end} (exclusive) sideways by @var{count} columns.
 This ``preserves the shape'' of the affected region, moving it as a
 This command indents all lines starting between @var{start}
 (inclusive) and @var{end} (exclusive) sideways by @var{count} columns.
 This ``preserves the shape'' of the affected region, moving it as a
@@ -2299,13 +2307,13 @@ In Mail mode, @kbd{C-c C-y} (@code{mail-yank-original}) uses
 replied to.
 @end deffn
 
 replied to.
 @end deffn
 
-@defun indent-code-rigidly start end columns &optional nochange-regexp
+@deffn Command indent-code-rigidly start end columns &optional nochange-regexp
 This is like @code{indent-rigidly}, except that it doesn't alter lines
 that start within strings or comments.
 
 In addition, it doesn't alter a line if @var{nochange-regexp} matches at
 the beginning of the line (if @var{nochange-regexp} is non-@code{nil}).
 This is like @code{indent-rigidly}, except that it doesn't alter lines
 that start within strings or comments.
 
 In addition, it doesn't alter a line if @var{nochange-regexp} matches at
 the beginning of the line (if @var{nochange-regexp} is non-@code{nil}).
-@end defun
+@end deffn
 
 @node Relative Indent
 @subsection Indentation Relative to Previous Lines
 
 @node Relative Indent
 @subsection Indentation Relative to Previous Lines
@@ -2568,9 +2576,9 @@ along with the characters; this includes such diverse functions as
 
 @menu
 * Examining Properties::   Looking at the properties of one character.
 
 @menu
 * Examining Properties::   Looking at the properties of one character.
-* Changing Properties::           Setting the properties of a range of text.
-* Property Search::       Searching for where a property changes value.
-* Special Properties::    Particular properties with special meanings.
+* Changing Properties::    Setting the properties of a range of text.
+* Property Search::        Searching for where a property changes value.
+* Special Properties::     Particular properties with special meanings.
 * Format Properties::      Properties for representing formatting of text.
 * Sticky Properties::      How inserted text gets properties from
                              neighboring text.
 * Format Properties::      Properties for representing formatting of text.
 * Sticky Properties::      How inserted text gets properties from
                              neighboring text.
@@ -2578,11 +2586,10 @@ along with the characters; this includes such diverse functions as
                              only when text is examined.
 * Clickable Text::         Using text properties to make regions of text
                              do something when you click on them.
                              only when text is examined.
 * Clickable Text::         Using text properties to make regions of text
                              do something when you click on them.
-* Links and Mouse-1::      How to make @key{Mouse-1} follow a link.
 * Fields::                 The @code{field} property defines
                              fields within the buffer.
 * Fields::                 The @code{field} property defines
                              fields within the buffer.
-* Not Intervals::         Why text properties do not use
-                            Lisp-visible text intervals.
+* Not Intervals::          Why text properties do not use
+                             Lisp-visible text intervals.
 @end menu
 
 @node Examining Properties
 @end menu
 
 @node Examining Properties
@@ -2988,7 +2995,7 @@ time you want to specify a particular attribute for certain text.
 
 @item
 A cons cell with the form @code{(foreground-color . @var{color-name})}
 
 @item
 A cons cell with the form @code{(foreground-color . @var{color-name})}
-or @code{(background-color . @var{color-name})}.  These are older,
+or @code{(background-color . @var{color-name})}.  These are old,
 deprecated equivalents for @code{(:foreground @var{color-name})} and
 @code{(:background @var{color-name})}.  Please convert code that uses
 them.
 deprecated equivalents for @code{(:foreground @var{color-name})} and
 @code{(:background @var{color-name})}.  Please convert code that uses
 them.
@@ -3007,11 +3014,9 @@ The @code{font-lock-face} property is equivalent to the @code{face}
 property when Font Lock mode is enabled.  When Font Lock mode is disabled,
 @code{font-lock-face} has no effect.
 
 property when Font Lock mode is enabled.  When Font Lock mode is disabled,
 @code{font-lock-face} has no effect.
 
-The @code{font-lock-mode} property is useful for special modes that
+The @code{font-lock-face} property is useful for special modes that
 implement their own highlighting.  @xref{Precalculated Fontification}.
 
 implement their own highlighting.  @xref{Precalculated Fontification}.
 
-This property is new in Emacs 22.1.
-
 @item mouse-face
 @kindex mouse-face @r{(text property)}
 The property @code{mouse-face} is used instead of @code{face} when the
 @item mouse-face
 @kindex mouse-face @r{(text property)}
 The property @code{mouse-face} is used instead of @code{face} when the
@@ -3144,9 +3149,20 @@ Consecutive characters with the same @code{field} property constitute a
 @item cursor
 @kindex cursor @r{(text property)}
 Normally, the cursor is displayed at the end of any overlay and text
 @item cursor
 @kindex cursor @r{(text property)}
 Normally, the cursor is displayed at the end of any overlay and text
-property strings present at the current window position.  You can
+property strings present at the current buffer position.  You can
 place the cursor on any desired character of these strings by giving
 place the cursor on any desired character of these strings by giving
-that character a non-@code{nil} @var{cursor} text property.
+that character a non-@code{nil} @code{cursor} text property.  In
+addition, if the value of the @code{cursor} property of an overlay
+string is an integer number, it specifies the number of buffer's
+character positions associated with the overlay string; this way,
+Emacs will display the cursor on the character with that property
+regardless of whether the current buffer position is actually covered
+by the overlay.  Specifically, if the value of the @code{cursor}
+property of a character is the number @var{n}, the cursor will be
+displayed on this character for any buffer position in the range
+@code{[@var{ovpos}..@var{ovpos}+@var{n}]}, where @var{ovpos} is the
+starting buffer position covered by the overlay (@pxref{Managing
+Overlays}).
 
 @item pointer
 @kindex pointer @r{(text property)}
 
 @item pointer
 @kindex pointer @r{(text property)}
@@ -3167,17 +3183,44 @@ A newline can have a @code{line-height} text or overlay property that
 controls the total height of the display line ending in that newline.
 @xref{Line Height}.
 
 controls the total height of the display line ending in that newline.
 @xref{Line Height}.
 
+@item wrap-prefix
+If text has a @code{wrap-prefix} property, the prefix it defines will
+be added at display-time to the beginning of every continuation line
+due to text wrapping (so if lines are truncated, the wrap-prefix is
+never used).  It may be a string, an image, or a stretch-glyph such as
+used by the @code{display} text-property.  @xref{Display Property}.
+
+A wrap-prefix may also be specified for an entire buffer using the
+@code{wrap-prefix} buffer-local variable (however, a
+@code{wrap-prefix} text-property takes precedence over the value of
+the @code{wrap-prefix} variable).  @xref{Truncation}.
+
+@item line-prefix
+If text has a @code{line-prefix} property, the prefix it defines will
+be added at display-time to the beginning of every non-continuation
+line.  It may be a string, an image, or a stretch-glyph such as used
+by the @code{display} text-property.  @xref{Display Property}.
+
+A line-prefix may also be specified for an entire buffer using the
+@code{line-prefix} buffer-local variable (however, a
+@code{line-prefix} text-property takes precedence over the value of
+the @code{line-prefix} variable).  @xref{Truncation}.
+
 @item modification-hooks
 @cindex change hooks for a character
 @cindex hooks for changing a character
 @kindex modification-hooks @r{(text property)}
 If a character has the property @code{modification-hooks}, then its
 @item modification-hooks
 @cindex change hooks for a character
 @cindex hooks for changing a character
 @kindex modification-hooks @r{(text property)}
 If a character has the property @code{modification-hooks}, then its
-value should be a list of functions; modifying that character calls all
-of those functions.  Each function receives two arguments: the beginning
-and end of the part of the buffer being modified.  Note that if a
-particular modification hook function appears on several characters
-being modified by a single primitive, you can't predict how many times
-the function will be called.
+value should be a list of functions; modifying that character calls
+all of those functions before the actual modification.  Each function
+receives two arguments: the beginning and end of the part of the
+buffer being modified.  Note that if a particular modification hook
+function appears on several characters being modified by a single
+primitive, you can't predict how many times the function will
+be called.
+Furthermore, insertion will not modify any existing character, so this
+hook will only be run when removing some characters, replacing them
+with others, or changing their text-properties.
 
 If these functions modify the buffer, they should bind
 @code{inhibit-modification-hooks} to @code{t} around doing so, to
 
 If these functions modify the buffer, they should bind
 @code{inhibit-modification-hooks} to @code{t} around doing so, to
@@ -3420,58 +3463,60 @@ being called over and over for the same text.
 @node Clickable Text
 @subsection Defining Clickable Text
 @cindex clickable text
 @node Clickable Text
 @subsection Defining Clickable Text
 @cindex clickable text
+@cindex follow links
+@cindex mouse-1
 
   @dfn{Clickable text} is text that can be clicked, with either the
 
   @dfn{Clickable text} is text that can be clicked, with either the
-the mouse or via keyboard commands, to produce some result.  Many
-major modes use clickable text to implement features such as
-hyper-links.  The @code{button} package provides an easy way to insert
-and manipulate clickable text.  @xref{Buttons}.
-
-  In this section, we will explain how to manually set up clickable
-text in a buffer using text properties.  This involves two things: (1)
-indicating clickability when the mouse moves over the text, and (2)
-making @kbd{RET} or a mouse click on that text do something.
-
-  Indicating clickability usually involves highlighting the text, and
-often involves displaying helpful information about the action, such
-as which mouse button to press, or a short summary of the action.
-This can be done with the @code{mouse-face} and @code{help-echo}
-text properties.  @xref{Special Properties}.
-Here is an example of how Dired does it:
+mouse or via a keyboard command, to produce some result.  Many major
+modes use clickable text to implement textual hyper-links, or
+@dfn{links} for short.
+
+  The easiest way to insert and manipulate links is to use the
+@code{button} package.  @xref{Buttons}.  In this section, we will
+explain how to manually set up clickable text in a buffer, using text
+properties.  For simplicity, we will refer to the clickable text as a
+@dfn{link}.
+
+  Implementing a link involves three separate steps: (1) indicating
+clickability when the mouse moves over the link; (2) making @kbd{RET}
+or @kbd{Mouse-2} on that link do something; and (3) setting up a
+@code{follow-link} condition so that the link obeys
+@code{mouse-1-click-follows-link}.
+
+  To indicate clickability, add the @code{mouse-face} text property to
+the text of the link; then Emacs will highlight the link when the
+mouse moves over it.  In addition, you should define a tooltip or echo
+area message, using the @code{help-echo} text property.  @xref{Special
+Properties}.  For instance, here is how Dired indicates that file
+names are clickable:
 
 @smallexample
 
 @smallexample
-(condition-case nil
-    (if (dired-move-to-filename)
-        (add-text-properties
-         (point)
-         (save-excursion
-           (dired-move-to-end-of-filename)
-           (point))
-         '(mouse-face highlight
-           help-echo "mouse-2: visit this file in other window")))
-  (error nil))
+ (if (dired-move-to-filename)
+     (add-text-properties
+       (point)
+       (save-excursion
+         (dired-move-to-end-of-filename)
+         (point))
+       '(mouse-face highlight
+         help-echo "mouse-2: visit this file in other window")))
 @end smallexample
 
 @end smallexample
 
-@noindent
-The first two arguments to @code{add-text-properties} specify the
-beginning and end of the text.
-
-  The usual way to make the mouse do something when you click it
-on this text is to define @code{mouse-2} in the major mode's
-keymap.  The job of checking whether the click was on clickable text
-is done by the command definition.  Here is how Dired does it:
+  To make the link clickable, bind @key{RET} and @kbd{Mouse-2} to
+commands that perform the desired action.  Each command should check
+to see whether it was called on a link, and act accordingly.  For
+instance, Dired's major mode keymap binds @kbd{Mouse-2} to the
+following command:
 
 @smallexample
 (defun dired-mouse-find-file-other-window (event)
   "In Dired, visit the file or directory name you click on."
   (interactive "e")
 
 @smallexample
 (defun dired-mouse-find-file-other-window (event)
   "In Dired, visit the file or directory name you click on."
   (interactive "e")
-  (let (window pos file)
-    (save-excursion
-      (setq window (posn-window (event-end event))
-            pos (posn-point (event-end event)))
-      (if (not (windowp window))
-          (error "No file chosen"))
-      (set-buffer (window-buffer window))
+  (let ((window (posn-window (event-end event)))
+        (pos (posn-point (event-end event)))
+        file)
+    (if (not (windowp window))
+        (error "No file chosen"))
+    (with-current-buffer (window-buffer window)
       (goto-char pos)
       (setq file (dired-get-file-for-visit)))
     (if (file-directory-p file)
       (goto-char pos)
       (setq file (dired-get-file-for-visit)))
     (if (file-directory-p file)
@@ -3485,72 +3530,51 @@ is done by the command definition.  Here is how Dired does it:
 @end smallexample
 
 @noindent
 @end smallexample
 
 @noindent
-The reason for the @code{save-excursion} construct is to avoid
-changing the current buffer.  In this case,
-Dired uses the functions @code{posn-window} and @code{posn-point}
-to determine which buffer the click happened in and where, and
-in that buffer, @code{dired-get-file-for-visit} to determine which
-file to visit.
+This command uses the functions @code{posn-window} and
+@code{posn-point} to determine where the click occurred, and
+@code{dired-get-file-for-visit} to determine which file to visit.
 
 
-  Instead of defining a mouse command for the major mode, you can define
-a key binding for the clickable text itself, using the @code{keymap}
-text property:
+  Instead of binding the mouse command in a major mode keymap, you can
+bind it within the link text, using the @code{keymap} text property
+(@pxref{Special Properties}).  For instance:
 
 @example
 (let ((map (make-sparse-keymap)))
   (define-key map [mouse-2] 'operate-this-button)
 
 @example
 (let ((map (make-sparse-keymap)))
   (define-key map [mouse-2] 'operate-this-button)
-  (put-text-property (point)
-                     (save-excursion
-                       (dired-move-to-end-of-filename)
-                       (point))
-                     'keymap map))
+  (put-text-property link-start link-end 'keymap map))
 @end example
 
 @noindent
 @end example
 
 @noindent
-This method makes it possible to define different commands for various
-clickable pieces of text.  Also, the major mode definition (or the
-global definition) remains available for the rest of the text in the
-buffer.
-
-@node Links and Mouse-1
-@subsection Links and Mouse-1
-@cindex follow links
-@cindex mouse-1
-
-  The normal Emacs command for activating text in read-only buffers is
-@key{Mouse-2}, which includes following textual links.  However, most
-graphical applications use @key{Mouse-1} for following links.  For
-compatibility, @key{Mouse-1} follows links in Emacs too, when you
-click on a link quickly without moving the mouse.  The user can
-customize this behavior through the variable
-@code{mouse-1-click-follows-link}.
-
-  To define text as a link at the Lisp level, you should bind the
-@code{mouse-2} event to a command to follow the link.  Then, to indicate that
-@key{Mouse-1} should also follow the link, you should specify a
-@code{follow-link} condition either as a text property or as a key
-binding:
-
-@table @asis
-@item @code{follow-link} property
-If the clickable text has a non-@code{nil} @code{follow-link} text or overlay
-property, that specifies the condition.
-
-@item @code{follow-link} event
-If there is a binding for the @code{follow-link} event, either on the
-clickable text or in the local keymap, the binding is the condition.
-@end table
-
-  Regardless of how you set the @code{follow-link} condition, its
-value is used as follows to determine whether the given position is
-inside a link, and (if so) to compute an @dfn{action code} saying how
-@key{Mouse-1} should handle the link.
+With this method, you can easily define different commands for
+different links.  Furthermore, the global definition of @key{RET} and
+@kbd{Mouse-2} remain available for the rest of the text in the buffer.
+
+@vindex mouse-1-click-follows-link
+  The basic Emacs command for clicking on links is @kbd{Mouse-2}.
+However, for compatibility with other graphical applications, Emacs
+also recognizes @kbd{Mouse-1} clicks on links, provided the user
+clicks on the link quickly without moving the mouse.  This behavior is
+controlled by the user option @code{mouse-1-click-follows-link}.
+@xref{Mouse References,,, emacs, The GNU Emacs Manual}.
+
+  To set up the link so that it obeys
+@code{mouse-1-click-follows-link}, you must either (1) apply a
+@code{follow-link} text or overlay property to the link text, or (2)
+bind the @code{follow-link} event to a keymap (which can be a major
+mode keymap or a local keymap specified via the @code{keymap} text
+property).  The value of the @code{follow-link} property, or the
+binding for the @code{follow-link} event, acts as a ``condition'' for
+the link action.  This condition tells Emacs two things: the
+circumstances under which a @kbd{Mouse-1} click should be regarded as
+occurring ``inside'' the link, and how to compute an ``action code''
+that says what to translate the @kbd{Mouse-1} click into.  The link
+action condition can be one of the following:
 
 @table @asis
 @item @code{mouse-face}
 
 @table @asis
 @item @code{mouse-face}
-If the condition is @code{mouse-face}, a position is inside a link if
-there is a non-@code{nil} @code{mouse-face} property at that position.
-The action code is always @code{t}.
+If the condition is the symbol @code{mouse-face}, a position is inside
+a link if there is a non-@code{nil} @code{mouse-face} property at that
+position.  The action code is always @code{t}.
 
 For example, here is how Info mode handles @key{Mouse-1}:
 
 
 For example, here is how Info mode handles @key{Mouse-1}:
 
@@ -3559,12 +3583,12 @@ For example, here is how Info mode handles @key{Mouse-1}:
 @end smallexample
 
 @item a function
 @end smallexample
 
 @item a function
-If the condition is a valid function, @var{func}, then a position
-@var{pos} is inside a link if @code{(@var{func} @var{pos})} evaluates
-to non-@code{nil}.  The value returned by @var{func} serves as the
-action code.
+If the condition is a function, @var{func}, then a position @var{pos}
+is inside a link if @code{(@var{func} @var{pos})} evaluates to
+non-@code{nil}.  The value returned by @var{func} serves as the action
+code.
 
 
-For example, here is how pcvs enables @key{Mouse-1} to follow links on
+For example, here is how pcvs enables @kbd{Mouse-1} to follow links on
 file names only:
 
 @smallexample
 file names only:
 
 @smallexample
@@ -3575,32 +3599,34 @@ file names only:
 
 @item anything else
 If the condition value is anything else, then the position is inside a
 
 @item anything else
 If the condition value is anything else, then the position is inside a
-link and the condition itself is the action code.  Clearly you should
-only specify this kind of condition on the text that constitutes a
-link.
+link and the condition itself is the action code.  Clearly, you should
+specify this kind of condition only when applying the condition via a
+text or property overlay on the link text (so that it does not apply
+to the entire buffer).
 @end table
 
 @noindent
 @end table
 
 @noindent
-The action code tells @key{Mouse-1} how to follow the link:
+The action code tells @kbd{Mouse-1} how to follow the link:
 
 @table @asis
 @item a string or vector
 
 @table @asis
 @item a string or vector
-If the action code is a string or vector, the @key{Mouse-1} event is
+If the action code is a string or vector, the @kbd{Mouse-1} event is
 translated into the first element of the string or vector; i.e., the
 translated into the first element of the string or vector; i.e., the
-action of the @key{Mouse-1} click is the local or global binding of
+action of the @kbd{Mouse-1} click is the local or global binding of
 that character or symbol.  Thus, if the action code is @code{"foo"},
 that character or symbol.  Thus, if the action code is @code{"foo"},
-@key{Mouse-1} translates into @kbd{f}.  If it is @code{[foo]},
-@key{Mouse-1} translates into @key{foo}.
+@kbd{Mouse-1} translates into @kbd{f}.  If it is @code{[foo]},
+@kbd{Mouse-1} translates into @key{foo}.
 
 @item anything else
 
 @item anything else
-For any other non-@code{nil} action code, the @code{mouse-1} event is
-translated into a @code{mouse-2} event at the same position.
+For any other non-@code{nil} action code, the @kbd{Mouse-1} event is
+translated into a @kbd{Mouse-2} event at the same position.
 @end table
 
 @end table
 
-  To define @key{Mouse-1} to activate a button defined with
+  To define @kbd{Mouse-1} to activate a button defined with
 @code{define-button-type}, give the button a @code{follow-link}
 @code{define-button-type}, give the button a @code{follow-link}
-property with a value as specified above to determine how to follow
-the link.  For example, here is how Help mode handles @key{Mouse-1}:
+property.  The property value should be a link action condition, as
+described above.  @xref{Buttons}.  For example, here is how Help mode
+handles @kbd{Mouse-1}:
 
 @smallexample
 (define-button-type 'help-xref
 
 @smallexample
 (define-button-type 'help-xref
@@ -3608,11 +3634,10 @@ the link.  For example, here is how Help mode handles @key{Mouse-1}:
   'action #'help-button-action)
 @end smallexample
 
   'action #'help-button-action)
 @end smallexample
 
-  To define @key{Mouse-1} on a widget defined with
-@code{define-widget}, give the widget a @code{:follow-link} property
-with a value as specified above to determine how to follow the link.
-
-For example, here is how the @code{link} widget specifies that
+  To define @kbd{Mouse-1} on a widget defined with
+@code{define-widget}, give the widget a @code{:follow-link} property.
+The property value should be a link action condition, as described
+above.  For example, here is how the @code{link} widget specifies that
 a @key{Mouse-1} click shall be translated to @key{RET}:
 
 @smallexample
 a @key{Mouse-1} click shall be translated to @key{RET}:
 
 @smallexample
@@ -3835,7 +3860,7 @@ ThXs Xs the contents of the buffer before.
 @end example
 @end defun
 
 @end example
 @end defun
 
-@defun translate-region start end table
+@deffn Command translate-region start end table
 This function applies a translation table to the characters in the
 buffer between positions @var{start} and @var{end}.
 
 This function applies a translation table to the characters in the
 buffer between positions @var{start} and @var{end}.
 
@@ -3849,7 +3874,7 @@ The return value of @code{translate-region} is the number of
 characters that were actually changed by the translation.  This does
 not count characters that were mapped into themselves in the
 translation table.
 characters that were actually changed by the translation.  This does
 not count characters that were mapped into themselves in the
 translation table.
-@end defun
+@end deffn
 
 @node Registers
 @section Registers
 
 @node Registers
 @section Registers
@@ -3924,27 +3949,6 @@ expect only certain data types.  The return value is @var{value}.
 This command displays what is contained in register @var{reg}.
 @end deffn
 
 This command displays what is contained in register @var{reg}.
 @end deffn
 
-@ignore
-@deffn Command point-to-register reg
-This command stores both the current location of point and the current
-buffer in register @var{reg} as a marker.
-@end deffn
-
-@deffn Command jump-to-register reg
-@deffnx Command register-to-point reg
-@comment !!SourceFile register.el
-This command restores the status recorded in register @var{reg}.
-
-If @var{reg} contains a marker, it moves point to the position stored in
-the marker.  Since both the buffer and the location within the buffer
-are stored by the @code{point-to-register} function, this command can
-switch you to another buffer.
-
-If @var{reg} contains a window configuration or a frame configuration.
-@code{jump-to-register} restores that configuration.
-@end deffn
-@end ignore
-
 @deffn Command insert-register reg &optional beforep
 This command inserts contents of register @var{reg} into the current
 buffer.
 @deffn Command insert-register reg &optional beforep
 This command inserts contents of register @var{reg} into the current
 buffer.
@@ -3964,43 +3968,6 @@ a rectangle (a list), currently useless things happen.  This may be
 changed in the future.
 @end deffn
 
 changed in the future.
 @end deffn
 
-@ignore
-@deffn Command copy-to-register reg start end &optional delete-flag
-This command copies the region from @var{start} to @var{end} into
-register @var{reg}.  If @var{delete-flag} is non-@code{nil}, it deletes
-the region from the buffer after copying it into the register.
-@end deffn
-
-@deffn Command prepend-to-register reg start end &optional delete-flag
-This command prepends the region from @var{start} to @var{end} into
-register @var{reg}.  If @var{delete-flag} is non-@code{nil}, it deletes
-the region from the buffer after copying it to the register.
-@end deffn
-
-@deffn Command append-to-register reg start end &optional delete-flag
-This command appends the region from @var{start} to @var{end} to the
-text already in register @var{reg}.  If @var{delete-flag} is
-non-@code{nil}, it deletes the region from the buffer after copying it
-to the register.
-@end deffn
-
-@deffn Command copy-rectangle-to-register reg start end &optional delete-flag
-This command copies a rectangular region from @var{start} to @var{end}
-into register @var{reg}.  If @var{delete-flag} is non-@code{nil}, it
-deletes the region from the buffer after copying it to the register.
-@end deffn
-
-@deffn Command window-configuration-to-register reg
-This function stores the window configuration of the selected frame in
-register @var{reg}.
-@end deffn
-
-@deffn Command frame-configuration-to-register reg
-This function stores the current frame configuration in register
-@var{reg}.
-@end deffn
-@end ignore
-
 @node Transposition
 @section Transposition of Text
 
 @node Transposition
 @section Transposition of Text
 
@@ -4035,7 +4002,7 @@ manner.
 }2045.  This section describes the functions for
 converting to and from this code.
 
 }2045.  This section describes the functions for
 converting to and from this code.
 
-@defun base64-encode-region beg end &optional no-line-break
+@deffn Command base64-encode-region beg end &optional no-line-break
 This function converts the region from @var{beg} to @var{end} into base
 64 code.  It returns the length of the encoded text.  An error is
 signaled if a character in the region is multibyte, i.e.@: in a
 This function converts the region from @var{beg} to @var{end} into base
 64 code.  It returns the length of the encoded text.  An error is
 signaled if a character in the region is multibyte, i.e.@: in a
@@ -4047,9 +4014,9 @@ Normally, this function inserts newline characters into the encoded
 text, to avoid overlong lines.  However, if the optional argument
 @var{no-line-break} is non-@code{nil}, these newlines are not added, so
 the output is just one long line.
 text, to avoid overlong lines.  However, if the optional argument
 @var{no-line-break} is non-@code{nil}, these newlines are not added, so
 the output is just one long line.
-@end defun
+@end deffn
 
 
-@defun base64-encode-string string &optional no-line-break
+@deffn Command base64-encode-string string &optional no-line-break
 This function converts the string @var{string} into base 64 code.  It
 returns a string containing the encoded text.  As for
 @code{base64-encode-region}, an error is signaled if a character in the
 This function converts the string @var{string} into base 64 code.  It
 returns a string containing the encoded text.  As for
 @code{base64-encode-region}, an error is signaled if a character in the
@@ -4059,7 +4026,7 @@ Normally, this function inserts newline characters into the encoded
 text, to avoid overlong lines.  However, if the optional argument
 @var{no-line-break} is non-@code{nil}, these newlines are not added, so
 the result string is just one long line.
 text, to avoid overlong lines.  However, if the optional argument
 @var{no-line-break} is non-@code{nil}, these newlines are not added, so
 the result string is just one long line.
-@end defun
+@end deffn
 
 @defun base64-decode-region beg end
 This function converts the region from @var{beg} to @var{end} from base
 
 @defun base64-decode-region beg end
 This function converts the region from @var{beg} to @var{end} from base
@@ -4125,6 +4092,49 @@ using the specified or chosen coding system.  However, if
 coding instead.
 @end defun
 
 coding instead.
 @end defun
 
+@node Parsing HTML
+@section Parsing HTML
+@cindex parsing html
+@cindex parsing xml
+
+Emacs provides an interface to the @code{libxml2} library via two
+functions: @code{html-parse-buffer} and @code{xml-parse-buffer}.  The
+HTML function will parse ``real world'' HTML and try to return a
+sensible parse tree, while the XML function is somewhat stricter about
+syntax.
+
+They both take a two optional parameter.  The first is a buffer, and
+the second is a base URL to be used to expand relative URLs in the
+document, if any.
+
+Here's an example demonstrating the structure of the parsed data you
+get out.  Given this HTML document:
+
+@example
+<html><hEad></head><body width=101><div class=thing>Foo<div>Yes
+@end example
+
+You get this parse tree:
+
+@example
+(html
+ (head)
+ (body
+  (:width . "101")
+  (div
+   (:class . "thing")
+   (text . "Foo")
+   (div
+    (text . "Yes\n")))))
+@end example
+
+It's a simple tree structure, where the @code{car} for each node is
+the name of the node, and the @code{cdr} is the value, or the list of
+values.
+
+Attributes are coded the same way as child nodes, but with @samp{:} as
+the first character.
+
 @node Atomic Changes
 @section Atomic Change Groups
 @cindex atomic changes
 @node Atomic Changes
 @section Atomic Change Groups
 @cindex atomic changes
@@ -4295,6 +4305,4 @@ code that is itself run from a modification hook, then rebind locally
 @code{inhibit-modification-hooks} to @code{nil}.
 @end defvar
 
 @code{inhibit-modification-hooks} to @code{nil}.
 @end defvar
 
-@ignore
-   arch-tag: 3721e738-a1cb-4085-bc1a-6cb8d8e1d32b
-@end ignore
+