changeset 107714:4582c857e008

Merge from mainline.
author Katsumi Yamaoka <yamaoka@jpl.org>
date Wed, 31 Mar 2010 06:33:56 +0000
parents 24df18c00979 (current diff) 41747909cb4b (diff)
children 19e22195d54e
files test/cedet/tests/scopetest.cpp test/cedet/tests/scopetest.java test/cedet/tests/templates.cpp test/cedet/tests/test.cpp test/cedet/tests/test.py test/cedet/tests/teststruct.cpp test/cedet/tests/testtemplates.cpp test/cedet/tests/testusing.cpp test/cedet/tests/testusing.hh
diffstat 71 files changed, 1679 insertions(+), 3489 deletions(-) [+]
line wrap: on
line diff
--- a/doc/emacs/ChangeLog	Wed Mar 31 00:14:29 2010 +0000
+++ b/doc/emacs/ChangeLog	Wed Mar 31 06:33:56 2010 +0000
@@ -1,3 +1,62 @@
+2010-03-30  Eli Zaretskii  <eliz@gnu.org>
+
+	* mule.texi (Input Methods): Mention "C-x 8 RET" and add a
+	cross-reference to "Inserting Text".
+
+	* basic.texi (Inserting Text): Add an index entry for "C-x 8 RET".
+	Mention completion provided by `ucs-insert'.
+
+2010-03-30  Chong Yidong  <cyd@stupidchicken.com>
+
+	* sending.texi (Sending Mail): Note variables that may need
+	customizing.
+	(Mail Sending): Expand discussion of send-mail-function.
+
+2010-03-30  Chong Yidong  <cyd@stupidchicken.com>
+
+	Document Message mode as the default mail mode.
+
+	* sending.texi (Sending Mail): Copyedits.
+	(Mail Format, Mail Headers): Document mail-from-style changes.
+	(Mail Commands): Rename from Mail mode.  Document Message mode.
+	(Mail Misc): Rename from Mail mode Misc.
+	(Mail Sending, Header Editing, Mail Misc): Switch to Message mode
+	command names and update keybindings.
+	(Header Editing): Document message-tab.  De-document
+	mail-self-blind, mail-default-reply-to, and mail-archive-file-name in
+	favor of mail-default-headers.  Ad index entries for user-full-name and
+	user-mail-address.
+	(Citing Mail): Update changes in Message mode behavior.  Document
+	mail-yank-prefix.
+	(Mail Signature): New node, moved from Mail Misc.
+	(Mail Aliases): Mail abbrevs are the default with Message mode.
+	(Mail Methods): Note that Message mode is now the default.
+
+	* rmail.texi (Rmail Reply):
+	* text.texi (Text Mode):
+	* major.texi (Major Modes):
+	* mule.texi (Output Coding): Refer to Message mode.
+
+	* custom.texi (Init Examples): Add xref to Mail Header.
+
+	* emacs.texi (Top):  Fix xrefs.
+
+2010-03-30  Chong Yidong  <cyd@stupidchicken.com>
+
+	* maintaining.texi (VC With A Merging VCS): C-x v v now creates a
+	repository if there is none.
+	(VC Change Log): Rename from VC Status.  Document vc-log-show-limit and
+	vc-print-root-log.
+	(Old Revisions): Copyedits.  Document vc-root-diff.
+
+	* programs.texi (Program Modes): Mention Javascript mode.
+
+	* text.texi (HTML Mode): Note that nXML is now the default XML mode.
+	* emacs.texi: Update node description.
+
+	* misc.texi (Navigation): Document doc-view-continuous.
+	(Shell Ring): Document new M-r binding.  M-s is no longer bound.
+
 2010-03-30  Juri Linkov  <juri@jurta.org>
 
 	* search.texi (Other Repeating Search): Remove line that `occur'
--- a/doc/emacs/basic.texi	Wed Mar 31 00:14:29 2010 +0000
+++ b/doc/emacs/basic.texi	Wed Mar 31 06:33:56 2010 +0000
@@ -100,13 +100,15 @@
 character to insert (@pxref{Arguments}).
 
 @findex ucs-insert
+@kindex C-x 8 RET
 @cindex Unicode
   Instead of @kbd{C-q}, you can use @kbd{C-x 8 @key{RET}}
 (@code{ucs-insert}) to insert a character based on its Unicode name or
 code-point.  This commands prompts for a character to insert, using
 the minibuffer; you can specify the character using either (i) the
 character's name in the Unicode standard, or (ii) the character's
-code-point in the Unicode standard.
+code-point in the Unicode standard.  If you specify the character's
+name, the command provides completion.
 
 @node Moving Point
 @section Changing the Location of Point
--- a/doc/emacs/custom.texi	Wed Mar 31 00:14:29 2010 +0000
+++ b/doc/emacs/custom.texi	Wed Mar 31 06:33:56 2010 +0000
@@ -2269,8 +2269,9 @@
 (setq user-mail-address "cheney@@torture.gov")
 @end example
 
-Various Emacs packages that need your own email address use the value of
-@code{user-mail-address}.
+Various Emacs packages, such as Message mode, consult
+@code{user-mail-address} when they need to know your email address.
+@xref{Mail Headers}.
 
 @item
 Make Text mode the default mode for new buffers.
--- a/doc/emacs/emacs.texi	Wed Mar 31 00:14:29 2010 +0000
+++ b/doc/emacs/emacs.texi	Wed Mar 31 06:33:56 2010 +0000
@@ -574,7 +574,7 @@
 * Text Mode::	        The major modes for editing text files.
 * Outline Mode::        Editing outlines.
 * TeX Mode::	        Editing input to the formatter TeX.
-* HTML Mode::           Editing HTML, SGML, and XML files.
+* HTML Mode::           Editing HTML and SGML files.
 * Nroff Mode::	        Editing input to the formatter nroff.
 * Formatted Text::      Editing formatted text directly in WYSIWYG fashion.
 * Text Based Tables::   Editing text-based tables in WYSIWYG fashion.
@@ -796,7 +796,7 @@
 The Secondary Commands of VC
 
 * Registering::         Putting a file under version control.
-* VC Status::           Viewing the VC status of files.
+* VC Change Log::       Viewing the VC Change Log.
 * VC Undo::             Canceling changes before or after check-in.
 
 VC Directory Mode
@@ -888,16 +888,17 @@
 * Mail Format:: 	Format of the mail being composed.
 * Mail Headers::        Details of some standard mail header fields.
 * Mail Aliases::        Abbreviating and grouping mail addresses.
-* Mail Mode::   	Special commands for editing mail being composed.
+* Mail Commands::   	Special commands for editing mail being composed.
+* Mail Signature::      Adding a signature to every message.
 * Mail Amusements::     Distracting the NSA; adding fortune messages.
 * Mail Methods::        Using alternative mail-composition methods.
 
-Mail Mode
+Mail Commands
 
 * Mail Sending::        Commands to send the message.
 * Header Editing::      Commands to move to header fields and edit them.
-* Citing Mail::         Copying all or part of a message you are replying to.
-* Mail Mode Misc::      Spell checking, signatures, etc.
+* Citing Mail::         Quoting a message you are replying to.
+* Mail Misc::           Attachments, spell checking, etc.
 
 Reading Mail with Rmail
 
--- a/doc/emacs/maintaining.texi	Wed Mar 31 00:14:29 2010 +0000
+++ b/doc/emacs/maintaining.texi	Wed Mar 31 06:33:56 2010 +0000
@@ -224,7 +224,7 @@
 @cindex revision
 @cindex revision ID
   A copy of a file stored in a repository is called a @dfn{revision}.
-The history of a file is a sequence of revisions.  Each revisions is
+The history of a file is a sequence of revisions.  Each revision is
 named by a @dfn{revision ID}.  The format of the revision ID depends
 on the version control system; in the simplest case, it is just an
 integer.
@@ -403,10 +403,10 @@
 consists of the marked files (@pxref{VC Directory Mode}).
 
   The principal VC command is an all-purpose command, @kbd{C-x v v}
-(@code{vc-next-action}), that performs either locking, merging or a
-check-in (depending on the situation) on the current VC fileset.  You
-can use @kbd{C-x v v} in a file-visiting buffer or in a VC Directory
-buffer.
+(@code{vc-next-action}), that performs either registration, locking,
+merging or a check-in (depending on the situation) on the current VC
+fileset.  You can use @kbd{C-x v v} in a file-visiting buffer or in a
+VC Directory buffer.
 
 @table @kbd
 @itemx C-x v v
@@ -461,23 +461,31 @@
 
 @itemize @bullet
 @item
-If the work file is the same as in the repository, it does nothing.
+If the work file is in a directory that is not controlled by any
+version control system, prompt for a repository type.  Then, create a
+version control repository of that type and register the file with it.
+
+@item
+If the work file is in a directory that is controlled by a version
+control system but not registered with it, register the file.
+
+@item
+If the work file is the same as in the repository, do nothing.
 
 @item
 If you have not changed the work file, but some other user has checked
-in changes to the repository, @kbd{C-x v v} merges those changes into
-the work file.
+in changes to the repository, merge those changes into the work file.
 
 @item
-If you have made modifications to the work file, @kbd{C-x v v}
-attempts to check in your changes.  To do this, Emacs first reads the
-log entry for the new revision (@pxref{Log Buffer}).  If some other
-user has checked in changes to the repository since you last checked
-it out, the checkin fails.  In that case, type @kbd{C-x v v} again to
-merge those changes into your own work file; this puts the work file
-into a ``conflicted'' state.  Type @kbd{C-x v v} to clear the
-``conflicted'' state; VC then regards the file as up-to-date and
-modified, and you can try to check it in again.
+If you have made modifications to the work file, attempts to check in
+your changes.  To do this, Emacs first reads the log entry for the new
+revision (@pxref{Log Buffer}).  If some other user has checked in
+changes to the repository since you last checked it out, the checkin
+fails.  In that case, type @kbd{C-x v v} again to merge those changes
+into your own work file; this puts the work file into a ``conflicted''
+state.  Type @kbd{C-x v v} to clear the ``conflicted'' state; VC then
+regards the file as up-to-date and modified, and you can try to check
+it in again.
 
 To pick up any recent changes from the repository @emph{without}
 trying to commit your own changes, type @kbd{C-x v m @key{RET}}.
@@ -485,15 +493,15 @@
 @end itemize
 
   These rules also apply when you use RCS in its ``non-locking'' mode,
-except that changes will not be automatically merged from the
-repository.  Nothing informs you if another user has checked in
-changes in the same file since you began editing it; when you check in
-your revision, his changes are removed (however, they remain in the
-repository and are thus not irrevocably lost).  Therefore, you must
-verify that the current revision is unchanged before checking in your
-changes.  In addition, locking is possible with RCS even in this mode:
-@kbd{C-x v v} with an unmodified file locks the file, just as it does
-with RCS in its normal locking mode (@pxref{VC With A Locking VCS}).
+except that changes are not automatically merged from the repository.
+Nothing informs you if another user has checked in changes in the same
+file since you began editing it; when you check in your revision, his
+changes are removed (however, they remain in the repository and are
+thus not irrevocably lost).  Therefore, you must verify that the
+current revision is unchanged before checking in your changes.  In
+addition, locking is possible with RCS even in this mode: @kbd{C-x v
+v} with an unmodified file locks the file, just as it does with RCS in
+its normal locking mode (@pxref{VC With A Locking VCS}).
 
 @node VC With A Locking VCS
 @subsubsection Basic Version Control with Locking
@@ -501,26 +509,25 @@
   Under a locking-based version control system (such as SCCS, and RCS
 in its default mode), @kbd{C-x v v} does the following:
 
- @itemize @bullet
+@itemize @bullet
 @item
-If the file is not locked, @kbd{C-x v v} locks it, and makes it
-writable so that you can change it.
+If the file is not locked, lock it and make it writable, so that you
+can change it.
 
 @item
-If the file is locked by you, and contains changes, @kbd{C-x v v}
-checks in the changes.  In order to do this, it first reads the log
-entry for the new revision.  @xref{Log Buffer}.
+If the file is locked by you, and contains changes, check in the
+changes.  In order to do this, Emacs first reads the log entry for the
+new revision.  @xref{Log Buffer}.
 
 @item
 If the file is locked by you, but you have not changed it since you
-locked it, @kbd{C-x v v} releases the lock and makes the file
-read-only again.
+locked it, release the lock and makes the file read-only again.
 
 @item
-If the file is locked by some other user, @kbd{C-x v v} asks you whether
-you want to ``steal the lock'' from that user.  If you say yes, the file
-becomes locked by you, but a message is sent to the person who had
-formerly locked the file, to inform him of what has happened.
+If the file is locked by some other user, ask whether you want to
+``steal the lock'' from that user.  If you say yes, the file becomes
+locked by you, but a message is sent to the person who had formerly
+locked the file, to inform him of what has happened.
 @end itemize
 
   These rules also apply when you use CVS in locking mode, except
@@ -639,20 +646,23 @@
 to examine any revision of a file, or compare two revisions.
 
 @table @kbd
-@item C-x v ~ @var{revision} @key{RET}
-Examine revision @var{revision} of the visited file, in a buffer of its
-own.
+@item C-x v ~
+Prompt for a revision of the current file, and visit it in a buffer of
+its own (@code{vc-revision-other-window}).
 
 @item C-x v =
-Compare the buffer contents associated with the current
-fileset with the working revision(s) from which you started editing.
+Compare the files in the current fileset with the working revision(s)
+you started from (@code{vc-diff}).  With a prefix argument, prompt for
+two revisions of the current fileset and compare them.
 
-@item C-u C-x v = @key{RET} @var{oldvers} @key{RET} @var{newvers} @key{RET}
-Compare the specified two repository revisions of the current fileset.
+@item C-x v D
+Compare the entire tree corresponding to the current fileset with the
+tree you started from (@code{vc-root-diff}).  With a prefix argument,
+prompt for two revisions and compare their trees.
 
 @item C-x v g
 Display an annotated version of the file: for each line, show the
-latest revision in which it was modified.
+latest revision in which it was modified (@code{vc-annotate}).
 @end table
 
 @findex vc-revision-other-window
@@ -673,12 +683,11 @@
 
 @findex vc-diff
 @kindex C-x v =
-  @kbd{C-x v =} (@code{vc-diff}) compares the current buffer contents
-of each file in the current VC fileset (saving them if necessary) with
-the repository revision from which you started editing.  Note that the
-latter may or may not be the latest revision of the file(s).  The diff
-is displayed in a special buffer in another window.  @xref{Comparing
-Files}.
+  @kbd{C-x v =} (@code{vc-diff}) compares each file in the current VC
+fileset (saving them if necessary) with the repository revision(s)
+from which you started editing.  Note that the latter may or may not
+be the latest revision of the file(s).  The diff is displayed in a
+special buffer in another window.  @xref{Comparing Files}.
 
 @findex vc-diff
 @kindex C-u C-x v =
@@ -700,6 +709,12 @@
 name) is unlikely to return diffs that are connected in any meaningful
 way.
 
+  The command @kbd{C-x v D} (@code{vc-root-diff}) is similar to
+@kbd{C-x v =}, but it compares the entire tree associated with the
+current VC fileset with the tree you started with.  This means all the
+files controlled by the current version control repository, even those
+that are not part of the current VC fileset.
+
   If you invoke @kbd{C-x v =} or @kbd{C-u C-x v =} from a buffer that
 is neither visiting a version-controlled file nor a VC directory
 buffer, these commands generate a diff of all registered files in the
@@ -801,7 +816,7 @@
 
 @menu
 * Registering::         Putting a file under version control.
-* VC Status::           Viewing the VC status of files.
+* VC Change Log::       Viewing the VC Change Log.
 * VC Undo::             Canceling changes before or after check-in.
 @end menu
 
@@ -857,22 +872,36 @@
 initial comment to describe the purpose of this source file.  Reading
 the initial comment works like reading a log entry (@pxref{Log Buffer}).
 
-@node VC Status
-@subsubsection VC Status Commands
+@node VC Change Log
+@subsubsection VC Change Log
 
 @table @kbd
 @item C-x v l
-Display revision control state and change history.
+Display revision control state and change history
+(@code{vc-print-log}).
+
+@item C-x v L
+Display the change history for the current repository
+(@code{vc-print-root-log}).
 @end table
 
 @kindex C-x v l
 @findex vc-print-log
-  To view the detailed revision control status and history of a file,
-type @kbd{C-x v l} (@code{vc-print-log}).  This pops up a special
-buffer named @samp{*vc-change-log*}, in a new window, that displays
-the history of changes to the current file, including the text of the
-log entries.  The point is centered at the revision of the file that
-is currently being visited.
+  The command @kbd{C-x v l} (@code{vc-print-log}) displays a buffer
+named @samp{*vc-change-log*} in a new window.  This buffer lists the
+changes to the current file, including the associated log entries.
+(These are the log entries associated with the version control system,
+i.e. the ones you enter via the @samp{*VC-Log*} buffer.  @xref{Log
+Buffer}.)  Point is centered at the revision of the file currently
+being visited.  With a prefix argument, the command prompts for the
+revision to center on, and the maximum number of revisions to display.
+
+@findex vc-print-root-log
+  Type @kbd{C-x v L} (@code{vc-print-root-log}) to display a
+@samp{*vc-change-log*} buffer showing the history of the
+version-controlled directory tree as a whole.  With a prefix argument,
+the command prompts for the maximum number of revisions to display.
+RCS, SCCS, and CVS do not support this feature.
 
   In the @samp{*vc-change-log*} buffer, you can use the following keys
 to move between the logs of revisions and of files, to view past
@@ -926,6 +955,16 @@
 indicated on the current line did when it was committed.
 @end table
 
+@vindex vc-log-show-limit
+Because fetching many log entries can be slow, the
+@samp{*vc-change-log*} buffer displays no more than 2000 revisions by
+default.  The variable @code{vc-log-show-limit} specifies this limit;
+if you set the value to zero, that removes the limit.  You can also
+increase the number of revisions shown in an existing
+@samp{*vc-change-log*} buffer by clicking on the @samp{Show 2X
+entries} or @samp{Show unlimited entries} buttons at the end of the
+buffer.  However, RCS, SCCS, and CVS do not support this feature.
+
 @node VC Undo
 @subsubsection Undoing Version Control Actions
 
--- a/doc/emacs/major.texi	Wed Mar 31 00:14:29 2010 +0000
+++ b/doc/emacs/major.texi	Wed Mar 31 06:33:56 2010 +0000
@@ -41,7 +41,7 @@
 mode, Fortran mode, and others.  The remaining major modes are not
 intended for use on users' files; they are used in buffers created for
 specific purposes by Emacs, such as Dired mode for buffers made by
-Dired (@pxref{Dired}), Mail mode for buffers made by @kbd{C-x m}
+Dired (@pxref{Dired}), Message mode for buffers made by @kbd{C-x m}
 (@pxref{Sending Mail}), and Shell mode for buffers used for
 communicating with an inferior shell process (@pxref{Interactive
 Shell}).
--- a/doc/emacs/misc.texi	Wed Mar 31 00:14:29 2010 +0000
+++ b/doc/emacs/misc.texi	Wed Mar 31 06:33:56 2010 +0000
@@ -84,11 +84,20 @@
 Emacs movement keys: @kbd{C-p}, @kbd{C-n}, @kbd{C-b}, @kbd{C-f}, and
 the arrow keys.
 
+@vindex doc-view-continuous
+  By default, the line-motion keys @kbd{C-p} and @kbd{C-n} stop
+scrolling at the beginning and end of the current page, respectively.
+However, if you change the variable @code{doc-view-continuous} to a
+non-@code{nil} value, then @kbd{C-p} displays the previous page if you
+are already at the beginning of the current page, and @kbd{C-n}
+displays the next page if you are at the end of the current page.
+
 @findex doc-view-next-page
 @findex doc-view-previous-page
-  To display the next page, type @kbd{n}, @key{next} or @kbd{C-x ]}
-(@code{doc-view-next-page}).  To display the previous page, type
-@kbd{p}, @key{prior} or @kbd{C-x [} (@code{doc-view-previous-page}).
+  You can also display the next page by typing @kbd{n}, @key{next} or
+@kbd{C-x ]} (@code{doc-view-next-page}).  To display the previous
+page, type @kbd{p}, @key{prior} or @kbd{C-x [}
+(@code{doc-view-previous-page}).
 
 @findex doc-view-scroll-up-or-next-page
 @findex doc-view-scroll-down-or-previous-page
@@ -957,12 +966,9 @@
 Fetch the next later old shell command.
 
 @kindex M-r @r{(Shell mode)}
-@kindex M-s @r{(Shell mode)}
-@findex comint-previous-matching-input
-@findex comint-next-matching-input
-@item M-r @var{regexp} @key{RET}
-@itemx M-s @var{regexp} @key{RET}
-Search backwards or forwards for old shell commands that match @var{regexp}.
+@findex comint-history-isearch-backward-regexp
+@item M-r
+Begin an incremental regexp search of old shell commands.
 
 @item C-c C-x
 @kindex C-c C-x @r{(Shell mode)}
@@ -995,15 +1001,15 @@
 @kbd{C-@key{UP}} works like @kbd{M-p}, and @kbd{C-@key{DOWN}} like
 @kbd{M-n}.
 
-  The history search commands @kbd{M-r} and @kbd{M-s} read a regular
-expression and search through the history for a matching command.  Aside
-from the choice of which command to fetch, they work just like @kbd{M-p}
-and @kbd{M-n}.  If you enter an empty regexp, these commands reuse the
-same regexp used last time.
-
-  When you find the previous input you want, you can resubmit it by
-typing @key{RET}, or you can edit it first and then resubmit it if you
-wish.  Any partial input you were composing before navigating the
+  The history search command @kbd{M-r} begins an incremental regular
+expression search of previous shell commands.  After typing @kbd{M-r},
+start typing the desired string or regular expression; the last
+matching shell command will be displayed in the current line.
+Incremental search commands have their usual effects---for instance,
+@kbd{C-s} and @kbd{C-r} search forward and backward for the next match
+(@pxref{Incremental Search}).  When you find the desired input, type
+@key{RET} to terminate the search.  This puts the input in the command
+line.  Any partial input you were composing before navigating the
 history list is restored when you go to the beginning or end of the
 history ring.
 
--- a/doc/emacs/mule.texi	Wed Mar 31 00:14:29 2010 +0000
+++ b/doc/emacs/mule.texi	Wed Mar 31 06:33:56 2010 +0000
@@ -540,6 +540,11 @@
 possible characters to type next is displayed in the echo area (but
 not when you are in the minibuffer).
 
+  Another facility for typing characters not on your keyboard is by
+using the @kbd{C-x 8 @key{RET}} (@code{ucs-insert}) to insert a single
+character based on its Unicode name or code-point; see @ref{Inserting
+Text}.
+
 @node Select Input Method
 @section Selecting an Input Method
 
@@ -968,15 +973,16 @@
 to the question.)
 
 @vindex sendmail-coding-system
-  When you send a message with Mail mode (@pxref{Sending Mail}), Emacs has
-four different ways to determine the coding system to use for encoding
-the message text.  It tries the buffer's own value of
-@code{buffer-file-coding-system}, if that is non-@code{nil}.  Otherwise,
-it uses the value of @code{sendmail-coding-system}, if that is
-non-@code{nil}.  The third way is to use the default coding system for
-new files, which is controlled by your choice of language environment,
-if that is non-@code{nil}.  If all of these three values are @code{nil},
-Emacs encodes outgoing mail using the Latin-1 coding system.
+  When you send a message with Message mode (@pxref{Sending Mail}),
+Emacs has four different ways to determine the coding system to use
+for encoding the message text.  It tries the buffer's own value of
+@code{buffer-file-coding-system}, if that is non-@code{nil}.
+Otherwise, it uses the value of @code{sendmail-coding-system}, if that
+is non-@code{nil}.  The third way is to use the default coding system
+for new files, which is controlled by your choice of language
+environment, if that is non-@code{nil}.  If all of these three values
+are @code{nil}, Emacs encodes outgoing mail using the Latin-1 coding
+system.
 
 @node Text Coding
 @section Specifying a Coding System for File Text
--- a/doc/emacs/programs.texi	Wed Mar 31 00:14:29 2010 +0000
+++ b/doc/emacs/programs.texi	Wed Mar 31 06:33:56 2010 +0000
@@ -88,11 +88,12 @@
 @cindex PostScript mode
 @cindex Conf mode
 @cindex DNS mode
+@cindex Javascript mode
   The existing programming language major modes include Lisp, Scheme
 (a variant of Lisp) and the Scheme-based DSSSL expression language,
 Ada, ASM, AWK, C, C++, Delphi (Object Pascal), Fortran, Icon, IDL
-(CORBA), IDLWAVE, Java, Metafont (@TeX{}'s companion for font
-creation), Modula2, Objective-C, Octave, Pascal, Perl, Pike,
+(CORBA), IDLWAVE, Java, Javascript, Metafont (@TeX{}'s companion for
+font creation), Modula2, Objective-C, Octave, Pascal, Perl, Pike,
 PostScript, Prolog, Python, Ruby, Simula, Tcl, and VHDL.  An
 alternative mode for Perl is called CPerl mode.  Modes are available
 for the scripting languages of the common GNU and Unix shells, VMS
--- a/doc/emacs/rmail.texi	Wed Mar 31 00:14:29 2010 +0000
+++ b/doc/emacs/rmail.texi	Wed Mar 31 06:33:56 2010 +0000
@@ -683,12 +683,12 @@
 @node Rmail Reply
 @section Sending Replies
 
-  Rmail has several commands that use Mail mode to send outgoing mail.
-@xref{Sending Mail}, for information on using Mail mode, including
-certain features meant to work with Rmail.  What this section documents
-are the special commands of Rmail for entering Mail mode.  Note that the
-usual keys for sending mail---@kbd{C-x m}, @kbd{C-x 4 m}, and @kbd{C-x 5
-m}---also work normally in Rmail mode.
+  Rmail has several commands to send outgoing mail.  @xref{Sending
+Mail}, for information on using Message mode, including certain
+features meant to work with Rmail.  What this section documents are
+the special commands of Rmail for entering the mail buffer.  Note that
+the usual keys for sending mail---@kbd{C-x m}, @kbd{C-x 4 m}, and
+@kbd{C-x 5 m}---also work normally in Rmail mode.
 
 @table @kbd
 @item m
@@ -735,12 +735,12 @@
 This means to reply only to the sender of the original message.
 
   Once the @samp{*mail*} buffer has been initialized, editing and
-sending the mail goes as usual (@pxref{Sending Mail}).  You can edit the
-presupplied header fields if they are not what you want.  You can also
-use the commands of Mail mode (@pxref{Mail Mode}), including @kbd{C-c
-C-y} which yanks in the message that you are replying to.  You can
-also switch to the Rmail buffer, select a different message there, switch
-back, and yank the new current message.
+sending the mail goes as usual (@pxref{Sending Mail}).  You can edit
+the presupplied header fields if they are not what you want.  You can
+also use commands such as @kbd{C-c C-y}, which yanks in the message
+that you are replying to (@pxref{Mail Commands}).  You can also switch
+to the Rmail buffer, select a different message there, switch back,
+and yank the new current message.
 
 @kindex M-m @r{(Rmail)}
 @findex rmail-retry-failure
--- a/doc/emacs/sending.texi	Wed Mar 31 00:14:29 2010 +0000
+++ b/doc/emacs/sending.texi	Wed Mar 31 06:33:56 2010 +0000
@@ -6,120 +6,110 @@
 @chapter Sending Mail
 @cindex sending mail
 @cindex mail
+@cindex email
 @cindex message
 
-  To send a message in Emacs, you start by typing a command (@kbd{C-x m})
-to select and initialize the @samp{*mail*} buffer.  Then you edit the text
-and headers of the message in this buffer, and type another command
-(@kbd{C-c C-s} or @kbd{C-c C-c}) to send the message.
+@kindex C-x m
+@findex compose-mail
+  To send an @dfn{e-mail} message in Emacs, type @kbd{C-x m}.  This
+selects and initializes a buffer named @samp{*mail*}, where you can
+edit the text and headers of the message.  Finally, type @kbd{C-c C-s}
+or @kbd{C-c C-c} to send the message.
 
 @table @kbd
 @item C-x m
-Begin composing a message to send (@code{compose-mail}).
+Begin composing mail (@code{compose-mail}).
 @item C-x 4 m
-Likewise, but display the message in another window
-(@code{compose-mail-other-window}).
+Likewise, in another window (@code{compose-mail-other-window}).
 @item C-x 5 m
-Likewise, but make a new frame (@code{compose-mail-other-frame}).
+Likewise, but in a new frame (@code{compose-mail-other-frame}).
 @item C-c C-s
-In Mail mode, send the message (@code{mail-send}).
+In the mail buffer, send the message (@code{message-send}).
 @item C-c C-c
-Send the message and bury the mail buffer (@code{mail-send-and-exit}).
+In the mail buffer, send the message and bury the buffer
+(@code{message-send-and-exit}).
 @end table
 
-@kindex C-x m
-@findex compose-mail
 @kindex C-x 4 m
 @findex compose-mail-other-window
 @kindex C-x 5 m
 @findex compose-mail-other-frame
-  The command @kbd{C-x m} (@code{compose-mail}) selects a buffer named
-@samp{*mail*} and initializes it with the skeleton of an outgoing
-message.  @kbd{C-x 4 m} (@code{compose-mail-other-window}) selects the
-@samp{*mail*} buffer in a different window, leaving the previous current
-buffer visible.  @kbd{C-x 5 m} (@code{compose-mail-other-frame}) creates
-a new frame to select the @samp{*mail*} buffer.
-
-  Because the mail-composition buffer is an ordinary Emacs buffer, you can
-switch to other buffers while in the middle of composing mail, and switch
-back later (or never).  If you use the @kbd{C-x m} command again when you
-have been composing another message but have not sent it, you are asked to
-confirm before the old message is erased.  If you answer @kbd{n}, the
-@samp{*mail*} buffer remains selected with its old contents, so you can
-finish the old message and send it.  @kbd{C-u C-x m} is another way to do
-this.  Sending the message marks the @samp{*mail*} buffer ``unmodified,''
-which avoids the need for confirmation when @kbd{C-x m} is next used.
+@noindent
+The command @kbd{C-x 4 m} (@code{compose-mail-other-window}) does the
+same as @kbd{C-x m}, except it displays the mail buffer in a different
+window.  The command @kbd{C-x 5 m} (@code{compose-mail-other-frame})
+creates a new frame for the mail buffer.
 
-  If you are composing a message in the @samp{*mail*} buffer and want to
-send another message before finishing the first, rename the
-@samp{*mail*} buffer using @kbd{M-x rename-uniquely} (@pxref{Misc
-Buffer}).  Then you can use @kbd{C-x m} or its variants described above
-to make a new @samp{*mail*} buffer.  Once you've done that, you can work
-with each mail buffer independently.
-
-@vindex mail-default-directory
-  The variable @code{mail-default-directory} controls the default
-directory for mail buffers, and also says where to put their auto-save
-files.
+  Because the mail buffer is an ordinary Emacs buffer, you can switch
+to other buffers while in the middle of composing mail, and switch
+back later (or never).  If you type @kbd{C-x m} again when you have
+been composing another message but have not sent it, Emacs asks for
+confirmation before erasing the old message.  If you answer @kbd{n},
+Emacs selects the mail buffer with its old contents, so you can finish
+the old message and send it.  @kbd{C-u C-x m} is another way to do
+this.  Sending the message marks the mail buffer ``unmodified,'' which
+avoids the need for confirmation when @kbd{C-x m} is next used.
 
-@c Not mentioned: mail-bury-selects-summary.  Really an Rmail feature.
+  If you want to send another message before finishing the current
+message, use the command @kbd{M-x rename-uniquely} to rename the
+current mail buffer (@pxref{Misc Buffer}).  Then you can use @kbd{C-x
+m} to make a new mail buffer, and work with each mail buffer
+independently.
 
-@ignore
-@c Commented out because it is not user-oriented;
-@c it doesn't say how to do some job.  -- rms.
-@cindex directory servers
-@cindex LDAP
-@cindex PH/QI
-@cindex names and addresses
-There is an interface to directory servers using various protocols such
-as LDAP or the CCSO white pages directory system (PH/QI), described in a
-separate manual.  It may be useful for looking up names and addresses.
-@xref{Top,,EUDC, eudc, EUDC Manual}.
-@end ignore
+  Before using Emacs to send mail, you may need to customize the
+variable @code{send-mail-function} if your system is not set up to
+deliver mail directly via SMTP (@pxref{Mail Sending}).  In addition,
+you may need to customize @code{user-mail-address} if the system
+cannot receive mail via SMTP (@pxref{Mail Headers}).
 
 @menu
-* Format: Mail Format.	     Format of the mail being composed.
-* Headers: Mail Headers.     Details of some standard mail header fields.
-* Aliases: Mail Aliases.     Abbreviating and grouping mail addresses.
-* Mode: Mail Mode.	     Special commands for editing mail being composed.
-* Amuse: Mail Amusements.    Distracting the NSA; adding fortune messages.
-* Methods: Mail Methods.     Using alternative mail-composition methods.
+* Format: Mail Format.	      Format of a mail message.
+* Headers: Mail Headers.      Details of some standard mail header fields.
+* Aliases: Mail Aliases.      Abbreviating and grouping mail addresses.
+* Commands: Mail Commands.    Special commands for editing mail being composed.
+* Signature: Mail Signature.  Adding a signature to every message.
+* Amuse: Mail Amusements.     Distracting the NSA; adding fortune messages.
+* Methods: Mail Methods.      Using alternative mail-composition methods.
 @end menu
 
 @node Mail Format
 @section The Format of the Mail Buffer
 
-  In addition to the @dfn{text} or @dfn{body}, a message has @dfn{header
-fields} which say who sent it, when, to whom, why, and so on.  Some
-header fields, such as @samp{Date} and @samp{Message-Id}, are created
-automatically when you send the message.  Others, such as the recipient
-names, must be specified by you in order to send the message properly.
+  An email message must contain certain pieces of information, called
+@dfn{headers}, which specify the message's sender, recipient(s), and
+so on.
 
-  In the mail buffer, you can insert and edit header fields using
-ordinary editing commands.  Mail mode provides commands to help you
-edit some header fields, and some are automatically preinitialized in
-the buffer, when appropriate.
+  At the top of the mail buffer is a set of @dfn{header fields}, where
+you can enter this information.  You can insert and edit header fields
+using ordinary editing commands.  @xref{Header Editing}, for commands
+specific to editing header fields.
+
+  Some header fields are automatically pre-initialized in the buffer,
+when appropriate; other headers, such as @samp{Date} and
+@samp{Message-Id}, are normally omitted from the mail buffer and
+created automatically when the message is sent.
 
 @vindex mail-header-separator
   The line in the buffer that says
 
-@example
+@smallexample
 --text follows this line--
-@end example
+@end smallexample
 
 @noindent
-is a special delimiter that separates the headers you have specified from
-the text.  Whatever follows this line is the text of the message; the
-headers precede it.  The delimiter line itself does not appear in the
-message actually sent.  The text used for the delimiter line is controlled
-by the variable @code{mail-header-separator}.
+separates the header fields from the @dfn{body} (or @dfn{text}) of the
+message.  Everything above this line is treated as part of the
+headers; everything below it is treated as the body.  The delimiter
+line itself does not appear in the message actually sent.  The text
+used for the delimiter line is controlled by the variable
+@code{mail-header-separator}.
 
   Here is an example of what the headers and text in the mail buffer
 might look like.
 
 @example
-To: gnu@@gnu.org
-CC: lungfish@@spam.org, byob@@spam.org
+To: gnu@@example.org
+CC: lungfish@@example.com, byob@@example.net
 Subject: The Emacs Manual
 --text follows this line--
 Please ignore this message.
@@ -134,85 +124,51 @@
 equivalent in field names (and in mailing addresses also).  After the
 colon and optional whitespace comes the contents of the field.
 
-  You can use any name you like for a header field, but normally people
-use only standard field names with accepted meanings.  Here is a table
-of fields commonly used in outgoing messages.  Emacs preinitializes some
-of these when you start to compose a mail, depending on various options
-you can set.  You can delete or alter any header field before you send
-the message, if you wish.
+  You can use any name you like for a header field, but normally
+people use only standard field names with accepted meanings.  Here is
+a table of commonly-used fields.  Emacs pre-initializes some of these,
+depending on various options you can set.  You can delete or alter any
+header field before you send the message, if you wish.
 
 @table @samp
+@item From
+@vindex user-mail-address
+The address of the sender (you).  This should be a valid mailing
+address, as replies will normally go there.  Emacs initializes this
+field using the variables @code{user-full-name} and
+@code{user-mail-address}; see below.
+
 @item To
-This field contains the mailing addresses to which the message is
-addressed.  If you list more than one address, use commas, not spaces,
-to separate them.
+The mailing address(es) to which the message is addressed.  To list
+more than one address, use commas (not spaces) to separate them.
 
 @item Subject
-The contents of the @samp{Subject} field should be a piece of text
-that says what the message is about.  The reason @samp{Subject} fields
-are useful is that most mail-reading programs can provide a summary of
-messages, listing the subject of each message but not its text.
+A piece of text saying what the message is about.  Most mail-reading
+programs can display a summary of messages, listing the subject of
+each message but not its text.
 
 @item CC
-This field contains additional mailing addresses to send the message to,
-like @samp{To} except that these readers should not regard the message
-as directed at them.
+Additional mailing address(es) to send the message to.  This is like
+@samp{To}, except that these readers should not regard the message as
+directed at them.
 
 @item BCC
-This field contains additional mailing addresses to send the message to,
-which should not appear in the header of the message actually sent.
-Copies sent this way are called @dfn{blind carbon copies}.
-
-@vindex mail-self-blind
-@cindex copy of every outgoing message
-To send a blind carbon copy of every outgoing message to yourself, set
-the variable @code{mail-self-blind} to @code{t}.  To send a blind carbon
-copy of every message to some other @var{address}, set the variable
-@code{mail-default-headers} to @code{"Bcc: @var{address}\n"}.
+Additional mailing address(es) to send the message to, which should
+not appear in the header of the message actually sent.  ``BCC'' stands
+for @dfn{blind carbon copies}.
 
 @item FCC
-This field contains the name of one file and directs Emacs to append a
-copy of the message to that file when you send the message.  Emacs
-writes the message in mbox format, unless the file is in Babyl format
-(used by Rmail before Emacs 23), in which case Emacs writes Babyl.  If
-an Rmail buffer is visiting the file, Emacs updates it accordingly.
-To specify more than one file, use several @samp{FCC} fields, with one
-file name in each field.
-
-@vindex mail-archive-file-name
-To put a fixed file name in the @samp{FCC} field each time you start
-editing an outgoing message, set the variable
-@code{mail-archive-file-name} to that file name.  Unless you remove the
-@samp{FCC} field before sending, the message will be written into that
-file when it is sent.
-
-@item From
-Use the @samp{From} field to say who you are.  You might need to change
-this if the account you are using to send the mail is not your own.  The
-contents of the @samp{From} field should be a valid mailing address,
-since replies will normally go there.  
-
-@vindex mail-setup-with-from
-Emacs initializes this field (unless the variable
-@code{mail-setup-with-from} is @code{nil}) using
-@code{user-mail-address} as the default.  If there is no @samp{From}
-field when you send a mail, Emacs adds one.
+The name of one file, to which a copy of the sent message should be
+appended.  Emacs writes the message in mbox format, unless the file is
+in Babyl format (used by Rmail before Emacs 23), in which case Emacs
+writes Babyl.  If an Rmail buffer is visiting the file, Emacs updates
+it accordingly.  To specify more than one file, use several @samp{FCC}
+fields, with one file name in each field.
 
 @item Reply-to
-Use this field to direct replies to a different address.  Most
-mail-reading programs (including Rmail) automatically send replies to
-the @samp{Reply-to} address in preference to the @samp{From} address.
-By adding a @samp{Reply-to} field to your header, you can work around
-any problems your @samp{From} address may cause for replies.
-
-@cindex @env{REPLYTO} environment variable
-@vindex mail-default-reply-to
-To put a fixed @samp{Reply-to} address into every outgoing message, set
-the variable @code{mail-default-reply-to} to that address (as a string).
-Then Emacs initializes the message with a @samp{Reply-to} field as
-specified.  When you first compose a mail, if
-@code{mail-default-reply-to} is @code{nil}, Emacs initializes it from the
-environment variable @env{REPLYTO}.
+An address to which replies should be sent, instead of @samp{From}.
+You can use this header if, for some reason, your @samp{From} address
+is unable to receive replies.
 
 @item Mail-reply-to
   This field takes precedence over @samp{Reply-to}.  It is used because
@@ -225,70 +181,88 @@
 It usually indicates that you want replies to go to the list, and that
 you do not need an extra copy sent directly to you.
 
-@vindex mail-mailing-lists
-  The variable @code{mail-mailing-lists} holds a list of mailing list
-addresses that you are subscribed to.  If it is non-@code{nil}, Emacs
-inserts an appropriate @samp{Mail-followup-to} header when sending mail
-to a mailing list.
-
-@c There is also "Sent-via", added by C-c C-v, but it does not seem
-@c particularly useful (?).
+@c Message mode handles this differently...
+@c @vindex mail-mailing-lists
+@c   The variable @code{mail-mailing-lists} holds a list of mailing list
+@c addresses that you are subscribed to.  If it is non-@code{nil}, Emacs
+@c inserts an appropriate @samp{Mail-followup-to} header when sending mail
+@c to a mailing list.
 
 @item In-reply-to
-This field contains a piece of text describing the message you are
-replying to.  Some mail systems can use this information to correlate
-related pieces of mail.  Normally this field is filled in by Rmail
-when you reply to a message in Rmail, and you never need to
-think about it (@pxref{Rmail}).
+A piece of text describing the message you are replying to.  Some mail
+systems can use this information to correlate related pieces of mail.
+Normally, you never need to think about this, because it is filled in
+automatically when you reply to a message in Rmail (or any other mail
+program built into Emacs).
 
 @item References
-This field lists the Message-Ids of related previous messages (a
-Message-Id is a unique identifier generated when a message is sent).
-Rmail sets up this field automatically when you reply to a message.
+The Message-Ids of previous related messages (a Message-Id is a unique
+identifier generated when a message is sent).  Like
+@samp{In-reply-to}, this is normally set up automatically for you.
 @end table
 
-  The @samp{To}, @samp{CC}, and @samp{BCC} header fields can appear
-any number of times, and each such header field can contain multiple
-addresses, separated by commas.  This way, you can specify any number
-of places to send the message.  These fields can also have
-continuation lines: one or more lines starting with whitespace,
-following the starting line of the field, are considered part of the
-field.  Here's an example of a @samp{To} field with a continuation
-line:
+@noindent
+The @samp{To}, @samp{CC}, and @samp{BCC} fields can appear any number
+of times, and each such header field can contain multiple addresses,
+separated by commas.  This way, you can specify any number of places
+to send the message.  These fields can also have continuation lines:
+one or more lines starting with whitespace, following the starting
+line of the field, are considered part of the field.  Here's an
+example of a @samp{To} field with a continuation line:
 
 @example
 @group
-To: foo@@here.net, this@@there.net,
-  me@@gnu.cambridge.mass.usa.earth.spiral3281
+To: foo@@example.net, this@@example.net,
+  bob@@example.com
 @end group
 @end example
 
+@vindex user-full-name
+@vindex user-mail-address
+  The default contents of the @samp{From} header field are computed
+from the variables @code{user-full-name} and @code{user-mail-address}.
+On some operating systems, Emacs initializes these two variables using
+environment variables (@pxref{General Variables}).  If this
+information is unavailable or wrong, you can customize the variables
+yourself (@pxref{Easy Customization}).
+
 @vindex mail-from-style
-  When you send the message, if you didn't write a @samp{From} field
-yourself, Emacs puts in one for you, using @code{user-mail-address}.
-The variable @code{mail-from-style} controls the format:
+  The value of the variable @code{mail-from-style} specifies how to
+format the address in the @samp{From} field:
 
-@table @code
-@item nil
-Use just the email address, as in @samp{king@@grassland.com}.
-@item parens
-Use both email address and full name, as in:@*
+@table @asis
+@item @code{nil}
+Use just the address, as in @samp{king@@grassland.com}.
+@item @code{parens}
+Use both address and full name, as in:@*
 @samp{king@@grassland.com (Elvis Parsley)}.
-@item angles
-Use both email address and full name, as in:@*
+@item @code{angles}
+Use both address and full name, as in:@*
 @samp{Elvis Parsley <king@@grassland.com>}.
-@item system-default
-Allow the system to insert the @samp{From} field.
+@item any other value
+Use @code{angles} for most addresses.  However, if the address must be
+``quoted'' to remain syntactically-valid under the @code{angles}
+format but not under the @code{parens} format, use @code{parens}
+instead.  This is the default.
 @end table
 
 @c There is also mail-specify-envelope-from and mail-envelope-from, but
 @c these are probably not topics for the Emacs manual.
 
 @vindex mail-default-headers
-  You can direct Emacs to insert certain default headers into the
-outgoing message by setting the variable @code{mail-default-headers}
-to a string.  Then @code{C-x m} inserts this string into the message
-headers.  If the default header fields are not appropriate for a
+  You can direct Emacs to insert certain default headers into the mail
+buffer by setting the variable @code{mail-default-headers} to a
+string.  Then @kbd{C-x m} inserts this string into the message
+headers.  For example, here is how to add a @samp{Reply-to} and
+@samp{FCC} header to each message:
+
+@smallexample
+(setq mail-default-headers
+      "Reply-to: foo@@example.com\nFCC: ~/Mail/sent")
+@end smallexample
+
+@noindent
+If the default header fields are not appropriate for a
 particular message, edit them as necessary before sending the message.
 
 @node Mail Aliases
@@ -296,29 +270,26 @@
 @cindex mail aliases
 @cindex @file{.mailrc} file
 @cindex mailrc file
+@vindex mail-personal-alias-file
 
-  You can define @dfn{mail aliases} in a file named @file{~/.mailrc}.
-These are short mnemonic names which stand for mail addresses or groups of
-mail addresses.  Like many other mail programs, Emacs expands aliases
-when they occur in the @samp{To}, @samp{From}, @samp{CC}, @samp{BCC}, and
-@samp{Reply-to} fields, plus their @samp{Resent-} variants.
-@c The list is defined by mail-address-field-regexp.
+  You can define @dfn{mail aliases}, which are short mnemonic names
+that stand for mail addresses or groups of mail addresses.  By
+default, mail aliases are defined in the file @file{~/.mailrc}.  You
+can specify a different file name to use, by setting the variable
+@code{mail-personal-alias-file}.
 
-  To define an alias in @file{~/.mailrc}, write a line in the following
+  To define an alias in @file{.mailrc}, write a line in the following
 format:
 
 @example
-alias @var{shortaddress} @var{fulladdresses}
+alias @var{nick} @var{fulladdresses}
 @end example
 
 @noindent
-Here @var{fulladdresses} stands for one or more mail addresses for
-@var{shortaddress} to expand into.  Separate multiple addresses with
-spaces; if an address contains a space, quote the whole address with a
-pair of double quotes.
-
-For instance, to make @code{maingnu} stand for
-@code{gnu@@gnu.org} plus a local address of your own, put in
+This means that @var{nick} should expand into @var{fulladdresses},
+where @var{fulladdresses} can be either a single address, or multiple
+addresses separated with spaces.  For instance, to make @code{maingnu}
+stand for @code{gnu@@gnu.org} plus a local address of your own, put in
 this line:@refill
 
 @example
@@ -326,329 +297,248 @@
 @end example
 
 @noindent
-Addresses specified in this way should use double quotes around an
-entire address when the address contains spaces.  But you need not
-include double quotes around parts of the address, such as the person's
-full name.  Emacs puts them in if they are needed.  For example,
+If an address contains a space, quote the whole address with a pair of
+double quotes, like this:
 
 @example
 alias jsmith "John Q. Smith <none@@example.com>"
 @end example
 
 @noindent
-is correct in @samp{.mailrc}.  Emacs will insert the address as
+Note that you need not include double quotes around individual parts
+of the address, such as the person's full name.  Emacs puts them in if
+they are needed.  For instance, it inserts the above address as
 @samp{"John Q. Smith" <none@@example.com>}.
 
-  Emacs also recognizes ``include'' commands in @samp{.mailrc} files.
-They look like this:
+  Emacs also recognizes ``include'' commands in @file{.mailrc}.  They
+look like this:
 
 @example
 source @var{filename}
 @end example
 
 @noindent
-The file @file{~/.mailrc} is used primarily by other mail-reading
-programs; it can contain various other commands.  Emacs ignores
-everything in it except for alias definitions and include commands.
-
-@findex define-mail-alias
-  Another way to define a mail alias, within Emacs alone, is with the
-@code{define-mail-alias} command.  It prompts for the alias and then the
-full address.  You can use it to define aliases in your @file{.emacs}
-file, like this:
-
-@example
-(define-mail-alias "maingnu" "gnu@@gnu.org")
-@end example
-
-@vindex mail-aliases
-  @code{define-mail-alias} records aliases by adding them to a
-variable named @code{mail-aliases}.  If you are comfortable with
-manipulating Lisp lists, you can set @code{mail-aliases} directly.  The
-initial value of @code{mail-aliases} is @code{t}, which means that
-Emacs should read @file{.mailrc} to get the proper value.
+The @file{.mailrc} file is not unique to Emacs; many other
+mail-reading programs use it for mail aliases, and it can contain
+various other commands.  However, Emacs ignores everything except
+alias definitions and include commands.
 
-@vindex mail-personal-alias-file
-  You can specify a different file name to use instead of
-@file{~/.mailrc} by setting the variable
-@code{mail-personal-alias-file}.
-
-@c There is also mail-alias-file for the system aliases.
+@findex mail-abbrev-insert-alias
+  Mail aliases expand as abbrevs---that is to say, as soon as you type
+a word-separator character after an alias (@pxref{Abbrevs}).  This
+expansion takes place only within the @samp{To}, @samp{From},
+@samp{CC}, @samp{BCC}, and @samp{Reply-to} header fields (plus their
+@samp{Resent-} variants); it does not take place in other header
+fields, such as @samp{Subject}.
 
-@findex expand-mail-aliases
-  Normally, Emacs expands aliases when you send the message.  You do not
-need to expand mail aliases before sending the message, but you can
-expand them if you want to see where the mail will actually go.  To do
-this, use the command @kbd{M-x expand-mail-aliases}; it expands all mail
-aliases currently present in the mail headers that hold addresses.
-
-  If you like, you can have mail aliases expand as abbrevs, as soon as
-you type them in (@pxref{Abbrevs}).  To enable this feature, execute the
-following:
-
-@example
-(add-hook 'mail-mode-hook 'mail-abbrevs-setup)
-@end example
+  You can also insert an aliased address directly, using the command
+@kbd{M-x mail-abbrev-insert-alias}.  This reads an alias name, with
+completion, and inserts its definition at point.
 
-@noindent
-@findex define-mail-abbrev
-@vindex mail-abbrevs
-This can go in your @file{.emacs} file.  @xref{Hooks}.  If you use this
-feature, you must use @code{define-mail-abbrev} instead of
-@code{define-mail-alias}; the latter does not work with this package.
-Note that the mail abbreviation package uses the variable
-@code{mail-abbrevs} instead of @code{mail-aliases}, and that all alias
-names are converted to lower case.
-
-@kindex C-c C-a @r{(Mail mode)}
-@findex mail-abbrev-insert-alias
-  The mail abbreviation package also provides the @kbd{C-c C-a}
-(@code{mail-abbrev-insert-alias}) command, which reads an alias
-name (with completion) and inserts its definition at point.  This is
-useful when editing the message text itself or a header field such as
-@samp{Subject} in which Emacs does not normally expand aliases.
-
-  Note that abbrevs expand only if you insert a word-separator character
-afterward.  However, you can rebind @kbd{C-n} and @kbd{M->} to cause
-expansion as well.  Here's how to do that:
+@node Mail Commands
+@section Mail Commands
+@cindex Message mode
+@cindex mode, Message
 
-@smallexample
-(add-hook 'mail-mode-hook
-    (lambda ()
-      (define-key
-        mail-mode-map [remap next-line] 'mail-abbrev-next-line)
-      (define-key
-        mail-mode-map [remap end-of-buffer] 'mail-abbrev-end-of-buffer)))
-@end smallexample
+  The default major mode for the @samp{*mail*} buffer is called
+Message mode.  It behaves like Text mode in many ways, but provides
+several additional commands on the @kbd{C-c} prefix, which make
+editing a message more convenient.
 
-@node Mail Mode
-@section Mail Mode
-@cindex Mail mode
-@cindex mode, Mail
-
-  The major mode used in the mail buffer is Mail mode, which is much
-like Text mode except that various special commands are provided on the
-@kbd{C-c} prefix.  These commands all have to do specifically with
-editing or sending the message. 
-
-  Mail mode is normally used in buffers set up automatically by the
-@code{mail} command and related commands.  However, you can also switch
-to Mail mode in a file-visiting buffer.  This is a useful thing to do if
-you have saved the text of a draft message in a file.
+  In this section, we will describe some of the most commonly-used
+commands available in Message mode.
+@ifnottex
+Message mode also has its own manual, where its features are described
+in greater detail.  @xref{Top,,Message, message, Message}.
+@end ifnottex
 
 @menu
 * Mail Sending::        Commands to send the message.
 * Header Editing::      Commands to move to header fields and edit them.
-* Citing Mail::         Copying all or part of a message you are replying to.
-* Mail Mode Misc::      Spell checking, signatures, etc.
+* Citing Mail::         Quoting a message you are replying to.
+* Mail Misc::           Attachments, spell checking, etc.
 @end menu
 
 @node Mail Sending
 @subsection Mail Sending
 
-  Mail mode has two commands for sending the message you have been
-editing:
+  There are two commands to send a message you have been editing:
 
 @table @kbd
+@item C-c C-c
+Send the message, and deselect the mail buffer (@code{message-send-and-exit}).
 @item C-c C-s
-Send the message, and leave the mail buffer selected (@code{mail-send}).
-@item C-c C-c
-Send the message, and select some other buffer (@code{mail-send-and-exit}).
+Send the message, and leave the mail buffer selected (@code{message-send}).
 @end table
 
-@kindex C-c C-s @r{(Mail mode)}
-@kindex C-c C-c @r{(Mail mode)}
-@findex mail-send
-@findex mail-send-and-exit
-@vindex mail-send-hook
-  @kbd{C-c C-s} (@code{mail-send}) sends the message and marks the mail
-buffer unmodified, but leaves that buffer selected so that you can
-modify the message (perhaps with new recipients) and send it again.
-@kbd{C-c C-c} (@code{mail-send-and-exit}) sends and then deletes the
-window or switches to another buffer.  It puts the mail buffer at the
-lowest priority for reselection by default, since you are finished with
-using it.  This is the usual way to send the message.  Sending a message
-runs the hook @code{mail-send-hook}.
+@kindex C-c C-s @r{(Message mode)}
+@kindex C-c C-c @r{(Message mode)}
+@findex message-send
+  If you want to send a message and be done with it, type @kbd{C-c
+C-c} (@code{mail-send-and-exit}).  This sends the message and then
+either deletes the window or switches to another buffer.  It also
+``buries'' the mail buffer, putting it at the lowest priority for
+reselection.  This is the usual command for sending a message.
 
-@c Options not mentioned: mail-interactive, mail-use-dsn.
+@findex message-send-and-exit
+  The command @kbd{C-c C-s} (@code{message-send}) sends the message
+and marks the mail buffer unmodified, but leaves the buffer selected.
+Use this command if you want to modify the message (perhaps with new
+recipients) and send it again.
+
+@vindex message-send-hook
+  Sending a message runs the hook @code{message-send-hook}.
 
   In a file-visiting buffer, sending the message does not clear the
 modified flag, because only saving the file should do that.  Also, you
 don't get a warning if you try to send the same message twice.
 
-@c This is indexed in mule.texi, node "Recognize Coding".
-@c @vindex sendmail-coding-system
-  When you send a message that contains non-@acronym{ASCII} characters, they need
-to be encoded with a coding system (@pxref{Coding Systems}).  Usually
-the coding system is specified automatically by your chosen language
-environment (@pxref{Language Environments}).  You can explicitly specify
-the coding system for outgoing mail by setting the variable
-@code{sendmail-coding-system} (@pxref{Recognize Coding}).
-
-  If the coding system thus determined does not handle the characters in
-a particular message, Emacs asks you to select the coding system to use,
+@vindex sendmail-coding-system
+  When you send a message containing non-@acronym{ASCII} characters,
+they need to be encoded with a coding system (@pxref{Coding Systems}).
+Usually the coding system is specified automatically by your chosen
+language environment (@pxref{Language Environments}).  You can
+explicitly specify the coding system for outgoing mail by setting the
+variable @code{sendmail-coding-system} (@pxref{Recognize Coding}).  If
+the coding system thus determined does not handle the characters in a
+particular message, Emacs asks you to select the coding system to use,
 showing a list of possible coding systems.
 
-@c Not mentioned: mail-send-nonascii.
-
 @cindex SMTP
 @cindex Feedmail
 @cindex Sendmail
 @cindex Mailclient
 @vindex send-mail-function
   The variable @code{send-mail-function} controls how the default mail
-user agent sends mail.  It should be set to a function.  In most cases,
-the default is @code{sendmail-send-it}, which delivers mail using the
-Sendmail installation on the local host.  On Mac OS X and MS-Windows,
-however, the default is normally @code{mailclient-send-it}, which
-passes the mail buffer on to the system's designated mail client (see
-@file{mailclient.el}).  To send mail through an SMTP server, set
-@code{send-mail-function} to @code{smtpmail-send-it} and set up the
-Emacs SMTP library (@pxref{Top,,Emacs SMTP Library, smtpmail, Sending
-mail via SMTP}).  Another option is @code{feedmail-send-it} (see the
-commentary section of the @file{feedmail.el} package).
+user agent sends mail.  Its value should be a function, which can be
+one of the following:
+
+@table @code
+@item sendmail-send-it
+Send mail using the system's default @command{sendmail} (or
+@command{sendmail}-compatible) program.  This is the default on Unix
+and GNU, and works provided the system is a valid @dfn{mail host}
+(that is, provided it can deliver mail via SMTP).
+
+@item mailclient-send-it
+Pass the mail buffer on to the system's designated mail client (see
+@file{mailclient.el}).  This is the default on Mac OS X and
+MS-Windows.
+
+@item smtpmail-send-it
+Send mail through an external mail host (e.g., your Internet service
+provider's SMTP server).  You will need to tell Emacs how to contact
+the SMTP server, by customizing the variables
+@code{smtpmail-smtp-server} and @code{smtpmail-auth-credentials}.
+@xref{Top,,Emacs SMTP Library, smtpmail, Sending mail via SMTP}.
+
+@item feedmail-send-it
+This is similar to @code{sendmail-send-it}, but allows you to queue
+messages for later sending.  See the commentary section in the file
+@file{feedmail.el} for more information.
+@end table
 
 @node Header Editing
 @subsection Mail Header Editing
 
-  Mail mode provides special commands to move to particular header
-fields and to complete addresses in headers.
+  Message mode provides the following special commands to move to
+particular header fields and to complete addresses in headers.
 
 @table @kbd
 @item C-c C-f C-t
-Move to the @samp{To} header field, creating one if there is none
-(@code{mail-to}).
+Move to the @samp{To} header (@code{message-goto-to}).
 @item C-c C-f C-s
-Move to the @samp{Subject} header field, creating one if there is
-none (@code{mail-subject}).
+Move to the @samp{Subject} header (@code{message-goto-subject}).
 @item C-c C-f C-c
-Move to the @samp{CC} header field, creating one if there is none
-(@code{mail-cc}).
+Move to the @samp{CC} header (@code{message-goto-cc}).
 @item C-c C-f C-b
-Move to the @samp{BCC} header field, creating one if there is none
-(@code{mail-bcc}).
+Move to the @samp{BCC} header (@code{message-goto-bcc}).
 @item C-c C-f C-r
-Move to the @samp{Reply-To} header field, creating one if there is none
-(@code{mail-reply-to}).
-@item C-c C-f C-a
-Move to the @samp{Mail-Reply-To} header field, creating one if there is none
-(@code{mail-mail-reply-to}).
-@item C-c C-f C-l
-Move to the @samp{Mail-Followup-To} header field, creating one if there is none
-(@code{mail-mail-followup-to}).
+Move to the @samp{Reply-To} header (@code{message-goto-reply-to}).
 @item C-c C-f C-f
+Move to the @samp{Mail-Followup-To} header field
+(@code{message-goto-followup-to}).
+@item C-c C-f C-w
 Add a new @samp{FCC} header field, with file-name completion
-(@code{mail-fcc}).
-@c There is also C-c C-v, mail-sent-via, which adds one or more
-@c "Sent-via" headers, but I don't know what the point of that header is.
-@item M-@key{TAB}
-Complete a mailing address (@code{mail-complete}).
+(@code{message-goto-fcc}).
+@item C-c C-b
+Move to the start of the message body (@code{message-goto-body}).
+@item @key{TAB}
+Complete a mailing address (@code{message-tab}).
 @end table
 
-@kindex C-c C-f C-t @r{(Mail mode)}
-@findex mail-to
-@kindex C-c C-f C-s @r{(Mail mode)}
-@findex mail-subject
-@kindex C-c C-f C-c @r{(Mail mode)}
-@findex mail-cc
-@kindex C-c C-f C-b @r{(Mail mode)}
-@findex mail-bcc
-@kindex C-c C-f C-r @r{(Mail mode)}
-@findex mail-reply-to
-@kindex C-c C-f C-a @r{(Mail mode)}
-@findex mail-mail-reply-to
-@kindex C-c C-f C-l @r{(Mail mode)}
-@findex mail-mail-followup-to
-@kindex C-c C-f C-f @r{(Mail mode)}
-@findex mail-fcc
-  There are several commands to move point to particular header fields,
-all based on the prefix @kbd{C-c C-f} (@samp{C-f} is for ``field'').
-They are listed in the table above.  If the field in question does not
-exist, these commands create one (the exception is @code{mail-fcc},
-which creates a new field each time).  We provide special motion
-commands for these particular fields because they are the fields users
-most often want to edit.
+@kindex C-c C-f C-t @r{(Message mode)}
+@findex message-goto-to
+@kindex C-c C-f C-s @r{(Message mode)}
+@findex message-goto-subject
+@kindex C-c C-f C-c @r{(Message mode)}
+@findex message-goto-cc
+@kindex C-c C-f C-b @r{(Message mode)}
+@findex message-goto-bcc
+@kindex C-c C-f C-r @r{(Message mode)}
+@findex goto-reply-to
+@kindex C-c C-f C-f @r{(Message mode)}
+@findex goto-followup-to
+@kindex C-c C-f C-w @r{(Message mode)}
+@findex message-goto-fcc
+  The commands to move point to particular header fields are all based
+on the prefix @kbd{C-c C-f} (@samp{C-f} is for ``field'').  If the
+field in question does not exist, the command creates one (the
+exception is @code{mail-fcc}, which creates a new field each time).
 
-@findex mail-complete
-@kindex M-TAB @r{(Mail mode)}
-@c `mail-complete-alist' specifies the headers.
-  While editing a header field that contains mailing addresses, such
-as @samp{To:}, @samp{CC:} and @samp{BCC:}, you can complete a mailing
-address by typing @kbd{M-@key{TAB}} (@code{mail-complete}).  It
-inserts the full name corresponding to the address, if it can
-determine the full name.  The variable @code{mail-complete-style}
-controls whether to insert the full name, and what style to use, as in
-@code{mail-from-style} (@pxref{Mail Headers}).  (If your window
-manager defines @kbd{M-@key{TAB}} to switch windows, you can type
-@kbd{@key{ESC} @key{TAB}} or @kbd{C-M-i}.)
+@kindex C-c C-b @r{(Message mode)}
+@findex mail-text
+  The command @kbd{C-c C-b} (@code{message-goto-body}) moves point to
+just after the header separator line---that is, to the beginning of
+the body.
 
-  For completion purposes, the valid mailing addresses are taken to be
-the local users' names plus your personal mail aliases (@pxref{Mail
-Aliases}).  You can specify additional sources of valid addresses;
-browse the customization group @samp{mailalias} to see the variables for
-customizing this feature (@pxref{Customization Groups}).
-
-  If you type @kbd{M-@key{TAB}} in the body of the message, or on a
-unrecognized header, @code{mail-complete} invokes the function specified
-by @code{mail-complete-function}.  By default, this is
-@code{ispell-complete-word}, as in Text mode.
+@findex message-tab
+@kindex TAB @r{(Message mode)}
+  While editing a header field that contains addresses, such as
+@samp{To:}, @samp{CC:} and @samp{BCC:}, you can complete an address by
+typing @key{TAB} (@code{message-tab}).  This attempts to insert the
+full name corresponding to the address based on a couple of methods,
+including EUDC, a library that recognizes a number of directory server
+protocols (@pxref{Top,,EUDC,eudc, The Emacs Unified Directory
+Client}).  Failing that, it attempts to expand the address as a mail
+alias (@pxref{Mail Aliases}).  If point is on a header field that does
+not take addresses, or if it is in the message body, then @key{TAB}
+just inserts a tab character.
 
 @node Citing Mail
 @subsection Citing Mail
 @cindex citing mail
 
-  Mail mode also has commands for yanking or @dfn{citing} all or part of
-a message that you are replying to.  These commands are active only when
-you started sending a message using an Rmail command.
-
 @table @kbd
 @item C-c C-y
-Yank the selected message from Rmail (@code{mail-yank-original}).
-@item C-c C-r
-Yank the region from the Rmail buffer (@code{mail-yank-region}).
+Yank the selected message from Rmail (@code{message-yank-original}).
 @item C-c C-q
 Fill each paragraph cited from another message
-(@code{mail-fill-yanked-message}).
-@c There is also mail-split-line, but it does not seem very useful.
+(@code{message-fill-yanked-message}).
 @end table
 
-@kindex C-c C-y @r{(Mail mode)}
-@findex mail-yank-original
-  When mail sending is invoked from the Rmail mail reader using an Rmail
-command, @kbd{C-c C-y} can be used inside the mail buffer to insert the
-text of the message you are replying to.  Normally it indents each line
-of that message three spaces and eliminates most header fields (as
-specified by the variable @code{mail-yank-ignored-headers}).  A numeric
-argument specifies the number of spaces to indent (the variable
-@code{mail-indentation-spaces} specifies the default number).  An
-argument of just @kbd{C-u} says not to indent at all and not to
-eliminate anything.  @kbd{C-c C-y} always uses the current message from
-the Rmail buffer, so you can insert several old messages by selecting
-one in Rmail, switching to @samp{*mail*} and yanking it, then switching
-back to Rmail to select another.
+@kindex C-c C-y @r{(Message mode)}
+@findex message-yank-original
+@findex message-yank-prefix
+  You can use the command @kbd{C-c C-y} (@code{message-yank-original})
+to @dfn{cite} a message that you are replying to.  This inserts the
+text of that message into the mail buffer.  This command is active
+only when the mail buffer is invoked from a mail program running in
+Emacs, such as Rmail.
 
-@vindex mail-yank-prefix
-  You can specify the text for @kbd{C-c C-y} to insert at the beginning
-of each line: set @code{mail-yank-prefix} to the desired string.  (A
-value of @code{nil} means to use indentation; this is the default.)
-However, @kbd{C-u C-c C-y} never adds anything at the beginning of the
-inserted lines, regardless of the value of @code{mail-yank-prefix}.
+  By default, Emacs inserts the string @samp{>} in front of each line
+of the cited text; this prefix string is specified by the variable
+@code{message-yank-prefix}.  If you call @code{message-yank-original}
+with a prefix argument, the citation prefix is not inserted.
 
-@kindex C-c C-r @r{(Mail mode)}
-@findex mail-yank-region
-  To yank just a part of an incoming message, set the region in Rmail to
-the part you want; then go to the @samp{*Mail*} message and type
-@kbd{C-c C-r} (@code{mail-yank-region}).  Each line that is copied is
-indented or prefixed according to @code{mail-yank-prefix}.
-
-@kindex C-c C-q @r{(Mail mode)}
+@kindex C-c C-q @r{(Message mode)}
 @findex mail-fill-yanked-message
-  After using @kbd{C-c C-y} or @kbd{C-c C-r}, you can type @kbd{C-c C-q}
-(@code{mail-fill-yanked-message}) to fill the paragraphs of the yanked
-old message or messages.  One use of @kbd{C-c C-q} fills all such
-paragraphs, each one individually.  To fill a single paragraph of the
-quoted message, use @kbd{M-q}.  If filling does not automatically
-handle the type of citation prefix you use, try setting the fill prefix
+  After using @kbd{C-c C-y}, you can type @kbd{C-c C-q}
+(@code{message-fill-yanked-message}) to fill the paragraphs of the
+cited message.  One use of @kbd{C-c C-q} fills all such paragraphs,
+each one individually.  To fill a single paragraph of the quoted
+message, use @kbd{M-q}.  If filling does not automatically handle the
+type of citation prefix you use, try setting the fill prefix
 explicitly.  @xref{Filling}.
 
 @vindex mail-citation-hook
@@ -657,91 +547,103 @@
 package, which provides more flexible citation
 (@pxref{Introduction,,,sc, Supercite}).
 
-@c No need to mention: mail-citation-prefix-regexp.
-
-@node Mail Mode Misc
-@subsection Mail Mode Miscellany
+@node Mail Misc
+@subsection Mail Miscellany
 
-@table @kbd
-@item C-c C-t
-Move to the beginning of the message body text (@code{mail-text}).
-@item C-c C-w
-Insert a signature at the end of the message text (@code{mail-signature}).
-@item C-c C-i @var{file} @key{RET}
-Insert the contents of @var{file} at the end of the message text
-(@code{mail-attach-file}).
-@item M-x ispell-message
-Perform spelling correction on the message text, but not on citations from
-other messages, or the message headers.
-@end table
-
-@kindex C-c C-t @r{(Mail mode)}
-@findex mail-text
-  @kbd{C-c C-t} (@code{mail-text}) moves point to just after the header
-separator line---that is, to the beginning of the message body text.
+@kindex C-c C-a @r{(Message mode)}
+@findex mail-attach-file
+@cindex MIME
+@cindex Multipurpose Internet Mail Extensions
+  You can @dfn{attach} a file to an outgoing message by typing
+@kbd{C-c C-a} (@code{mml-attach-file}) in the mail buffer.  Attaching
+is done using the MIME (Multipurpose Internet Mail Extensions)
+standard.
 
-@kindex C-c C-w @r{(Mail mode)}
-@findex mail-signature
-@vindex mail-signature
-  @kbd{C-c C-w} (@code{mail-signature}) adds a standard piece of text
-(your @dfn{mail signature}) at the end of the message to say more about who
-you are.  For example, it may contain telephone numbers, or your
-physical location.  The text comes from the variable
-@code{mail-signature}.  It can be a fixed string, or a Lisp expression
-that returns a string.  If it is @code{t} or @code{nil}, the function
-inserts the contents of the file @code{mail-signature-file}.  By
-default, this is the file @file{~/.signature} in your home directory.
+  The @code{mml-attach-file} command prompts for the name of the file,
+and for the attachment's @dfn{content type}, @dfn{description}, and
+@dfn{disposition}.  The content type is normally detected
+automatically; just type @key{RET} to accept the default.  The
+description is a single line of text that the recipient will see next
+to the attachment; you may also choose to leave this empty.  The
+disposition is either @samp{inline} (the default), which means the
+recipient will see a link to the attachment within the message body,
+or @samp{attachment}, which means the link will be separate from the
+body.
 
-  If the variable @code{mail-signature} has a non-@code{nil} value,
-starting a mail automatically inserts your signature.  Otherwise, you
-must explicitly use the command @code{mail-signature}.  If you want to
-omit your signature from a particular message, just delete it from the
-buffer before you send the message.
+  The actual contents of the attached file are not inserted into the
+mail buffer.  Instead, some placeholder text is inserted into the mail
+buffer, like this:
 
-  Convention says that the start of your signature should be marked by a
-line whose contents are @samp{-- }.  If your signature comes from a
-file, this prefix is added for you, but in all other cases you must add
-it yourself.  The remainder of your signature should be no more than
-four lines.
+@smallexample
+<#part type="text/plain" filename="~/foo.txt" disposition=inline>
+<#/part>
+@end smallexample
+
+@noindent
+When you type @kbd{C-c C-c} or @kbd{C-c C-s} to send the message, the
+attached file will be delivered with it.
 
 @findex ispell-message
-  You can do spelling correction on the message text you have written
-with the command @kbd{M-x ispell-message}.  If you have yanked an
-incoming message into the outgoing draft, this command skips what was
-yanked, but it checks the text that you yourself inserted.  (It looks
-for indentation or @code{mail-yank-prefix} to distinguish the cited
-lines from your input.)  @xref{Spelling}.
-
-@kindex C-c C-i @r{(Mail mode)}
-@findex mail-attach-file
-  To include a file in the outgoing message, you can use @kbd{C-x i},
-the usual command to insert a file in the current buffer.  But it is
-often more convenient to use a special command, @kbd{C-c C-i}
-(@code{mail-attach-file}).  This command inserts the file contents at
-the end of the buffer, after your signature (if any), with a delimiter
-line that includes the file name.  Note that this is not a MIME
-attachment.
+  While composing a message, you can do spelling correction on the
+message text by typing @kbd{M-x ispell-message}.  If you have yanked
+an incoming message into the outgoing draft, this command skips what
+was yanked, but it checks the text that you yourself inserted (it
+looks for indentation or @code{mail-yank-prefix} to distinguish the
+cited lines from your input).  @xref{Spelling}.
 
 @vindex mail-mode-hook
 @vindex mail-setup-hook
-  Turning on Mail mode (which @kbd{C-x m} does automatically) runs the
-normal hooks @code{text-mode-hook} and @code{mail-mode-hook}.
+  Turning on Message mode (which @kbd{C-x m} does automatically) runs
+the normal hooks @code{text-mode-hook} and @code{message-mode-hook}.
 Initializing a new outgoing message runs the normal hook
-@code{mail-setup-hook}; if you want to add special fields to your mail
-header or make other changes to the appearance of the mail buffer, use
-that hook.  @xref{Hooks}.
+@code{message-setup-hook}; you can use this hook if you want to make
+changes to the appearance of the mail buffer.  @xref{Hooks}.
 
   The main difference between these hooks is just when they are
-invoked.  Whenever you type @kbd{M-x mail}, @code{mail-mode-hook} runs
-as soon as the @samp{*mail*} buffer is created.  Then the
-@code{mail-setup} function inserts the default contents of the buffer.
-After these default contents are inserted, @code{mail-setup-hook} runs.
+invoked.  Whenever you type @kbd{C-x m}, @code{message-mode-hook} runs
+as soon as the mail buffer is created.  Then the @code{message-setup}
+function inserts the default contents of the buffer.  After these
+default contents are inserted, @code{message-setup-hook} runs.
+
+  If you use @kbd{C-x m} to continue an existing composition,
+@code{message-mode-hook} runs immediately after switching to the mail
+buffer.  If the buffer is unmodified, or if you decide to erase it and
+start again, @code{message-setup-hook} runs after the default contents
+are inserted.
+
+@node Mail Signature
+@section Mail Signature
 
-  If you use @kbd{M-x mail} to continue an existing composition,
-@code{mail-mode-hook} runs immediately after switching to the
-@samp{*mail*} buffer.  If the buffer is unmodified, or if you decide to
-erase it and start again, @code{mail-setup-hook} runs after the default
-contents are inserted.
+@cindex mail signature
+@vindex mail-signature-file
+@vindex mail-signature
+  You can add a standard piece of text---your @dfn{mail
+signature}---to the end of every message.  This signature may contain
+information such as your telephone number or your physical location.
+The variable @code{mail-signature} determines how Emacs handles the
+mail signature.
+
+  The default value of @code{mail-signature} is @code{t}; this means
+to look for your mail signature in the file @file{~/.signature}.  If
+this file exists, its contents are automatically inserted into the end
+of the mail buffer.  You can change the signature file via the
+variable @code{mail-signature-file}.
+
+  If you change @code{mail-signature} to a string, that specifies the
+text of the signature directly.
+
+@kindex C-c C-w @r{(Message mode)}
+@findex message-insert-signature
+  If you change @code{mail-signature} to @code{nil}, Emacs will not
+insert your mail signature automatically.  You can insert your mail
+signature by typing @kbd{C-c C-w} (@code{message-insert-signature}) in
+the mail buffer.  Emacs will look for your signature in the signature
+file.
+
+  By convention, a mail signature should be marked by a line whose
+contents are @samp{-- }.  If your signature lacks this prefix, it is
+added for you.  The remainder of your signature should be no more than
+four lines.
 
 @node Mail Amusements
 @section Mail Amusements
@@ -778,28 +680,32 @@
 @node Mail Methods
 @section Mail-Composition Methods
 @cindex mail-composition methods
+@cindex Mail mode
+@cindex mode, Mail
 
 @cindex MH mail interface
 @cindex Message mode for sending mail
   In this chapter we have described the usual Emacs mode for editing
-and sending mail---Mail mode.  Emacs has alternative facilities for
-editing and sending mail, including
-MH-E and Message mode, not documented in this manual.
-@xref{Top,,MH-E,mh-e, The Emacs Interface to MH}.  @xref{Top,,Message,message,
-Message Manual}.  You can choose any of them as your preferred method.
-The commands @code{C-x m}, @code{C-x 4 m} and @code{C-x 5 m} use
-whichever agent you have specified, as do various other Emacs commands
-and facilities that send mail.
+and sending mail---Message mode.  This is only one of several
+available modes.  Prior to Emacs 23.2, the default mode was Mail mode,
+which is similar to Message mode in many respects but lacks features
+such as MIME support.  Another available mode is MH-E
+(@pxref{Top,,MH-E,mh-e, The Emacs Interface to MH}).
 
 @vindex mail-user-agent
-  To specify your mail-composition method, customize the variable
-@code{mail-user-agent}.  Currently legitimate values include
-@code{sendmail-user-agent} (Mail mode), @code{mh-e-user-agent},
-@code{message-user-agent} and @code{gnus-user-agent}.
+  You can choose any of these @dfn{mail user agents} as your preferred
+method for editing and sending mail.  The commands @code{C-x m},
+@code{C-x 4 m} and @code{C-x 5 m} use whichever agent you have
+specified; so do various other parts of Emacs that send mail, such as
+the bug reporter (@pxref{Bugs}).  To specify a mail user agent,
+customize the variable @code{mail-user-agent}.  Currently, legitimate
+values include @code{message-user-agent} (Message mode)
+@code{sendmail-user-agent} (Mail mode), @code{gnus-user-agent}, and
+@code{mh-e-user-agent}.
 
   If you select a different mail-composition method, the information
-in this chapter about the @samp{*mail*} buffer and Mail mode does not
-apply; the other methods use a different format of text in a different
+in this chapter about the mail buffer and Message mode does not apply;
+the other methods use a different format of text in a different
 buffer, and their commands are different as well.
 
 @vindex read-mail-command
--- a/doc/emacs/text.texi	Wed Mar 31 00:14:29 2010 +0000
+++ b/doc/emacs/text.texi	Wed Mar 31 06:33:56 2010 +0000
@@ -26,11 +26,16 @@
 @xref{Outline Mode}.
 @end iftex
 
+@cindex nXML mode
+@cindex mode, XML
+@cindex mode, nXML
+@findex nxml-mode
   Emacs has other major modes for text which contains ``embedded''
-commands, such as @TeX{} and La@TeX{} (@pxref{TeX Mode}); HTML, SGML,
-and XML (@pxref{HTML Mode}); and Groff and Nroff (@pxref{Nroff Mode}).
-In addition, you can edit formatted text in WYSIWYG style (``what you
-see is what you get''), using Enriched mode (@pxref{Formatted Text}).
+commands, such as @TeX{} and La@TeX{} (@pxref{TeX Mode}); HTML and
+SGML (@pxref{HTML Mode}); XML (@pxref{Top, nXML Mode,,nxml-mode, nXML
+Mode}); and Groff and Nroff (@pxref{Nroff Mode}).  In addition, you
+can edit formatted text in WYSIWYG style (``what you see is what you
+get''), using Enriched mode (@pxref{Formatted Text}).
 
 @cindex ASCII art
   If you need to edit pictures made out of text characters (commonly
@@ -61,7 +66,7 @@
 * Text Mode::	        The major modes for editing text files.
 * Outline Mode::        Editing outlines.
 * TeX Mode::	        Editing input to the formatter TeX.
-* HTML Mode::           Editing HTML, SGML, and XML files.
+* HTML Mode::           Editing HTML and SGML files.
 * Nroff Mode::	        Editing input to the formatter nroff.
 * Formatted Text::      Editing formatted text directly in WYSIWYG fashion.
 * Text Based Tables::   Editing text-based tables in WYSIWYG fashion.
@@ -923,10 +928,10 @@
 @vindex text-mode-hook
   Entering Text mode runs the hook @code{text-mode-hook}.  Other major
 modes related to Text mode also run this hook, followed by hooks of
-their own; this includes Paragraph-Indent Text mode, Nroff mode, @TeX{}
-mode, Outline mode, and Mail mode.  Hook functions on
-@code{text-mode-hook} can look at the value of @code{major-mode} to see
-which of these modes is actually being entered.  @xref{Hooks}.
+their own; this includes Paragraph-Indent Text mode, Nroff mode,
+@TeX{} mode, Outline mode, and Message mode.  Hook functions on
+@code{text-mode-hook} can look at the value of @code{major-mode} to
+see which of these modes is actually being entered.  @xref{Hooks}.
 
 @node Outline Mode
 @section Outline Mode
@@ -1743,29 +1748,17 @@
 Ref@TeX{}.  @inforef{Top,, reftex}.
 
 @node HTML Mode
-@section SGML, XML, and HTML Modes
+@section SGML and HTML Modes
 @cindex SGML mode
 @cindex HTML mode
-@cindex XML mode
 @cindex mode, SGML
 @cindex mode, HTML
-@cindex mode, XML
 @findex sgml-mode
 @findex html-mode
-@findex xml-mode
-
-  The major modes for SGML, XML, and HTML provide indentation support
-and commands for operating on tags.  XML mode is actually identical to
-SGML mode (to be precise, @code{xml-mode} is an alias for
-@code{sgml-mode}), because XML is a strict subset of SGML.  HTML mode
-is a slightly customized variant of SGML mode.
-
-@vindex sgml-xml-mode
-  In XML, every opening tag must have an explicit closing tag.  When
-the variable @code{sgml-xml-mode} is non-@code{nil}, the tag insertion
-commands described below always insert explicit closing tags as well.
-When you visit a file, Emacs determines whether it is XML by examining
-the file contents, and sets @code{sgml-xml-mode} accordingly.
+
+  The major modes for SGML and HTML provide indentation support and
+commands for operating on tags.  HTML mode is a slightly customized
+variant of SGML mode.
 
 @table @kbd
 @item C-c C-n
@@ -1855,13 +1848,22 @@
 @cindex mode, nXML
 @findex nxml-mode
 @cindex XML schema
-  Emacs also provides a more advanced mode for editing XML
-documents, called nXML mode (@code{nxml-mode}).  nXML mode is aware of
-many existing XML schema, and uses them to provide completion of XML
-elements via @kbd{C-@key{RET}} or @kbd{M-@key{TAB}}, as well as
-``on-the-fly'' validation of XML, with errors highlighted via Font
-Lock (@pxref{Font Lock}).  It is described in its own manual.
-@xref{Top, nXML Mode,,nxml-mode, nXML Mode}.
+  The default mode for editing XML documents is called nXML mode
+(@code{xml-mode} or @code{nxml-mode}).  This is a powerful major mode
+that can recognize many existing XML schema and use them to provide
+completion of XML elements via @kbd{C-@key{RET}} or @kbd{M-@key{TAB}},
+as well as ``on-the-fly'' XML validation with error highlighting.  It
+is described in its own manual.  @xref{Top, nXML Mode,,nxml-mode, nXML
+Mode}.
+
+@vindex sgml-xml-mode
+  However, you can also use SGML mode to edit XML, since XML is a
+strict subset of SGML.  In XML, every opening tag must have an
+explicit closing tag.  When the variable @code{sgml-xml-mode} is
+non-@code{nil}, the tag insertion commands described above always
+insert explicit closing tags as well.  When you visit a file in SGML
+mode, Emacs determines whether it is XML by examining the file
+contents, and sets @code{sgml-xml-mode} accordingly.
 
 @node Nroff Mode
 @section Nroff Mode
--- a/doc/lispref/ChangeLog	Wed Mar 31 00:14:29 2010 +0000
+++ b/doc/lispref/ChangeLog	Wed Mar 31 06:33:56 2010 +0000
@@ -1,3 +1,8 @@
+2010-03-26  Chong Yidong  <cyd@stupidchicken.com>
+
+	* loading.texi (Hooks for Loading): Document after-load-functions.
+	Copyedits.
+
 2010-03-24  Arni Magnusson  <arnima@hafro.is>  (tiny change)
 
 	* frames.texi (Cursor Parameters): Fix typo.  (Bug#5760)
--- a/doc/lispref/loading.texi	Wed Mar 31 00:14:29 2010 +0000
+++ b/doc/lispref/loading.texi	Wed Mar 31 06:33:56 2010 +0000
@@ -920,8 +920,17 @@
 @cindex loading hooks
 @cindex hooks for loading
 
-You can ask for code to be executed if and when a particular library is
-loaded, by calling @code{eval-after-load}.
+You can ask for code to be executed each time Emacs loads a library,
+by using the variable @code{after-load-functions}:
+
+@defvar after-load-functions
+This abnormal hook is run after loading a file.  Each function in the
+hook is called with a single argument, the absolute filename of the
+file that was just loaded.
+@end defvar
+
+If you want code to be executed when a @emph{particular} library is
+loaded, use the function @code{eval-after-load}:
 
 @defun eval-after-load library form
 This function arranges to evaluate @var{form} at the end of loading
@@ -930,7 +939,7 @@
 Don't forget to quote @var{form}!
 
 You don't need to give a directory or extension in the file name
-@var{library}---normally you just give a bare file name, like this:
+@var{library}.  Normally, you just give a bare file name, like this:
 
 @example
 (eval-after-load "edebug" '(def-edebug-spec c-point t))
@@ -955,31 +964,30 @@
 execution of the rest of @var{form}.
 @end defun
 
-In general, well-designed Lisp programs should not use this feature.
-The clean and modular ways to interact with a Lisp library are (1)
-examine and set the library's variables (those which are meant for
-outside use), and (2) call the library's functions.  If you wish to
-do (1), you can do it immediately---there is no need to wait for when
-the library is loaded.  To do (2), you must load the library (preferably
-with @code{require}).
+Normally, well-designed Lisp programs should not use
+@code{eval-after-load}.  If you need to examine and set the variables
+defined in another library (those meant for outside use), you can do
+it immediately---there is no need to wait until the library is loaded.
+If you need to call functions defined by that library, you should load
+the library, preferably with @code{require} (@pxref{Named Features}).
 
 But it is OK to use @code{eval-after-load} in your personal
-customizations if you don't feel they must meet the design standards for
-programs meant for wider use.
+customizations if you don't feel that they must meet the design
+standards for programs meant for wider use.
 
 @defvar after-load-alist
-This variable, an alist built by @code{eval-after-load}, holds the
-expressions to evaluate when particular libraries are loaded.  Each
-element looks like this:
+This variable stores an alist built by @code{eval-after-load},
+containing the expressions to evaluate when certain libraries are
+loaded.  Each element looks like this:
 
 @example
 (@var{regexp-or-feature} @var{forms}@dots{})
 @end example
 
 The key @var{regexp-or-feature} is either a regular expression or a
-symbol, and the value is a list of forms.  The forms are evaluated when
-the key matches the absolute true name of the file being
-@code{load}ed or the symbol being @code{provide}d.
+symbol, and the value is a list of forms.  The forms are evaluated
+when the key matches the absolute true name or feature name of the
+library being loaded.
 @end defvar
 
 @ignore
--- a/doc/misc/calc.texi	Wed Mar 31 00:14:29 2010 +0000
+++ b/doc/misc/calc.texi	Wed Mar 31 06:33:56 2010 +0000
@@ -12167,7 +12167,7 @@
 their default values, then settings from the file you named are loaded
 if this file exists, and this file becomes the one that Calc will
 use in the future for commands like @kbd{m m}.  The default settings
-file name is @file{~/.calc.el}.  You can see the current file name by
+file name is @file{~/.emacs.d/calc.el}.  You can see the current file name by
 giving a blank response to the @kbd{m F} prompt.  See also the
 discussion of the @code{calc-settings-file} variable; @pxref{Customizing Calc}.
 
@@ -16006,7 +16006,7 @@
 Selections show deep structure (@kbd{j b}; @pxref{Making Selections}).
 
 @item Save
-Record modes in @file{~/.calc.el} (@kbd{m R}; @pxref{General Mode Commands}).
+Record modes in @file{~/.emacs.d/calc.el} (@kbd{m R}; @pxref{General Mode Commands}).
 
 @item Local
 Record modes in Embedded buffer (@kbd{m R}).
@@ -28108,7 +28108,7 @@
 @cindex Calc init file, user-defined units
 The @kbd{u p} (@code{calc-permanent-units}) command stores the user-defined
 units in your Calc init file (the file given by the variable
-@code{calc-settings-file}, typically @file{~/.calc.el}), so that the
+@code{calc-settings-file}, typically @file{~/.emacs.d/calc.el}), so that the
 units will still be available in subsequent Emacs sessions.  If there
 was already a set of user-defined units in your Calc init file, it
 is replaced by the new set.  (@xref{General Mode Commands}, for a way to
@@ -28509,7 +28509,7 @@
 @cindex Calc init file, variables
 The @kbd{s p} (@code{calc-permanent-variable}) command saves a
 variable's value permanently in your Calc init file (the file given by
-the variable @code{calc-settings-file}, typically @file{~/.calc.el}), so
+the variable @code{calc-settings-file}, typically @file{~/.emacs.d/calc.el}), so
 that its value will still be available in future Emacs sessions.  You
 can re-execute @w{@kbd{s p}} later on to update the saved value, but the
 only way to remove a saved variable is to edit your calc init file
@@ -30862,7 +30862,7 @@
 which are also available outside of Embedded mode.  
 (@pxref{General Mode Commands}.) They are @code{Save},  in which mode
 settings are recorded permanently in your Calc init file (the file given
-by the variable @code{calc-settings-file}, typically @file{~/.calc.el})
+by the variable @code{calc-settings-file}, typically @file{~/.emacs.d/calc.el})
 rather than by annotating the current document, and no-recording
 mode (where there is no symbol like @code{Save} or @code{Local} in
 the mode line), in which mode-changing commands do not leave any
@@ -31122,7 +31122,7 @@
 binding permanent so that it will remain in effect even in future Emacs
 sessions.  (It does this by adding a suitable bit of Lisp code into
 your Calc init file; that is, the file given by the variable
-@code{calc-settings-file}, typically @file{~/.calc.el}.)  For example,
+@code{calc-settings-file}, typically @file{~/.emacs.d/calc.el}.)  For example,
 @kbd{Z P s} would register our @code{sincos} command permanently.  If
 you later wish to unregister this command you must edit your Calc init
 file by hand.  (@xref{General Mode Commands}, for a way to tell Calc to
@@ -31855,7 +31855,7 @@
 
 A good place to put your @code{defmath} commands is your Calc init file
 (the file given by @code{calc-settings-file}, typically
-@file{~/.calc.el}), which will not be loaded until Calc starts.
+@file{~/.emacs.d/calc.el}), which will not be loaded until Calc starts.
 If a file named @file{.emacs} exists in your home directory, Emacs reads
 and executes the Lisp forms in this file as it starts up.  While it may
 seem reasonable to put your favorite @code{defmath} commands there,
@@ -34956,7 +34956,9 @@
 @code{nil}, then Calc will automatically load your settings file (if it
 exists) the first time Calc is invoked.
 
-The default value for this variable is @code{"~/.calc.el"}.
+The default value for this variable is @code{"~/.emacs.d/calc.el"}
+unless the file @file{~/.calc.el} exists, in which case the default
+value will be @code{"~/.calc.el"}.
 @end defvar
 
 @defvar calc-gnuplot-name
--- a/etc/ChangeLog	Wed Mar 31 00:14:29 2010 +0000
+++ b/etc/ChangeLog	Wed Mar 31 06:33:56 2010 +0000
@@ -1,3 +1,13 @@
+2010-03-30  Chong Yidong  <cyd@stupidchicken.com>
+
+	* images/icons/hicolor/scalable/apps/emacs.svg: Put preamble after
+	svg tag (Bug#5790).
+
+2010-03-30  Eli Zaretskii  <eliz@gnu.org>
+
+	* PROBLEMS: Mention problems on MS-Windows with incompatible
+	regex.h headers.
+
 2010-03-28  Eli Zaretskii  <eliz@gnu.org>
 
 	* HELLO: Reorder Arabic and Hebrew into logical order, and
--- a/etc/NEWS	Wed Mar 31 00:14:29 2010 +0000
+++ b/etc/NEWS	Wed Mar 31 06:33:56 2010 +0000
@@ -36,6 +36,8 @@
 
 * Changes in Emacs 24.1
 
+** auto-mode-case-fold is now enabled by default.
+
 +++
 ** Emacs now supports display and editing of bidirectional text.
 Warning: This is still very much experimental!  The existing support
--- a/etc/NEWS.23	Wed Mar 31 00:14:29 2010 +0000
+++ b/etc/NEWS.23	Wed Mar 31 06:33:56 2010 +0000
@@ -148,7 +148,7 @@
 +++
 *** The new completion-style `initials' is available.
 For instance, this can complete M-x lch to list-command-history.
-
+---
 *** The new variable `completions-format' determines how completions
 are displayed in the *Completions* buffer.  If you set it to
 `vertical', completions are sorted vertically in columns.
@@ -227,7 +227,7 @@
 Dired buffers to be reverted automatically on revisiting them.
 
 ** DocView
-
++++
 *** When `doc-view-continuous' is non-nil, scrolling a line
 on the page edge advances to the next/previous page.
 
@@ -250,6 +250,7 @@
 manual that generates an Info file which gives the same information
 through a menu structure.
 
++++
 ** Message mode is now the default mode for composing mail.
 
 The default for `mail-user-agent' is now message-user-agent, so the
@@ -259,6 +260,7 @@
 for several years.  It provides several features that are absent in
 Mail mode, such as MIME handling.
 
+---
 *** If the user has not customized mail-user-agent, `compose-mail'
 checks for Mail mode customizations, and issues a warning if these
 customizations are found.  This alerts users who may otherwise be
@@ -271,49 +273,59 @@
 Emacs will wait for the process sending mail to return.  If you
 experience delays when sending mail, you may wish to set this to nil.
 
++++
 ** nXML mode is now the default for editing XML files.
 
-** Shell
+** Shell (and other comint modes)
++++
+*** M-s is no longer bound to `comint-next-matching-input'.
 +++
-*** ansi-color is now enabled by default.
+*** M-r is now bound to `comint-history-isearch-backward-regexp'.
+This starts an incremental search of the comint/shell input history.
++++
+*** ansi-color is now enabled by default in Shell mode.
 To disable it, set ansi-color-for-comint-mode to nil.
 
+** Tramp
 +++
-** Tramp
-
 *** New connection methods "rsyncc", "imap" and "imaps".
 On systems which support GVFS-Fuse, Tramp offers also the new
 connection methods "dav", "davs", "obex" and "synce".
 
 ** VC and related modes
-
++++
 *** When using C-x v v or C-x v i on a unregistered file that is in a
 directory not controlled by any VCS, ask the user what VC backend to
 use to create a repository, create a new repository and register the
 file.
-
-*** FIXME: add info about the new VC functions: vc-root-diff and
-vc-root-print-log once they stabilize.
-
-*** The log functions (C-x v l and C-x v L) do not show the full log
-by default anymore.  The number of entries shown can be chosen
-interactively with a prefix argument, by customizing
-vc-log-show-limit.  The log buffer display buttons that can be used
-to change the number of entries shown.
-RCS, SCCS, CVS do not support this feature.
-
++++
+*** New command `vc-root-print-log', bound to `C-x v L'.
+This displays a `*vc-change-log*' buffer showing the history of the
+version-controlled directory tree as a whole.
++++
+*** New command `vc-root-diff', bound to `C-x v D'.
+This is similar to `vc-diff', but compares the entire directory tree
+of the current VC directory with its working revision.
++++
+*** `C-x v l' and `C-x v L' do not show the full log by default.
+The number of entries shown can be chosen interactively with a prefix
+argument, or by customizing vc-log-show-limit.  The `*vc-change-log*'
+buffer now contains buttons at the end of the buffer, which can be
+used to increase the number of entries shown.  RCS, SCCS, and CVS do
+not support this feature.
+---
 *** vc-annotate supports annotations through file copies and renames,
 it displays the old names for the files and it can show logs/diffs for
 the corresponding lines.  Currently only Git and Mercurial take
 advantage of this feature.
-
+---
 *** The log command in vc-annotate can display a single log entry
 instead of redisplaying the full log.  The RCS, CVS and SCCS VC
 backends do not support this.
-
+---
 *** When a file is not found, VC will not try to check it out of RCS anymore.
 
-*** Diff and log operations can be used from dired buffers.
+*** Diff and log operations can be used from Dired buffers.
 
 *** vc-git changes
 
@@ -330,7 +342,7 @@
 
 *** vc-bzr supports operating with shelves: the shelve list is
 displayed in the *vc-dir* header, shelves can be created, removed and applied.
-
+---
 *** log-edit-strip-single-file-name controls whether or not single filenames
 are stripped when copying text from the ChangeLog to the *VC-Log* buffer.
 
@@ -355,11 +367,6 @@
 the command asynchronously without the need to manually add ampersand to
 the end of the command.  Its output appears in the buffer `*Async Shell
 Command*'.
-
-*** Isearch searches in the comint/shell input history when the new variable
-`comint-history-isearch' is non-nil.  New commands `comint-history-isearch-backward'
-and `comint-history-isearch-backward-regexp' (bound to M-r) start Isearch
-in the input history regardless of the value of `comint-history-isearch'.
 +++
 *** Interactively `multi-isearch-buffers' and `multi-isearch-buffers-regexp'
 read buffer names to search, one by one, ended with RET.  With a prefix
@@ -414,6 +421,7 @@
 
 ** htmlfontify.el turns a fontified Emacs buffer into an HTML page.
 
++++
 ** js.el is a new major mode for JavaScript files.
 
 ** imap-hash.el is a new library to address IMAP mailboxes as hashtables.
@@ -523,9 +531,9 @@
 *** make-network-process can now also create `seqpacket' Unix sockets.
 
 ** Loading changes
-
+---
 *** eval-next-after-load is obsolete.
-
++++
 *** New hook `after-load-functions' run after loading an Elisp file.
 
 ** Byte compilation changes
--- a/etc/PROBLEMS	Wed Mar 31 00:14:29 2010 +0000
+++ b/etc/PROBLEMS	Wed Mar 31 06:33:56 2010 +0000
@@ -2478,6 +2478,26 @@
 4.1.1, and 4.1.2, are currently the _only_ versions known to succeed
 in building Emacs (as of v22.1).
 
+*** Building the native MS-Windows port fails due to unresolved externals
+
+The linker error messages look like this:
+
+ oo-spd/i386/ctags.o:ctags.c:(.text+0x156e): undefined reference to `_imp__re_set_syntax'
+ collect2: ld returned 1 exit status
+
+This happens because GCC finds an incompatible header regex.h
+somewhere on the include path, before the version of regex.h supplied
+with Emacs.  One such incompatible version of regex.h is part of the
+GnuWin32 Regex package.
+
+The solution is to remove the incompatible regex.h from the include
+path, when compiling Emacs.  Alternatively, re-run the configure.bat
+script with the "-isystem C:/GnuWin32/include" switch (adapt for your
+system's place where you keep the GnuWin32 include files) -- this will
+cause the compiler to search headers in the directories specified by
+the Emacs Makefile _before_ it looks in the GnuWin32 include
+directories.
+
 *** Building the native MS-Windows port with Cygwin GCC can fail.
 
 Emacs may not build using some Cygwin builds of GCC, such as Cygwin
--- a/etc/images/icons/hicolor/scalable/apps/emacs.svg	Wed Mar 31 00:14:29 2010 +0000
+++ b/etc/images/icons/hicolor/scalable/apps/emacs.svg	Wed Mar 31 06:33:56 2010 +0000
@@ -1,8 +1,16 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   version="1.0"
+   width="48"
+   height="48"
+   viewBox="0.171 0.201 512 512"
+   id="svg4768"
+   xml:space="preserve">
 <!-- Gnu Emacs Icon
-
-   Copyright (C) 2008, 2009, 2010
-   Free Software Foundation, Inc.
+   Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
 
    This file is part of GNU Emacs.
 
@@ -21,16 +29,6 @@
 
 -->
 <!-- Created with Inkscape (http://www.inkscape.org/) -->
-<svg
-   xmlns:svg="http://www.w3.org/2000/svg"
-   xmlns="http://www.w3.org/2000/svg"
-   xmlns:xlink="http://www.w3.org/1999/xlink"
-   version="1.0"
-   width="48"
-   height="48"
-   viewBox="0.171 0.201 512 512"
-   id="svg4768"
-   xml:space="preserve">
 <defs
    id="defs4770"><linearGradient
    id="linearGradient3294"><stop
--- a/lisp/ChangeLog	Wed Mar 31 00:14:29 2010 +0000
+++ b/lisp/ChangeLog	Wed Mar 31 06:33:56 2010 +0000
@@ -1,3 +1,71 @@
+2010-03-31  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* simple.el (append-to-buffer): Simplify.
+
+2010-03-31  Tomas Abrahamsson  <tab@lysator.liu.se>
+
+	* textmodes/artist.el (artist-mode): Fix typo in docstring.
+	Reported by Alex Schröder <kensanata@gmail.com>.  (Bug#5807)
+
+2010-03-31  Kenichi Handa  <handa@m17n.org>
+
+	* language/sinhala.el (composition-function-table): Fix regexp for
+	the new Unicode specification.
+
+	* language/indian.el (devanagari-composable-pattern)
+	(tamil-composable-pattern, kannada-composable-pattern)
+	(malayalam-composable-pattern): Adjust for the new Unicode
+	specification.
+	(bengali-composable-pattern, gurmukhi-composable-pattern)
+	(gujarati-composable-pattern, oriya-composable-pattern)
+	(telugu-composable-pattern): New variables to cope with the new
+	Unicode specification.  Use them in composition-function-table.
+
+2010-03-31  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	Make tmm-menubar work for the Buffers menu again.
+	* tmm.el (tmm-prompt): Also handle keymap entries in the form of
+	vectors rather than cons cells, as used in menu-bar-update-buffers.
+
+2010-03-31  Chong Yidong  <cyd@stupidchicken.com>
+
+	* progmodes/js.el (js-auto-indent-flag, js-mode-map)
+	(js-insert-and-indent): Revert 2009-08-15 change, restoring
+	electric punctuation for "{}();,:" (Bug#5586).
+
+	* mail/sendmail.el (mail-default-directory): Doc fix.
+
+2010-03-31  Chong Yidong  <cyd@stupidchicken.com>
+
+	* mail/sendmail.el (mail-default-directory): Doc fix.
+
+2010-03-31  Eli Zaretskii  <eliz@gnu.org>
+
+	* subr.el (version-regexp-alist, version-to-list)
+	(version-list-<, version-list-=, version-list-<=)
+	(version-list-not-zero, version<, version<=, version=): Doc fix.
+	(Bug#5744).
+
+2010-02-31  Dan Nicolaescu  <dann@ics.uci.edu>
+
+	* vc.el (vc-root-diff): Doc fix.
+
+2010-03-31  Chong Yidong  <cyd@stupidchicken.com>
+
+	* vc.el (vc-print-log, vc-print-root-log): Doc fix.
+
+	* simple.el (append-to-buffer): Fix last change.
+
+2010-03-31  Chong Yidong  <cyd@stupidchicken.com>
+
+	* simple.el (append-to-buffer): Ensure that point is preserved if
+	BUFFER is the current buffer.  Suggested by YAMAMOTO Mitsuharu.
+	(Bug#5749)
+
+2010-03-31  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* files.el (auto-mode-case-fold): Change default to t.
+
 2010-03-30  Juri Linkov  <juri@jurta.org>
 
 	* dired-x.el (dired-omit-mode): Doc fix.
@@ -39,8 +107,8 @@
 	    Chong Yidong  <cyd@stupidchicken.com>
 
 	* subr.el: Extend progress reporters to perform "spinning".
-	(progress-reporter-update, progress-reporter-do-update): Handle
-	non-numeric value arguments.
+	(progress-reporter-update, progress-reporter-do-update):
+	Handle non-numeric value arguments.
 	(progress-reporter--pulse-characters): New var.
 
 2010-03-28  Chong Yidong  <cyd@stupidchicken.com>
@@ -55,9 +123,9 @@
 2010-03-27  Nick Roberts  <nickrob@snap.net.nz>
 
 	Restore GDB/MI fuctionality removed by r99212.
-        * lisp/progmodes/gdb-mi.el: Restored.
-	* lisp/progmodes/gdb-ui.el: Removed.
-	* lisp/progmodes/gud.el: Re-accommodated for gdb-mi.el.
+	* lisp/progmodes/gdb-mi.el: Restore.
+	* lisp/progmodes/gdb-ui.el: Remove.
+	* lisp/progmodes/gud.el: Re-accommodate for gdb-mi.el.
 
 2010-03-25  Glenn Morris  <rgm@gnu.org>
 
@@ -372,11 +440,13 @@
 
 	* vc-bzr.el (vc-bzr-checkin): Pass extra arguments to the commit
 	command.
-	(log-edit-extra-flags, log-edit-before-checkin-process): New declarations.
+	(log-edit-extra-flags, log-edit-before-checkin-process):
+	New declarations.
 
 	* vc-hg.el (vc-hg-checkin): Pass extra arguments to the commit
 	command.
-	(log-edit-extra-flags, log-edit-before-checkin-process): New declarations.
+	(log-edit-extra-flags, log-edit-before-checkin-process):
+	New declarations.
 	(vc-hg-log-edit-mode): New derived mode.
 
 	* vc-arch.el (vc-arch-checkin):
@@ -475,8 +545,8 @@
 	(widget-field-value-set): New fun.
 	(editable-field): Use it.
 	(widget-field-value-get): Clean up unused var.
-	(widget-color-value-create, widget-color--choose-action): New
-	funs.  Allow using list-colors-display to choose color.
+	(widget-color-value-create, widget-color--choose-action):
+	New funs.  Allow using list-colors-display to choose color.
 
 2010-03-12  Chong Yidong  <cyd@stupidchicken.com>
 
@@ -487,8 +557,7 @@
 	(custom-buffer-create-internal): Add custom-apropos search field.
 	(custom-add-parent-links): Don't display parent doc.
 	(custom-group-value-create): Don't sort top-level custom group.
-	(custom-magic-value-create): Show visibility button before option
-	name.
+	(custom-magic-value-create): Show visibility button before option name.
 
 	(custom-variable-state): New fun, from custom-variable-state-set.
 	(custom-variable-state-set): Use it.
@@ -626,8 +695,8 @@
 
 2010-03-07  Štěpán Němec  <stepnem@gmail.com>  (tiny change)
 
-	* vc-git.el (vc-git-annotate-extract-revision-at-line): Use
-	vc-git-root as default directory for revision path (Bug#5657).
+	* vc-git.el (vc-git-annotate-extract-revision-at-line):
+	Use vc-git-root as default directory for revision path (Bug#5657).
 
 2010-03-06  Chong Yidong  <cyd@stupidchicken.com>
 
@@ -716,8 +785,8 @@
 2010-02-28  Michael Albinus  <michael.albinus@gmx.de>
 
 	* net/dbus.el (dbus-introspect, dbus-get-property)
-	(dbus-set-property, dbus-get-all-properties): Use
-	`dbus-call-method' when noninteractive.  (Bug#5645)
+	(dbus-set-property, dbus-get-all-properties):
+	Use `dbus-call-method' when noninteractive.  (Bug#5645)
 
 2010-02-28  Chong Yidong  <cyd@stupidchicken.com>
 
@@ -2102,9 +2171,9 @@
 
 2009-12-18  Ulf Jasper  <ulf.jasper@web.de>
 
-	* calendar/icalendar.el (icalendar--convert-tz-offset): Fixed
-	timezone names.
-	(icalendar--convert-tz-offset): Fixed the "last-day-problem".
+	* calendar/icalendar.el (icalendar--convert-tz-offset):
+	Fix timezone names.
+	(icalendar--convert-tz-offset): Fix the "last-day-problem".
 	(icalendar--add-diary-entry): Remove the trailing blank that
 	diary-make-entry inserts.
 
@@ -2121,7 +2190,7 @@
 	(tramp-advice-file-expand-wildcards): Remove it.
 
 	* net/tramp-compat.el (top): Autoload `tramp-handle-file-remote-p'.
-	(tramp-advice-file-expand-wildcards): Moved from tramp.el.
+	(tramp-advice-file-expand-wildcards): Move from tramp.el.
 	Activate advice for older GNU Emacs versions.  (Bug#5237)
 
 2009-12-17  Juanma Barranquero  <lekktu@gmail.com>
@@ -2138,12 +2207,12 @@
 
 	* files.el (hack-local-variables-filter): While ignoring duplicates,
 	don't take `mode' into account.
-	(hack-local-variables-filter, hack-dir-local-variables): Don't
-	remove duplicate `mode' from local-variables-alist (like `eval').
+	(hack-local-variables-filter, hack-dir-local-variables):
+	Don't remove duplicate `mode' from local-variables-alist (like `eval').
 
 2009-12-17  Juri Linkov  <juri@jurta.org>
 
-	Make `dired-diff' more safe.  (Bug#5225)
+	Make `dired-diff' safer.  (Bug#5225)
 
 	* dired-aux.el (dired-diff): Signal an error when `file' equals to
 	`current' or when `file' is a directory of the `current' file.
@@ -2340,7 +2409,7 @@
 
 2009-12-09  Vivek Dasmohapatra  <vivek@etla.org>
 
-	Drop some properties to avoid surprises.
+	Drop some properties to avoid surprises (bug#5002).
 	* htmlfontify.el (hfy-ignored-properties): New defcustom.
 	(hfy-fontify-buffer): Use it.
 
--- a/lisp/files.el	Wed Mar 31 00:14:29 2010 +0000
+++ b/lisp/files.el	Wed Mar 31 06:33:56 2010 +0000
@@ -2159,7 +2159,7 @@
   (if (fboundp 'ucs-set-table-for-input) ; don't lose when building
       (ucs-set-table-for-input)))
 
-(defcustom auto-mode-case-fold nil
+(defcustom auto-mode-case-fold t
   "Non-nil means to try second pass through `auto-mode-alist'.
 This means that if the first case-sensitive search through the alist fails
 to find a matching major mode, a second case-insensitive search is made.
--- a/lisp/gnus/ChangeLog	Wed Mar 31 00:14:29 2010 +0000
+++ b/lisp/gnus/ChangeLog	Wed Mar 31 06:33:56 2010 +0000
@@ -1,6 +1,12 @@
+2010-03-30  Chong Yidong  <cyd@stupidchicken.com>
+
+	* message.el (message-default-mail-headers):
+	(message-default-headers): Carry the value mail-default-headers over
+	into message-default-mail-headers, rather than message-default-headers.
+
 2010-03-30  Martin Stjernholm  <mast@lysator.liu.se>
 
-	* mm-decode.el (mm-add-meta-html-tag): Added option to override the
+	* mm-decode.el (mm-add-meta-html-tag): Add option to override the
 	charset.
 
 	* gnus-art.el (gnus-article-browse-html-parts): Force the correct
@@ -8,8 +14,8 @@
 
 2010-03-30  Katsumi Yamaoka  <yamaoka@jpl.org>
 
-	* gnus-art.el (gnus-article-browse-delete-temp-files): Delete
-	directories as well.
+	* gnus-art.el (gnus-article-browse-delete-temp-files):
+	Delete directories as well.
 	(gnus-article-browse-html-parts): Work for images that do not specify
 	file names; delete temp directory when quitting; insert header at the
 	right place; use file: scheme for image files.
@@ -30,8 +36,8 @@
 
 2010-03-27  Teodor Zlatanov  <tzz@lifelogs.com>
 
-	* auth-source.el (auth-sources): Change default to be simpler.  Explain
-	about Secret Service API sources.  Improve Customize options.
+	* auth-source.el (auth-sources): Change default to be simpler.
+	Explain about Secret Service API sources.  Improve Customize options.
 	(auth-source-pick): Change to accept any number of search parameters.
 	Implement fallbacks iteratively, not recursively.  Add scoring on the
 	second pass and sort by score.  Call Secret Service API when needed.
--- a/lisp/gnus/message.el	Wed Mar 31 00:14:29 2010 +0000
+++ b/lisp/gnus/message.el	Wed Mar 31 06:33:56 2010 +0000
@@ -1167,11 +1167,7 @@
   :valid-regexp "^\\'"
   :error "All header lines must be newline terminated")
 
-(defcustom message-default-headers
-  ;; Default to the value of `mail-default-headers' if available.
-  ;; Note: as for Emacs 21, XEmacs 21.4 and 21.5, it is unavailable
-  ;; unless sendmail.el is loaded.
-  (if (boundp 'mail-default-headers) mail-default-headers "")
+(defcustom message-default-headers ""
   "*A string containing header lines to be inserted in outgoing messages.
 It is inserted before you edit the message, so you can edit or delete
 these lines."
@@ -1184,16 +1180,18 @@
   ;; Ease the transition from mail-mode to message-mode.  See bugs#4431, 5555.
   (concat (if (and (boundp 'mail-default-reply-to)
 		   (stringp mail-default-reply-to))
-	      (format "Reply-to: %s\n" mail-default-reply-to)
-	    "")
+	      (format "Reply-to: %s\n" mail-default-reply-to))
 	  (if (and (boundp 'mail-self-blind)
 		   mail-self-blind)
-	      (format "BCC: %s\n" user-mail-address)
-	    "")
+	      (format "BCC: %s\n" user-mail-address))
 	  (if (and (boundp 'mail-archive-file-name)
 		   (stringp mail-archive-file-name))
-	      (format "FCC: %s\n" mail-archive-file-name)
-	    ""))
+	      (format "FCC: %s\n" mail-archive-file-name))
+	  ;; Use the value of `mail-default-headers' if available.
+	  ;; Note: as for Emacs 21, XEmacs 21.4 and 21.5, it is
+	  ;; unavailable unless sendmail.el is loaded.
+	  (if (boundp 'mail-default-headers)
+	      mail-default-headers))
   "*A string of header lines to be inserted in outgoing mails."
   :version "23.2"
   :group 'message-headers
--- a/lisp/language/indian.el	Wed Mar 31 00:14:29 2010 +0000
+++ b/lisp/language/indian.el	Wed Mar 31 06:33:56 2010 +0000
@@ -140,28 +140,25 @@
 
 (defconst devanagari-composable-pattern
   (let ((table
-	 '(("V" . "[\u0904-\u0914\u0960-\u0961\u0972]") ; independent vowel
-	   ("C" . "[\u0915-\u0939\u0958-\u095F\u097B-\u097C\u097E-\u097F]") ; consonant
-	   ("R" . "\u0930")			 ; RA
-	   ("n" . "\u093C")			 ; NUKTA
-	   ("H" . "\u094D")			 ; HALANT
-	   ("m" . "\u093F")			 ; vowel sign (pre)
-	   ("u" . "[\u0945-\u0948\u0955]")	 ; vowel sign (above)
-	   ("b" . "[\u0941-\u0944\u0962-\u0963]") ; vowel sign (below)
-	   ("p" . "[\u093E\u0940\u0949-\u094C]") ; vowel sign (post)
-	   ("A" . "[\u0900-\u0902\u0953-\u0954]") ; vowel modifier (above)
-	   ("a" . "\u0903")			 ; vowel modifier (post) 
-	   ("S" . "\u0951")			 ; stress sign (above)
-	   ("s" . "\u0952")			 ; stress sign (below)
-	   ("N" . "\u200C")			 ; ZWNJ
-	   ("J" . "\u200D")			 ; ZWJ
-	   ("X" . "[\u0900-\u097F]"))))		 ; all coverage
+	 '(("a" . "[\u0900-\u0902]")	; vowel modifier (above)
+	   ("A" . "\u0903")		; vowel modifier (post) 
+	   ("V" . "[\u0904-\u0914\u0960-\u0961\u0972]") ; independent vowel
+	   ("C" . "[\u0915-\u0939\u0958-\u095F\u0979-\u097F]") ; consonant
+	   ("R" . "\u0930")		; RA
+	   ("n" . "\u093C")		; NUKTA
+	   ("v" . "[\u093E-\u094C\u094E\u0955\u0962-\u0963]") ; vowel sign
+	   ("H" . "\u094D")		; HALANT
+	   ("s" . "[\u0951-\u0952]")	; stress sign
+	   ("t" . "[\u0953-\u0954]")	; accent
+	   ("N" . "\u200C")		; ZWNJ
+	   ("J" . "\u200D")		; ZWJ
+	   ("X" . "[\u0900-\u097F]"))))	; all coverage
     (indian-compose-regexp
      (concat
       ;; syllables with an independent vowel, or
-      "\\(?:RH\\)?Vn?m?b?u?p?n?A?s?S?a?\\|"
+      "\\(?:RH\\)?Vn?\\(?:J?HR\\)?v*n?a?s?t?A?\\|"
       ;; consonant-based syllables, or
-      "\\(?:Cn?J?HJ?\\)*Cn?\\(?:H[NJ]?\\|m?b?u?p?n?A?s?S?a?\\)\\|"
+      "Cn?\\(?:J?HJ?Cn?\\)*\\(?:H[NJ]?\\|v*n?a?s?t?A?\\)\\|"
       ;; special consonant form, or
       "JHR\\|"
       ;; any other singleton characters
@@ -169,43 +166,202 @@
      table))
   "Regexp matching a composable sequence of Devanagari characters.")
 
+(defconst bengali-composable-pattern
+  (let ((table
+	 '(("a" . "\u0981")		; SIGN CANDRABINDU
+	   ("A" . "[\u0982-\u0983]")	; SIGN ANUSVARA .. VISARGA
+	   ("V" . "[\u0985-\u0994\u09E0-\u09E1]") ; independent vowel
+	   ("C" . "[\u0995-\u09B9\u09DC-\u09DF\u09F1]") ; consonant
+	   ("B" . "[\u09AC\u09AF-\u09B0\u09F0]")		; BA, YA, RA
+	   ("R" . "[\u09B0\u09F0]")		; RA
+	   ("n" . "\u09BC")		; NUKTA
+	   ("v" . "[\u09BE-\u09CC\u09D7\u09E2-\u09E3]") ; vowel sign
+	   ("H" . "\u09CD")		; HALANT
+	   ("T" . "\u09CE")		; KHANDA TA
+	   ("N" . "\u200C")		; ZWNJ
+	   ("J" . "\u200D")		; ZWJ
+	   ("X" . "[\u0980-\u09FF]"))))	; all coverage
+    (indian-compose-regexp
+     (concat
+      ;; syllables with an independent vowel, or
+      "\\(?:RH\\)?Vn?\\(?:J?HB\\)?v*n?a?A?\\|"
+      ;; consonant-based syllables, or
+      "Cn?\\(?:J?HJ?Cn?\\)*\\(?:H[NJ]?\\|v*[NJ]?v?a?A?\\)\\|"
+      ;; another syllables with an independent vowel, or
+      "\\(?:RH\\)?T\\|"
+      ;; special consonant form, or
+      "JHB\\|"
+      ;; any other singleton characters
+      "X")
+     table))
+  "Regexp matching a composable sequence of Bengali characters.")
+
+(defconst gurmukhi-composable-pattern
+  (let ((table
+	 '(("a" . "[\u0A01-\u0A02]")	; SIGN ADAK BINDI .. BINDI
+	   ("A" . "\u0A03]")		; SIGN VISARGA
+	   ("V" . "[\u0A05-\u0A14]")	; independent vowel
+	   ("C" . "[\u0A15-\u0A39\u0A59-\u0A5E]")	; consonant
+	   ("Y" . "[\u0A2F\u0A30\u0A35\u0A39]") ; YA, RA, VA, HA
+	   ("n" . "\u0A3C")		; NUKTA
+	   ("v" . "[\u0A3E-\u0A4C]")	; vowel sign
+	   ("H" . "\u0A4D")		; VIRAMA
+	   ("a" . "\u0A70")		; TIPPI
+	   ("N" . "\u200C")		; ZWNJ
+	   ("J" . "\u200D")		; ZWJ
+	   ("X" . "[\u0A00-\u0A7F]"))))	; all coverage
+    (indian-compose-regexp
+     (concat
+      ;; consonant-based syllables, or
+      "Cn?\\(?:J?HJ?Cn?\\)*\\(?:H[NJ]?\\|v*n?a?A?\\)\\|"
+      ;; syllables with an independent vowel, or
+      "Vn?\\(?:J?HY\\)?v*n?a?A?\\|"
+      ;; special consonant form, or
+      "JHY\\|"
+      ;; any other singleton characters
+      "X")
+     table))
+  "Regexp matching a composable sequence of Gurmukhi characters.")
+
+(defconst gujarati-composable-pattern
+  (let ((table
+	 '(("a" . "[\u0A81-\u0A82]")	; SIGN CANDRABINDU .. ANUSVARA
+	   ("A" . "\u0A83]")		; SIGN VISARGA
+	   ("V" . "[\u0A85-\u0A94\u0AE0-\u0AE1]") ; independent vowel
+	   ("C" . "[\u0A95-\u0AB9]")	; consonant
+	   ("R" . "\u0AB0")		; RA
+	   ("n" . "\u0ABC")		; NUKTA
+	   ("v" . "[\u0ABE-\u0ACC\u0AE2-\u0AE3]") ; vowel sign
+	   ("H" . "\u0ACD")		; VIRAMA
+	   ("N" . "\u200C")		; ZWNJ
+	   ("J" . "\u200D")		; ZWJ
+	   ("X" . "[\u0A80-\u0AFF]"))))	; all coverage
+    (indian-compose-regexp
+     (concat
+      ;; syllables with an independent vowel, or
+      "\\(?:RH\\)?Vn?\\(?:J?HR\\)?v*n?a?A?\\|"
+      ;; consonant-based syllables, or
+      "Cn?\\(?:J?HJ?Cn?\\)*\\(?:H[NJ]?|v*n?a?A?\\)\\|"
+      ;; special consonant form, or
+      "JHR\\|"
+      ;; any other singleton characters
+      "X")
+     table))
+  "Regexp matching a composable sequence of Gujarati characters.")
+
+(defconst oriya-composable-pattern
+  (let ((table
+	 '(("a" . "\u0B01")		; SIGN CANDRABINDU
+	   ("A" . "[\u0B02-\u0B03]")	; SIGN ANUSVARA .. VISARGA
+	   ("V" . "[\u0B05-\u0B14\u0B60-\u0B61]") ; independent vowel
+	   ("C" . "[\u0B15-\u0B39\u0B5C-\u0B5D\u0B71]")	; consonant
+	   ("B" . "[\u0B15-\u0B17\u0B1B-\u0B1D\u0B1F-\u0B21\u0B23-\u0B24\u0B27-\u0B30\u0B32-\u0B35\u0B38-\u0B39]") ; consonant with below form
+	   ("n" . "\u0B3C")		; NUKTA
+	   ("v" . "[\u0B3E-\u0B44\u0B56-\u0B57\u0B62-\u0B63]") ; vowel sign
+	   ("H" . "\u0B4D")		; VIRAMA
+	   ("N" . "\u200C")		; ZWNJ
+	   ("J" . "\u200D")		; ZWJ
+	   ("X" . "[\u0B00-\u0B7F]"))))	; all coverage
+    (indian-compose-regexp
+     (concat
+      ;; syllables with an independent vowel, or
+      "\\(?:RH\\)?Vn?\\(?:J?HB\\)?v*n?a?A?\\|"
+      ;; consonant-based syllables, or
+      "Cn?\\(?:J?HJ?Cn?\\)*\\(?:H[NJ]?|v*n?a?A?\\)\\|"
+      ;; special consonant form, or
+      "JHB\\|"
+      ;; any other singleton characters
+      "X")
+     table))
+  "Regexp matching a composable sequence of Oriya characters.")
+
 (defconst tamil-composable-pattern
-  (concat
-   "\\([à®…-à®”]\\)\\|"
-   "[ஂஃ]\\|" ;; vowel modifier considered independent
-   "\\(\\(?:\\(?:கà¯à®·\\)\\|[க-ஹ]\\)[à¯à®¾-ௌ]?\\)\\|"
-   "\\(à®·à¯à®°à¯€\\)")
+  (let ((table
+	 '(("a" . "\u0B82")		; SIGN ANUSVARA
+	   ("V" . "[\u0B85-\u0B94]")	; independent vowel
+	   ("C" . "[\u0B95-\u0BB9]")	; consonant
+	   ("v" . "[\u0BBE-\u0BC8\u0BD7]") ; vowel sign
+	   ("H" . "\u0BCD")		; VIRAMA
+	   ("N" . "\u200C")		; ZWNJ
+	   ("J" . "\u200D")		; ZWJ
+	   ("X" . "[\u0B80-\u0BFF]"))))	; all coverage
+    (indian-compose-regexp
+     (concat
+      ;; consonant-based syllables, or
+      "C\\(?:J?HJ?C\\)*\\(?:H[NJ]?|v*a?\\)\\|"
+      ;; syllables with an independent vowel, or
+      "Vv*a?\\|"
+      ;; any other singleton characters
+      "X")
+     table))
   "Regexp matching a composable sequence of Tamil characters.")
 
+(defconst telugu-composable-pattern
+  (let ((table
+	 '(("a" . "[\u0C01-\u0C03]")	; SIGN CANDRABINDU .. VISARGA
+	   ("V" . "[\u0C05-\u0C14\u0C60-\u0C61]") ; independent vowel
+	   ("C" . "[\u0C15-\u0C39\u0C58-\u0C59]") ; consonant
+	   ("v" . "[\u0C3E-\u0C4C\u0C55-\u0C56\u0C62-\u0C63]")	; vowel sign
+	   ("H" . "\u0BCD")		; VIRAMA
+	   ("N" . "\u200C")		; ZWNJ
+	   ("J" . "\u200D")		; ZWJ
+	   ("X" . "[\u0C00-\u0C7F]"))))	; all coverage
+    (indian-compose-regexp
+     (concat
+      ;; consonant-based syllables, or
+      "C\\(?:J?HJ?C\\)*\\(?:H[NJ]?|v*a?\\)\\|"
+      ;; syllables with an independent vowel, or
+      "V\\(?:J?HC\\)?v*a?\\|"
+      ;; special consonant form, or
+      "JHC\\|"
+      ;; any other singleton characters
+      "X")
+     table))
+  "Regexp matching a composable sequence of Telugu characters.")
+
 (defconst kannada-composable-pattern
-  (concat
-   "\\([ಂ-ಔೠಌ]\\)\\|[ಃ]"
-   "\\|\\("
-   "\\(?:\\(?:[ಕ-ಹ]à³\\)?\\(?:[ಕ-ಹ]à³\\)?\\(?:[ಕ-ಹ]à³\\)?[ಕ-ಹ]à³\\)?"
-   "[ಕ-ಹ]\\(?:à³\\|[ಾ-à³à³•à³ƒ]?\\)?"
-   "\\)")
+  (let ((table
+	 '(("A" . "[\u0C82-\u0C83]")	; SIGN ANUSVARA .. VISARGA
+	   ("V" . "[\u0C85-\u0C94\u0CE0-\u0CE1]") ; independent vowel
+	   ("C" . "[\u0C95-\u0CB9\u0CDE]")	  ; consonant
+	   ("B" . "\u0CB0")		; RA
+	   ("n" . "\u0CBC")		; NUKTA
+	   ("v" . "[\u0CBE-\u0CCC\u0CD5-\u0CD6\u0CE2-\u0CE3]") ; vowel sign
+	   ("H" . "\u0CCD")		; VIRAMA
+	   ("N" . "\u200C")		; ZWNJ
+	   ("J" . "\u200D")		; ZWJ
+	   ("X" . "[\u0C80-\u0CFF]"))))	; all coverage
+    (indian-compose-regexp
+     (concat
+      ;; syllables with an independent vowel, or
+      "\\(?:RH\\)?Vn?\\(?:J?HC\\)?v?A?\\|"
+      ;; consonant-based syllables, or
+      "Cn?\\(?:J?HJ?Cn?\\)*\\(?:H[NJ]?|v*n?A?\\)\\|"
+      ;; special consonant form, or
+      "JHB\\|"
+      ;; any other singleton characters
+      "X")
+     table))
   "Regexp matching a composable sequence of Kannada characters.")
 
 (defconst malayalam-composable-pattern
   (let ((table
-	 '(("V" . "[\u0D05-\u0D14\u0D60-\u0D61]") ; independent vowel
+	 '(("A" . "[\u0D02-\u0D03]")	; SIGN ANUSVARA .. VISARGA
+	   ("V" . "[\u0D05-\u0D14\u0D60-\u0D61]") ; independent vowel
 	   ("C" . "[\u0D15-\u0D39]")		  ; consonant 
-	   ("m" . "[\u0D46-\u0D48\u0D4A-\u0D4C]") ; prebase matra
-	   ("p" . "[\u0D3E-\u0D44\u0D57]")	  ; postbase matra
-	   ("b" . "[\u0D62-\u0D63]")		  ; belowbase matra
-	   ("a" . "[\u0D02-\u0D03]")		  ; abovebase sign
-	   ("H" . "\u0D4D")			  ; virama sign 
+	   ("Y" . "[\u0D2F-\u0D30\u0D32\u0D35]")  ; YA, RA, LA, VA
+	   ("v" . "[\u0D3E-\u0D48\u0D57\u0D62-\u0D63]")	; postbase matra
 	   ("N" . "\u200C")			  ; ZWNJ
 	   ("J" . "\u200D")			  ; ZWJ
 	   ("X" . "[\u0D00-\u0D7F]"))))		  ; all coverage
     (indian-compose-regexp
      (concat
+      ;; consonant-based syllables, or
+      "\\(?:CJ?HJ?C\\)*\\(?:H[NJ]?\\|v?A?\\)\\|"
       ;; syllables with an independent vowel, or
-      "V\\(?:J?HC\\)?m?b?p?a?\\|"
-      ;; consonant-based syllables, or
-      "\\(?:CJ?HJ?\\)\\{0,4\\}C\\(?:H[NJ]?\\|m?b?p?a?\\)\\|"
+      "V\\(?:J?HY\\)?v*?A?\\|"
       ;; special consonant form, or
-      "JHC\\|"
+      "JHY\\|"
       ;; any other singleton characters
       "X")
      table))
@@ -213,13 +369,13 @@
 
 (let ((script-regexp-alist
        `((devanagari . ,devanagari-composable-pattern)
-	 (bengali . "[\x980-\x9FF\x200C\x200D]+")
-	 (gurmukhi . "[\xA00-\xA7F\x200C\x200D]+")
-	 (gujarati . "[\xA80-\xAFF\x200C\x200D]+")
-	 (oriya . "[\xB00-\xB7F\x200C\x200D]+")
-	 (tamil . "[\xB80-\xBFF\x200C\x200D]+")
-	 (telugu . "[\xC00-\xC7F\x200C\x200D]+")
-	 (kannada . "[\xC80-\xCFF\x200C\x200D]+")
+	 (bengali . ,bengali-composable-pattern)
+	 (gurmukhi . ,gurmukhi-composable-pattern)
+	 (gujarati . ,gujarati-composable-pattern)
+	 (oriya . ,oriya-composable-pattern)
+	 (tamil . ,tamil-composable-pattern)
+	 (telugu . ,telugu-composable-pattern)
+	 (kannada . ,kannada-composable-pattern)
 	 (malayalam . ,malayalam-composable-pattern))))
   (map-char-table
    #'(lambda (key val)
--- a/lisp/language/sinhala.el	Wed Mar 31 00:14:29 2010 +0000
+++ b/lisp/language/sinhala.el	Wed Mar 31 06:33:56 2010 +0000
@@ -33,7 +33,17 @@
 (set-char-table-range 
  composition-function-table
  '(#xD80 . #xDFF)
- (list (vector "[\xD80-\xDFF\x200C\x200D]+" 0 'font-shape-gstring)))
+ (list (vector
+	;; C:consonant, H:HALANT, J:ZWJ, v:vowel sign,
+	;; V:independent vowel, a:ANUSVARA .. VISARGA
+	(concat
+	 ;; C(HJC)*v*H?a?, or
+	 "[\u0D9A-\u0DC6]\\(?:\u0DCA\u200D[\u0D9A-\u0DC6]\\)*[\u0DCF-\u0DDF\u0DF2-\u0DF3]*\u0DCA?[\u0D82-\u0D83]?\\|"
+	 ;; Va?, or
+	 "[\u0D85-\u0D96][\u0D82-\u0D83]?\\|"
+	 ;; any other singleton characters
+	 "[\u0D80-\u0DFF]")
+	0 'font-shape-gstring)))
 
 ;; arch-tag: 87b9ad3b-5090-422f-b942-eb85b9d52e7c
 ;; sinhala.el ends here
--- a/lisp/mail/sendmail.el	Wed Mar 31 00:14:29 2010 +0000
+++ b/lisp/mail/sendmail.el	Wed Mar 31 06:33:56 2010 +0000
@@ -417,9 +417,11 @@
 
 ;;;###autoload
 (defcustom mail-default-directory (purecopy "~/")
-  "Directory for mail buffers.
-Value of `default-directory' for mail buffers.
-This directory is used for auto-save files of mail buffers."
+  "Value of `default-directory' for Mail mode buffers.
+This directory is used for auto-save files of Mail mode buffers.
+
+Note that Message mode does not use this variable; it auto-saves
+in `message-auto-save-directory'."
   :type '(directory :tag "Directory")
   :group 'sendmail
   :version "22.1")
--- a/lisp/progmodes/js.el	Wed Mar 31 00:14:29 2010 +0000
+++ b/lisp/progmodes/js.el	Wed Mar 31 06:33:56 2010 +0000
@@ -436,6 +436,13 @@
   :type 'integer
   :group 'js)
 
+(defcustom js-auto-indent-flag t
+  "Whether to automatically indent when typing punctuation characters.
+If non-nil, the characters {}();,: also indent the current line
+in Javascript mode."
+  :type 'boolean
+  :group 'js)
+
 (defcustom js-flat-functions nil
   "Treat nested functions as top-level functions in `js-mode'.
 This applies to function movement, marking, and so on."
@@ -483,6 +490,9 @@
 
 (defvar js-mode-map
   (let ((keymap (make-sparse-keymap)))
+    (mapc (lambda (key)
+	    (define-key keymap key #'js-insert-and-indent))
+	  '("{" "}" "(" ")" ":" ";" ","))
     (define-key keymap [(control ?c) (meta ?:)] #'js-eval)
     (define-key keymap [(control ?c) (control ?j)] #'js-set-js-context)
     (define-key keymap [(control meta ?x)] #'js-eval-defun)
@@ -498,6 +508,21 @@
     keymap)
   "Keymap for `js-mode'.")
 
+(defun js-insert-and-indent (key)
+  "Run the command bound to KEY, and indent if necessary.
+Indentation does not take place if point is in a string or
+comment."
+  (interactive (list (this-command-keys)))
+  (call-interactively (lookup-key (current-global-map) key))
+  (let ((syntax (save-restriction (widen) (syntax-ppss))))
+    (when (or (and (not (nth 8 syntax))
+                   js-auto-indent-flag)
+              (and (nth 4 syntax)
+                   (eq (current-column)
+                       (1+ (current-indentation)))))
+      (indent-according-to-mode))))
+
+
 ;;; Syntax table and parsing
 
 (defvar js-mode-syntax-table
--- a/lisp/simple.el	Wed Mar 31 00:14:29 2010 +0000
+++ b/lisp/simple.el	Wed Mar 31 06:33:56 2010 +0000
@@ -3468,17 +3468,18 @@
   (interactive
    (list (read-buffer "Append to buffer: " (other-buffer (current-buffer) t))
 	 (region-beginning) (region-end)))
-  (let ((oldbuf (current-buffer)))
-    (let* ((append-to (get-buffer-create buffer))
-           (windows (get-buffer-window-list append-to t t))
-           point)
+  (let* ((oldbuf (current-buffer))
+         (append-to (get-buffer-create buffer))
+         (windows (get-buffer-window-list append-to t t))
+         point)
+    (save-excursion
       (with-current-buffer append-to
-	(setq point (point))
-	(barf-if-buffer-read-only)
-	(insert-buffer-substring oldbuf start end)
-	(dolist (window windows)
-	  (when (= (window-point window) point)
-	    (set-window-point window (point))))))))
+        (setq point (point))
+        (barf-if-buffer-read-only)
+        (insert-buffer-substring oldbuf start end)
+        (dolist (window windows)
+          (when (= (window-point window) point)
+            (set-window-point window (point))))))))
 
 (defun prepend-to-buffer (buffer start end)
   "Prepend to specified buffer the text of the region.
--- a/lisp/subr.el	Wed Mar 31 00:14:29 2010 +0000
+++ b/lisp/subr.el	Wed Mar 31 06:33:56 2010 +0000
@@ -3595,11 +3595,11 @@
     ("^[-_+ ]cvs$"             . -3)	; treat "1.2.3-CVS" as alpha release
     ("^[-_+ ]?b\\(eta\\)?$"    . -2)
     ("^[-_+ ]?\\(pre\\|rc\\)$" . -1))
-  "*Specify association between non-numeric version part and a priority.
+  "*Specify association between non-numeric version and its priority.
 
 This association is used to handle version string like \"1.0pre2\",
 \"0.9alpha1\", etc.  It's used by `version-to-list' (which see) to convert the
-non-numeric part to an integer.  For example:
+non-numeric part of a version string to an integer.  For example:
 
    String Version    Integer List Version
    \"1.0pre2\"         (1  0 -1 2)
@@ -3617,15 +3617,15 @@
 Where:
 
 REGEXP		regexp used to match non-numeric part of a version string.
-		It should begin with a `^' anchor and end with a `$' to
+		It should begin with the `^' anchor and end with a `$' to
 		prevent false hits.  Letter-case is ignored while matching
 		REGEXP.
 
-PRIORITY	negative integer which indicate the non-numeric priority.")
+PRIORITY	a negative integer specifying non-numeric priority of REGEXP.")
 
 
 (defun version-to-list (ver)
-  "Convert version string VER into an integer list.
+  "Convert version string VER into a list of integers.
 
 The version syntax is given by the following EBNF:
 
@@ -3639,17 +3639,17 @@
 The NUMBER part is optional if SEPARATOR is a match for an element
 in `version-regexp-alist'.
 
-As an example of valid version syntax:
+Examples of valid version syntax:
 
    1.0pre2   1.0.7.5   22.8beta3   0.9alpha1   6.9.30Beta
 
-As an example of invalid version syntax:
+Examples of invalid version syntax:
 
    1.0prepre2   1.0..7.5   22.8X3   alpha3.2   .5
 
-As an example of version convertion:
-
-   String Version    Integer List Version
+Examples of version conversion:
+
+   Version String    Version as a List of Integers
    \"1.0.7.5\"         (1  0  7 5)
    \"1.0pre2\"         (1  0 -1 2)
    \"1.0PRE2\"         (1  0 -1 2)
@@ -3695,12 +3695,12 @@
 
 
 (defun version-list-< (l1 l2)
-  "Return t if integer list L1 is lesser than L2.
-
-Note that integer list (1) is equal to (1 0), (1 0 0), (1 0 0 0),
-etc.  That is, the trailing zeroes are irrelevant.  Also, integer
-list (1) is greater than (1 -1) which is greater than (1 -2)
-which is greater than (1 -3)."
+  "Return t if L1, a list specification of a version, is lower than L2.
+
+Note that a version specified by the list (1) is equal to (1 0),
+\(1 0 0), (1 0 0 0), etc.  That is, the trailing zeros are insignificant.
+Also, a version given by the list (1) is higher than (1 -1), which in
+turn is higher than (1 -2), which is higher than (1 -3)."
   (while (and l1 l2 (= (car l1) (car l2)))
     (setq l1 (cdr l1)
 	  l2 (cdr l2)))
@@ -3716,12 +3716,12 @@
 
 
 (defun version-list-= (l1 l2)
-  "Return t if integer list L1 is equal to L2.
-
-Note that integer list (1) is equal to (1 0), (1 0 0), (1 0 0 0),
-etc.  That is, the trailing zeroes are irrelevant.  Also, integer
-list (1) is greater than (1 -1) which is greater than (1 -2)
-which is greater than (1 -3)."
+  "Return t if L1, a list specification of a version, is equal to L2.
+
+Note that a version specified by the list (1) is equal to (1 0),
+\(1 0 0), (1 0 0 0), etc.  That is, the trailing zeros are insignificant.
+Also, a version given by the list (1) is higher than (1 -1), which in
+turn is higher than (1 -2), which is higher than (1 -3)."
   (while (and l1 l2 (= (car l1) (car l2)))
     (setq l1 (cdr l1)
 	  l2 (cdr l2)))
@@ -3737,7 +3737,7 @@
 
 
 (defun version-list-<= (l1 l2)
-  "Return t if integer list L1 is lesser than or equal to L2.
+  "Return t if L1, a list specification of a version, is lower or equal to L2.
 
 Note that integer list (1) is equal to (1 0), (1 0 0), (1 0 0 0),
 etc.  That is, the trailing zeroes are irrelevant.  Also, integer
@@ -3757,9 +3757,9 @@
    (t  (<= 0 (version-list-not-zero l2)))))
 
 (defun version-list-not-zero (lst)
-  "Return the first non-zero element of integer list LST.
-
-If all LST elements are zeroes or LST is nil, return zero."
+  "Return the first non-zero element of LST, which is a list of integers.
+
+If all LST elements are zeros or LST is nil, return zero."
   (while (and lst (zerop (car lst)))
     (setq lst (cdr lst)))
   (if lst
@@ -3769,31 +3769,31 @@
 
 
 (defun version< (v1 v2)
-  "Return t if version V1 is lesser than V2.
+  "Return t if version V1 is lower (older) than V2.
 
 Note that version string \"1\" is equal to \"1.0\", \"1.0.0\", \"1.0.0.0\",
-etc.  That is, the trailing \".0\"s are irrelevant.  Also, version string \"1\"
-is greater than \"1pre\" which is greater than \"1beta\" which is greater than
-\"1alpha\"."
+etc.  That is, the trailing \".0\"s are insignificant.  Also, version
+string \"1\" is higher (newer) than \"1pre\", which is higher than \"1beta\",
+which is higher than \"1alpha\"."
   (version-list-< (version-to-list v1) (version-to-list v2)))
 
 
 (defun version<= (v1 v2)
-  "Return t if version V1 is lesser than or equal to V2.
+  "Return t if version V1 is lower (older) than or equal to V2.
 
 Note that version string \"1\" is equal to \"1.0\", \"1.0.0\", \"1.0.0.0\",
-etc.  That is, the trailing \".0\"s are irrelevant.  Also, version string \"1\"
-is greater than \"1pre\" which is greater than \"1beta\" which is greater than
-\"1alpha\"."
+etc.  That is, the trailing \".0\"s are insignificant..  Also, version
+string \"1\" is higher (newer) than \"1pre\", which is higher than \"1beta\",
+which is higher than \"1alpha\"."
   (version-list-<= (version-to-list v1) (version-to-list v2)))
 
 (defun version= (v1 v2)
   "Return t if version V1 is equal to V2.
 
 Note that version string \"1\" is equal to \"1.0\", \"1.0.0\", \"1.0.0.0\",
-etc.  That is, the trailing \".0\"s are irrelevant.  Also, version string \"1\"
-is greater than \"1pre\" which is greater than \"1beta\" which is greater than
-\"1alpha\"."
+etc.  That is, the trailing \".0\"s are insignificant..  Also, version
+string \"1\" is higher (newer) than \"1pre\", which is higher than \"1beta\",
+which is higher than \"1alpha\"."
   (version-list-= (version-to-list v1) (version-to-list v2)))
 
 
--- a/lisp/textmodes/artist.el	Wed Mar 31 00:14:29 2010 +0000
+++ b/lisp/textmodes/artist.el	Wed Mar 31 06:33:56 2010 +0000
@@ -1319,7 +1319,7 @@
 
 Variables
 
- This is a brief overview of the different varaibles. For more info,
+ This is a brief overview of the different variables.  For more info,
  see the documentation for the variables (type \\[describe-variable] <variable> RET).
 
  artist-rubber-banding		Interactively do rubber-banding or not
--- a/lisp/tmm.el	Wed Mar 31 00:14:29 2010 +0000
+++ b/lisp/tmm.el	Wed Mar 31 06:33:56 2010 +0000
@@ -170,7 +170,11 @@
     (mapc (lambda (elt)
 	    (if (stringp elt)
 		(setq gl-str elt)
-	      (and (listp elt) (tmm-get-keymap elt not-menu))))
+	      (cond
+	       ((listp elt) (tmm-get-keymap elt not-menu))
+	       ((vectorp elt)
+		(dotimes (i (length elt))
+		  (tmm-get-keymap (cons i (aref elt i)) not-menu))))))
 	    menu)
     ;; Choose an element of tmm-km-list; put it in choice.
     (if (and not-menu (= 1 (length tmm-km-list)))
--- a/lisp/vc.el	Wed Mar 31 00:14:29 2010 +0000
+++ b/lisp/vc.el	Wed Mar 31 06:33:56 2010 +0000
@@ -1618,9 +1618,10 @@
 
 ;;;###autoload
 (defun vc-root-diff (historic &optional not-urgent)
-  "Display diffs between file revisions.
-Normally this compares the currently selected fileset with their
-working revisions.  With a prefix argument HISTORIC, it reads two revision
+  "Display diffs between VC-controlled whole tree revisions.
+Normally, this compares the tree corresponding to the current
+fileset with the working revision.
+With a prefix argument HISTORIC, prompt for two revision
 designators specifying which revisions to compare.
 
 The optional argument NOT-URGENT non-nil means it is ok to say no to
@@ -1941,7 +1942,12 @@
 ;;;###autoload
 (defun vc-print-log (&optional working-revision limit)
   "List the change log of the current fileset in a window.
-If WORKING-REVISION is non-nil, leave the point at that revision."
+If WORKING-REVISION is non-nil, leave point at that revision.
+If LIMIT is non-nil, it should be a number specifying the maximum
+number of revisions to show; the default is `vc-log-show-limit'.
+
+When called interactively with a prefix argument, prompt for
+WORKING-REVISION and LIMIT."
   (interactive
    (cond
     (current-prefix-arg
@@ -1965,7 +1971,10 @@
 
 ;;;###autoload
 (defun vc-print-root-log (&optional limit)
-  "List the change log of for the current VC controlled tree in a window."
+  "List the change log for the current VC controlled tree in a window.
+If LIMIT is non-nil, it should be a number specifying the maximum
+number of revisions to show; the default is `vc-log-show-limit'.
+When called interactively with a prefix argument, prompt for LIMIT."
   (interactive
    (cond
     (current-prefix-arg
--- a/src/ChangeLog	Wed Mar 31 00:14:29 2010 +0000
+++ b/src/ChangeLog	Wed Mar 31 06:33:56 2010 +0000
@@ -1,3 +1,57 @@
+2010-03-31  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	Get rid of the direct_output optimizations.
+	* keyboard.c (nonundocount): Remove extern declaration.
+	(command_loop_1): Remove brittle optimisation for cheap and
+	common operations.
+	* xdisp.c (redisplay_internal): Don't bother checking
+	redisplay_performed_directly_p any more.
+	* sysdep.c (init_sys_modes): Don't call direct_output_forward_char
+	any more.
+	* dispnew.c (redisplay_performed_directly_p)
+	(direct_output_for_insert, direct_output_forward_char):
+	* dispextern.h (redisplay_performed_directly_p)
+	(direct_output_for_insert, direct_output_forward_char): Remove.
+	* cmds.c (nonundocount): Make it static.
+
+2010-03-31  Bernhard Herzog  <bh@intevation.de>  (tiny change)
+
+	* menu.c (Fx_popup_menu): Use last_event_timestamp (Bug#4930).
+
+2010-03-31  Jan Djärv  <jan.h.d@swipnet.se>
+
+	* xdisp.c (note_mouse_highlight): Don't do highlight if pointer is
+	invisible (Bug#5766).
+
+2010-03-31  Adrian Robert  <adrian.b.robert@gmail.com>
+
+	* xdisp.c (x_consider_frame_title, update_window_cursor):
+	Remove HAVE_NS conditionals.
+	(prepare_menu_bars)[HAVE_NS]: Call ns_set_doc_edited.
+
+	* nsfns.m (x_implicitly_set_name): If frame-title-format is t, use
+	filename for the title.
+	(ns_set_doc_edited): Do nothing if the selected window is a
+	minibuffer window.
+
+	* nsterm.h: Add prototypes for ns_set_name_as_filename and
+	ns_set_doc_edited.
+
+	* nsterm.m: Remove unneeded prototype.
+
+2010-03-31  Glenn Morris  <rgm@gnu.org>
+
+	* Makefile.in (SOME_MACHINE_OBJECTS): Ensure dbus stuff is always
+	in the DOC file.  (Bug#5336)
+
+2010-03-31  Chong Yidong  <cyd@stupidchicken.com>
+
+	* xdisp.c (pos_visible_p): Revert 2008-01-25 change (Bug#5730).
+
+2010-03-31  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* window.c (keys_of_window): Remove redundant/overridden bindings.
+
 2010-03-30  Eli Zaretskii  <eliz@gnu.org>
 
 	* xdisp.c (BUFFER_POS_REACHED_P, move_it_in_display_line_to):
--- a/src/Makefile.in	Wed Mar 31 00:14:29 2010 +0000
+++ b/src/Makefile.in	Wed Mar 31 06:33:56 2010 +0000
@@ -515,7 +515,7 @@
    in case they are needed there.  */
 SOME_MACHINE_OBJECTS = dosfns.o msdos.o \
   xterm.o xfns.o xmenu.o xselect.o xrdb.o xsmfns.o fringe.o image.o \
-  fontset.o \
+  fontset.o dbusbind.o \
   nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o \
   w32.o w32console.o w32fns.o w32heap.o w32inevt.o \
   w32menu.o w32proc.o w32reg.o w32select.o w32term.o w32xfns.o $(FONT_DRIVERS)
--- a/src/cmds.c	Wed Mar 31 00:14:29 2010 +0000
+++ b/src/cmds.c	Wed Mar 31 06:33:56 2010 +0000
@@ -317,7 +317,7 @@
   return value;
 }
 
-int nonundocount;
+static int nonundocount;
 
 /* Note that there's code in command_loop_1 which typically avoids
    calling this.  */
--- a/src/dispextern.h	Wed Mar 31 00:14:29 2010 +0000
+++ b/src/dispextern.h	Wed Mar 31 06:33:56 2010 +0000
@@ -1102,17 +1102,9 @@
 
 extern int display_completed;
 
-/* Non-zero means redisplay has been performed directly (see also
-   direct_output_for_insert and direct_output_forward_char), so that
-   no further updating has to be performed.  The function
-   redisplay_internal checks this flag, and does nothing but reset it
-   to zero if it is non-zero.  */
-
-extern int redisplay_performed_directly_p;
-
 /* A temporary storage area, including a row of glyphs.  Initialized
    in xdisp.c.  Used for various purposes, as an example see
-   direct_output_for_insert.  */
+   get_overlay_arrow_glyph_row.  */
 
 extern struct glyph_row scratch_glyph_row;
 
@@ -3172,8 +3164,6 @@
 extern void cancel_line P_ ((int, struct frame *));
 extern void init_desired_glyphs P_ ((struct frame *));
 extern int scroll_frame_lines P_ ((struct frame *, int, int, int, int));
-extern int direct_output_for_insert P_ ((int));
-extern int direct_output_forward_char P_ ((int));
 extern int update_frame P_ ((struct frame *, int, int));
 extern int scrolling P_ ((struct frame *));
 extern void bitch_at_user P_ ((void));
@@ -3200,8 +3190,6 @@
 void redraw_frame P_ ((struct frame *));
 void redraw_garbaged_frames P_ ((void));
 int scroll_cost P_ ((struct frame *, int, int, int));
-int direct_output_for_insert P_ ((int));
-int direct_output_forward_char P_ ((int));
 int update_frame P_ ((struct frame *, int, int));
 void update_single_window P_ ((struct window *, int));
 int scrolling P_ ((struct frame *));
--- a/src/dispnew.c	Wed Mar 31 00:14:29 2010 +0000
+++ b/src/dispnew.c	Wed Mar 31 06:33:56 2010 +0000
@@ -302,12 +302,6 @@
 
 struct glyph space_glyph;
 
-/* Non-zero means update has been performed directly, so that there's
-   no need for redisplay_internal to do much work.  Set by
-   direct_output_for_insert.  */
-
-int redisplay_performed_directly_p;
-
 /* Counts of allocated structures.  These counts serve to diagnose
    memory leaks and double frees.  */
 
@@ -3456,401 +3450,6 @@
 
 
 /***********************************************************************
-			  Direct Operations
- ***********************************************************************/
-
-/* Try to update display and current glyph matrix directly.
-
-   This function is called after a character G has been inserted into
-   current_buffer.  It tries to update the current glyph matrix and
-   perform appropriate screen output to reflect the insertion.  If it
-   succeeds, the global flag redisplay_performed_directly_p will be
-   set to 1, and thereby prevent the more costly general redisplay
-   from running (see redisplay_internal).
-
-   This function is not called for `hairy' character insertions.
-   In particular, it is not called when after or before change
-   functions exist, like they are used by font-lock.  See keyboard.c
-   for details where this function is called.  */
-
-int
-direct_output_for_insert (g)
-     int g;
-{
-  register struct frame *f = SELECTED_FRAME ();
-  struct window *w = XWINDOW (selected_window);
-  struct it it, it2;
-  struct glyph_row *glyph_row;
-  struct glyph *glyphs, *glyph, *end;
-  int n;
-  /* Non-null means that redisplay of W is based on window matrices.  */
-  int window_redisplay_p = FRAME_WINDOW_P (f);
-  /* Non-null means we are in overwrite mode.  */
-  int overwrite_p = !NILP (current_buffer->overwrite_mode);
-  int added_width;
-  struct text_pos pos;
-  int delta, delta_bytes;
-
-  /* Not done directly.  */
-  redisplay_performed_directly_p = 0;
-
-  /* Quickly give up for some common cases.  */
-  if (cursor_in_echo_area
-      /* Give up if fonts have changed.  */
-      || fonts_changed_p
-      /* Give up if face attributes have been changed.  */
-      || face_change_count
-      /* Give up if cursor position not really known.  */
-      || !display_completed
-      /* Give up if buffer appears in two places.  */
-      || buffer_shared > 1
-      /* Give up if we need to reorder bidirectional text.  */
-      || !NILP (current_buffer->bidi_display_reordering)
-      /* Give up if currently displaying a message instead of the
-	 minibuffer contents.  */
-      || (EQ (selected_window, minibuf_window)
-	  && EQ (minibuf_window, echo_area_window))
-      /* Give up for hscrolled mini-buffer because display of the prompt
-	 is handled specially there (see display_line).  */
-      || (MINI_WINDOW_P (w) && XFASTINT (w->hscroll))
-      /* Give up if overwriting in the middle of a line.  */
-      || (overwrite_p
-	  && PT != ZV
-	  && FETCH_BYTE (PT) != '\n')
-      /* Give up for tabs and line ends.  */
-      || g == '\t'
-      || g == '\n'
-      || g == '\r'
-      || (g == ' ' && !NILP (current_buffer->word_wrap))
-      /* Give up if unable to display the cursor in the window.  */
-      || w->cursor.vpos < 0
-      /* Give up if we are showing a message or just cleared the message
-	 because we might need to resize the echo area window.  */
-      || !NILP (echo_area_buffer[0])
-      || !NILP (echo_area_buffer[1])
-      || (glyph_row = MATRIX_ROW (w->current_matrix, w->cursor.vpos),
-	  /* Can't do it in a continued line because continuation
-	     lines would change.  */
-	  (glyph_row->continued_p
-	   || glyph_row->exact_window_width_line_p
-	   /* Can't use this method if the line overlaps others or is
-	      overlapped by others because these other lines would
-	      have to be redisplayed.  */
-	   || glyph_row->overlapping_p
-	   || glyph_row->overlapped_p))
-      /* Can't do it for partial width windows on terminal frames
-	 because we can't clear to eol in such a window.  */
-      || (!window_redisplay_p && !WINDOW_FULL_WIDTH_P (w)))
-    return 0;
-
-  /* If we can't insert glyphs, we can use this method only
-     at the end of a line.  */
-  if (!FRAME_CHAR_INS_DEL_OK (f))
-    if (PT != ZV && FETCH_BYTE (PT_BYTE) != '\n')
-      return 0;
-
-  /* Set up a display iterator structure for W.  Glyphs will be
-     produced in scratch_glyph_row.  Current position is W's cursor
-     position.  */
-  clear_glyph_row (&scratch_glyph_row);
-  SET_TEXT_POS (pos, PT, PT_BYTE);
-  DEC_TEXT_POS (pos, !NILP (current_buffer->enable_multibyte_characters));
-  init_iterator (&it, w, CHARPOS (pos), BYTEPOS (pos), &scratch_glyph_row,
-		 DEFAULT_FACE_ID);
-
-  glyph_row = MATRIX_ROW (w->current_matrix, w->cursor.vpos);
-  if (glyph_row->mouse_face_p)
-    return 0;
-
-  /* Give up if highlighting trailing whitespace and we have trailing
-     whitespace in glyph_row.  We would have to remove the trailing
-     whitespace face in that case.  */
-  if (!NILP (Vshow_trailing_whitespace)
-      && glyph_row->used[TEXT_AREA])
-    {
-      struct glyph *last;
-
-      last = glyph_row->glyphs[TEXT_AREA] + glyph_row->used[TEXT_AREA] - 1;
-      if (last->type == STRETCH_GLYPH
-	  || (last->type == CHAR_GLYPH
-	      && last->u.ch == ' '))
-	return 0;
-    }
-
-  /* Give up if there are overlay strings at pos.  This would fail
-     if the overlay string has newlines in it.  */
-  if (STRINGP (it.string))
-    return 0;
-
-  it.hpos = w->cursor.hpos;
-  it.vpos = w->cursor.vpos;
-  it.current_x = w->cursor.x + it.first_visible_x;
-  it.current_y = w->cursor.y;
-  it.end_charpos = PT;
-  it.stop_charpos = min (PT, it.stop_charpos);
-  it.stop_charpos = max (IT_CHARPOS (it), it.stop_charpos);
-
-  /* More than one display element may be returned for PT - 1 if
-     (i) it's a control character which is translated into `\003' or
-     `^C', or (ii) it has a display table entry, or (iii) it's a
-     combination of both.  */
-  delta = delta_bytes = 0;
-  while (get_next_display_element (&it))
-    {
-      PRODUCE_GLYPHS (&it);
-
-      /* Give up if glyph doesn't fit completely on the line.  */
-      if (it.current_x >= it.last_visible_x)
-	return 0;
-
-      /* Give up if new glyph has different ascent or descent than
-	 the original row, or if it is not a character glyph.  */
-      if (glyph_row->ascent != it.ascent
-	  || glyph_row->height != it.ascent + it.descent
-	  || glyph_row->phys_ascent != it.phys_ascent
-	  || glyph_row->phys_height != it.phys_ascent + it.phys_descent
-	  || it.what != IT_CHARACTER)
-	return 0;
-
-      delta += 1;
-      delta_bytes += it.len;
-      set_iterator_to_next (&it, 1);
-    }
-
-  /* Give up if we hit the right edge of the window.  We would have
-     to insert truncation or continuation glyphs.  */
-  added_width = it.current_x - (w->cursor.x + it.first_visible_x);
-  if (glyph_row->pixel_width + added_width >= it.last_visible_x)
-    return 0;
-
-  /* Give up if there is a \t following in the line.  */
-  it2 = it;
-  it2.end_charpos = ZV;
-  it2.stop_charpos = min (it2.stop_charpos, ZV);
-  while (get_next_display_element (&it2)
-	 && !ITERATOR_AT_END_OF_LINE_P (&it2))
-    {
-      if (it2.c == '\t')
-	return 0;
-      set_iterator_to_next (&it2, 1);
-    }
-
-  /* Number of new glyphs produced.  */
-  n = it.glyph_row->used[TEXT_AREA];
-
-  /* Start and end of glyphs in original row.  */
-  glyphs = glyph_row->glyphs[TEXT_AREA] + w->cursor.hpos;
-  end = glyph_row->glyphs[1 + TEXT_AREA];
-
-  /* Make room for new glyphs, then insert them.  */
-  xassert (end - glyphs - n >= 0);
-  safe_bcopy ((char *) glyphs, (char *) (glyphs + n),
-	      (end - glyphs - n) * sizeof (*end));
-  bcopy (it.glyph_row->glyphs[TEXT_AREA], glyphs, n * sizeof *glyphs);
-  glyph_row->used[TEXT_AREA] = min (glyph_row->used[TEXT_AREA] + n,
-				    end - glyph_row->glyphs[TEXT_AREA]);
-
-  /* Compute new line width.  */
-  glyph = glyph_row->glyphs[TEXT_AREA];
-  end = glyph + glyph_row->used[TEXT_AREA];
-  glyph_row->pixel_width = glyph_row->x;
-  while (glyph < end)
-    {
-      glyph_row->pixel_width += glyph->pixel_width;
-      ++glyph;
-    }
-
-  /* Increment buffer positions for glyphs following the newly
-     inserted ones.  */
-  for (glyph = glyphs + n; glyph < end; ++glyph)
-    if (glyph->charpos > 0 && BUFFERP (glyph->object))
-      glyph->charpos += delta;
-
-  if (MATRIX_ROW_END_CHARPOS (glyph_row) > 0)
-    {
-      MATRIX_ROW_END_CHARPOS (glyph_row) += delta;
-      MATRIX_ROW_END_BYTEPOS (glyph_row) += delta_bytes;
-    }
-
-  /* Adjust positions in lines following the one we are in.  */
-  increment_matrix_positions (w->current_matrix,
-			      w->cursor.vpos + 1,
-			      w->current_matrix->nrows,
-			      delta, delta_bytes);
-
-  glyph_row->contains_overlapping_glyphs_p
-    |= it.glyph_row->contains_overlapping_glyphs_p;
-
-  glyph_row->displays_text_p = 1;
-  w->window_end_vpos = make_number (max (w->cursor.vpos,
-					 XFASTINT (w->window_end_vpos)));
-
-  if (!NILP (Vshow_trailing_whitespace))
-    highlight_trailing_whitespace (it.f, glyph_row);
-
-  /* Write glyphs.  If at end of row, we can simply call write_glyphs.
-     In the middle, we have to insert glyphs.  Note that this is now
-     implemented for X frames.  The implementation uses updated_window
-     and updated_row.  */
-  updated_row = glyph_row;
-  updated_area = TEXT_AREA;
-  update_begin (f);
-  if (FRAME_RIF (f))
-    {
-      FRAME_RIF (f)->update_window_begin_hook (w);
-
-      if (glyphs == end - n
-	  /* In front of a space added by append_space.  */
-	  || (glyphs == end - n - 1
-	      && (end - n)->charpos <= 0))
-	FRAME_RIF (f)->write_glyphs (glyphs, n);
-      else
-	FRAME_RIF (f)->insert_glyphs (glyphs, n);
-    }
-  else
-    {
-      if (glyphs == end - n)
-	write_glyphs (f, glyphs, n);
-      else
-	insert_glyphs (f, glyphs, n);
-    }
-
-  w->cursor.hpos += n;
-  w->cursor.x = it.current_x - it.first_visible_x;
-  xassert (w->cursor.hpos >= 0
-	   && w->cursor.hpos < w->desired_matrix->matrix_w);
-
-  /* How to set the cursor differs depending on whether we are
-     using a frame matrix or a window matrix.   Note that when
-     a frame matrix is used, cursor_to expects frame coordinates,
-     and the X and Y parameters are not used.  */
-  if (window_redisplay_p)
-    FRAME_RIF (f)->cursor_to (w->cursor.vpos, w->cursor.hpos,
-                              w->cursor.y, w->cursor.x);
-  else
-    {
-      int x, y;
-      x = (WINDOW_TO_FRAME_HPOS (w, w->cursor.hpos)
-	   + (INTEGERP (w->left_margin_cols)
-	      ? XFASTINT (w->left_margin_cols)
-	      : 0));
-      y = WINDOW_TO_FRAME_VPOS (w, w->cursor.vpos);
-      cursor_to (f, y, x);
-    }
-
-#ifdef HAVE_WINDOW_SYSTEM
-  update_window_fringes (w, 0);
-#endif
-
-  if (FRAME_RIF (f))
-    FRAME_RIF (f)->update_window_end_hook (w, 1, 0);
-  update_end (f);
-  updated_row = NULL;
-  if (FRAME_TERMCAP_P (f))
-    fflush (FRAME_TTY (f)->output);
-
-  TRACE ((stderr, "direct output for insert\n"));
-  mark_window_display_accurate (it.window, 1);
-  redisplay_performed_directly_p = 1;
-  return 1;
-}
-
-
-/* Perform a direct display update for moving PT by N positions
-   left or right.  N < 0 means a movement backwards.  This function
-   is currently only called for N == 1 or N == -1.  */
-
-int
-direct_output_forward_char (n)
-     int n;
-{
-  struct frame *f = SELECTED_FRAME ();
-  struct window *w = XWINDOW (selected_window);
-  struct glyph_row *row;
-
-  /* Give up if point moved out of or into a composition.  */
-  if (check_point_in_composition (current_buffer, XINT (w->last_point),
-				  current_buffer, PT))
-    return 0;
-
-  /* Give up if face attributes have been changed.  */
-  if (face_change_count)
-    return 0;
-
-  /* Give up if current matrix is not up to date or we are
-     displaying a message.  */
-  if (!display_completed || cursor_in_echo_area)
-    return 0;
-
-  /* Give up if we need to reorder bidirectional text.  */
-  if (!NILP (XBUFFER (w->buffer)->bidi_display_reordering))
-    return 0;
-
-  /* Give up if the buffer's direction is reversed.  */
-  if (!NILP (XBUFFER (w->buffer)->direction_reversed))
-    return 0;
-
-  /* Can't use direct output if highlighting a region.  */
-  if (!NILP (Vtransient_mark_mode) && !NILP (current_buffer->mark_active))
-    return 0;
-
-  /* Can't use direct output if highlighting trailing whitespace.  */
-  if (!NILP (Vshow_trailing_whitespace))
-    return 0;
-
-  /* Give up if we are showing a message or just cleared the message
-     because we might need to resize the echo area window.  */
-  if (!NILP (echo_area_buffer[0]) || !NILP (echo_area_buffer[1]))
-    return 0;
-
-  /* Give up if currently displaying a message instead of the
-     minibuffer contents.  */
-  if (XWINDOW (minibuf_window) == w
-      && EQ (minibuf_window, echo_area_window))
-    return 0;
-
-  /* Give up if we don't know where the cursor is.  */
-  if (w->cursor.vpos < 0)
-    return 0;
-
-  row = MATRIX_ROW (w->current_matrix, w->cursor.vpos);
-
-  /* Give up if PT is outside of the last known cursor row.  */
-  if (PT <= MATRIX_ROW_START_CHARPOS (row)
-      || PT >= MATRIX_ROW_END_CHARPOS (row))
-    return 0;
-
-  set_cursor_from_row (w, row, w->current_matrix, 0, 0, 0, 0);
-
-  w->last_cursor = w->cursor;
-  XSETFASTINT (w->last_point, PT);
-
-  xassert (w->cursor.hpos >= 0
-	   && w->cursor.hpos < w->desired_matrix->matrix_w);
-
-  if (FRAME_WINDOW_P (f))
-    FRAME_RIF (f)->cursor_to (w->cursor.vpos, w->cursor.hpos,
-                              w->cursor.y, w->cursor.x);
-  else
-    {
-      int x, y;
-      x = (WINDOW_TO_FRAME_HPOS (w, w->cursor.hpos)
-	   + (INTEGERP (w->left_margin_cols)
-	      ? XFASTINT (w->left_margin_cols)
-	      : 0));
-      y = WINDOW_TO_FRAME_VPOS (w, w->cursor.vpos);
-      cursor_to (f, y, x);
-    }
-
-  if (FRAME_TERMCAP_P (f))
-    fflush (FRAME_TTY (f)->output);
-  redisplay_performed_directly_p = 1;
-  return 1;
-}
-
-
-
-/***********************************************************************
 			     Frame Update
  ***********************************************************************/
 
--- a/src/keyboard.c	Wed Mar 31 00:14:29 2010 +0000
+++ b/src/keyboard.c	Wed Mar 31 06:33:56 2010 +0000
@@ -1520,8 +1520,6 @@
 }
 #endif
 
-extern int nonundocount;	/* Declared in cmds.c.  */
-
 Lisp_Object
 command_loop_1 ()
 {
@@ -1744,149 +1742,8 @@
 	}
       else
 	{
-	  if (NILP (current_kboard->Vprefix_arg))
-	    {
-	      /* In case we jump to directly_done.  */
-	      Vcurrent_prefix_arg = current_kboard->Vprefix_arg;
-
-	      /* Recognize some common commands in common situations and
-		 do them directly.  */
-	      if (EQ (Vthis_command, Qforward_char) && PT < ZV
-		  && NILP (Vthis_command_keys_shift_translated)
-		  && !CONSP (Vtransient_mark_mode))
-		{
-                  struct Lisp_Char_Table *dp
-		    = window_display_table (XWINDOW (selected_window));
-		  lose = FETCH_CHAR (PT_BYTE);
-		  SET_PT (PT + 1);
-		  if (! NILP (Vpost_command_hook))
-		    /* Put this before calling adjust_point_for_property
-		       so it will only get called once in any case.  */
-		    goto directly_done;
-		  if (current_buffer == prev_buffer
-		      && last_point_position != PT
-		      && NILP (Vdisable_point_adjustment)
-		      && NILP (Vglobal_disable_point_adjustment))
-		    adjust_point_for_property (last_point_position, 0);
-		  already_adjusted = 1;
-		  if (PT == last_point_position + 1
-		      && (dp
-			  ? (VECTORP (DISP_CHAR_VECTOR (dp, lose))
-			     ? XVECTOR (DISP_CHAR_VECTOR (dp, lose))->size == 1
-			     : (NILP (DISP_CHAR_VECTOR (dp, lose))
-				&& (lose >= 0x20 && lose < 0x7f)))
-			  : (lose >= 0x20 && lose < 0x7f))
-		      /* To extract the case of continuation on
-                         wide-column characters.  */
-		      && ASCII_BYTE_P (lose)
-		      && (XFASTINT (XWINDOW (selected_window)->last_modified)
-			  >= MODIFF)
-		      && (XFASTINT (XWINDOW (selected_window)->last_overlay_modified)
-			  >= OVERLAY_MODIFF)
-		      && (XFASTINT (XWINDOW (selected_window)->last_point)
-			  == PT - 1)
-		      && !windows_or_buffers_changed
-		      && EQ (current_buffer->selective_display, Qnil)
-		      && !detect_input_pending ()
-		      && NILP (XWINDOW (selected_window)->column_number_displayed)
-		      && NILP (Vexecuting_kbd_macro))
-		    direct_output_forward_char (1);
-		  goto directly_done;
-		}
-	      else if (EQ (Vthis_command, Qbackward_char) && PT > BEGV
-		       && NILP (Vthis_command_keys_shift_translated)
-		       && !CONSP (Vtransient_mark_mode))
-		{
-                  struct Lisp_Char_Table *dp
-		    = window_display_table (XWINDOW (selected_window));
-		  SET_PT (PT - 1);
-		  lose = FETCH_CHAR (PT_BYTE);
-		  if (! NILP (Vpost_command_hook))
-		    goto directly_done;
-		  if (current_buffer == prev_buffer
-		      && last_point_position != PT
-		      && NILP (Vdisable_point_adjustment)
-		      && NILP (Vglobal_disable_point_adjustment))
-		    adjust_point_for_property (last_point_position, 0);
-		  already_adjusted = 1;
-		  if (PT == last_point_position - 1
-		      && (dp
-			  ? (VECTORP (DISP_CHAR_VECTOR (dp, lose))
-			     ? XVECTOR (DISP_CHAR_VECTOR (dp, lose))->size == 1
-			     : (NILP (DISP_CHAR_VECTOR (dp, lose))
-				&& (lose >= 0x20 && lose < 0x7f)))
-			  : (lose >= 0x20 && lose < 0x7f))
-		      && (XFASTINT (XWINDOW (selected_window)->last_modified)
-			  >= MODIFF)
-		      && (XFASTINT (XWINDOW (selected_window)->last_overlay_modified)
-			  >= OVERLAY_MODIFF)
-		      && (XFASTINT (XWINDOW (selected_window)->last_point)
-			  == PT + 1)
-		      && !windows_or_buffers_changed
-		      && EQ (current_buffer->selective_display, Qnil)
-		      && !detect_input_pending ()
-		      && NILP (XWINDOW (selected_window)->column_number_displayed)
-		      && NILP (Vexecuting_kbd_macro))
-		    direct_output_forward_char (-1);
-		  goto directly_done;
-		}
-	      else if (EQ (Vthis_command, Qself_insert_command)
-		       /* Try this optimization only on char keystrokes.  */
-		       && NATNUMP (last_command_event)
-		       && CHAR_VALID_P (XFASTINT (last_command_event), 0))
-		{
-		  unsigned int c
-		    = translate_char (Vtranslation_table_for_input,
-				      XFASTINT (last_command_event));
-		  int value;
-		  if (NILP (Vexecuting_kbd_macro)
-		      && !EQ (minibuf_window, selected_window))
-		    {
-		      if (!nonundocount || nonundocount >= 20)
-			{
-			  Fundo_boundary ();
-			  nonundocount = 0;
-			}
-		      nonundocount++;
-		    }
-
-		  lose = ((XFASTINT (XWINDOW (selected_window)->last_modified)
-			   < MODIFF)
-			  || (XFASTINT (XWINDOW (selected_window)->last_overlay_modified)
-			      < OVERLAY_MODIFF)
-			  || (XFASTINT (XWINDOW (selected_window)->last_point)
-			      != PT)
-			  || MODIFF <= SAVE_MODIFF
-			  || windows_or_buffers_changed
-			  || !EQ (current_buffer->selective_display, Qnil)
-			  || detect_input_pending ()
-			  || !NILP (XWINDOW (selected_window)->column_number_displayed)
-			  || !NILP (Vexecuting_kbd_macro));
-
-		  value = internal_self_insert (c, 0);
-
-		  if (value == 2)
-		    nonundocount = 0;
-
-                  frame_make_pointer_invisible ();
-
-		  if (! NILP (Vpost_command_hook))
-		    /* Put this before calling adjust_point_for_property
-		       so it will only get called once in any case.  */
-		    goto directly_done;
-
-		  /* VALUE == 1 when AFTER-CHANGE functions are
-		     installed which is the case most of the time
-		     because FONT-LOCK installs one.  */
-		  if (!lose && !value)
-		    direct_output_for_insert (c);
-		  goto directly_done;
-		}
-	    }
-
 	  /* Here for a command that isn't executed directly */
 
-          {
 #ifdef HAVE_WINDOW_SYSTEM
             int scount = SPECPDL_INDEX ();
 
@@ -1898,7 +1755,6 @@
               }
 #endif
 
-            nonundocount = 0;
             if (NILP (current_kboard->Vprefix_arg)) /* FIXME: Why?  --Stef  */
               Fundo_boundary ();
             Fcommand_execute (Vthis_command, Qnil, Qnil, Qnil);
@@ -1913,8 +1769,6 @@
             unbind_to (scount, Qnil);
 #endif
           }
-	}
-    directly_done: ;
       current_kboard->Vlast_prefix_arg = Vcurrent_prefix_arg;
 
       /* Note that the value cell will never directly contain nil
--- a/src/menu.c	Wed Mar 31 00:14:29 2010 +0000
+++ b/src/menu.c	Wed Mar 31 06:33:56 2010 +0000
@@ -61,6 +61,10 @@
 #define HAVE_BOXES 1
 #endif
 
+/* The timestamp of the last input event Emacs received from the X server.  */
+/* Defined in keyboard.c.  */
+extern unsigned long last_event_timestamp;
+
 extern Lisp_Object QCtoggle, QCradio;
 
 Lisp_Object menu_items;
@@ -1073,7 +1077,6 @@
   int keymaps = 0;
   int for_click = 0;
   int specpdl_count = SPECPDL_INDEX ();
-  Lisp_Object timestamp = Qnil;
   struct gcpro gcpro1;
 
   if (NILP (position))
@@ -1107,10 +1110,9 @@
 	    for_click = 1;
 	    tem = Fcar (Fcdr (position));  /* EVENT_START (position) */
 	    window = Fcar (tem);	     /* POSN_WINDOW (tem) */
-	    tem = Fcdr (Fcdr (tem));
-	    x = Fcar (Fcar (tem));
-	    y = Fcdr (Fcar (tem));
-	    timestamp = Fcar (Fcdr (tem));
+	    tem = Fcar (Fcdr (Fcdr (tem))); /* POSN_WINDOW_POSN (tem) */
+	    x = Fcar (tem);
+	    y = Fcdr (tem);
 	  }
 
 	/* If a click happens in an external tool bar or a detached
@@ -1318,9 +1320,13 @@
   selection = ns_menu_show (f, xpos, ypos, for_click,
 			    keymaps, title, &error_name);
 #else /* MSDOS and X11 */
+  /* Assume last_event_timestamp is the timestamp of the button event.
+     Is this assumption ever violated?  We can't use the timestamp
+     stored within POSITION because there the top bits from the actual
+     timestamp may be truncated away (Bug#4930).  */
   selection = xmenu_show (f, xpos, ypos, for_click,
 			  keymaps, title, &error_name,
-			  INTEGERP (timestamp) ? XUINT (timestamp) : 0);
+			  last_event_timestamp);
 #endif
 
   UNBLOCK_INPUT;
--- a/src/nsfns.m	Wed Mar 31 00:14:29 2010 +0000
+++ b/src/nsfns.m	Wed Mar 31 06:33:56 2010 +0000
@@ -81,6 +81,7 @@
 extern Lisp_Object Qheight, Qminibuffer, Qname, Qonly, Qwidth;
 extern Lisp_Object Qunsplittable, Qmenu_bar_lines, Qbuffer_predicate, Qtitle;
 extern Lisp_Object Qnone;
+extern Lisp_Object Vframe_title_format;
 
 Lisp_Object Qbuffered;
 Lisp_Object Qfontsize;
@@ -583,6 +584,8 @@
   NSTRACE (x_implicitly_set_name);
   if (FRAME_ICONIFIED_P (f))
     ns_set_name_iconic (f, arg, 0);
+  else if (FRAME_NS_P (f) && EQ (Vframe_title_format, Qt))
+    ns_set_name_as_filename (f);
   else
     ns_set_name (f, arg, 0);
 }
@@ -627,14 +630,14 @@
 
   BLOCK_INPUT;
   pool = [[NSAutoreleasePool alloc] init];
-  name =XBUFFER (buf)->filename;
+  name = XBUFFER (buf)->filename;
   if (NILP (name) || FRAME_ICONIFIED_P (f)) name =XBUFFER (buf)->name;
 
   if (FRAME_ICONIFIED_P (f) && !NILP (f->icon_name))
     name = f->icon_name;
 
   if (NILP (name))
-    name = build_string([ns_app_name UTF8String]);
+    name = build_string ([ns_app_name UTF8String]);
   else
     CHECK_STRING (name);
 
@@ -687,11 +690,14 @@
 {
   NSView *view = FRAME_NS_VIEW (f);
   NSAutoreleasePool *pool;
-  BLOCK_INPUT;
-  pool = [[NSAutoreleasePool alloc] init];
-  [[view window] setDocumentEdited: !NILP (arg)];
-  [pool release];
-  UNBLOCK_INPUT;
+  if (!MINI_WINDOW_P (XWINDOW (f->selected_window)))
+    {
+      BLOCK_INPUT;
+      pool = [[NSAutoreleasePool alloc] init];
+      [[view window] setDocumentEdited: !NILP (arg)];
+      [pool release];
+      UNBLOCK_INPUT;
+    }
 }
 
 
--- a/src/nsterm.h	Wed Mar 31 00:14:29 2010 +0000
+++ b/src/nsterm.h	Wed Mar 31 06:33:56 2010 +0000
@@ -708,6 +708,8 @@
 extern int ns_lisp_to_cursor_type ();
 extern Lisp_Object ns_cursor_type_to_lisp (int arg);
 extern Lisp_Object Qnone;
+extern void ns_set_name_as_filename (struct frame *f);
+extern void ns_set_doc_edited (struct frame *f, Lisp_Object arg);
 
 extern int
 ns_defined_color (struct frame *f, char *name, XColor *color_def, int alloc,
--- a/src/nsterm.m	Wed Mar 31 00:14:29 2010 +0000
+++ b/src/nsterm.m	Wed Mar 31 06:33:56 2010 +0000
@@ -4173,8 +4173,6 @@
   ns_send_appdefined (-2);
 }
 
-extern void update_window_cursor (struct window *w, int on);
-
 - (void)fd_handler: (NSTimer *) fdEntry
 /* --------------------------------------------------------------------------
      Check data waiting on file descriptors and terminate if so
--- a/src/sysdep.c	Wed Mar 31 00:14:29 2010 +0000
+++ b/src/sysdep.c	Wed Mar 31 06:33:56 2010 +0000
@@ -1401,9 +1401,8 @@
 
   if (tty_out->term_initted && no_redraw_on_reenter)
     {
-      /* XXX This seems wrong on multi-tty. */
-      if (display_completed)
-	direct_output_forward_char (0);
+      /* We used to call "direct_output_forward_char(0)" here,
+	 but it's not clear why, since it may not do anything anyway.  */
     }
   else
     {
--- a/src/window.c	Wed Mar 31 00:14:29 2010 +0000
+++ b/src/window.c	Wed Mar 31 06:33:56 2010 +0000
@@ -7380,9 +7380,6 @@
   initial_define_key (global_map, Ctl ('V'), "scroll-up");
   initial_define_key (meta_map, Ctl ('V'), "scroll-other-window");
   initial_define_key (meta_map, 'v', "scroll-down");
-
-  initial_define_key (global_map, Ctl('L'), "recenter");
-  initial_define_key (meta_map, 'r', "move-to-window-line");
 }
 
 /* arch-tag: 90a9c576-0590-48f1-a5f1-6c96a0452d9f
--- a/src/xdisp.c	Wed Mar 31 00:14:29 2010 +0000
+++ b/src/xdisp.c	Wed Mar 31 06:33:56 2010 +0000
@@ -32,9 +32,7 @@
    decides it's time to do it.  This is done either automatically for
    you as part of the interpreter's command loop or as the result of
    calling Lisp functions like `sit-for'.  The C function `redisplay'
-   in xdisp.c is the only entry into the inner redisplay code.  (Or,
-   let's say almost---see the description of direct update
-   operations, below.)
+   in xdisp.c is the only entry into the inner redisplay code.
 
    The following diagram shows how redisplay code is invoked.  As you
    can see, Lisp calls redisplay and vice versa.  Under window systems
@@ -46,12 +44,6 @@
    change the interpreter's state.  If you don't follow these rules,
    you will encounter bugs which are very hard to explain.
 
-	     (Direct functions, see below)
-             direct_output_for_insert,
-             direct_forward_char (dispnew.c)
-   	  +---------------------------------+
-          |                                 |
-	  |                                 V
    +--------------+   redisplay     +----------------+
    | Lisp machine |---------------->| Redisplay code |<--+
    +--------------+   (xdisp.c)     +----------------+   |
@@ -85,28 +77,11 @@
    then compared to find a cheap way to update the display, e.g. by
    reusing part of the display by scrolling lines.
 
-
-   Direct operations.
-
    You will find a lot of redisplay optimizations when you start
    looking at the innards of redisplay.  The overall goal of all these
    optimizations is to make redisplay fast because it is done
    frequently.
 
-   Two optimizations are not found in xdisp.c.  These are the direct
-   operations mentioned above.  As the name suggests they follow a
-   different principle than the rest of redisplay.  Instead of
-   building a desired matrix and then comparing it with the current
-   display, they perform their actions directly on the display and on
-   the current matrix.
-
-   One direct operation updates the display after one character has
-   been entered.  The other one moves the cursor by one position
-   forward or backward.  You find these functions under the names
-   `direct_output_for_insert' and `direct_output_forward_char' in
-   dispnew.c.
-
-
    Desired matrices.
 
    Desired matrices are always built per Emacs window.  The function
@@ -1377,33 +1352,7 @@
 	visible_p = 1;
       if (visible_p)
 	{
-	  if (it_method == GET_FROM_BUFFER)
-	    {
-	      Lisp_Object window, prop;
-
-	      XSETWINDOW (window, w);
-	      prop = Fget_char_property (make_number (charpos),
-					 Qinvisible, window);
-
-	      /* If charpos coincides with invisible text covered with an
-		 ellipsis, use the first glyph of the ellipsis to compute
-		 the pixel positions.  */
-	      if (TEXT_PROP_MEANS_INVISIBLE (prop) == 2)
-		{
-		  struct glyph_row *row = it.glyph_row;
-		  struct glyph *glyph = row->glyphs[TEXT_AREA];
-		  struct glyph *end = glyph + row->used[TEXT_AREA];
-		  int x = row->x;
-
-		  for (; glyph < end
-			 && (!BUFFERP (glyph->object)
-			     || glyph->charpos < charpos);
-		       glyph++)
-		    x += glyph->pixel_width;
-		  top_x = x;
-		}
-	    }
-	  else if (it_method == GET_FROM_DISPLAY_VECTOR)
+	  if (it_method == GET_FROM_DISPLAY_VECTOR)
 	    {
 	      /* We stopped on the last glyph of a display vector.
 		 Try and recompute.  Hack alert!  */
@@ -9787,32 +9736,7 @@
       if (! STRINGP (f->name)
 	  || SBYTES (f->name) != len
 	  || bcmp (title, SDATA (f->name), len) != 0)
-        {
-#ifdef HAVE_NS
-          if (FRAME_NS_P (f))
-            {
-              if (!MINI_WINDOW_P(XWINDOW(f->selected_window)))
-                {
-                  if (EQ (fmt, Qt))
-                    ns_set_name_as_filename (f);
-                  else
-                    x_implicitly_set_name (f, make_string(title, len),
-                                           Qnil);
-                }
-            }
-          else
-#endif
-	    x_implicitly_set_name (f, make_string (title, len), Qnil);
-        }
-#ifdef HAVE_NS
-      if (FRAME_NS_P (f))
-        {
-          /* do this also for frames with explicit names */
-          ns_implicitly_set_icon_type(f);
-          ns_set_doc_edited(f, Fbuffer_modified_p
-                            (XWINDOW (f->selected_window)->buffer), Qnil);
-        }
-#endif
+	x_implicitly_set_name (f, make_string (title, len), Qnil);
     }
 }
 
@@ -9909,6 +9833,11 @@
 #ifdef HAVE_WINDOW_SYSTEM
 	  update_tool_bar (f, 0);
 #endif
+#ifdef HAVE_NS
+          if (windows_or_buffers_changed)
+            ns_set_doc_edited (f, Fbuffer_modified_p
+			       (XWINDOW (f->selected_window)->buffer));
+#endif
 	  UNGCPRO;
 	}
 
@@ -11664,16 +11593,6 @@
   if (!f->glyphs_initialized_p)
     return;
 
-  /* The flag redisplay_performed_directly_p is set by
-     direct_output_for_insert when it already did the whole screen
-     update necessary.  */
-  if (redisplay_performed_directly_p)
-    {
-      redisplay_performed_directly_p = 0;
-      if (!hscroll_windows (selected_window))
-	return;
-    }
-
 #if defined (USE_X_TOOLKIT) || defined (USE_GTK) || defined (HAVE_NS)
   if (popup_activated ())
     return;
@@ -23519,9 +23438,6 @@
 /* Switch the display of W's cursor on or off, according to the value
    of ON.  */
 
-#ifndef HAVE_NS
-static
-#endif
 void
 update_window_cursor (w, on)
      struct window *w;
@@ -24440,7 +24356,8 @@
 #endif
 
   if (NILP (Vmouse_highlight)
-      || !f->glyphs_initialized_p)
+      || !f->glyphs_initialized_p
+      || f->pointer_invisible)
     return;
 
   dpyinfo->mouse_face_mouse_x = x;
--- a/test/ChangeLog	Wed Mar 31 00:14:29 2010 +0000
+++ b/test/ChangeLog	Wed Mar 31 06:33:56 2010 +0000
@@ -1,3 +1,34 @@
+2010-03-29  Chong Yidong  <cyd@stupidchicken.com>
+
+	* cedet/semantic-ia-utest.el
+	(semantic-symref-test-count-hits-in-tag): Add function, from
+	semantic-test.el.
+
+	* cedet/tests/test.cpp:
+	* cedet/tests/test.py:
+	* cedet/tests/teststruct.cpp:
+	* cedet/tests/testtemplates.cpp:
+	* cedet/tests/testusing.cpp:
+	* cedet/tests/scopetest.cpp:
+	* cedet/tests/scopetest.java: Files deleted.
+
+	* cedet/tests/test.make:
+	* cedet/tests/test.c:
+	* cedet/tests/testjavacomp.java:
+	* cedet/tests/testspp.c:
+	* cedet/tests/testsppreplace.c:
+	* cedet/tests/testsppreplaced.c:
+	* cedet/tests/testsubclass.cpp:
+	* cedet/tests/testsubclass.hh:
+	* cedet/tests/testtypedefs.cpp:
+	* cedet/tests/testvarnames.c:
+	* cedet/tests/test.el:
+	* cedet/tests/testdoublens.cpp:
+	* cedet/tests/testdoublens.hpp: Add copyright header.
+
+	* cedet/semantic-tests.el (semanticdb-test-gnu-global):
+	Remove reference to deleted files.
+
 2010-03-30  Juri Linkov  <juri@jurta.org>
 
 	* occur-testsuite.el (occur-tests): Add tests for context lines.
--- a/test/cedet/semantic-ia-utest.el	Wed Mar 31 00:14:29 2010 +0000
+++ b/test/cedet/semantic-ia-utest.el	Wed Mar 31 06:33:56 2010 +0000
@@ -42,10 +42,7 @@
     "tests/testdoublens.cpp"
     "tests/testsubclass.cpp"
     "tests/testtypedefs.cpp"
-    "tests/teststruct.cpp"
-    "tests/testtemplates.cpp"
     "tests/testfriends.cpp"
-    "tests/testusing.cpp"
     "tests/testnsp.cpp"
     "tests/testsppcomplete.c"
     "tests/testvarnames.c"
@@ -419,6 +416,27 @@
 
     ))
 
+(defun semantic-symref-test-count-hits-in-tag ()
+  "Lookup in the current tag the symbol under point.
+Then count all the other references to the same symbol within the
+tag that contains point, and return that."
+  (interactive)
+  (let* ((ctxt (semantic-analyze-current-context))
+	 (target (car (reverse (oref ctxt prefix))))
+	 (tag (semantic-current-tag))
+	 (start (current-time))
+	 (Lcount 0))
+    (when (semantic-tag-p target)
+      (semantic-symref-hits-in-region
+       target (lambda (start end prefix) (setq Lcount (1+ Lcount)))
+       (semantic-tag-start tag)
+       (semantic-tag-end tag))
+      (when (interactive-p)
+	(message "Found %d occurrences of %s in %.2f seconds"
+		 Lcount (semantic-tag-name target)
+		 (semantic-elapsed-time start (current-time))))
+      Lcount)))
+
 (defun semantic-src-utest-buffer-refs ()
   "Run a sym-ref counting unit-test pass in the current buffer."
 
--- a/test/cedet/semantic-tests.el	Wed Mar 31 00:14:29 2010 +0000
+++ b/test/cedet/semantic-tests.el	Wed Mar 31 06:33:56 2010 +0000
@@ -107,53 +107,6 @@
       (data-debug-new-buffer "*SemanticDB Gnu Global Result*")
       (data-debug-insert-thing result "?" ""))))
 
-;;; From semantic-find
-
-(require 'semantic/find)
-
-(defun semantic-find-benchmark ()
-  "Run some simple benchmarks to see how we are doing.
-Optional argument ARG is the number of iterations to run."
-  (interactive)
-  (require 'benchmark)
-  (let ((f-name nil)
-	(b-name nil)
-	(f-comp)
-	(b-comp)
-	(f-regex)
-	)
-    (garbage-collect)
-    (setq f-name
-	  (benchmark-run-compiled
-	      1000 (semantic-find-first-tag-by-name "class3"
-						    "test/test.cpp")))
-    (garbage-collect)
-    (setq b-name
-	  (benchmark-run-compiled
-	      1000 (semantic-brute-find-first-tag-by-name "class3"
-							  "test/test.cpp")))
-    (garbage-collect)
-    (setq f-comp
-	  (benchmark-run-compiled
-	      1000 (semantic-find-tags-for-completion "method"
-						      "test/test.cpp")))
-    (garbage-collect)
-    (setq b-comp
-	  (benchmark-run-compiled
-	      1000 (semantic-brute-find-tag-by-name-regexp "^method"
-							   "test/test.cpp")))
-    (garbage-collect)
-    (setq f-regex
-	  (benchmark-run-compiled
-	      1000 (semantic-find-tags-by-name-regexp "^method"
-						      "test/test.cpp")))
-
-    (message "Name [new old] [ %.3f %.3f ] Complete [newc/new old] [ %.3f/%.3f %.3f ]"
-	     (car f-name) (car b-name)
-	     (car f-comp) (car f-regex)
-	     (car b-comp))
-  ))
-
 ;;; From semantic-format
 
 (require 'semantic/format)
--- a/test/cedet/tests/scopetest.cpp	Wed Mar 31 00:14:29 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-/* Test scoping rules for c++ in the analyzer. */
-
-namespace {
-
-  class aclass2;  // Forward reference.
-
-  class aclass1 {
-  private:
-    int attrp1;
-    int amethodp1(int argp1);
-    aclass2 areference;
-  protected:
-    int attrpr1;
-  public:
-    int attr1;
-    int amethod1(int arg1);
-  };
-}
-
-namespace {
-  class aclass2 : public aclass1
-  {
-  private:
-    int attrp2;
-    int amethodp2(int argp1);
-  public:
-    aclass2(int aninitvalue);
-    ~aclass2();
-    int attr2;
-    int amethod2(int arg2);
-  };
-}
-
-aclass2::aclass2(init aninitvalue)
-{
-  /* This is a comment that talks about aclass1 */
-  aclass1;
-}
-
-int aclass2::amethod2(int arg2)
-{
-  int alocalvar;
-  float q;
-
-  ac;
-}
-
-// arch-tag: 9336063c-6b2e-4677-a390-d2dd091a2474
--- a/test/cedet/tests/scopetest.java	Wed Mar 31 00:14:29 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-class Foo {
-
-   public void a1() {}
-
-   class Bar {
-
-     public int a2() {}
-
-     public void b() {
-	 a   // -1-
-     }
-
-     class Baz {
-
-       public int a3() {}
-
-       public Baz(int a4) {
-	   a  // -2-
-       }
-
-     }
-
-   }
-
-}
\ No newline at end of file
--- a/test/cedet/tests/templates.cpp	Wed Mar 31 00:14:29 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,130 +0,0 @@
-// C++ examples and requests from Klaus Berndl
-
-// template in a unnamed namespace
-namespace
-{
-  template<typename Target, typename Source>
-  Target lexical_cast(Source arg)
-  {
-    std::stringstream interpreter;
-    Target result;
-
-    if(!(interpreter << arg) || !(interpreter >> result) ||
-       !(interpreter >> std::ws).eof())
-      throw bad_lexical_cast();
-    
-    return result;
-  }
-}
-
-
-template <class T, FOO> class Vector
-{
-private:
-  static T* v;
-  int sz;
-
-public:
-  T& elem(int i) {return v[i];}
-  virtual ~Vector ();
-
-protected:
-  Vector ();
-};
-
-template <> class Vector <void*>
-{
-private:
-  void** v;
-  int sz;
-
-public:
-  Vector ();
-  virtual int func1(int i);
-  virtual int func2(int i) = 0;
-  static virtual int func3(int i) = 0;
-  void*& elem(int i) {return v[i];}
-  //...
-};
-
-// template contains namespace
-typedef vector<CzkUtilities::Action*> ActionList;
-
-// declaration of some template-types
-map<XXX, Test::YYY>** map_var;
-
-map_with_size<XXX, Test::YYY, size> map_size_var;
-typedef map_with_size<XXX, Test::YYY, size> SizedMap;
-
-map_with_10_size<XXX, Test::YYY, 10>* pMap_size10_var;
-typedef map_with_10_size<XXX, Test::YYY, 10> Size10Map;
-
-// a function which such a template-argument
-void* test_function(map<ClassX, Test::ClassY, 10>* pMap);
-
-
-template <class T> class Vector <T*> : private Vector <void*>
-{
-public:
-	typedef Vector <void*> Base;
-
-	Vector () : Base() {}
-
-	T*& elem(int i) {return static_cast<T*&>(Base::elem(i));}
-	//...
-};
-
-// outside method implementation of a template-class
-template<class T> T& Vector<T*>::elem(int i)
-{
-  return C;
-}
-
-// same but qualified with a namespace Testnamespace
-template<class T> T& Testnamespace::Vector<T*>::elem(int i)
-{
-  return C;
-}
-
-// function templates with keyword typename
-template<typename Target, typename Source>
-Target lexical_cast(Source arg)
-{
-  std::stringstream interpreter;
-  Target result;
-
-  if(!(interpreter << arg) || !(interpreter >> result) ||
-     !(interpreter >> std::ws).eof())
-    throw bad_lexical_cast();
-    
-  return result;
-}
-
-template<class T>
-static
-typename T::_ptr_type
-getService(const std::string& pServiceName, const int pRetries=20)
-{
-  return T::_narrow(getServiceObject(pServiceName, pRetries));
-}
-
-// function template declaration
-template<class T> void sort(vector<T>&);
-// complex function template definition
-template<class T, class S, const NamespaceY::ClassX<TestClass, &s> volatile ***&i>
-map<ClassY, ClassX, 10>
-sort(const vector<T>& v)
-{
-  return;
-}
-
-// variable declarations of template-types
-foo<TClass, Testnamespace::XClass, i> *bar1;
-foo<TClass, Testnamespace::XClass, **&i> *bar2;
-foo<TClass, Testnamespace::XClass, *Namespace::ClassX::i> bar3;
-foo<0> bar0;
-
-class SomeName;
-class OtherName;
-
-// arch-tag: 55ff74de-74dc-44ad-8252-50dc5f3492c3
--- a/test/cedet/tests/test.c	Wed Mar 31 00:14:29 2010 +0000
+++ b/test/cedet/tests/test.c	Wed Mar 31 06:33:56 2010 +0000
@@ -1,6 +1,29 @@
-/* Test file for C language.
- * Attempt to include as many aspects of the C language as possible.
+/* test.c --- Semantic unit test for C.
+
+   Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
+   2010 Free Software Foundation, Inc.
+
+   Author: Eric M. Ludlam <eric@siege-engine.com>
+
+   This file is part of GNU Emacs.
+
+   GNU Emacs is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 of the License, or
+   (at your option) any later version.
+
+   GNU Emacs is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+/* Attempt to include as many aspects of the C language as possible.
  */
+
 /* types of include files */
 #include "includeme1.h"
 #include <includeme2.h>
--- a/test/cedet/tests/test.cpp	Wed Mar 31 00:14:29 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,592 +0,0 @@
-/* Test file for C++ language.
- * Attempt to include as many aspects of the C++ language as possible.
- * Do not include things tested in test.c since that shares the
- * same language.
- */
-
-/* An include test */
-#include <stdio.h>
-
-#include <cmath>
-
-#include "c++-test.hh"
-
-#include <c++-test.hh>
-
-double var1 = 1.2;
-
-int simple1(int a) {
-
-}
-
-struct foo1 {
-  int test;
-};
-
-struct foo2 : public foo1 {
-  const int foo21(int a, int b);
-  const int foo22(int a, int b) { return 1 }
-};
-
-/* Classes */
-class class1 {
-private:
-  int var11;
-  struct foo1 var12;
-public:
-  int p_var11;
-  struct foo p_var12;
-};
-
-class i_class1 : public class1 {
-private:
-  int var11;
-  struct foo var12;
-public:
-  int p_var11;
-  struct foo p_var12;
-};
-
-class class2 {
-private:
-  int var21;
-  struct foo var22;
-public:
-  int p_var21;
-  struct foo p_var22;
-};
-
-class i_class2 : public class1, public class2 {
-private:
-  int var21;
-  struct foo var22;
-protected:
-  int pt_var21;
-public:
-  int p_var21;
-  struct foo p_var22;
-};
-
-class class3 {
-  /* A class with strange things in it */
-public:
-  class3(); /* A constructor */
-  enum embedded_foo_enum {
-    a, b, c
-  } embed1;
-  struct embedded_bar_struct {
-    int a;
-    int b;
-  } embed2;
-  class embedded_baz_class {
-    embedded_baz_class();
-    ~embedded_baz_class();
-  } embed3;
-  ~class3(); /* destructor */
-  
-  /* Methods */
-  int method_for_class3(int a, char b);
-
-  int inline_method(int c) { return c; }
-
-  /* Operators */
-  class3& operator^= (const class3& something);
-
-  /* Funny declmods */
-  const class3 * const method_const_ptr_ptr(const int * const argconst) const = 0;
-};
-
-class3::class3()
-{
-  /* Constructor outside the definition. */
-}
-
-int class3::method_for_class3(int a, char b)
-{
-}
-
-int class3::method1_for_class3( int a, int &b)
-{
-  int cvariablename;
-  class3 fooy[];
-  class3 moose = new class3;
-
-  // Complktion testing line should find external members.
-  a = fooy[1].me ;
-  b = cv ;
-
-  if (fooy.emb) {
-    simple1(c);
-  }
-
-  cos(10);
-  abs(10);
-
-  return 1;
-}
-
-char class3::method2_for_class3( int a, int b) throw ( exception1 )
-{
-  return 'a';
-}
-
-void *class3::method3_for_class3( int a, int b) throw ( exception1, exception2 )
-{
-  int q = a;
-  return "Moose";
-}
-
-void *class3::method31_for_class3( int a, int b) throw ( )
-{
-  int q = a;
-  return "Moose";
-}
-
-void *class3::method4_for_class3( int a, int b) reentrant
-{
-  class3 ct;
-
-  ct.method5_for_class3(1,a);
-
-  pritf();
-}
-
-/*
- * A method on class3.
- */
-void *class3::method5_for_class3( int a, int b) const
-{
-}
-
-/*
- * Namespace parsing tests
- */
-namespace NS {
-  class class_in_namespace {
-    int equiv(const NS::class_in_namespace *) const;
-  };
-}
-
-int NS::class_in_namespace::equiv(const NS::class_in_namespace *cin) const
-{
-  return 0;
-}
-
-// Stuff Klaus found.
-// Inheritance w/out a specifying for public.
-class class4 : class1 {
-  // Pure virtual methods.
-  void virtual print () const = 0;
-
-public:
-  // The whacky constructor type
-  class4()
-    try : class1(args)
-  {
-    // constructor body	
-  }
-  catch ()
-    {
-      
-    }
-  
-
-};
-
-class class5 : public virtual class4 {
-  // Virtual inheritance
-};
-
-class class6 : class1 {
-  // Mutable
-  mutable int i;
-};
-
-/* Namespaces */
-namespace namespace1 {
-  void ns_method1() { }
-
-  class n_class1 {
-  public:
-    void method11(int a) { }
-  };
-
-  /* This shouldn't parse due to missing semicolon. */
-  class _n_class2 : public n_class1 {
-    void n_c2_method1(int a, int b) { }
-  };
-
-  // Macros in the namespace
-#define NSMACRO 1
-
-  // Template in the namespace
-  template<class T> T nsti1(const Foo& foo);
-  template<> int nsti1<int>(const Foo& foo);
-    
-}
-
-namespace namespace2 {
-
-  using namespace1::n_class1;
-
-}
-
-/* Initializers */
-void tinitializers1(): inita1(False),
-		       inita2(False)
-{
-  inita1= 1;
-}
-
-/* How about Extern C type things. */
-int funny_prototype(int ,int b,float c)
-{
-
-}
-
-extern "C"
-int extern_c_1(int a, int b)
-{
-
-  funny_prototype(1,2,3.4);
-
-  printf("Moose", );
-
-  return 1;
-}
-
-extern "C" {
-
-  int extern_c_2(int a, int b)
-  {
-    return 1;
-  }
-
-}
-
-// Some operator stuff
-class Action
-{
-  // Problems!! operator() and operator[] can not be parsed with semantic
-  // 1.4.2 but with latest c.by
-  virtual void operator()(int i, char *p ) = 0;
-  virtual String& operator[]() = 0;
-  virtual void operator!() = 0;
-  virtual void operator->() = 0;
-  virtual T& operator+=();
-  virtual T& operator*();
-  virtual T& operator*=();
-};
-
-// class with namespace qualified parents
-class Multiinherit : public virtual POA::Parent,
-                     public virtual POA::Parent1,
-                     Parent
-{
-private:
-  int i;
-
-public:
-  Multiinherit();
-  ~Multiinherit();
-
-  // method with a list of qualified exceptions
-  void* throwtest()
-    throw(Exception0,
-          Testnamespace::Exception1,
-          Testnamespace::Excpetion2,
-          Testnamespace::testnamespace1::Exception3);
-  
-};
-
-void*
-Multiinherit::throwtest()
-  throw (Exception0,
-         Testnamespace::Exception1,
-         Testnamespace::Excpetion2,
-         Testnamespace::testnamespace1::Exception3)
-{
-  return;
-}
-
-// Jens Rock <jens.rock@asamnet.de>: Nested classes or structs defined
-// outside of the containing class/struct.
-class container
-{
- public:
-  struct contained;
-  container();
-  ~container();
-};
-
-struct container::contained
-{
-  public:
-  contained();
-  ~contained();
-};
-
-/*
- * Ok, how about some template stuff.
- */
-template <class CT, class container = vector<CT> >
-const CT& max (const CT& a, const CT& b)
-{
-  return a < b ? b : a;
-}
-
-// Arne Schmitz found this one
-std::vector<int> &a, &b, &c;
-
-class TemplateUsingClass
-{
-  typedef TestClassMap::iterator iterator;
-  typedef map<long, long> TestClassMap;
-
-  // typedefs with const and volatile
-  typedef const map<long, long> const_TestClassMap;
-  typedef TestClassMap<string>::iterator volatile volatile_iterator;
-
-  map<int, int> mapclassvarthingy;
-};
-
-template<class T> T ti1(const Foo& foo);
-template<> int ti1<int>(const Foo& foo);
-
-
-// -----------------------------------
-// Now some namespace and related stuff
-// -----------------------------------
-
-using CORBA::LEX::get_token;
-using Namespace1;
-
-using namespace POA::std;
-using namespace Test;
-
-
-
-namespace Parser
-{
-  namespace
-  {
-    using Lexer::get_test;
-    string str = "";
-  }
-  
-  namespace XXX
-  {
-    
-    class Foobar : public virtual POA::Parent,
-                   public virtual POA::Parent1,
-                   private POA::list<fact>,
-                   private map<string>
-    {
-      ini i;
-      list <shared_ptr<item> >::const_iterator l;
-    public:
-      
-      Foobar();
-      ~Foobar();
-    };
-  }
-  
-
-  void test_function(int i);
-    
-};
-
-// unnamed namespaces - even nested
-namespace
-{
-  namespace
-  {
-    using Lexer::get_test;
-    string str = "";
-  }
-
-  // some builtin types
-  long long ll = 0;
-  long double d = 0.0;
-  unsigned test;
-  unsigned long int **uli = 0;
-  signed si = 0;
-  signed short ss = 0;
-  short int i = 0;
-  long int li = 0;
-  
-  // expressions with namespace/class-qualifyiers
-  ORB_var cGlobalOrb = ORB::_nil();
-  ORB_var1 cGlobalOrb1 = ORB::_test;
-
-  class Testclass
-  {
-    #define TEST 0
-    ini i;
-
-  public:
-
-    Testclass();
-    ~Testclass();
-  };
-
-  static void test_function(unsigned int i);
-
-};
-
-
-// outside method implementations which should be grouped to type Test
-XXX&
-Test::waiting()
-{
-  return;
-}
-
-void
-Test::print()
-{
-  return;
-}
-
-// outside method implementations with namespaces which should be grouped to
-// their complete (incl. namespace) types
-void*
-Parser::XXX::Foobar::wait(int i, const char const * const * p)
-{
-  return;
-}
-
-void*
-Namespace1::Test::wait1(int i)
-{
-  return;
-}
-
-int
-Namespace1::Test::waiting(int i)
-{
-  return;
-}
-
-// a class with some outside implementations which should all be grouped to
-// this class declaration
-class ClassWithExternals
-{
-private:
-  int i;
-
-public:
-  ClassWithExternals();
-  ~ClassWithExternals();
-  void non_nil();
-};
-
-
-// Foobar is not displayed; seems that semantic tries to add this to the class
-// Foobar but can not find/display it, because contained in the namespace above.
-void
-Foobar::non_nil()
-{
-  return;
-}
-
-// are correctly grouped to the ClassWithExternals class
-void
-ClassWithExternals::non_nil()
-{
-  String s = "lödfjg dlfgkdlfkgjdl";
-  return;
-}
-
-ClassWithExternals::ClassWithExternals()
-{
-  return;
-}
-
-void
-ClassWithExternals::~ClassWithExternals()
-{
-  return;
-}
-
-
-// -------------------------------
-// Now some macro and define stuff
-// -------------------------------
-
-#define TEST 0
-#define TEST1 "String"
-
-// The first backslash makes this macro unmatched syntax with semantic 1.4.2!
-// With flexing \+newline as nothing all is working fine!
-#define MZK_ENTER(METHOD) \
-{ \
-  CzkMethodLog lMethodLog(METHOD,"Framework");\
-}
-
-#define ZK_ASSERTM(METHOD,ASSERTION,MESSAGE) \
-   { if(!(ASSERTION))\
-      {\
-	std::ostringstream lMesgStream; \
-        lMesgStream << "Assertion failed: " \
-	<< MESSAGE; \
-        CzkLogManager::doLog(CzkLogManager::FATAL,"",METHOD, \
-        "Assert",lMesgStream); \
-        assert(ASSERTION);\
-      }\
-   }
-
-// Test if not newline-backslashes are handled correctly
-string s = "My \"quoted\" string";
-
-// parsed fine as macro
-#define FOO (arg) method(arg, "foo");
-
-// With semantic 1.4.2 this parsed as macro BAR *and* function method.
-// With latest c.bnf at least one-liner macros can be parsed correctly.
-#define BAR (arg) CzkMessageLog method(arg, "bar");
-
-// some const and volatile stuff
-char * p1 = "Hello"; // 1. variable Pointer, variable Data
-const char * p2 = "Hello"; // 2. variable pointer, constant data
-char * const p3 = "Hello"; // 3. constant pointer, variable data
-const char * const p4 = "Hello"; // 4. constant pointer, constant data
-
-// Case 2 and 4 can exchange first "const" and "char"
-char const * p21 = "Hello"; // variable pointer, constant data
-char const * const p41 = "Hello"; // constant pointer, constant data
-
-char volatile a = 0; // a volatile char
-void foo(bar const &arg); // a reference to a const bar
-int foobar(bar const * const p); // a const pointer to a const bar
-int foobar(bar const volatile * const p); // a const pointer to a const bar
-int foobar3(char* p); // a const pointer to a const bar
-
-// Should not be parsed because this is invalid code
-int const & const r3 = i;
-
-boolean i = 0;
-boolean & r1 = i;
-boolean const & r2 = i;
-
-// const * sequences can be very long in C++ ;-)
-char const * const * const * const * ppp;
-
-// complex function declarationen with named pointer-arguments
-const char** foobar1(volatile char const * const **p);
-const char** foobar11(volatile Test::Namespace::Char<char*> const * const **p);
-
-// complex function declarationen with unnamed pointer-arguments
-const char* foobar2(const char***);
-const char* foobar21(const Test::Namespace::Char<char>***);
-
-// string literal parsing even with wchar_t
-char const *p = "string1";
-char const *q = "string1" "str\"ing2" "string3";
-wchar_t testc = L'a';
-
-wchar_t const *wp = L"string with a \" in it";
-wchar_t const *wq = L"string \n\t\"test" L"string2";
-wchar_t const *wr = L"string L";
-
-// arch-tag: 59828880-d72f-4059-922f-89579edf9e58
--- a/test/cedet/tests/test.el	Wed Mar 31 00:14:29 2010 +0000
+++ b/test/cedet/tests/test.el	Wed Mar 31 06:33:56 2010 +0000
@@ -1,6 +1,24 @@
-;; Test file for Emacs Lisp.
-;; Attempt to include as many aspects of Emacs Lisp as possible.
-;;
+;;; test.el --- Unit test file for Semantic Emacs Lisp support.
+
+;; Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010
+;;   Free Software Foundation, Inc.
+
+;; Author: Eric M. Ludlam <eric@siege-engine.com>
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 
 ;;; Require
 ;;
@@ -88,7 +106,7 @@
 (autoload (quote a-autoload) "somefile"
   "Non-interactive autoload." nil nil)
 
-(autoload (quote a-autoload-interactive) "somefile" 
+(autoload (quote a-autoload-interactive) "somefile"
 "Interactive autoload." t nil)
 
 
@@ -116,7 +134,7 @@
   (slot-1 :equal 'eq)
   slot-2)
 
-(defstruct test-struct-2 
+(defstruct test-struct-2
   slot-1
   slot-2)
 
--- a/test/cedet/tests/test.make	Wed Mar 31 00:14:29 2010 +0000
+++ b/test/cedet/tests/test.make	Wed Mar 31 06:33:56 2010 +0000
@@ -1,4 +1,23 @@
-# Test makefile -*- makefile -*-
+# test.make --- Semantic unit test for Make -*- makefile -*-
+
+# Copyright (C) 2001, 2002, 2010 Free Software Foundation, Inc.
+
+# Author: Eric M. Ludlam <eric@siege-engine.com>
+
+# This file is part of GNU Emacs.
+
+# GNU Emacs is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU Emacs is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 
 top=
 ede_FILES=Project.ede Makefile
--- a/test/cedet/tests/test.py	Wed Mar 31 00:14:29 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,580 +0,0 @@
-# Test file for Python language.
-#
-
-# Simle class compount statement with blank lines sprinkled.
-class Foo(Bar):
-
-    x = 1
-
-    y = 2
-
-# Simple def statement with no argument
-def sss():
-    i = 1
-
-# Simple def statement with arguments
-def ttt(x,y,z):
-    i = 1
-
-import foo
-
-for x in y:
-    print x
-
-while y > 0:
-    y = y - 1
-
-a=b=c=d=e=f=i=j=k=l=m=n=o=p=q=r=s=t=x=y=1
-
-if x:
-    x = 2
-    y = 3
-
-x = 2
-y = 3
-s and t
-q | r
-o ^ p
-m & n
-k << l
-z = 4
-i >> j
-e / f
-c * d
-a + b
-2 ** 5
-x
-s = "a" "b" "c"
-1
-
-# implicit continuation lines, see
-# http://docs.python.org/ref/implicit-joining.html
-
-a_list = [ 1, 2, 3,
-           4, 5,
-                 6 ]
-
-a_tuple = (1, 2, 3,
-
-           4, 5, 6)
-
-a_hash = { 'a':1, "b":2,
-           'c' : 3,
-           "d" : 4 }
-
-
-def longarglist(a,
-                b,
-                c,
-                d):
-    a=1;
-    b=1;
-    c=1;
-    d=1;
-
-class longclasslist(xx.yyy,
-                    zz.aa):
-    foo=1
-                    
-
-# wisent-python.wy chokes on this! -ryk 6/17/02
-
-class HTTPServer(xxx.yyy):
-    allow_reuse_address = 1    # Seems to make sense in testing environment
-    def server_bind(self):
-        SocketServer.TCPServer.server_bind(self)
-        host, port = self.socket.getsockname()
-        self.server_name = socket.getfqdn(host)
-        self.server_port = port
-
-
-#########################################################################
-### /usr/lib/python2.2/BaseHTTPServer.py
-#########################################################################
-
-"""HTTP server base class.
-
-Note: the class in this module doesn't implement any HTTP request; see
-SimpleHTTPServer for simple implementations of GET, HEAD and POST
-(including CGI scripts).
-
-Contents:
-
-- BaseHTTPRequestHandler: HTTP request handler base class
-- test: test function
-
-XXX To do:
-
-- send server version
-- log requests even later (to capture byte count)
-- log user-agent header and other interesting goodies
-- send error log to separate file
-- are request names really case sensitive?
-
-"""
-
-
-# See also:
-#
-# HTTP Working Group                                        T. Berners-Lee
-# INTERNET-DRAFT                                            R. T. Fielding
-# <draft-ietf-http-v10-spec-00.txt>                     H. Frystyk Nielsen
-# Expires September 8, 1995                                  March 8, 1995
-#
-# URL: http://www.ics.uci.edu/pub/ietf/http/draft-ietf-http-v10-spec-00.txt
-
-
-# Log files
-# ---------
-#
-# Here's a quote from the NCSA httpd docs about log file format.
-#
-# | The logfile format is as follows. Each line consists of:
-# |
-# | host rfc931 authuser [DD/Mon/YYYY:hh:mm:ss] "request" ddd bbbb
-# |
-# |        host: Either the DNS name or the IP number of the remote client
-# |        rfc931: Any information returned by identd for this person,
-# |                - otherwise.
-# |        authuser: If user sent a userid for authentication, the user name,
-# |                  - otherwise.
-# |        DD: Day
-# |        Mon: Month (calendar name)
-# |        YYYY: Year
-# |        hh: hour (24-hour format, the machine's timezone)
-# |        mm: minutes
-# |        ss: seconds
-# |        request: The first line of the HTTP request as sent by the client.
-# |        ddd: the status code returned by the server, - if not available.
-# |        bbbb: the total number of bytes sent,
-# |              *not including the HTTP/1.0 header*, - if not available
-# |
-# | You can determine the name of the file accessed through request.
-#
-# (Actually, the latter is only true if you know the server configuration
-# at the time the request was made!)
-
-
-__version__ = "0.2"
-
-__all__ = ["HTTPServer", "BaseHTTPRequestHandler"]
-
-import sys
-import time
-import socket # For gethostbyaddr()
-import mimetools
-import SocketServer
-
-# Default error message
-DEFAULT_ERROR_MESSAGE = """\
-<head>
-<title>Error response</title>
-</head>
-<body>
-<h1>Error response</h1>
-<p>Error code %(code)d.
-<p>Message: %(message)s.
-<p>Error code explanation: %(code)s = %(explain)s.
-</body>
-"""
-
-
-class HTTPServer(SocketServer.TCPServer):
-
-    allow_reuse_address = 1    # Seems to make sense in testing environment
-
-    def server_bind(self):
-        """Override server_bind to store the server name."""
-        SocketServer.TCPServer.server_bind(self)
-        host, port = self.socket.getsockname()
-        self.server_name = socket.getfqdn(host)
-        self.server_port = port
-
-
-class BaseHTTPRequestHandler(SocketServer.StreamRequestHandler):
-
-    """HTTP request handler base class.
-
-    The following explanation of HTTP serves to guide you through the
-    code as well as to expose any misunderstandings I may have about
-    HTTP (so you don't need to read the code to figure out I'm wrong
-    :-).
-
-    HTTP (HyperText Transfer Protocol) is an extensible protocol on
-    top of a reliable stream transport (e.g. TCP/IP).  The protocol
-    recognizes three parts to a request:
-
-    1. One line identifying the request type and path
-    2. An optional set of RFC-822-style headers
-    3. An optional data part
-
-    The headers and data are separated by a blank line.
-
-    The first line of the request has the form
-
-    <command> <path> <version>
-
-    where <command> is a (case-sensitive) keyword such as GET or POST,
-    <path> is a string containing path information for the request,
-    and <version> should be the string "HTTP/1.0".  <path> is encoded
-    using the URL encoding scheme (using %xx to signify the ASCII
-    character with hex code xx).
-
-    The protocol is vague about whether lines are separated by LF
-    characters or by CRLF pairs -- for compatibility with the widest
-    range of clients, both should be accepted.  Similarly, whitespace
-    in the request line should be treated sensibly (allowing multiple
-    spaces between components and allowing trailing whitespace).
-
-    Similarly, for output, lines ought to be separated by CRLF pairs
-    but most clients grok LF characters just fine.
-
-    If the first line of the request has the form
-
-    <command> <path>
-
-    (i.e. <version> is left out) then this is assumed to be an HTTP
-    0.9 request; this form has no optional headers and data part and
-    the reply consists of just the data.
-
-    The reply form of the HTTP 1.0 protocol again has three parts:
-
-    1. One line giving the response code
-    2. An optional set of RFC-822-style headers
-    3. The data
-
-    Again, the headers and data are separated by a blank line.
-
-    The response code line has the form
-
-    <version> <responsecode> <responsestring>
-
-    where <version> is the protocol version (always "HTTP/1.0"),
-    <responsecode> is a 3-digit response code indicating success or
-    failure of the request, and <responsestring> is an optional
-    human-readable string explaining what the response code means.
-
-    This server parses the request and the headers, and then calls a
-    function specific to the request type (<command>).  Specifically,
-    a request SPAM will be handled by a method do_SPAM().  If no
-    such method exists the server sends an error response to the
-    client.  If it exists, it is called with no arguments:
-
-    do_SPAM()
-
-    Note that the request name is case sensitive (i.e. SPAM and spam
-    are different requests).
-
-    The various request details are stored in instance variables:
-
-    - client_address is the client IP address in the form (host,
-    port);
-
-    - command, path and version are the broken-down request line;
-
-    - headers is an instance of mimetools.Message (or a derived
-    class) containing the header information;
-
-    - rfile is a file object open for reading positioned at the
-    start of the optional input data part;
-
-    - wfile is a file object open for writing.
-
-    IT IS IMPORTANT TO ADHERE TO THE PROTOCOL FOR WRITING!
-
-    The first thing to be written must be the response line.  Then
-    follow 0 or more header lines, then a blank line, and then the
-    actual data (if any).  The meaning of the header lines depends on
-    the command executed by the server; in most cases, when data is
-    returned, there should be at least one header line of the form
-
-    Content-type: <type>/<subtype>
-
-    where <type> and <subtype> should be registered MIME types,
-    e.g. "text/html" or "text/plain".
-
-    """
-
-    # The Python system version, truncated to its first component.
-    sys_version = "Python/" + sys.version.split()[0]
-
-    # The server software version.  You may want to override this.
-    # The format is multiple whitespace-separated strings,
-    # where each string is of the form name[/version].
-    server_version = "BaseHTTP/" + __version__
-
-    def parse_request(self):
-        """Parse a request (internal).
-
-        The request should be stored in self.raw_request; the results
-        are in self.command, self.path, self.request_version and
-        self.headers.
-
-        Return value is 1 for success, 0 for failure; on failure, an
-        error is sent back.
-
-        """
-        self.request_version = version = "HTTP/0.9" # Default
-        requestline = self.raw_requestline
-        if requestline[-2:] == '\r\n':
-            requestline = requestline[:-2]
-        elif requestline[-1:] == '\n':
-            requestline = requestline[:-1]
-        self.requestline = requestline
-        words = requestline.split()
-        if len(words) == 3:
-            [command, path, version] = words
-            if version[:5] != 'HTTP/':
-                self.send_error(400, "Bad request version (%s)" % `version`)
-                return 0
-        elif len(words) == 2:
-            [command, path] = words
-            if command != 'GET':
-                self.send_error(400,
-                                "Bad HTTP/0.9 request type (%s)" % `command`)
-                return 0
-        else:
-            self.send_error(400, "Bad request syntax (%s)" % `requestline`)
-            return 0
-        self.command, self.path, self.request_version = command, path, version
-        self.headers = self.MessageClass(self.rfile, 0)
-        return 1
-
-    def handle(self):
-        """Handle a single HTTP request.
-
-        You normally don't need to override this method; see the class
-        __doc__ string for information on how to handle specific HTTP
-        commands such as GET and POST.
-
-        """
-
-        self.raw_requestline = self.rfile.readline()
-        if not self.parse_request(): # An error code has been sent, just exit
-            return
-        mname = 'do_' + self.command
-        if not hasattr(self, mname):
-            self.send_error(501, "Unsupported method (%s)" % `self.command`)
-            return
-        method = getattr(self, mname)
-        method()
-
-    def send_error(self, code, message=None):
-        """Send and log an error reply.
-
-        Arguments are the error code, and a detailed message.
-        The detailed message defaults to the short entry matching the
-        response code.
-
-        This sends an error response (so it must be called before any
-        output has been generated), logs the error, and finally sends
-        a piece of HTML explaining the error to the user.
-
-        """
-
-        try:
-            short, long = self.responses[code]
-        except KeyError:
-            short, long = '???', '???'
-        if not message:
-            message = short
-        explain = long
-        self.log_error("code %d, message %s", code, message)
-        self.send_response(code, message)
-        self.send_header("Content-Type", "text/html")
-        self.end_headers()
-        self.wfile.write(self.error_message_format %
-                         {'code': code,
-                          'message': message,
-                          'explain': explain})
-
-    error_message_format = DEFAULT_ERROR_MESSAGE
-
-    def send_response(self, code, message=None):
-        """Send the response header and log the response code.
-
-        Also send two standard headers with the server software
-        version and the current date.
-
-        """
-        self.log_request(code)
-        if message is None:
-            if self.responses.has_key(code):
-                message = self.responses[code][0]
-            else:
-                message = ''
-        if self.request_version != 'HTTP/0.9':
-            self.wfile.write("%s %s %s\r\n" %
-                             (self.protocol_version, str(code), message))
-        self.send_header('Server', self.version_string())
-        self.send_header('Date', self.date_time_string())
-
-    def send_header(self, keyword, value):
-        """Send a MIME header."""
-        if self.request_version != 'HTTP/0.9':
-            self.wfile.write("%s: %s\r\n" % (keyword, value))
-
-    def end_headers(self):
-        """Send the blank line ending the MIME headers."""
-        if self.request_version != 'HTTP/0.9':
-            self.wfile.write("\r\n")
-
-    def log_request(self, code='-', size='-'):
-        """Log an accepted request.
-
-        This is called by send_reponse().
-
-        """
-
-        self.log_message('"%s" %s %s',
-                         self.requestline, str(code), str(size))
-
-    def log_error(self, *args):
-        """Log an error.
-
-        This is called when a request cannot be fulfilled.  By
-        default it passes the message on to log_message().
-
-        Arguments are the same as for log_message().
-
-        XXX This should go to the separate error log.
-
-        """
-
-        apply(self.log_message, args)
-
-    def log_message(self, format, *args):
-        """Log an arbitrary message.
-
-        This is used by all other logging functions.  Override
-        it if you have specific logging wishes.
-
-        The first argument, FORMAT, is a format string for the
-        message to be logged.  If the format string contains
-        any % escapes requiring parameters, they should be
-        specified as subsequent arguments (it's just like
-        printf!).
-
-        The client host and current date/time are prefixed to
-        every message.
-
-        """
-
-        sys.stderr.write("%s - - [%s] %s\n" %
-                         (self.address_string(),
-                          self.log_date_time_string(),
-                          format%args))
-
-    def version_string(self):
-        """Return the server software version string."""
-        return self.server_version + ' ' + self.sys_version
-
-    def date_time_string(self):
-        """Return the current date and time formatted for a message header."""
-        now = time.time()
-        year, month, day, hh, mm, ss, wd, y, z = time.gmtime(now)
-        s = "%s, %02d %3s %4d %02d:%02d:%02d GMT" % (
-                self.weekdayname[wd],
-                day, self.monthname[month], year,
-                hh, mm, ss)
-        return s
-
-    def log_date_time_string(self):
-        """Return the current time formatted for logging."""
-        now = time.time()
-        year, month, day, hh, mm, ss, x, y, z = time.localtime(now)
-        s = "%02d/%3s/%04d %02d:%02d:%02d" % (
-                day, self.monthname[month], year, hh, mm, ss)
-        return s
-
-    weekdayname = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
-
-    monthname = [None,
-                 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
-                 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
-
-    def address_string(self):
-        """Return the client address formatted for logging.
-
-        This version looks up the full hostname using gethostbyaddr(),
-        and tries to find a name that contains at least one dot.
-
-        """
-
-        host, port = self.client_address
-        return socket.getfqdn(host)
-
-    # Essentially static class variables
-
-    # The version of the HTTP protocol we support.
-    # Don't override unless you know what you're doing (hint: incoming
-    # requests are required to have exactly this version string).
-    protocol_version = "HTTP/1.0"
-
-    # The Message-like class used to parse headers
-    MessageClass = mimetools.Message
-
-    # Table mapping response codes to messages; entries have the
-    # form {code: (shortmessage, longmessage)}.
-    # See http://www.w3.org/hypertext/WWW/Protocols/HTTP/HTRESP.html
-    responses = {
-        200: ('OK', 'Request fulfilled, document follows'),
-        201: ('Created', 'Document created, URL follows'),
-        202: ('Accepted',
-              'Request accepted, processing continues off-line'),
-        203: ('Partial information', 'Request fulfilled from cache'),
-        204: ('No response', 'Request fulfilled, nothing follows'),
-
-        301: ('Moved', 'Object moved permanently -- see URI list'),
-        302: ('Found', 'Object moved temporarily -- see URI list'),
-        303: ('Method', 'Object moved -- see Method and URL list'),
-        304: ('Not modified',
-              'Document has not changed singe given time'),
-
-        400: ('Bad request',
-              'Bad request syntax or unsupported method'),
-        401: ('Unauthorized',
-              'No permission -- see authorization schemes'),
-        402: ('Payment required',
-              'No payment -- see charging schemes'),
-        403: ('Forbidden',
-              'Request forbidden -- authorization will not help'),
-        404: ('Not found', 'Nothing matches the given URI'),
-
-        500: ('Internal error', 'Server got itself in trouble'),
-        501: ('Not implemented',
-              'Server does not support this operation'),
-        502: ('Service temporarily overloaded',
-              'The server cannot process the request due to a high load'),
-        503: ('Gateway timeout',
-              'The gateway server did not receive a timely response'),
-
-        }
-
-
-def test(HandlerClass = BaseHTTPRequestHandler,
-         ServerClass = HTTPServer):
-    """Test the HTTP request handler class.
-
-    This runs an HTTP server on port 8000 (or the first command line
-    argument).
-
-    """
-
-    if sys.argv[1:]:
-        port = int(sys.argv[1])
-    else:
-        port = 8000
-    server_address = ('', port)
-
-    httpd = ServerClass(server_address, HandlerClass)
-
-    sa = httpd.socket.getsockname()
-    print "Serving HTTP on", sa[0], "port", sa[1], "..."
-    httpd.serve_forever()
-
-
-if __name__ == '__main__':
-    test()
-
-# arch-tag: 567449b3-cc90-45b6-bbe3-1e113995bdae
--- a/test/cedet/tests/testdoublens.cpp	Wed Mar 31 00:14:29 2010 +0000
+++ b/test/cedet/tests/testdoublens.cpp	Wed Mar 31 06:33:56 2010 +0000
@@ -1,7 +1,24 @@
-//
-// CPP file for semantic-ia-utest
-// completion engine unit tests.
-//
+// testdoublens.cpp --- semantic-ia-utest completion engine unit tests
+
+// Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
+
+// Author: Eric M. Ludlam <eric@siege-engine.com>
+
+// This file is part of GNU Emacs.
+
+// GNU Emacs is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// GNU Emacs is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+
 #include "testdoublens.hpp"
 
 namespace Name1 {
@@ -29,7 +46,7 @@
     void Foo::sendStuff(int /* a */, int /* b */) // ^3^
     {
     }
-    
+
   } // namespace Name2
 } // namespace Name1
 
@@ -44,7 +61,7 @@
   Name1::Name2::F//-4-
     // #4# ( "Foo" )
     ;
-  
+
   // @TODO - get this working...
   Name1::stage2_Foo::M//-5-
     /// #5# ( "Mumble" )
@@ -58,15 +75,15 @@
 
 // Second test from Ravikiran Rajagopal
 
-namespace A { 
+namespace A {
   class foo {
   public:
     void aa();
     void bb();
   };
 }
-namespace A { 
-  class bar { 
+namespace A {
+  class bar {
   public:
     void xx();
   public:
@@ -96,7 +113,7 @@
 
     int Bar::baz()
     {
-      return dum// -7- 
+      return dum// -7-
 	// #7# ( "dumdum" )
 	;
     }
--- a/test/cedet/tests/testdoublens.hpp	Wed Mar 31 00:14:29 2010 +0000
+++ b/test/cedet/tests/testdoublens.hpp	Wed Mar 31 06:33:56 2010 +0000
@@ -1,6 +1,24 @@
-//
-// Header file used in one of the ia-utest tests.
-//
+// testdoublens.hpp --- Header file used in one of the Semantic tests
+
+// Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
+
+// Author: Eric M. Ludlam <eric@siege-engine.com>
+
+// This file is part of GNU Emacs.
+
+// GNU Emacs is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// GNU Emacs is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+
 namespace Name1 {
   namespace Name2 {
 
--- a/test/cedet/tests/testjavacomp.java	Wed Mar 31 00:14:29 2010 +0000
+++ b/test/cedet/tests/testjavacomp.java	Wed Mar 31 06:33:56 2010 +0000
@@ -1,24 +1,23 @@
-/** testjavacomp.java --- 
- *
- * Copyright (C) 2009, 2010  Free Software Foundation, Inc.
- *
- * Author: Eric M. Ludlam <eric@siege-engine.com>
- *
- * This file is part of GNU Emacs.
- *
- * GNU Emacs is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * GNU Emacs is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
- */
+//  testjavacomp.java --- Semantic unit test for Java
+
+//  Copyright (C) 2009, 2010  Free Software Foundation, Inc.
+
+//  Author: Eric M. Ludlam <eric@siege-engine.com>
+
+//  This file is part of GNU Emacs.
+
+//  GNU Emacs is free software: you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation, either version 3 of the License, or
+//  (at your option) any later version.
+
+//  GNU Emacs is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+
+//  You should have received a copy of the GNU General Public License
+//  along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 
 package tests.testjavacomp;
 
--- a/test/cedet/tests/testspp.c	Wed Mar 31 00:14:29 2010 +0000
+++ b/test/cedet/tests/testspp.c	Wed Mar 31 06:33:56 2010 +0000
@@ -1,6 +1,24 @@
-/* Attempt to test the C preprocessor
- *
- */
+/* testspp.cpp --- Semantic unit test for the C preprocessor
+
+   Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+
+   Author: Eric M. Ludlam <eric@siege-engine.com>
+
+   This file is part of GNU Emacs.
+
+   GNU Emacs is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 of the License, or
+   (at your option) any later version.
+
+   GNU Emacs is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+*/
 
 int some_fcn (){}
 
--- a/test/cedet/tests/testsppreplace.c	Wed Mar 31 00:14:29 2010 +0000
+++ b/test/cedet/tests/testsppreplace.c	Wed Mar 31 06:33:56 2010 +0000
@@ -1,5 +1,23 @@
-/* Test CPP/SPP Replacement
- */
+/* testsppreplace.c --- unit test for CPP/SPP Replacement
+   Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+
+   Author: Eric M. Ludlam <eric@siege-engine.com>
+
+   This file is part of GNU Emacs.
+
+   GNU Emacs is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 of the License, or
+   (at your option) any later version.
+
+   GNU Emacs is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+*/
 
 /* TEST: The EMU keyword doesn't screw up the function defn. */
 #define EMU
--- a/test/cedet/tests/testsppreplaced.c	Wed Mar 31 00:14:29 2010 +0000
+++ b/test/cedet/tests/testsppreplaced.c	Wed Mar 31 06:33:56 2010 +0000
@@ -1,5 +1,25 @@
-/* What the SPP replace file would looklike with MACROS replaced.
- */
+/* testsppreplaced.c --- unit test for CPP/SPP Replacement
+   Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+
+   Author: Eric M. Ludlam <eric@siege-engine.com>
+
+   This file is part of GNU Emacs.
+
+   GNU Emacs is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 of the License, or
+   (at your option) any later version.
+
+   GNU Emacs is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+/* What the SPP replace file would looklike with MACROS replaced: */
 
 /* TEST: The EMU keyword doesn't screw up the function defn. */
 char parse_around_emu ()
--- a/test/cedet/tests/teststruct.cpp	Wed Mar 31 00:14:29 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,68 +0,0 @@
-// Combinations of templates and structure inheritance.
-//
-// Created by Alex Ott.
-
-template <typename DerivedT>
-struct grammar {
-public:
-  typedef grammar<DerivedT> self_t;
-  typedef DerivedT const& embed_t;
-  grammar() {}
-  ~grammar() { }
-  void use_parser() const { }
-  void test1() { }
-};
-
-struct PDFbool_parser : public grammar<PDFbool_parser> {
-  PDFbool_parser() {}
-  template <typename scannerT> struct definition {
-    typedef typename scannerT::iterator_t iterator_t;
-    int top;
-    definition(const PDFbool_parser& /*self*/) {
-      return ;
-    }
-    const int start() const {
-      return top;
-    }
-  };
-};
-
-int main(void) {
-  PDFbool_parser PDFbool_p = PDFbool_parser();
-  PDFbool_p.//-1-
-    ;
-  // #1# ("definition" "embed_t" "self_t" "test1" "use_parser")
-}
-
-// ----------------------------------------------------------------------
-
-template <class Derived> struct Base {
-public:
-  void interface()
-  {
-    // ...
-    static_cast<Derived*>(this)->implementation();
-    // ...
-  }
-
-  static void static_func()
-  {
-    // ...
-    Derived::static_sub_func();
-    // ...
-  }
-};
-
-struct Derived : Base<Derived> {
-  void implementation() { }
-  static void static_sub_func() { }
-};
-
-int foo () {
-  Derived d;
-  d.//-2-
-    ;
-  // #2# ("implementation" "interface" "static_func" "static_sub_func")
-}
-
-// arch-tag: d6e39f96-525e-44af-8cd1-d03e1829acd3
--- a/test/cedet/tests/testsubclass.cpp	Wed Mar 31 00:14:29 2010 +0000
+++ b/test/cedet/tests/testsubclass.cpp	Wed Mar 31 06:33:56 2010 +0000
@@ -1,5 +1,23 @@
-/* Special test file for Semantic Analyzer and complex C++ inheritance.
- */
+// testsubclass.cpp --- unit test for analyzer and complex C++ inheritance
+
+// Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+
+// Author: Eric M. Ludlam <eric@siege-engine.com>
+
+// This file is part of GNU Emacs.
+
+// GNU Emacs is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// GNU Emacs is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 
 //#include <iostream>
 #include "testsubclass.hh"
@@ -94,7 +112,7 @@
   MooseVariableName = createMoose();
 
   doLatinStuff(MooseVariableName);
-  
+
   tmp = this.f// -1-
     // #1# ( "fAlcesBool" "fIsValid" "fLatin" )
     ;
@@ -125,7 +143,7 @@
 int someFunction(int mPickle)
 {
   moose mMoose = deer::alces::createMoose();
-  
+
   if (mPickle == 1) {
 
     int mOption1 = 2;
@@ -152,7 +170,7 @@
   class A{
   private:
     void private_a(){}
-  public: 
+  public:
     void public_a();
   };
 
--- a/test/cedet/tests/testsubclass.hh	Wed Mar 31 00:14:29 2010 +0000
+++ b/test/cedet/tests/testsubclass.hh	Wed Mar 31 06:33:56 2010 +0000
@@ -1,8 +1,23 @@
-/* Special test file for Semantic Analyzer and complex C++ inheritance.
- *
- * Header file for testsubclass.cpp with class defns but no
- * implementations.
- */
+// testsubclass.hh --- unit test for analyzer and complex C++ inheritance
+
+// Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+
+// Author: Eric M. Ludlam <eric@siege-engine.com>
+
+// This file is part of GNU Emacs.
+
+// GNU Emacs is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// GNU Emacs is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 
 //#include <cmath>
 // #include <stdio.h>
--- a/test/cedet/tests/testtemplates.cpp	Wed Mar 31 00:14:29 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,92 +0,0 @@
-// Templates Test file:
-// Written by 'Raf'
-
-template <class T, int U, class V>
-class read_ref {
-public:
-  const T* read_ref_member_one( T);
-  const V* read_ref_member_two();
-};
-
-namespace NS {
-  template <class T, int U, class V>
-  class ref {
-  public:  
-    read_ref<T,10,V> operator->() {
-      m_// -1-
-	;
-      // #1# ( "m_datas" )
-    }  
-
-  private:
-    T m_datas[U];
-  };
-
-}
-
-class FooOne {
-public:
-  int fooOneMember();
-};
-
-class FooTwo {
-public:
-  int fooTwoMember();
-};
-
-class FooThree {
-public:
-  int fooThreeMember();
-
-  FooOne * operator->();
-};
-
-typedef ref<FooOne, 10,FooTwo> Test;
-
-using NS;
-
-void
-main(void) {
-  ref<FooOne, 10, FooTwo> v;
-  
-  v->read_ref_member_one()-> // -2-
-    ;
-  // #2# ( "fooOneMember" )
-
-  v->read_ref_member_two()-> // -3-
-    ;
-  // #3# ( "fooTwoMember" )
-
-  v-> // -4-
-    ;
-  // #4# ( "read_ref_member_one" "read_ref_member_two" )
-
-  Test t;
-
-  t->read_ref_member_two()-> // -5-
-    ;
-  // #5# ( "fooTwoMember" )
-
-  ref<FooOne, 10, FooThree> v2;
-  
-  v2->read_ref_member_two()-> // -6- 
-    ;
-  // #6# ( "fooOneMember" )
-
-  /* Try all these things by also specifying the namespace in the name. */
-  NS::ref<FooOne, 10, FooTwo> v3;
-  
-  v3->read_ref_member_one()-> // -7-
-    ;
-  // #7# ( "fooOneMember" )
-
-  v3->read_ref_member_two()-> // -8-
-    ;
-  // #8# ( "fooTwoMember" )
-
-  v3->read_ref_member_two// @1@ 5
-    ;
-
-}
-
-// arch-tag: 03cbb8c3-3d01-42ab-b416-42a08ea7b896
--- a/test/cedet/tests/testtypedefs.cpp	Wed Mar 31 00:14:29 2010 +0000
+++ b/test/cedet/tests/testtypedefs.cpp	Wed Mar 31 06:33:56 2010 +0000
@@ -1,16 +1,31 @@
-// Sample with some fake bits out of std::string
-//
+// testtypedefs.cpp --- Sample with some fake bits out of std::string
+
+// Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
+
+// Author: Eric M. Ludlam <eric@siege-engine.com>
+
+// This file is part of GNU Emacs.
+
+// GNU Emacs is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// GNU Emacs is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+
 // Thanks Ming-Wei Chang for these examples.
 
 namespace std {
-
   template <T>class basic_string {
-
   public:
     void resize(int);
-  
   };
-
 }
 
 typedef std::basic_string<char> mstring;
@@ -18,41 +33,34 @@
 using namespace std;
 typedef basic_string<char> bstring;
 
-
 int main(){
   mstring a;
-
   a.// -1-
     ;
   // #1# ( "resize" )
-  
   bstring b;
   // It doesn't work here.
   b.// -2-
     ;
   // #2# ( "resize" )
-  
   return 0;
 }
 
-
 // ------------------
 
-class Bar 
+class Bar
 {
 public:
      void someFunc() {}
-
 };
 
 typedef Bar new_Bar;
 
 template <class mytype>
-class TBar 
+class TBar
 {
 public:
      void otherFunc() {}
-
 };
 
 typedef TBar<char> new_TBar;
@@ -65,11 +73,9 @@
   nb.// -3-
     ;
   // #3# ("someFunc")
-
   ntb.// -4-
     ;
   // #4# ("otherFunc")
-
   return 0;
 }
 
--- a/test/cedet/tests/testusing.cpp	Wed Mar 31 00:14:29 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,134 +0,0 @@
-// Test using statements in C++
-
-#include <adstdio.h>
-
-#include <testusing.hh>
-
-namespace moose {
-  
-  class MyClass;
-  class Point;
-
-  typedef MyClass snerk;
-}
-
-namespace moose {
-
-  class Point;
-  class MyClass;
-
-}
-
-namespace {
-  
-  int global_variable = 0;
-
-};
-
-using moose::MyClass;
-
-void someFcn() {
-
-  MyClass f;
-
-  f.//-1-
-    ; //#1# ( "getVal" "setVal" )
-
-}
-
-// Code from Zhiqiu Kong
-
-namespace panda {
-
-  using namespace bread_name;
-
-  int func()
-  {
-    bread test;
-    test.//-2-
-      ;// #2# ( "geta" )
-    return 0;
-  }
-}
-
-// Local using statements and aliased types
-// Code from David Engster
-
-void func2()
-{
-  using namespace somestuff;
-  OneClass f;
-  f.//-3-
-    ; //#3# ( "aFunc" "anInt" )
-}
-
-void func3()
-{
-  using somestuff::OneClass;
-  OneClass f;
-  f.//-4-
-    ; //#4# ( "aFunc" "anInt" )
-}
-
-// Dereferencing alias types created through 'using' statements
-
-// Alias with fully qualified name
-void func4()
-{
-  otherstuff::OneClass f;
-  f. //-5-
-    ; //#5# ( "aFunc" "anInt" )
-}
-
-// Alias through namespace directive
-void func5()
-{
-  using namespace otherstuff;
-  OneClass f;
-  f. //-6-
-    ; //#6# ( "aFunc" "anInt" )
-}
-
-// Check name hiding
-void func6()
-{
-  using namespace morestuff;
-  OneClass f;		// Alias for somestuff::OneClass
-  f.  //-7-
-    ; //#7# ( "aFunc" "anInt" )
-  aStruct g;	// This however is morestuff::aStruct !
-  g. //-8-
-    ; //#8# ( "anotherBar" "anotherFoo" )
-}
-
-// Alias of an alias
-// Currently doesn't work interactively for some reason.
-void func6()
-{
-  using namespace evenmorestuff;
-  OneClass f;
-  f. //-7-
-    ; //#7# ( "aFunc" "anInt" )
-}
-
-// Alias for struct in nested namespace, fully qualified
-void func7()
-{
-  outer::StructNested f;
-  f.//-8-
-    ; //#8# ( "one" "two" )
-}
-
-// Alias for nested namespace
-void func8()
-{
-  using namespace outerinner;
-  StructNested f;
-  AnotherStruct g;
-  f.//-9-
-    ; //#9# ( "one" "two" )
-  g.//-10-
-    ; //#10# ( "four" "three" )
-}
-
-// arch-tag: 8e68d5d1-4d48-47c6-a910-d8d6b66b2768
--- a/test/cedet/tests/testusing.hh	Wed Mar 31 00:14:29 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,127 +0,0 @@
-// test usings header file.
-
-namespace moose {
-
-  class Point;
-
-  class MyClass;
-
-}
-
-
-namespace moose {
-
-  class Point;
-
-  class MyClass {
-  public:
-    MyClass() : fVal(0) {
-    }
-
-    ~MyClass() {};
-
-    /**
-     * fVal Accessors
-     * @{
-     */
-    int getVal() const {
-      return fVal;
-    }
-    void setVal(int Val) const {
-      fVal = Val;
-    }
-    /**
-     * @}
-     */
-  private:
-    int fVal;
-  };
-
-}
-
-namespace deer {
-
-  class Pickle;
-
-};
-
-// Code from Zhiqiu Kong
-
-#ifndef BREAD_H
-#define BREAD_H
-
-namespace bread_name {
-  class bread
-  {
-  public:
-    void geta();
-  private:
-    int m_a;
-    int m_b;
-  };
-}
-
-#endif
-
-// Code from David Engster
-// Creating alias types through 'using' trickery
-
-namespace somestuff {
-  class OneClass {
-  public:
-    void aFunc();
-    int anInt;
-  };
-  struct aStruct {
-    int foo;
-    int bar;
-  };
-}
-
-namespace otherstuff {
-  // make otherstuff::OneClass an alias for somestuff::OneClass
-  using somestuff::OneClass;
-}
-
-namespace morestuff {
-  // make morestuff an alias namespace for somestuff
-  using namespace somestuff;
-  // but hide aStruct with own type
-  struct aStruct {
-    int anotherFoo;
-    int anotherBar;
-  };
-}
-
-// We can also create an alias for an alias
-namespace evenmorestuff {
-  using otherstuff::OneClass;
-}
-
-// Now with nested namespaces
-namespace outer {
-  namespace inner {
-    struct StructNested {
-      int one;
-      int two;
-    };
-    struct AnotherStruct {
-      int three;
-      int four;
-    };
-  }
-}
-
-// Elevate the first struct into 'outer'
-// so that we can access it via 'outer::StructNested'
-namespace outer {
-  using outer::inner::StructNested;
-}
-
-// Create an alias for a nested namespace
-namespace outerinner {
-  // equivalent to 'namespace outerinner = outer::inner;'
-  using namespace outer::inner;
-}
-
-// arch-tag: f7e59fad-100b-47d3-ae8b-a8390a026ade
--- a/test/cedet/tests/testvarnames.c	Wed Mar 31 00:14:29 2010 +0000
+++ b/test/cedet/tests/testvarnames.c	Wed Mar 31 06:33:56 2010 +0000
@@ -1,6 +1,25 @@
-/*
- * Test variable and function names, lists of variables on one line, etc.
- */
+/* testvarnames.cpp
+   Test variable and function names, lists of variables on one line, etc.
+
+   Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
+
+   Author: Eric M. Ludlam <eric@siege-engine.com>
+
+   This file is part of GNU Emacs.
+
+   GNU Emacs is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 of the License, or
+   (at your option) any later version.
+
+   GNU Emacs is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+*/
 
 struct independent {
   int indep_1;