changeset 108444:8ce523466531

Merge from mainline.
author Katsumi Yamaoka <yamaoka@jpl.org>
date Sat, 03 Apr 2010 12:47:25 +0000
parents b836559c725c (current diff) ac009f6ace05 (diff)
children d6e3aa27b97d
files etc/NEWS.23
diffstat 29 files changed, 511 insertions(+), 238 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri Apr 02 14:34:08 2010 +0000
+++ b/ChangeLog	Sat Apr 03 12:47:25 2010 +0000
@@ -3631,8 +3631,8 @@
 
 1999-10-09  Stefan Monnier  <monnier@cs.yale.edu>
 
-	* make-dist (dontcompile): look for the DONTCOMPILE variable rather
-	  than the obsolete dontcompilefiles pseudo-rule in lisp/Makefile.
+	* make-dist (dontcompile): Look for the DONTCOMPILE variable rather
+	than the obsolete dontcompilefiles pseudo-rule in lisp/Makefile.
 
 1999-10-09  Richard M. Stallman  <rms@gnu.org>
 
@@ -3641,7 +3641,7 @@
 
 1999-10-08  Stefan Monnier  <monnier@cs.yale.edu>
 
-	* update-subdirs: also ignore CVS subdirs.
+	* update-subdirs: Also ignore CVS subdirs.
 
 1999-10-07  Gerd Moellmann  <gerd@gnu.org>
 
@@ -6201,8 +6201,8 @@
 	src/Makefile.in is built from src/Makefile.
 
 	* Makefile.in (src/Makefile, lib-src/Makefile, oldXMenu/Makefile):
-	  If these files are out of date, simply have config.status
-	  rebuild them; don't rebuild them explicitly.
+	If these files are out of date, simply have config.status
+	rebuild them; don't rebuild them explicitly.
 
 1993-09-25  Brian J. Fox  (bfox@ai.mit.edu)
 
@@ -6397,7 +6397,7 @@
 
 1993-07-12  Frederic Pierresteguy  (F.Pierresteguy@frcl.bull.fr)
 
-	* configure.in (m68k-bull-sysv3): new config.
+	* configure.in (m68k-bull-sysv3): New config.
 
 1993-07-10  Jim Blandy  (jimb@geech.gnu.ai.mit.edu)
 
@@ -6620,7 +6620,7 @@
 
 	* make-dist: Rebuild configure if configure.in is newer.
 
-	* Makefile.in (src:, lib-src:, FRC:): force the src and lib-src
+	* Makefile.in (src:, lib-src:, FRC:): Force the src and lib-src
 	targets to be executed even if make remembers that it has already
 	satisfied FRC.
 
@@ -7120,7 +7120,7 @@
 	* make-dist: Don't distribute etc/Old files.
 
 	* GETTING.GNU.SOFTWARE, PROBLEMS: Registered into RCS with their
-	  backups.
+	backups.
 
 1993-03-20  Jim Blandy  (jimb@geech.gnu.ai.mit.edu)
 
@@ -7150,7 +7150,7 @@
 1993-03-17  Eric S. Raymond  (eric@mole.gnu.ai.mit.edu)
 
 	* Makefile.in: Add commented-out variable settings for developer's
-	  configuration.
+	configuration.
 
 1993-03-14  Jim Blandy  (jimb@wookumz.gnu.ai.mit.edu)
 
@@ -7765,7 +7765,7 @@
 	the script.
 	* INSTALL: Doc fix.
 
-	* Makefile: brought the Makefile up to the GNU coding
+	* Makefile: Brought the Makefile up to the GNU coding
 	standards, as described in standards.text:
 	(TAGS): New name for the target which rebuilds the tags table.
 	(check): New target; doesn't do anything yet.
--- a/doc/lispref/ChangeLog	Fri Apr 02 14:34:08 2010 +0000
+++ b/doc/lispref/ChangeLog	Sat Apr 03 12:47:25 2010 +0000
@@ -1,3 +1,13 @@
+2010-04-01  Chong Yidong  <cyd@stupidchicken.com>
+
+	* nonascii.texi (Text Representations): Don't mark
+	enable-multibyte-characters as a user option.
+
+2010-03-31  Eli Zaretskii  <eliz@gnu.org>
+
+	* control.texi (Handling Errors): How to re-throw a signal caught
+	by condition-case.
+
 2010-03-26  Chong Yidong  <cyd@stupidchicken.com>
 
 	* loading.texi (Hooks for Loading): Document after-load-functions.
--- a/doc/lispref/control.texi	Fri Apr 02 14:34:08 2010 +0000
+++ b/doc/lispref/control.texi	Sat Apr 03 12:47:25 2010 +0000
@@ -1023,6 +1023,20 @@
 
 If @var{var} is @code{nil}, that means no variable is bound.  Then the
 error symbol and associated data are not available to the handler.
+
+@cindex rethrow a signal
+Sometimes it is necessary to re-throw a signal caught by
+@code{condition-case}, for some outer-level handler to catch.  Here's
+how to do that:
+
+@smallexample
+  (signal (car err) (cdr err))
+@end smallexample
+
+@noindent
+where @code{err} is the error description variable, the first argument
+to @code{condition-case} whose error condition you want to re-throw.
+@xref{Definition of signal}.
 @end defspec
 
 @defun error-message-string error-description
@@ -1109,6 +1123,7 @@
 @end smallexample
 @end defmac
 
+
 @node Error Symbols
 @subsubsection Error Symbols and Condition Names
 @cindex error symbol
--- a/doc/lispref/nonascii.texi	Fri Apr 02 14:34:08 2010 +0000
+++ b/doc/lispref/nonascii.texi	Sat Apr 03 12:47:25 2010 +0000
@@ -37,7 +37,7 @@
 
   Emacs buffers and strings support a large repertoire of characters
 from many different scripts, allowing users to type and display text
-in most any known written language.
+in almost any known written language.
 
 @cindex character codepoint
 @cindex codespace
@@ -95,7 +95,7 @@
 The representation for a string is determined and recorded in the string
 when the string is constructed.
 
-@defopt enable-multibyte-characters
+@defvar enable-multibyte-characters
 This variable specifies the current buffer's text representation.
 If it is non-@code{nil}, the buffer contains multibyte text; otherwise,
 it contains unibyte encoded text or binary non-text data.
@@ -105,7 +105,7 @@
 
 The @samp{--unibyte} command line option does its job by setting the
 default value to @code{nil} early in startup.
-@end defopt
+@end defvar
 
 @defun position-bytes position
 Buffer positions are measured in character units.  This function
--- a/etc/AUTHORS	Fri Apr 02 14:34:08 2010 +0000
+++ b/etc/AUTHORS	Sat Apr 03 12:47:25 2010 +0000
@@ -33,8 +33,8 @@
 
 Adrian Robert: co-wrote ns-win.el
 and changed nsterm.m nsfns.m nsfont.m nsterm.h Makefile.in nsmenu.m
-  configure.in README config.in emacs.c font.c keyboard.c nsgui.h image.c
-  lisp.h macos.texi menu.c nsimage.m xdisp.c Info-gnustep.plist darwin.h
+  configure.in README config.in emacs.c font.c keyboard.c nsgui.h xdisp.c
+  image.c lisp.h macos.texi menu.c nsimage.m Info-gnustep.plist darwin.h
   and 83 other files
 
 Ævar Arnfjörð Bjarmason: changed rcirc.el
@@ -164,12 +164,12 @@
 
 Andreas Luik: changed xfns.c xterm.c
 
-Andreas Politz: changed elp.el ido.el term.el
+Andreas Politz: changed editfns.c elp.el ido.el term.el
 
 Andreas Schwab: changed Makefile.in configure.in lisp.h xdisp.c files.el
   coding.c alloc.c process.c print.c editfns.c fileio.c fns.c dired.el
   xterm.c keyboard.c simple.el eval.c info.el buffer.c sysdep.c emacs.c
-  and 480 other files
+  and 483 other files
 
 Andreas Seltenreich: changed nnweb.el gnus.texi message.el gnus.el
   nnslashdot.el gnus-util.el mm-url.el mm-uu.el url-http.el xterm.c
@@ -230,7 +230,7 @@
   ldap.el message.el mm-decode.el mml-sec.el mml.el mule-conf.el
   nnimap.el nnrss.el wid-edit.el
 
-Arni Magnusson: changed ada-mode.texi
+Arni Magnusson: changed ada-mode.texi frames.texi
 
 Artem Chuprina: changed message.el
 
@@ -282,7 +282,7 @@
 and changed vc.el gnus-msg.el message.el diff-mode.el ffap.el nnimap.el
   nnmbox.el simple.el vc-cvs.el
 
-Bernhard Herzog: changed vc-hg.el
+Bernhard Herzog: changed vc-hg.el menu.c
 
 Bernt Hansen: changed org-clock.el
 
@@ -433,10 +433,10 @@
 
 Chong Yidong: wrote redisplay-testsuite.el
 and co-wrote longlines.el
-and changed xdisp.c simple.el files.el display.texi files.texi
-  frames.texi keyboard.c cus-edit.el faces.el xterm.c Makefile.in
-  emacs.texi xfaces.c font.c startup.el xfns.c image.c misc.texi
-  compile.el configure.in custom.texi and 608 other files
+and changed xdisp.c simple.el files.el display.texi frames.texi
+  files.texi emacs.texi keyboard.c cus-edit.el faces.el xterm.c
+  Makefile.in xfaces.c font.c startup.el xfns.c misc.texi image.c
+  compile.el custom.texi text.texi and 633 other files
 
 Chris Chase: co-wrote idlw-shell.el idlwave.el
 
@@ -557,6 +557,8 @@
   emacs.c files.el term.c process.c vc-rcs.el bindings.el diff-mode.el
   lisp-mode.el and 840 other files
 
+Dan Rosenberg: changed movemail.c
+
 Daniel Brockman: changed cus-start.el format-spec.el ibuffer.el rcirc.el
 
 Daniel Colascione: co-wrote js.el
@@ -905,25 +907,26 @@
 
 Eric M. Ludlam: wrote analyze.el args.el autoconf-edit.el bovine.el c.el
   cedet-cscope.el cedet-files.el cedet-global.el cedet-idutils.el
-  cedet-utests.el chart.el checkdoc.el compile.el cpp-root.el
+  cedet-utests.el chart.el checkdoc.el compile.el complete.el cpp-root.el
   cscope.el ctxt.el data-debug.el db-debug.el db-el.el db-file.el
   db-find.el db-global.el db-mode.el db-ref.el db-typecache.el db.el
   debug.el decorate.el dep.el dframe.el dictionary.el dired.el doc.el
-  document.el ede-grammar.el ede.el edit.el eieio-base.el eieio-comp.el
-  eieio-custom.el eieio-datadebug.el eieio-opt.el eieio-speedbar.el
-  eieio.el el.el expandproto.el extract.el ezimage.el fcn.el
-  fields.el filter.el filters.el find.el format.el fw.el gcc.el
-  getset.el global.el grep.el html.el ia-sb.el ia.el idle.el idutils.el
-  include.el insert.el inversion.el java.el javascript.el lex-spp.el
-  lex.el linux.el list.el locate.el make.el makefile-edit.el map.el
-  mode.el mru-bookmark.el pconf.el pmake.el proj-archive.el proj-aux.el
-  proj-comp.el proj-elisp.el proj-info.el proj-misc.el proj-obj.el
-  proj-prog.el proj-scheme.el proj-shared.el proj.el project-am.el
-  pulse.el refs.el sb-image.el sb.el scm.el scope.el semantic-ia-utest.el
-  semantic-tests.el semantic-utest-c.el semantic-utest.el semantic.el
-  shell.el simple.el sort.el source.el speedbar.el srecode.el srt.el
+  document.el ede-grammar.el ede-tests.el ede.el edit.el eieio-base.el
+  eieio-comp.el eieio-custom.el eieio-datadebug.el eieio-opt.el
+  eieio-speedbar.el eieio.el el.el emacs.el expandproto.el extract.el
+  ezimage.el fcn.el fields.el files.el filter.el filters.el find.el
+  format.el fw.el gcc.el getset.el global.el grep.el html.el ia-sb.el
+  ia.el idle.el idutils.el imenu.el include.el insert.el inversion.el
+  java.el javascript.el lex-spp.el lex.el linux.el list.el locate.el
+  make.el makefile-edit.el map.el mode.el mru-bookmark.el pconf.el
+  pmake.el proj-archive.el proj-aux.el proj-comp.el proj-elisp.el
+  proj-info.el proj-misc.el proj-obj.el proj-prog.el proj-scheme.el
+  proj-shared.el proj.el project-am.el pulse.el refs.el sb-image.el sb.el
+  scm.el scope.el semantic-ia-utest.el semantic-tests.el
+  semantic-utest-c.el semantic-utest.el semantic.el shell.el simple.el
+  sort.el source.el speedbar.el srecode-tests.el srecode.el srt.el
   symref.el system.el table.el tag-file.el tag-ls.el tag-write.el tag.el
-  texi.el util.el
+  test.el texi.el util.el
 and co-wrote cpp.el db-ebrowse.el util-modes.el
 and changed *.el info.el rmail.el speedbspec.el gud.el sb-dir-minus.xpm
   sb-dir-plus.xpm sb-dir.xpm sb-mail.xpm sb-pg-minus.xpm sb-pg-plus.xpm
@@ -999,9 +1002,9 @@
 Florian Weimer: changed message.el gnus.el coding.c gnus-sum.el gnus.texi
   mm-decode.el mm-util.el
 
-Francesc Rocher: changed startup.el cus-start.el gnus.el gnus.png
-  gnus.svg macterm.c splash.png splash.svg splash8.xpm w32term.c xdisp.c
-  xterm.c
+Francesc Rocher: changed startup.el MORE.STUFF cus-start.el gnus.el
+  gnus.png gnus.svg macterm.c splash.png splash.svg splash8.xpm w32term.c
+  xdisp.c xterm.c
 
 Francesco Potortì: wrote cmacexp.el
 and changed etags.c man.el delta.h etags.1 undigest.el Makefile.in
@@ -1130,7 +1133,7 @@
   cal-menu.el cal-hebrew.el fortran.el holidays.el configure.in
   cal-islam.el bytecomp.el calendar.texi cal-bahai.el files.el appt.el
   cal-china.el emacs.texi rmailsum.el simple.el startup.el
-  and 972 other files
+  and 975 other files
 
 Glynn Clements: wrote gamegrid.el snake.el tetris.el
 
@@ -1342,7 +1345,7 @@
 Jan Djärv: wrote dnd.el font-setting.el x-dnd.el
 and changed gtkutil.c xterm.c xfns.c configure.in xterm.h xmenu.c
   x-win.el Makefile.in gtkutil.h keyboard.c frame.c frames.texi config.in
-  emacs.c xselect.c startup.el xresources.texi alloc.c cus-start.el
+  emacs.c xselect.c xresources.texi startup.el alloc.c cus-start.el
   xlwmenu.c process.c and 203 other files
 
 Jan Moringen: co-wrote cpp.el
@@ -1629,10 +1632,10 @@
 Juan León Lahoz García: wrote wdired.el
 and changed files.el perl-mode.el
 
-Juanma Barranquero: changed makefile.w32-in subr.el files.el bs.el
-  faces.el help-fns.el w32fns.c org.el server.el simple.el emacsclient.c
+Juanma Barranquero: changed makefile.w32-in subr.el files.el faces.el
+  bs.el help-fns.el w32fns.c org.el server.el simple.el emacsclient.c
   desktop.el buffer.c mule-cmds.el ido.el window.c xdisp.c allout.el
-  keyboard.c replace.el eval.c and 924 other files
+  keyboard.c replace.el eval.c and 930 other files
 
 Juergen Hoetzel: changed url-handlers.el
 
@@ -1729,7 +1732,7 @@
 and changed gnus-art.el message.el gnus-sum.el gnus.texi mm-decode.el
   mm-util.el mm-view.el rfc2047.el mml.el gnus-group.el gnus-msg.el
   gnus-util.el gnus-start.el gnus.el nntp.el gnus-agent.el nnrss.el
-  mm-uu.el nnmail.el emacs-mime.texi nnheader.el and 107 other files
+  mm-uu.el nnmail.el emacs-mime.texi nnheader.el and 108 other files
 
 Kaveh R. Ghazi: changed delta88k.h xterm.c
 
@@ -2948,6 +2951,8 @@
 
 Steinar Bang: changed imap.el
 
+Štěpán Němec: changed subr.el vc-git.el
+
 Stephan Stahl: changed which-func.el buff-menu.el buffer.c dired-x.texi
   ediff-mult.el
 
@@ -3083,7 +3088,7 @@
 
 Terry Jones: wrote shadow.el
 
-Tetsurou Okazaki: changed byte-opt.el log-edit.el xterm.c
+Tetsurou Okazaki: changed Makefile.in byte-opt.el log-edit.el xterm.c
 
 Thamer Mahmoud: changed arabic.el
 
@@ -3311,7 +3316,7 @@
 
 Wilson H. Tien: changed unexelf.c
 
-Wilson Snyder: changed verilog-mode.el
+Wilson Snyder: changed verilog-mode.el files.el
 
 Wim Nieuwenhuizen: changed TUTORIAL.nl
 
@@ -3343,7 +3348,7 @@
 Yamamoto Mitsuharu: changed macterm.c macfns.c mac-win.el mac.c macterm.h
   macmenu.c macgui.h image.c macselect.c xdisp.c keyboard.c xterm.c
   Makefile.in emacs.c darwin.h macos.texi unexmacosx.c w32term.c alloc.c
-  configure.in dispnew.c and 82 other files
+  configure.in dispnew.c and 83 other files
 
 Yann Dirson: changed imenu.el
 
--- a/etc/NEWS.23	Fri Apr 02 14:34:08 2010 +0000
+++ b/etc/NEWS.23	Sat Apr 03 12:47:25 2010 +0000
@@ -268,6 +268,7 @@
 
 To disable this check, set compose-mail-user-agent-warnings to nil.
 
+---
 ** The default value of mail-interactive is t, since Emacs 23.1.
 (This was not announced at the time.)  It means that when sending mail,
 Emacs will wait for the process sending mail to return.  If you
@@ -464,7 +465,7 @@
 
 
 * Lisp changes in Emacs 23.2
-
+---
 ** All the default-FOO variables that hold the default value of the FOO
 variable, are now declared obsolete.
 
--- a/lib-src/ChangeLog	Fri Apr 02 14:34:08 2010 +0000
+++ b/lib-src/ChangeLog	Sat Apr 03 12:47:25 2010 +0000
@@ -1,3 +1,15 @@
+2010-04-03  Juanma Barranquero  <lekktu@gmail.com>
+
+	Add stubs for Windows, required after CVE-2010-0825 change.
+	* ntlib.c (getgid, getegid, setegid): New stubs.
+	* ntlib.h (getgid, getegid, setegid): Declare them.
+
+2010-04-02  Dan Rosenberg  <dan.j.rosenberg@gmail.com>  (tiny change)
+
+	* movemail.c (main): Check return values of setuid.  Avoid
+	possibility of symlink attack when movemail is setgid mail
+	(CVE-2010-0825).
+
 2010-04-02  Dan Nicolaescu  <dann@ics.uci.edu>
 
 	Remove extern errno declarations.
@@ -3967,7 +3979,7 @@
 	(xmalloc, fatal, error): New functions.
 	(delete_socket, handle_signals): New functions.
 	(progname, socket_name): New variables.
-	 [HAVE_SOCKETS] (main): Call handle_signals; set the new variables.
+	[HAVE_SOCKETS] (main): Call handle_signals; set the new variables.
 
 1996-09-01  Richard Stallman  <rms@ethanol.gnu.ai.mit.edu>
 
@@ -4740,9 +4752,9 @@
 1995-01-12  Francesco Potortì  (pot@cnuce.cnr.it)
 
 	* etags.c (FILEPOS, GET_CHARNO, GET_FILEPOS, max, LINENO): Deleted.
-	(append_to_tagfile, typedefs, typedefs_and_cplusplus,
-	 constantypedefs, update, vgrind_style, no_warnings,
-	 cxref_style, cplusplus, noindentypedefs): Were int, now logical.
+	(append_to_tagfile, typedefs, typedefs_and_cplusplus)
+	(constantypedefs, update, vgrind_style, no_warnings)
+	(cxref_style, cplusplus, noindentypedefs): Were int, now logical.
 	(permit_duplicates): Was a var, now a #define.
 	(filename_lb): Was global, now local to main.
 	(main): Open the tag file when in cxref mode.
@@ -4761,8 +4773,8 @@
 	(TOKEN_SAVED_P, SAVE_TOKEN, RESTORE_TOKEN): Deleted.
 	(C_entries): nameb and savenameb deleted.  Use dinamic allocation.
 	(pfcnt): Deleted.  Users updated.
-	(getit, Asm_labels, Pascal_functions, L_getit, get_scheme,
-	 TEX_getit, prolog_getit): Use dinamic allocation for storing
+	(getit, Asm_labels, Pascal_functions, L_getit, get_scheme)
+	(TEX_getit, prolog_getit): Use dinamic allocation for storing
 	the tag instead of a fixed size buffer.
 
 1995-01-10  Richard Stallman  <rms@mole.gnu.ai.mit.edu>
@@ -6687,8 +6699,8 @@
 1990-01-19  David Lawrence  (tale@cocoa-puffs)
 
 	* timer.c, getdate.y (new files) and Makefile:
-	  Sub-process support for run-at-time in timer.el.
-	  Doesn't yet work correctly for USG.
+	Sub-process support for run-at-time in timer.el.
+	Doesn't yet work correctly for USG.
 
 1990-01-10  Jim Kingdon  (kingdon@pogo)
 
--- a/lib-src/movemail.c	Fri Apr 02 14:34:08 2010 +0000
+++ b/lib-src/movemail.c	Sat Apr 03 12:47:25 2010 +0000
@@ -194,6 +194,9 @@
 # define ARGSTR "p"
 #endif /* MAIL_USE_POP */
 
+  uid_t real_gid = getgid();
+  uid_t priv_gid = getegid();
+
 #ifdef WINDOWSNT
   /* Ensure all file i/o is in binary mode. */
   _fmode = _O_BINARY;
@@ -244,25 +247,6 @@
   if (*outname == 0)
     fatal ("Destination file name is empty", 0, 0);
 
-  /* Check access to output file.  */
-  if (access (outname, F_OK) == 0 && access (outname, W_OK) != 0)
-    pfatal_with_name (outname);
-
-  /* Also check that outname's directory is writable to the real uid.  */
-  {
-    char *buf = (char *) xmalloc (strlen (outname) + 1);
-    char *p;
-    strcpy (buf, outname);
-    p = buf + strlen (buf);
-    while (p > buf && !IS_DIRECTORY_SEP (p[-1]))
-      *--p = 0;
-    if (p == buf)
-      *p++ = '.';
-    if (access (buf, W_OK) != 0)
-      pfatal_with_name (buf);
-    free (buf);
-  }
-
 #ifdef MAIL_USE_POP
   if (!strncmp (inname, "po:", 3))
     {
@@ -274,15 +258,12 @@
       exit (status);
     }
 
-  setuid (getuid ());
+  if (setuid (getuid ()) < 0)
+    fatal ("Failed to drop privileges", 0, 0);
+
 #endif /* MAIL_USE_POP */
 
 #ifndef DISABLE_DIRECT_ACCESS
-
-  /* Check access to input file.  */
-  if (access (inname, R_OK | W_OK) != 0)
-    pfatal_with_name (inname);
-
 #ifndef MAIL_USE_MMDF
 #ifndef MAIL_USE_SYSTEM_LOCK
 #ifdef MAIL_USE_MAILLOCK
@@ -376,7 +357,8 @@
       time_t touched_lock, now;
 #endif
 
-      setuid (getuid ());
+      if (setuid (getuid ()) < 0 || setegid (real_gid) < 0)
+	fatal ("Failed to drop privileges", 0, 0);
 
 #ifndef MAIL_USE_MMDF
 #ifdef MAIL_USE_SYSTEM_LOCK
@@ -402,6 +384,9 @@
       if (outdesc < 0)
 	pfatal_with_name (outname);
 
+      if (setegid (priv_gid) < 0)
+	fatal ("Failed to regain privileges", 0, 0);
+
       /* This label exists so we can retry locking
 	 after a delay, if it got EAGAIN or EBUSY.  */
     retry_lock:
@@ -495,6 +480,10 @@
 	pfatal_and_delete (outname);
 #endif
 
+      /* Prevent symlink attacks truncating other users' mailboxes */
+      if (setegid (real_gid) < 0)
+	fatal ("Failed to drop privileges", 0, 0);
+
       /* Check to make sure no errors before we zap the inbox.  */
       if (close (outdesc) != 0)
 	pfatal_and_delete (outname);
@@ -526,6 +515,10 @@
 	}
 #endif /* not MAIL_USE_SYSTEM_LOCK */
 
+      /* End of mailbox truncation */
+      if (setegid (priv_gid) < 0)
+	fatal ("Failed to regain privileges", 0, 0);
+
 #ifdef MAIL_USE_MAILLOCK
       /* This has to occur in the child, i.e., in the process that
          acquired the lock! */
--- a/lib-src/ntlib.c	Fri Apr 02 14:34:08 2010 +0000
+++ b/lib-src/ntlib.c	Sat Apr 03 12:47:25 2010 +0000
@@ -125,12 +125,30 @@
   return 0;
 }
 
+unsigned
+getgid ()
+{
+  return 0;
+}
+
+unsigned
+getegid ()
+{
+  return 0;
+}
+
 int
 setuid (unsigned uid)
 {
   return 0;
 }
 
+int
+setegid (unsigned gid)
+{
+  return 0;
+}
+
 struct passwd *
 getpwuid (unsigned uid)
 {
--- a/lib-src/ntlib.h	Fri Apr 02 14:34:08 2010 +0000
+++ b/lib-src/ntlib.h	Sat Apr 03 12:47:25 2010 +0000
@@ -36,7 +36,10 @@
 char * getlogin ();
 char * cuserid (char * s);
 unsigned getuid ();
+unsigned getegid ();
+unsigned getgid ();
 int setuid (unsigned uid);
+int setegid (unsigned gid);
 char * getpass (const char * prompt);
 int fchown (int fd, unsigned uid, unsigned gid);
 
--- a/lisp/ChangeLog	Fri Apr 02 14:34:08 2010 +0000
+++ b/lisp/ChangeLog	Sat Apr 03 12:47:25 2010 +0000
@@ -1,8 +1,34 @@
+2010-04-03  Eli Zaretskii  <eliz@gnu.org>
+
+	* emacs-lisp/authors.el (authors-fixed-entries): Add entry for Eli
+	Zaretskii.
+
+2010-04-02  Juanma Barranquero  <lekktu@gmail.com>
+
+	* cedet/semantic/imenu.el (semantic-imenu-bucketize-type-members)
+	(semantic-create-imenu-directory-index): Fix typos in docstrings.
+	(semantic-imenu-goto-function): Reflow docstring.
+
+2010-04-02  Juri Linkov  <juri@jurta.org>
+
+	* ehelp.el (electric-help-orig-major-mode):
+	New buffer-local variable.
+	(electric-help-mode): Set it to original major-mode.  Doc fix.
+	(with-electric-help): Use `electric-help-orig-major-mode' instead
+	of (default-value 'major-mode).  Doc fix.
+	http://lists.gnu.org/archive/html/emacs-devel/2010-04/msg00069.html
+
 2010-04-02  Sam Steingold  <sds@gnu.org>
 
 	* vc-hg.el (vc-hg-push, vc-hg-pull): Use `apply' when calling
 	`vc-hg-command' with a list of flags.
 
+	* progmodes/bug-reference.el (bug-reference-bug-regexp): Also
+	accept "patch" and "RFE".
+	(bug-reference-fontify): `bug-reference-url-format' can also be a
+	function to be able to handle the bug kind.
+	(turn-on-bug-reference-mode, turn-on-bug-reference-prog-mode): Add
+
 2010-04-02  Jan Djärv  <jan.h.d@swipnet.se>
 
 	* tmm.el (tmm-get-keymap): Check with symbolp before passing
@@ -3866,7 +3892,7 @@
 	* bookmark.el: Formatting and doc fixes only:
 	(bookmark-search-delay): Shorten doc string to fit in 80 columns.
 	(bookmark-bmenu-search): Wrap to fit within 80 columns.
-	  Minor grammar and punctuation fixes in doc string.
+	Minor grammar and punctuation fixes in doc string.
 	(bookmark-read-search-input): Adjust to fit within 80 columns.
 
 2009-11-20  Tassilo Horn  <tassilo@member.fsf.org>
@@ -6621,12 +6647,12 @@
 2009-10-05  Karl Fogel  <kfogel@red-bean.com>
 
 	* bookmark.el (bookmark-handle-bookmark): If bookmark has no file,
-	  don't do anything related to relocating, just return nil.
+	don't do anything related to relocating, just return nil.
 	(bookmark-error-no-filename): New error.
 	(bookmark-default-handler): Signal `bookmark-error-no-filename' if
-	  bookmark has no file.  Don't even attempt to handle things that
-	  are not files; the whole point of custom handlers is to keep that
-	  knowledge elsewhere anyway.  Tighten some comments.
+	bookmark has no file.  Don't even attempt to handle things that
+	are not files; the whole point of custom handlers is to keep that
+	knowledge elsewhere anyway.  Tighten some comments.
 	(bookmark-file-or-variation-thereof): Remove now-unused function.
 	(bookmark-location): Doc string fix.
 	(Bug#4250)
@@ -6656,8 +6682,8 @@
 	(bookmark-relocate, bookmark-insert-location, bookmark-rename)
 	(bookmark-insert, bookmark-delete, bookmark-time-to-save-p)
 	(bookmark-edit-annotation-mode, bookmark-edit-annotation):
-	   Improve doc strings to say whether bookmark can be a string or
-	   a record or both, and make other consistency and clarity fixes.
+	Improve doc strings to say whether bookmark can be a string or
+	a record or both, and make other consistency and clarity fixes.
 	(bookmark-get-handler, bookmark--jump-via, bookmark-write-file)
 	(bookmark-default-annotation-text, bookmark-yank-word)
 	(bookmark-maybe-load-default-file, bookmark-maybe-sort-alist)
@@ -6665,12 +6691,12 @@
 	(bookmark-bmenu-show-filenames, bookmark-bmenu-hide-filenames)
 	(bookmark-bmenu-bookmark): Give these doc strings.
 	(bookmark-bmenu-check-position): Give this a doc string, but also
-	   add a FIXME comment about how the function may be pointless.
+	add a FIXME comment about how the function may be pointless.
 	(bookmark-default-handler): Rework doc string and change a
-	   parameter name, to clarify that this takes a bookmark record
-	   not a bookmark name.
+	parameter name, to clarify that this takes a bookmark record
+	not a bookmark name.
 	(bookmark-set): Change a parameter name to indicate its meaning,
-	   and improve the doc string a bit.
+	and improve the doc string a bit.
 	(Bug#4188)
 
 2009-10-04  Karl Fogel  <kfogel@red-bean.com>
--- a/lisp/cedet/semantic/db-find.el	Fri Apr 02 14:34:08 2010 +0000
+++ b/lisp/cedet/semantic/db-find.el	Sat Apr 03 12:47:25 2010 +0000
@@ -774,7 +774,7 @@
 		 (buffer-name))
 
       (data-debug-new-buffer "*SEMANTICDB lost-includes ADEBUG*")
-      (data-debug-insert-tag-list lost "*")
+      ;; (data-debug-insert-tag-list lost "*")
       )))
 
 (defun semanticdb-find-adebug-insert-scanned-tag-cons (consdata prefix prebuttontext)
--- a/lisp/cedet/semantic/imenu.el	Fri Apr 02 14:34:08 2010 +0000
+++ b/lisp/cedet/semantic/imenu.el	Sat Apr 03 12:47:25 2010 +0000
@@ -95,7 +95,7 @@
 
 (defcustom semantic-imenu-bucketize-type-members t
   "*Non-nil if members of a type should be grouped into buckets.
-nil means to keep them in the same order.
+A nil value means to keep them in the same order.
 Overriden to nil if `semantic-imenu-bucketize-file' is nil."
   :group 'semantic-imenu
   :type 'boolean)
@@ -167,8 +167,8 @@
 
 (defun semantic-imenu-goto-function (name position &optional rest)
   "Move point associated with NAME to POSITION.
-Used to override function `imenu-default-goto-function' so that we can continue
-to use overlays to maintain the current position.
+Used to override function `imenu-default-goto-function' so that
+we can continue to use overlays to maintain the current position.
 Optional argument REST is some extra stuff."
   (require 'pulse)
   (if (semantic-overlay-p position)
@@ -249,7 +249,7 @@
               'semantic-imenu-flush-fcn nil t)))
 
 (defun semantic-create-imenu-directory-index (&optional stream)
-  "Create an IMENU tag index based on all files active in semanticdb.
+  "Create an imenu tag index based on all files active in semanticdb.
 Optional argument STREAM is the stream of tags for the current buffer."
   (if (not semanticdb-current-database)
       (semantic-create-imenu-index-1 stream nil)
--- a/lisp/ehelp.el	Fri Apr 02 14:34:08 2010 +0000
+++ b/lisp/ehelp.el	Sat Apr 03 12:47:25 2010 +0000
@@ -94,10 +94,14 @@
     map)
   "Keymap defining commands available in `electric-help-mode'.")
 
+(defvar electric-help-orig-major-mode nil)
+(make-variable-buffer-local 'electric-help-orig-major-mode)
+
 (defun electric-help-mode ()
   "`with-electric-help' temporarily places its buffer in this mode.
-\(On exit from `with-electric-help', the buffer is put in default `major-mode'.)"
+\(On exit from `with-electric-help', the original `major-mode' is restored.)"
   (setq buffer-read-only t)
+  (setq electric-help-orig-major-mode major-mode)
   (setq mode-name "Help")
   (setq major-mode 'help)
   (setq mode-line-buffer-identification '(" Help:  %b"))
@@ -131,7 +135,7 @@
 
 When the user exits (with `electric-help-exit', or otherwise), the help
 buffer's window disappears (i.e., we use `save-window-excursion'), and
-BUFFER is put into default `major-mode' (or `fundamental-mode')."
+BUFFER is put back into its original major mode."
   (setq buffer (get-buffer-create (or buffer "*Help*")))
   (let ((one (one-window-p t))
 	(config (current-window-configuration))
@@ -170,13 +174,17 @@
       (set-buffer buffer)
       (setq buffer-read-only nil)
 
+      ;; Restore the original major mode saved by `electric-help-mode'.
       ;; We should really get a usable *Help* buffer when retaining
       ;; the electric one with `r'.  The problem is that a simple
-      ;; call to help-mode won't cut it; at least RET is bound wrong
-      ;; afterwards.  It's also not clear that `help-mode' is always
-      ;; the right thing, maybe we should add an optional parameter.
+      ;; call to `help-mode' won't cut it; e.g. RET is bound wrong
+      ;; afterwards (`View-scroll-line-forward' instead of `help-follow').
+      ;; That's because Help mode should be set with `with-help-window'
+      ;; instead of the direct call to `help-mode'. But at least
+      ;; RET works correctly on links after using `help-mode'.
+      ;; This is satisfactory enough.
       (condition-case ()
-          (funcall (or (default-value 'major-mode) 'fundamental-mode))
+          (funcall (or electric-help-orig-major-mode 'fundamental-mode))
         (error nil))
 
       (set-window-configuration config)
--- a/lisp/emacs-lisp/authors.el	Fri Apr 02 14:34:08 2010 +0000
+++ b/lisp/emacs-lisp/authors.el	Sat Apr 03 12:47:25 2010 +0000
@@ -427,6 +427,7 @@
     ("Geoff Voelker" :wrote "w32-fns.el" "w32.c" "w32.h" "w32heap.c"
      "w32heap.h" "w32inevt.c" "w32proc.c" "w32term.c" "ms-w32.h")
     ("Morten Welinder" :wrote "dosfns.c" "[many MS-DOS files]" "msdos.h")
+    ("Eli Zaretskii" :wrote "bidi.c" "[bidirectional display in xdisp.c]")
     ;; Not using this version any more.
 ;;;    ("Pace Willisson" :wrote "ispell.el")
     ;; FIXME overwritten by Author:.
--- a/lisp/gnus/ChangeLog	Fri Apr 02 14:34:08 2010 +0000
+++ b/lisp/gnus/ChangeLog	Sat Apr 03 12:47:25 2010 +0000
@@ -1,3 +1,8 @@
+2010-04-01  Andreas Schwab  <schwab@linux-m68k.org>
+
+	* mm-uu.el (mm-uu-pgp-signed-extract-1): Use buffer-file-coding-system
+	if set.
+
 2010-03-31  Katsumi Yamaoka  <yamaoka@jpl.org>
 
 	* gnus-art.el (gnus-article-browse-html-save-cid-content): Rename from
--- a/lisp/gnus/mm-uu.el	Fri Apr 02 14:34:08 2010 +0000
+++ b/lisp/gnus/mm-uu.el	Sat Apr 03 12:47:25 2010 +0000
@@ -486,9 +486,11 @@
       (if (mm-uu-pgp-signed-test)
 	  (progn
 	    (mml2015-clean-buffer)
-	    (let ((coding-system-for-write (or gnus-newsgroup-charset
+	    (let ((coding-system-for-write (or buffer-file-coding-system
+					       gnus-newsgroup-charset
 					       'iso-8859-1))
-		  (coding-system-for-read (or gnus-newsgroup-charset
+		  (coding-system-for-read (or buffer-file-coding-system
+					      gnus-newsgroup-charset
 					      'iso-8859-1)))
 	      (funcall (mml2015-clear-verify-function))))
 	(when (and mml2015-use (null (mml2015-clear-verify-function)))
--- a/lisp/ldefs-boot.el	Fri Apr 02 14:34:08 2010 +0000
+++ b/lisp/ldefs-boot.el	Sat Apr 03 12:47:25 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
@@ -10464,7 +10464,13 @@
 
 ;;;### (autoloads (flyspell-buffer flyspell-region flyspell-mode-off
 ;;;;;;  turn-off-flyspell turn-on-flyspell flyspell-mode flyspell-prog-mode)
+<<<<<<< TREE
 ;;;;;;  "flyspell" "textmodes/flyspell.el" (19370 36541))
+||||||| BASE-REVISION
+;;;;;;  "flyspell" "textmodes/flyspell.el" (19352 21362))
+=======
+;;;;;;  "flyspell" "textmodes/flyspell.el" (19369 7847))
+>>>>>>> MERGE-SOURCE
 ;;; Generated autoloads from textmodes/flyspell.el
 
 (autoload 'flyspell-prog-mode "flyspell" "\
@@ -10786,6 +10792,7 @@
 
 ;;;***
 
+<<<<<<< TREE
 ;;;### (autoloads (gdb gdb-enable-debug) "gdb-mi" "progmodes/gdb-mi.el"
 ;;;;;;  (19375 49830))
 ;;; Generated autoloads from progmodes/gdb-mi.el
@@ -10796,6 +10803,19 @@
 (custom-autoload 'gdb-enable-debug "gdb-mi" t)
 
 (autoload 'gdb "gdb-mi" "\
+||||||| BASE-REVISION
+;;;### (autoloads (gdb-enable-debug gdb) "gdb-ui" "progmodes/gdb-ui.el"
+;;;;;;  (19352 21362))
+;;; Generated autoloads from progmodes/gdb-ui.el
+
+(autoload 'gdb "gdb-ui" "\
+=======
+;;;### (autoloads (gdb-enable-debug gdb) "gdb-ui" "progmodes/gdb-ui.el"
+;;;;;;  (19372 60979))
+;;; Generated autoloads from progmodes/gdb-ui.el
+
+(autoload 'gdb "gdb-ui" "\
+>>>>>>> MERGE-SOURCE
 Run gdb on program FILE in buffer *gud-FILE*.
 The directory containing FILE becomes the initial working directory
 and source-file directory for your debugger.
@@ -13649,8 +13669,16 @@
 ;;;;;;  ido-find-alternate-file ido-find-file-other-window ido-find-file
 ;;;;;;  ido-find-file-in-dir ido-switch-buffer-other-frame ido-insert-buffer
 ;;;;;;  ido-kill-buffer ido-display-buffer ido-switch-buffer-other-window
+<<<<<<< TREE
 ;;;;;;  ido-switch-buffer ido-mode ido-mode) "ido" "ido.el" (19292
 ;;;;;;  15231))
+||||||| BASE-REVISION
+;;;;;;  ido-switch-buffer ido-mode ido-mode) "ido" "ido.el" (19352
+;;;;;;  21354))
+=======
+;;;;;;  ido-switch-buffer ido-mode ido-mode) "ido" "ido.el" (19355
+;;;;;;  62587))
+>>>>>>> MERGE-SOURCE
 ;;; Generated autoloads from ido.el
 
 (defvar ido-mode nil "\
@@ -14142,7 +14170,13 @@
 ;;;;;;  image-dired-jump-thumbnail-buffer image-dired-delete-tag
 ;;;;;;  image-dired-tag-files image-dired-show-all-from-dir image-dired-display-thumbs
 ;;;;;;  image-dired-dired-with-window-configuration image-dired-dired-insert-marked-thumbs)
+<<<<<<< TREE
 ;;;;;;  "image-dired" "image-dired.el" (19370 36540))
+||||||| BASE-REVISION
+;;;;;;  "image-dired" "image-dired.el" (19352 21354))
+=======
+;;;;;;  "image-dired" "image-dired.el" (19367 42949))
+>>>>>>> MERGE-SOURCE
 ;;; Generated autoloads from image-dired.el
 
 (autoload 'image-dired-dired-insert-marked-thumbs "image-dired" "\
@@ -15394,7 +15428,13 @@
 
 ;;;***
 
+<<<<<<< TREE
 ;;;### (autoloads (js-mode) "js" "progmodes/js.el" (19279 5151))
+||||||| BASE-REVISION
+;;;### (autoloads (js-mode) "js" "progmodes/js.el" (19352 21355))
+=======
+;;;### (autoloads (js-mode) "js" "progmodes/js.el" (19375 48608))
+>>>>>>> MERGE-SOURCE
 ;;; Generated autoloads from progmodes/js.el
 
 (autoload 'js-mode "js" "\
@@ -16503,7 +16543,13 @@
 
 ;;;### (autoloads (makefile-imake-mode makefile-bsdmake-mode makefile-makepp-mode
 ;;;;;;  makefile-gmake-mode makefile-automake-mode makefile-mode)
+<<<<<<< TREE
 ;;;;;;  "make-mode" "progmodes/make-mode.el" (19372 27330))
+||||||| BASE-REVISION
+;;;;;;  "make-mode" "progmodes/make-mode.el" (19352 21355))
+=======
+;;;;;;  "make-mode" "progmodes/make-mode.el" (19370 15152))
+>>>>>>> MERGE-SOURCE
 ;;; Generated autoloads from progmodes/make-mode.el
 
 (autoload 'makefile-mode "make-mode" "\
@@ -16735,7 +16781,13 @@
 ;;;;;;  message-forward-make-body message-forward message-recover
 ;;;;;;  message-supersede message-cancel-news message-followup message-wide-reply
 ;;;;;;  message-reply message-news message-mail message-mode) "message"
+<<<<<<< TREE
 ;;;;;;  "gnus/message.el" (19370 36541))
+||||||| BASE-REVISION
+;;;;;;  "gnus/message.el" (19352 21361))
+=======
+;;;;;;  "gnus/message.el" (19374 17766))
+>>>>>>> MERGE-SOURCE
 ;;; Generated autoloads from gnus/message.el
 
 (define-mail-user-agent 'message-user-agent 'message-mail 'message-send-and-exit 'message-kill-buffer 'message-send-hook)
@@ -17381,7 +17433,13 @@
 ;;;***
 
 ;;;### (autoloads (mm-uu-dissect-text-parts mm-uu-dissect) "mm-uu"
+<<<<<<< TREE
 ;;;;;;  "gnus/mm-uu.el" (19279 5150))
+||||||| BASE-REVISION
+;;;;;;  "gnus/mm-uu.el" (19352 21355))
+=======
+;;;;;;  "gnus/mm-uu.el" (19382 2266))
+>>>>>>> MERGE-SOURCE
 ;;; Generated autoloads from gnus/mm-uu.el
 
 (autoload 'mm-uu-dissect "mm-uu" "\
@@ -22607,8 +22665,16 @@
 
 ;;;***
 
+<<<<<<< TREE
 ;;;### (autoloads nil "reftex-vars" "textmodes/reftex-vars.el" (19370
 ;;;;;;  36541))
+||||||| BASE-REVISION
+;;;### (autoloads nil "reftex-vars" "textmodes/reftex-vars.el" (19352
+;;;;;;  21358))
+=======
+;;;### (autoloads nil "reftex-vars" "textmodes/reftex-vars.el" (19367
+;;;;;;  42950))
+>>>>>>> MERGE-SOURCE
 ;;; Generated autoloads from textmodes/reftex-vars.el
 (put 'reftex-vref-is-default 'safe-local-variable (lambda (x) (or (stringp x) (symbolp x))))
 (put 'reftex-fref-is-default 'safe-local-variable (lambda (x) (or (stringp x) (symbolp x))))
@@ -22860,8 +22926,16 @@
 ;;;;;;  rmail-secondary-file-directory rmail-primary-inbox-list rmail-highlighted-headers
 ;;;;;;  rmail-retry-ignored-headers rmail-displayed-headers rmail-ignored-headers
 ;;;;;;  rmail-dont-reply-to-names rmail-user-mail-address-regexp
+<<<<<<< TREE
 ;;;;;;  rmail-movemail-variant-p) "rmail" "mail/rmail.el" (19370
 ;;;;;;  36541))
+||||||| BASE-REVISION
+;;;;;;  rmail-movemail-variant-p) "rmail" "mail/rmail.el" (19352
+;;;;;;  21360))
+=======
+;;;;;;  rmail-movemail-variant-p) "rmail" "mail/rmail.el" (19363
+;;;;;;  36802))
+>>>>>>> MERGE-SOURCE
 ;;; Generated autoloads from mail/rmail.el
 
 (autoload 'rmail-movemail-variant-p "rmail" "\
@@ -23828,7 +23902,13 @@
 ;;;;;;  mail-alias-file mail-default-reply-to mail-archive-file-name
 ;;;;;;  mail-header-separator send-mail-function mail-interactive
 ;;;;;;  mail-self-blind mail-specify-envelope-from mail-from-style)
+<<<<<<< TREE
 ;;;;;;  "sendmail" "mail/sendmail.el" (19338 9841))
+||||||| BASE-REVISION
+;;;;;;  "sendmail" "mail/sendmail.el" (19352 21361))
+=======
+;;;;;;  "sendmail" "mail/sendmail.el" (19374 15070))
+>>>>>>> MERGE-SOURCE
 ;;; Generated autoloads from mail/sendmail.el
 
 (defvar mail-from-style 'default "\
@@ -23982,9 +24062,11 @@
 (custom-autoload 'mail-signature-file "sendmail" t)
 
 (defvar 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'.")
 
 (custom-autoload 'mail-default-directory "sendmail" t)
 
@@ -24705,7 +24787,13 @@
 ;;;***
 
 ;;;### (autoloads (smiley-buffer smiley-region) "smiley" "gnus/smiley.el"
+<<<<<<< TREE
 ;;;;;;  (19370 36541))
+||||||| BASE-REVISION
+;;;;;;  (19352 21358))
+=======
+;;;;;;  (19367 42950))
+>>>>>>> MERGE-SOURCE
 ;;; Generated autoloads from gnus/smiley.el
 
 (autoload 'smiley-region "smiley" "\
@@ -26723,7 +26811,13 @@
 ;;;;;;  tex-start-commands tex-start-options slitex-run-command latex-run-command
 ;;;;;;  tex-run-command tex-offer-save tex-main-file tex-first-line-header-regexp
 ;;;;;;  tex-directory tex-shell-file-name) "tex-mode" "textmodes/tex-mode.el"
+<<<<<<< TREE
 ;;;;;;  (19323 49698))
+||||||| BASE-REVISION
+;;;;;;  (19352 21363))
+=======
+;;;;;;  (19371 46148))
+>>>>>>> MERGE-SOURCE
 ;;; Generated autoloads from textmodes/tex-mode.el
 
 (defvar tex-shell-file-name nil "\
@@ -27718,7 +27812,13 @@
 ;;;***
 
 ;;;### (autoloads (tmm-prompt tmm-menubar-mouse tmm-menubar) "tmm"
+<<<<<<< TREE
 ;;;;;;  "tmm.el" (19279 5148))
+||||||| BASE-REVISION
+;;;;;;  "tmm.el" (19352 21359))
+=======
+;;;;;;  "tmm.el" (19376 53416))
+>>>>>>> MERGE-SOURCE
 ;;; Generated autoloads from tmm.el
  (define-key global-map "\M-`" 'tmm-menubar)
  (define-key global-map [menu-bar mouse-1] 'tmm-menubar-mouse)
@@ -27968,7 +28068,13 @@
 ;;;***
 
 ;;;### (autoloads (trace-function-background trace-function trace-buffer)
+<<<<<<< TREE
 ;;;;;;  "trace" "emacs-lisp/trace.el" (19370 36541))
+||||||| BASE-REVISION
+;;;;;;  "trace" "emacs-lisp/trace.el" (19352 21359))
+=======
+;;;;;;  "trace" "emacs-lisp/trace.el" (19367 42950))
+>>>>>>> MERGE-SOURCE
 ;;; Generated autoloads from emacs-lisp/trace.el
 
 (defvar trace-buffer (purecopy "*trace-output*") "\
@@ -28005,7 +28111,13 @@
 ;;;### (autoloads (tramp-unload-tramp tramp-completion-handle-file-name-completion
 ;;;;;;  tramp-completion-handle-file-name-all-completions tramp-unload-file-name-handlers
 ;;;;;;  tramp-file-name-handler tramp-syntax tramp-mode) "tramp"
+<<<<<<< TREE
 ;;;;;;  "net/tramp.el" (19370 36541))
+||||||| BASE-REVISION
+;;;;;;  "net/tramp.el" (19352 21361))
+=======
+;;;;;;  "net/tramp.el" (19356 59749))
+>>>>>>> MERGE-SOURCE
 ;;; Generated autoloads from net/tramp.el
 
 (defvar tramp-mode t "\
@@ -29228,7 +29340,13 @@
 ;;;;;;  vc-create-tag vc-merge vc-insert-headers vc-revision-other-window
 ;;;;;;  vc-root-diff vc-diff vc-version-diff vc-register vc-next-action
 ;;;;;;  vc-before-checkin-hook vc-checkin-hook vc-checkout-hook)
+<<<<<<< TREE
 ;;;;;;  "vc" "vc.el" (19370 36540))
+||||||| BASE-REVISION
+;;;;;;  "vc" "vc.el" (19352 21359))
+=======
+;;;;;;  "vc" "vc.el" (19371 62620))
+>>>>>>> MERGE-SOURCE
 ;;; Generated autoloads from vc.el
 
 (defvar vc-checkout-hook nil "\
@@ -29315,9 +29433,10 @@
 \(fn HISTORIC &optional NOT-URGENT)" t nil)
 
 (autoload 'vc-root-diff "vc" "\
-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
@@ -29372,12 +29491,20 @@
 
 (autoload 'vc-print-log "vc" "\
 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.
 
 \(fn &optional WORKING-REVISION LIMIT)" t nil)
 
 (autoload 'vc-print-root-log "vc" "\
-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.
 
 \(fn &optional LIMIT)" t nil)
 
@@ -31480,7 +31607,13 @@
 ;;;***
 
 ;;;### (autoloads (woman-find-file woman-dired-find-file woman woman-locale)
+<<<<<<< TREE
 ;;;;;;  "woman" "woman.el" (19370 36540))
+||||||| BASE-REVISION
+;;;;;;  "woman" "woman.el" (19352 21359))
+=======
+;;;;;;  "woman" "woman.el" (19359 48737))
+>>>>>>> MERGE-SOURCE
 ;;; Generated autoloads from woman.el
 
 (defvar woman-locale nil "\
@@ -31834,6 +31967,7 @@
 ;;;;;;  "cedet/semantic/edit.el" "cedet/semantic/find.el" "cedet/semantic/format.el"
 ;;;;;;  "cedet/semantic/fw.el" "cedet/semantic/grammar-wy.el" "cedet/semantic/grammar.el"
 ;;;;;;  "cedet/semantic/html.el" "cedet/semantic/ia-sb.el" "cedet/semantic/ia.el"
+<<<<<<< TREE
 ;;;;;;  "cedet/semantic/idle.el" "cedet/semantic/imenu.el" "cedet/semantic/java.el"
 ;;;;;;  "cedet/semantic/lex-spp.el" "cedet/semantic/lex.el" "cedet/semantic/loaddefs.el"
 ;;;;;;  "cedet/semantic/mru-bookmark.el" "cedet/semantic/sb.el" "cedet/semantic/scope.el"
@@ -31842,6 +31976,25 @@
 ;;;;;;  "cedet/semantic/symref/global.el" "cedet/semantic/symref/grep.el"
 ;;;;;;  "cedet/semantic/symref/idutils.el" "cedet/semantic/symref/list.el"
 ;;;;;;  "cedet/semantic/tag-file.el" "cedet/semantic/tag-ls.el" "cedet/semantic/tag-write.el"
+||||||| BASE-REVISION
+;;;;;;  "cedet/semantic/idle.el" "cedet/semantic/java.el" "cedet/semantic/lex-spp.el"
+;;;;;;  "cedet/semantic/lex.el" "cedet/semantic/mru-bookmark.el"
+;;;;;;  "cedet/semantic/sb.el" "cedet/semantic/scope.el" "cedet/semantic/senator.el"
+;;;;;;  "cedet/semantic/sort.el" "cedet/semantic/symref.el" "cedet/semantic/symref/cscope.el"
+;;;;;;  "cedet/semantic/symref/filter.el" "cedet/semantic/symref/global.el"
+;;;;;;  "cedet/semantic/symref/grep.el" "cedet/semantic/symref/idutils.el"
+;;;;;;  "cedet/semantic/symref/list.el" "cedet/semantic/tag-file.el"
+;;;;;;  "cedet/semantic/tag-ls.el" "cedet/semantic/tag-write.el"
+=======
+;;;;;;  "cedet/semantic/idle.el" "cedet/semantic/imenu.el" "cedet/semantic/java.el"
+;;;;;;  "cedet/semantic/lex-spp.el" "cedet/semantic/lex.el" "cedet/semantic/mru-bookmark.el"
+;;;;;;  "cedet/semantic/sb.el" "cedet/semantic/scope.el" "cedet/semantic/senator.el"
+;;;;;;  "cedet/semantic/sort.el" "cedet/semantic/symref.el" "cedet/semantic/symref/cscope.el"
+;;;;;;  "cedet/semantic/symref/filter.el" "cedet/semantic/symref/global.el"
+;;;;;;  "cedet/semantic/symref/grep.el" "cedet/semantic/symref/idutils.el"
+;;;;;;  "cedet/semantic/symref/list.el" "cedet/semantic/tag-file.el"
+;;;;;;  "cedet/semantic/tag-ls.el" "cedet/semantic/tag-write.el"
+>>>>>>> MERGE-SOURCE
 ;;;;;;  "cedet/semantic/tag.el" "cedet/semantic/texi.el" "cedet/semantic/util-modes.el"
 ;;;;;;  "cedet/semantic/util.el" "cedet/semantic/wisent.el" "cedet/semantic/wisent/comp.el"
 ;;;;;;  "cedet/semantic/wisent/java-tags.el" "cedet/semantic/wisent/javascript.el"
@@ -31955,6 +32108,7 @@
 ;;;;;;  "org/org-mac-message.el" "org/org-macs.el" "org/org-mew.el"
 ;;;;;;  "org/org-mhe.el" "org/org-mouse.el" "org/org-protocol.el"
 ;;;;;;  "org/org-rmail.el" "org/org-src.el" "org/org-vm.el" "org/org-w3m.el"
+<<<<<<< TREE
 ;;;;;;  "org/org-wl.el" "patcomp.el" "pcvs-info.el" "pcvs-parse.el"
 ;;;;;;  "pcvs-util.el" "pgg-def.el" "pgg-parse.el" "pgg-pgp.el" "pgg-pgp5.el"
 ;;;;;;  "play/gamegrid.el" "play/gametree.el" "play/meese.el" "progmodes/ada-prj.el"
@@ -31977,6 +32131,55 @@
 ;;;;;;  "url/url-nfs.el" "url/url-proxy.el" "url/url-vars.el" "vc-dav.el"
 ;;;;;;  "vcursor.el" "vt-control.el" "vt100-led.el" "w32-fns.el"
 ;;;;;;  "w32-vars.el" "x-dnd.el") (19375 51700 955763))
+||||||| BASE-REVISION
+;;;;;;  "org/org-wl.el" "password-cache.el" "patcomp.el" "pcvs-info.el"
+;;;;;;  "pcvs-parse.el" "pcvs-util.el" "pgg-def.el" "pgg-parse.el"
+;;;;;;  "pgg-pgp.el" "pgg-pgp5.el" "play/gamegrid.el" "play/gametree.el"
+;;;;;;  "play/meese.el" "progmodes/ada-prj.el" "progmodes/cc-align.el"
+;;;;;;  "progmodes/cc-awk.el" "progmodes/cc-bytecomp.el" "progmodes/cc-cmds.el"
+;;;;;;  "progmodes/cc-defs.el" "progmodes/cc-fonts.el" "progmodes/cc-langs.el"
+;;;;;;  "progmodes/cc-menus.el" "progmodes/ebnf-abn.el" "progmodes/ebnf-bnf.el"
+;;;;;;  "progmodes/ebnf-dtd.el" "progmodes/ebnf-ebx.el" "progmodes/ebnf-iso.el"
+;;;;;;  "progmodes/ebnf-otz.el" "progmodes/ebnf-yac.el" "progmodes/idlw-complete-structtag.el"
+;;;;;;  "progmodes/idlw-help.el" "progmodes/idlw-toolbar.el" "progmodes/mantemp.el"
+;;;;;;  "progmodes/xscheme.el" "ps-def.el" "ps-mule.el" "ps-samp.el"
+;;;;;;  "s-region.el" "saveplace.el" "sb-image.el" "scroll-bar.el"
+;;;;;;  "select.el" "soundex.el" "subdirs.el" "tempo.el" "textmodes/bib-mode.el"
+;;;;;;  "textmodes/makeinfo.el" "textmodes/page-ext.el" "textmodes/refbib.el"
+;;;;;;  "textmodes/refer.el" "textmodes/reftex-auc.el" "textmodes/reftex-dcr.el"
+;;;;;;  "textmodes/reftex-ref.el" "textmodes/reftex-sel.el" "textmodes/reftex-toc.el"
+;;;;;;  "textmodes/texnfo-upd.el" "timezone.el" "tooltip.el" "tree-widget.el"
+;;;;;;  "uniquify.el" "url/url-about.el" "url/url-cookie.el" "url/url-dired.el"
+;;;;;;  "url/url-expand.el" "url/url-ftp.el" "url/url-history.el"
+;;;;;;  "url/url-imap.el" "url/url-methods.el" "url/url-nfs.el" "url/url-proxy.el"
+;;;;;;  "url/url-vars.el" "vc-dav.el" "vcursor.el" "vt-control.el"
+;;;;;;  "vt100-led.el" "w32-fns.el" "w32-vars.el" "x-dnd.el") (19352
+;;;;;;  23109 108328))
+=======
+;;;;;;  "org/org-wl.el" "password-cache.el" "patcomp.el" "pcvs-info.el"
+;;;;;;  "pcvs-parse.el" "pcvs-util.el" "pgg-def.el" "pgg-parse.el"
+;;;;;;  "pgg-pgp.el" "pgg-pgp5.el" "play/gamegrid.el" "play/gametree.el"
+;;;;;;  "play/meese.el" "progmodes/ada-prj.el" "progmodes/cc-align.el"
+;;;;;;  "progmodes/cc-awk.el" "progmodes/cc-bytecomp.el" "progmodes/cc-cmds.el"
+;;;;;;  "progmodes/cc-defs.el" "progmodes/cc-fonts.el" "progmodes/cc-langs.el"
+;;;;;;  "progmodes/cc-menus.el" "progmodes/ebnf-abn.el" "progmodes/ebnf-bnf.el"
+;;;;;;  "progmodes/ebnf-dtd.el" "progmodes/ebnf-ebx.el" "progmodes/ebnf-iso.el"
+;;;;;;  "progmodes/ebnf-otz.el" "progmodes/ebnf-yac.el" "progmodes/idlw-complete-structtag.el"
+;;;;;;  "progmodes/idlw-help.el" "progmodes/idlw-toolbar.el" "progmodes/mantemp.el"
+;;;;;;  "progmodes/xscheme.el" "ps-def.el" "ps-mule.el" "ps-samp.el"
+;;;;;;  "s-region.el" "saveplace.el" "sb-image.el" "scroll-bar.el"
+;;;;;;  "select.el" "soundex.el" "subdirs.el" "tempo.el" "textmodes/bib-mode.el"
+;;;;;;  "textmodes/makeinfo.el" "textmodes/page-ext.el" "textmodes/refbib.el"
+;;;;;;  "textmodes/refer.el" "textmodes/reftex-auc.el" "textmodes/reftex-dcr.el"
+;;;;;;  "textmodes/reftex-ref.el" "textmodes/reftex-sel.el" "textmodes/reftex-toc.el"
+;;;;;;  "textmodes/texnfo-upd.el" "timezone.el" "tooltip.el" "tree-widget.el"
+;;;;;;  "uniquify.el" "url/url-about.el" "url/url-cookie.el" "url/url-dired.el"
+;;;;;;  "url/url-expand.el" "url/url-ftp.el" "url/url-history.el"
+;;;;;;  "url/url-imap.el" "url/url-methods.el" "url/url-nfs.el" "url/url-proxy.el"
+;;;;;;  "url/url-vars.el" "vc-dav.el" "vcursor.el" "vt-control.el"
+;;;;;;  "vt100-led.el" "w32-fns.el" "w32-vars.el" "x-dnd.el") (19382
+;;;;;;  35538 347447))
+>>>>>>> MERGE-SOURCE
 
 ;;;***
 
--- a/lisp/progmodes/bug-reference.el	Fri Apr 02 14:34:08 2010 +0000
+++ b/lisp/progmodes/bug-reference.el	Sat Apr 03 12:47:25 2010 +0000
@@ -41,13 +41,20 @@
 (defvar bug-reference-url-format nil
   "Format used to turn a bug number into a URL.
 The bug number is supplied as a string, so this should have a single %s.
+This can also be a function designator; it is called without arguments
+ and should return a string.
+It can use `match-string' to get parts matched against
+`bug-reference-bug-regexp', specifically:
+ 1. issue kind (bug, patch, rfe &c)
+ 2. issue number.
+
 There is no default setting for this, it must be set per file.")
 
 ;;;###autoload
 (put 'bug-reference-url-format 'safe-local-variable 'stringp)
 
 (defconst bug-reference-bug-regexp
-  "\\(?:[Bb]ug ?#\\|PR [a-z-+]+/\\)\\([0-9]+\\)"
+  "\\([Bb]ug ?#\\|[Pp]atch ?#\\|RFE ?#\\|PR [a-z-+]+/\\)\\([0-9]+\\)"
   "Regular expression which matches bug references.")
 
 (defun bug-reference-set-overlay-properties ()
@@ -87,9 +94,11 @@
 	    (overlay-put overlay 'category 'bug-reference)
 	    ;; Don't put a link if format is undefined
 	    (when bug-reference-url-format
-	      (overlay-put overlay 'bug-reference-url
-			   (format bug-reference-url-format
-				   (match-string-no-properties 1))))))))))
+              (overlay-put overlay 'bug-reference-url
+                           (if (stringp bug-reference-url-format)
+                               (format bug-reference-url-format
+                                       (match-string-no-properties 2))
+                             (funcall bug-reference-url-format))))))))))
 
 ;; Taken from button.el.
 (defun bug-reference-push-button (&optional pos use-mouse-action)
@@ -121,6 +130,11 @@
       (widen)
       (bug-reference-unfontify (point-min) (point-max)))))
 
+(defun turn-on-bug-reference-mode ()
+  "Unconditionally turn bug reference mode on."
+  (unless bug-reference-mode
+    (bug-reference-mode)))
+
 ;;;###autoload
 (define-minor-mode bug-reference-prog-mode
   "Like `bug-reference-mode', but only buttonize in comments and strings."
@@ -134,5 +148,10 @@
       (widen)
       (bug-reference-unfontify (point-min) (point-max)))))
 
+(defun turn-on-bug-reference-prog-mode ()
+  "Unconditionally turn bug reference prog mode on."
+  (unless bug-reference-prog-mode
+    (bug-reference-prog-mode)))
+
 ;; arch-tag: b138abce-e5c3-475e-bd58-7afba40387ea
 ;;; bug-reference.el ends here
--- a/lisp/tmm.el	Fri Apr 02 14:34:08 2010 +0000
+++ b/lisp/tmm.el	Sat Apr 03 12:47:25 2010 +0000
@@ -465,8 +465,8 @@
 	      ((if (listp (cdr-safe (cdr-safe elt)))
 		   (or (keymapp (cdr-safe (cdr-safe elt)))
 		       (eq (car (cdr-safe (cdr-safe elt))) 'lambda))
-		 (and (symbolp (cdr-safe (cdr-safe elt))
-			       (fboundp (cdr-safe (cdr-safe elt))))))
+		 (and (symbolp (cdr-safe (cdr-safe elt)))
+			       (fboundp (cdr-safe (cdr-safe elt)))))
 	       (setq km (cddr elt))
 	       (and (stringp (car elt)) (setq str (car elt)))
 	       (and str
--- a/msdos/ChangeLog	Fri Apr 02 14:34:08 2010 +0000
+++ b/msdos/ChangeLog	Sat Apr 03 12:47:25 2010 +0000
@@ -735,7 +735,7 @@
 
 1994-04-30  Morten Welinder  (terra@diku.dk)
 
-	* sed1.inp: don't comment out the inc-vers run as that
+	* sed1.inp: Don't comment out the inc-vers run as that
 	does not exist anymore.
 	Don't reset DEBUG_MOLE as that no longer is used.
 	Identify the file being patched as src/...
@@ -758,7 +758,7 @@
 
 1994-01-08  Morten Welinder  (terra@diku.dk)
 
-	* sed3.inp: improve make-compatibility by not using drive
+	* sed3.inp: Improve make-compatibility by not using drive
 	specifications and by not specifying an explicit shell.
 
 1994-01-07  Morten Welinder  (terra@diku.dk)
--- a/src/ChangeLog	Fri Apr 02 14:34:08 2010 +0000
+++ b/src/ChangeLog	Sat Apr 03 12:47:25 2010 +0000
@@ -1,3 +1,22 @@
+2010-04-03  Eli Zaretskii  <eliz@gnu.org>
+
+	* w32fns.c (x_create_tip_frame): Copy `parms' before we modify it
+	in this function.  (Bug#5703)
+
+2010-04-03  Chong Yidong  <cyd@stupidchicken.com>
+
+	* nsterm.h: Fix last change.
+
+2010-04-03  Dan Nicolaescu  <dann@ics.uci.edu>
+
+	* m/intel386.h (NO_REMAP): Move definition ...
+	* s/msdos.h (NO_REMAP): ... here.
+
+	* m/vax.h (CRT0_DUMMIES): Remove, unused.
+
+	* ecrt0.c: Remove MSDOS, m68k and __sparc__ conditionals, file not
+	used on those platforms.
+
 2010-04-02  Dan Nicolaescu  <dann@ics.uci.edu>
 
 	Remove extern errno declarations.
@@ -118,7 +137,7 @@
 
 	* xdisp.c (x_consider_frame_title, update_window_cursor):
 	Remove HAVE_NS conditionals.
-	(prepare_menu_bars)[HAVE_NS]: Call ns_set_doc_edited.
+	(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.
@@ -475,7 +494,7 @@
 2010-03-12  Eli Zaretskii  <eliz@gnu.org>
 
 	These changes remove termcap.c from the build on Posix platforms.
-	* Makefilie.in (termcapobj): Move termcap.o from here...
+	* Makefile.in (termcapobj): Move termcap.o from here...
 	(MSDOS_OBJ): ...to here.
 	(termcapobj) [!LIBS_TERMCAP]: Remove specialized value, as it is
 	now identical to when LIBS_TERMCAP is defined.
@@ -760,7 +779,7 @@
 2010-01-19  Alan Mackenzie  <acm@muc.de>
 
 	Fix spurious before-change-functions invocation from (insert ?\n).
-	* textprop.c (set_text_properties): rename parameter
+	* textprop.c (set_text_properties): Rename parameter
 	`signal_after_change_p' to `coherent_change_p', and make the
 	invocation of `modify_region' conditional on it.
 
@@ -10782,7 +10801,7 @@
 
 	* font.c (Vfont_encoding_alist, find_font_encoding): Move from
 	fontset.c.
-	(font_pixel_size)[! HAVE_WINDOW_SYSTEM]: Return 1.
+	(font_pixel_size) [! HAVE_WINDOW_SYSTEM]: Return 1.
 	(font_open_entity): Update FRAME_X_DISPLAY_INFO (f)->n_fonts,
 	FRAME_SMALLEST_CHAR_WIDTH (f), and FRAME_SMALLEST_FONT_HEIGHT (f)
 	only when HAVE_WINDOW_SYSTEM is defined.
@@ -20616,7 +20635,7 @@
 
 2007-08-29  ARISAWA Akihiro  <ari@mbf.ocn.ne.jp>  (tiny change)
 
-	* term.c (dissociate_if_controlling_tty)[USG]: Fix parse error.
+	* term.c (dissociate_if_controlling_tty) [USG]: Fix parse error.
 
 2007-08-29  Yoshiaki Kasahara  <kasahara@nc.kyushu-u.ac.jp>  (tiny change)
 
--- a/src/ChangeLog.10	Fri Apr 02 14:34:08 2010 +0000
+++ b/src/ChangeLog.10	Sat Apr 03 12:47:25 2010 +0000
@@ -2137,7 +2137,7 @@
 
 	* Makefile.in (keymap.o): Add "keymap.h" and "window.h" dependencies.
 
-	* keymap.c: include "window.h".
+	* keymap.c: Include "window.h".
 	(Fcommand_remapping): New optional POSITION argument.
 	(Fkey_binding): New optional POSITION argument.  Completely rework
 	handling of mouse clicks to get the same order of keymaps as
@@ -5867,9 +5867,9 @@
 
 2005-12-26  Luc Teirlinck  <teirllm@auburn.edu>
 
-	* keyboard.h: extern last_point_position_window.
-
-	* undo.c: include keyboard.h.
+	* keyboard.h: Extern last_point_position_window.
+
+	* undo.c: Include keyboard.h.
 
 	* Makefile.in (undo.o): Depend on keyboard.h.
 
@@ -8276,7 +8276,7 @@
 	* xdisp.c (syms_of_xdisp) <nobreak-char-display>: Doc fix.
 	(syms_of_xdisp) <void-text-area-pointer>: Doc fix.
 
-	* fileio.c (Frename_file)[!DOS_NT]: Don't call chown on MSDOS/Windows.
+	* fileio.c (Frename_file) [!DOS_NT]: Don't call chown on MSDOS/Windows.
 
 2005-06-23  Richard M. Stallman  <rms@gnu.org>
 
@@ -12611,7 +12611,7 @@
 	* macterm.c (mac_check_for_quit_char): Remove warning for using
 	NULL where 0 should be used.
 	* unexmacosx.c: Use malloc/malloc.h on Tiger instead of
-	objc/malloc.h
+	objc/malloc.h.
 	* mac.c: Include time.h for Tiger compatibility.
 
 2004-10-07  Kim F. Storm  <storm@cua.dk>
@@ -12843,7 +12843,7 @@
 	* Makefile.in (msdos.o): Depend on buffer.h, commands.h, and
 	blockinput.h.
 	(dosfns.o): Depend on blockinput.h, window.h, dispextern.h,
-	charset.h, and coding.h
+	charset.h, and coding.h.
 	(w16select.o): Depend on buffer.h, charset.h, coding.h, and composite.h.
 	(term.o): Depend on window.h and keymap.h.
 	(abbrev.o): Depend on syntax.h.
@@ -17222,7 +17222,7 @@
 2003-09-01  Jason Rumney  <jasonr@gnu.org>
 
 	* makefile.w32-in (alloca.o): Remove.
-	(coding.o): Depend on intervals.h
+	(coding.o): Depend on intervals.h.
 	(emacs.o, bytecode.o): Depend on window.h.
 
 2003-09-01  Dave Love  <fx@gnu.org>
@@ -22643,7 +22643,7 @@
 	(Fx_popup_menu): Don't show pop up menu until preceding one is
 	actually cleaned up.  Moved UNGCPRO outside #ifdef HAVE_MENUS block.
 
-	* w32menu.c: Changes adapted from xmenu.c
+	* w32menu.c: Changes adapted from xmenu.c.
 	(set_frame_menubar): First parse all submenus,
 	then make widget_value trees from them.
 	Don't allocate any widget_value objects
@@ -24232,7 +24232,7 @@
 	m/ibmps2-aix.h, m/ibmrs6000.h, m/ibmrt-aix.h, m/ibmrt.h,
 	m/ibms390.h, m/intel386.h, m/iris4d.h, m/irist.h, m/isi-ov.h,
 	m/m68k.h, m/macppc.h, m/masscomp.h, m/mg1.h, m/mips-siemens.h,
-	m/mips.h, m/news-r6.h, m/news.h, m/next.h, m/nh3000.h, m/nh4000.h
+	m/mips.h, m/news-r6.h, m/news.h, m/next.h, m/nh3000.h, m/nh4000.h,
 	m/ns32000.h, m/orion.h, m/pfa50.h, m/plexus.h, m/pmax.h,
 	m/powerpcle.h, m/pyrmips.h, m/sequent-ptx.h, m/sequent.h,
 	m/sparc.h, m/sr2k.h, m/symmetry.h, m/tad68k.h, m/tahoe.h,
--- a/src/ChangeLog.8	Fri Apr 02 14:34:08 2010 +0000
+++ b/src/ChangeLog.8	Sat Apr 03 12:47:25 2010 +0000
@@ -2886,10 +2886,10 @@
 
 	* sysdep.c: Define numerous routines to emulate Unix system calls.
 
-	* xfaces.c: on MacOS, define the set of colors listed in rgb.txt
+	* xfaces.c: On MacOS, define the set of colors listed in rgb.txt
 	file of an X Window environment.
 
-	* xfaces.c: on MacOS, define the Lisp functions x-display-color-p,
+	* xfaces.c: On MacOS, define the Lisp functions x-display-color-p,
 	x-display-grayscale, x-color-defined-p, and x-color-values.
 
 	* sysdep.c [macintosh] (stat, fstat, mkdir, rmdir, utime, access)
@@ -3160,7 +3160,7 @@
 
 1999-08-25  Alexandre Oliva  <oliva@dcc.unicamp.br>
 
-	* unexelf.c: Merge IRIX debugging info patch from unexsgi.c
+	* unexelf.c: Merge IRIX debugging info patch from unexsgi.c.
 	* m/iris4d.h: Use unexelf for IRIX 5.*.
 	* m/iris5d.h: Use unexelf for IRIX 6.*.
 	* unexsgi.c: Deleted.
@@ -3767,8 +3767,8 @@
 1999-08-06  Gerd Moellmann  <gerd@gnu.org>
 
 	* xdisp.c (compute_line_metrics): If first line's physical ascent
-	 is larger than its logical ascent, use the physical ascent, and
-	 make the row taller.  Set row's overlapping_p flag.
+	is larger than its logical ascent, use the physical ascent, and
+	make the row taller.  Set row's overlapping_p flag.
 
 	* dispnew.c (redraw_overlapping_rows): Use flag overlapping_p.
 	(direct_output_for_insert): Ditto.
@@ -4675,7 +4675,7 @@
 
 1999-06-04  Gerd Moellmann  <gerd@gnu.org>
 
-	* xfaces.c (recompute_basic_faces)[GLYPH_DEBUG]: Check return
+	* xfaces.c (recompute_basic_faces) [GLYPH_DEBUG]: Check return
 	value of realize_basic_faces.
 	(load_face_font_or_fontset): Store full font name in face.
 	(realize_default_face): Use full font name.
@@ -5601,9 +5601,9 @@
 	* window.c (coordinates_in_window): Use CURRENT_MODE_LINE_HEIGHT.
 
 	* xdisp.c (redisplay_window): If mode line height has changed,
-	 arrange for a thorough immediate redisplay using the correct mode
-	 line height.
-	 (window_box_height): Use CURRENT_MODE_LINE_HEIGHT.
+	arrange for a thorough immediate redisplay using the correct mode
+	line height.
+	(window_box_height): Use CURRENT_MODE_LINE_HEIGHT.
 
 	* dispextern.h (MATRIX_MODE_LINE_HEIGHT): New.
 	(CURRENT_MODE_LINE_HEIGHT): New.
@@ -7062,7 +7062,7 @@
 1998-05-04  Gerd Moellmann  <gerd@gnu.org>
 
 	* Makefile.in (LIBXPM): If not already defined, define to -lXpm.
-	(LIBX)[HAVE_X11]: Add LIBXPM.
+	(LIBX) [HAVE_X11]: Add LIBXPM.
 
 	* xfns.c (xpm_image_p): Implementation of image type functions
 	for XPM.
@@ -10052,7 +10052,7 @@
 
 	* xterm.h (WINDOW_COL_PIXEL_X etc.) Removed.
 
-	* dispextern.h (WINDOW_TO_FRAME_HPOS/VPOS): Moved to dispnew.c
+	* dispextern.h (WINDOW_TO_FRAME_HPOS/VPOS): Moved to dispnew.c.
 
 	* xfns.c (x_contour_region): Use pixel coordinates from window
 	cursor instead of WINDOW_TO_FRAME_H/VPOS.
@@ -10897,7 +10897,7 @@
 	(MATRIX_ROW_INVERSE_P): Former MATRIX_ROW_HIGHLIGHT_P.
 	(struct glyph_row): HIGHLIGHT_P -> INVERSE_P
 
-	* all files: use above new names.
+	* all files: Use above new names.
 
 	* dispnew.c (scroll_frame_lines): Simplified.  Use
 	SCROLL_GLYPH_MATRIX.
@@ -10961,7 +10961,7 @@
 	(init_display): Ditto.
 	(syms_of_display): Ditto.
 
-	* dispextern.h: add prototypes for REDRAW_FRAME,
+	* dispextern.h: Add prototypes for REDRAW_FRAME,
 	REDRAW_GARBAGED_FRAMES, CANCEL_LINE, CLEAR_FRAME_RECORDS,
 	INIT_DESIRED_GLYPHS, SCROLL_FRAME_LINES, PRESERVE_OTHER_COLUMNS,
 	ADJUST_WINDOW_CHARSTARTS, CANCEL_MY_COLUMNS,
@@ -11108,9 +11108,9 @@
 	(make_window): Initialize DESIRED_MATRIX and CURRENT_MATRIX.
 	(replace_window): Reset DESIRED_MATRIX and CURRENT_MATRIX
 
-	* Makefile.in (window.o): Add dependency window.c -> dispextern.h
-
-	* window.c: Include dispextern.h
+	* Makefile.in (window.o): Add dependency window.c -> dispextern.h.
+
+	* window.c: Include dispextern.h.
 
 	* scroll.c (do_scrolling): Use new glyphs.
 	(do_direct_scrolling): Ditto.
@@ -11141,9 +11141,9 @@
 	(write_glyphs): Ditto.
 	(insert_glyphs): Ditto.
 
-	* Makefile.in (term.o): term.c depends on dispextern.h
-
-	* term.c: Include dispextern.h
+	* Makefile.in (term.o): term.c depends on dispextern.h.
+
+	* term.c: Include dispextern.h.
 
 	* dispnew.c (direct_output_forward_char): Old glyph functions
 	removed, new inserted.
@@ -11560,8 +11560,8 @@
 1999-05-02  Andrew Innes  <andrewi@gnu.org>
 
 	* s/ms-w32.h (HAVE_FSYNC): New macro.
-	 (fsync): Map to _commit.
-	 (ftruncate): Map to _chsize.
+	(fsync): Map to _commit.
+	(ftruncate): Map to _chsize.
 
 	* w32term.c (dumpglyphs): On Windows NT, do output in Unicode even
 	for ASCII, if enabled, to avoid memory allocation overhead for
@@ -11666,7 +11666,7 @@
 
 	* fontset.c (Fquery_fontset): Don't check for fontset aliases here.
 	(Fnew_fontset, Fset_fontset_font): Check for them here.
-	 (Ffontset_info, Fnew_fontset, Fset_fontset_font):
+	(Ffontset_info, Fnew_fontset, Fset_fontset_font):
 	Fix error message syntax.
 
 	* buffer.c (Fmake_indirect_buffer): Copy multibyte status
@@ -12775,7 +12775,7 @@
 1998-12-06  Eli Zaretskii  <eliz@mescaline.gnu.org>
 
 	* Makefile.in (msdos.o): Depend on termchar.h, charset.h,
-	coding.h, and disptab.h
+	coding.h, and disptab.h.
 
 	* msdos.c (Vdos_unsupported_char_glyph): New variable.
 	(syms_of_msdos): DEFVAR_LISP it.
--- a/src/ecrt0.c	Fri Apr 02 14:34:08 2010 +0000
+++ b/src/ecrt0.c	Sat Apr 03 12:47:25 2010 +0000
@@ -59,9 +59,7 @@
 
 int data_start = 0;
 
-#ifndef MSDOS
 char **environ;
-#endif
 
 #ifndef static
 /* On systems where the static storage class is usable, this function
@@ -100,70 +98,7 @@
      and optimize it out.  */
   (void) &start1;
 }
-#else /* not CRT0_DUMMIES */
-
-/* This is a kludge.  Now that the CRT0_DUMMIES mechanism above exists,
-   most of these machines could use the vax code above
-   with some suitable definition of CRT0_DUMMIES.
-   Then the symbol m68k could be flushed.
-   But I don't want to risk breaking these machines
-   in a version 17 patch release, so that change is being put off.  */
-
-#ifdef m68k			/* Can't do it all from C */
-	asm ("	global	_start");
-	asm ("	text");
-	asm ("_start:");
-	asm ("  comm	splimit%,4");
-	asm ("	global	exit");
-	asm ("	text");
-  	asm ("	mov.l	%d0,splimit%");
-	asm ("	jsr	start1");
-	asm ("	mov.l	%d0,(%sp)");
-	asm ("	jsr	exit");
-	asm ("	mov.l	&1,%d0");	/* d0 = 1 => exit */
-	asm ("	trap	&0");
-
-/* ignore takes care of skipping the a6 value pushed in start.  */
-static
-start1 (argc, xargv)
-     int argc;
-     char *xargv;
-{
-  register char **argv = &xargv;
-  environ = argv + argc + 1;
-
-  if ((char *)environ == xargv)
-    environ--;
-  exit (main (argc, argv, environ));
-}
-
-#endif /* m68k */
-
-#endif /* not CRT0_DUMMIES */
-
-#ifdef __sparc__
-asm (".global __start");
-asm (".text");
-asm ("__start:");
-asm ("	mov	0, %fp");
-asm ("	ld	[%sp + 64], %o0");
-asm ("	add	%sp, 68, %o1");
-asm ("	sll	%o0, 2,	%o2");
-asm ("	add	%o2, 4,	%o2");
-asm ("	add	%o1, %o2, %o2");
-asm ("	sethi	%hi(_environ), %o3");
-asm ("	st	%o2, [%o3+%lo(_environ)]");
-asm ("	andn	%sp, 7,	%sp");
-asm ("	call	_main");
-asm ("	sub	%sp, 24, %sp");
-asm ("	call	__exit");
-asm ("	nop");
-
-#endif /* __sparc__ */
-
-#if __FreeBSD__ == 2
-char *__progname;
-#endif
+#endif /* CRT0_DUMMIES */
 
 /* arch-tag: 4025c2fb-d6b1-4d29-b1b6-8100b6bd1e74
    (do not change this comment) */
--- a/src/m/intel386.h	Fri Apr 02 14:34:08 2010 +0000
+++ b/src/m/intel386.h	Sat Apr 03 12:47:25 2010 +0000
@@ -85,10 +85,6 @@
 #define TEXT_START 0
 #endif /* USG */
 
-#ifdef MSDOS
-#define NO_REMAP
-#endif
-
 #ifdef WINDOWSNT
 #define VIRT_ADDR_VARIES
 #define DATA_START 	get_data_start ()
--- a/src/m/vax.h	Fri Apr 02 14:34:08 2010 +0000
+++ b/src/m/vax.h	Sat Apr 03 12:47:25 2010 +0000
@@ -34,10 +34,6 @@
 
 /* #define vax    -- appears to be done automatically  */
 
-/* crt0.c should use the vax-bsd style of entry, with no dummy args.  */
-
-#define CRT0_DUMMIES
-
 /* USG systems I know of running on Vaxes do not actually
    support the load average, so disable it for them.  */
 
--- a/src/s/msdos.h	Fri Apr 02 14:34:08 2010 +0000
+++ b/src/s/msdos.h	Sat Apr 03 12:47:25 2010 +0000
@@ -170,5 +170,7 @@
 #define GC_SETJMP_WORKS 1
 #define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS
 
+#define NO_REMAP
+
 /* arch-tag: d184f860-815d-4ff4-8187-d05c0f3c37d0
    (do not change this comment) */
--- a/src/w32fns.c	Fri Apr 02 14:34:08 2010 +0000
+++ b/src/w32fns.c	Sat Apr 03 12:47:25 2010 +0000
@@ -5427,6 +5427,10 @@
 
   kb = dpyinfo->terminal->kboard;
 
+  /* The calls to x_get_arg remove elements from PARMS, so copy it to
+     avoid destructive changes behind our caller's back.  */
+  parms = Fcopy_alist (parms);
+
   /* Get the name of the frame to use for resource lookup.  */
   name = x_get_arg (dpyinfo, parms, Qname, "name", "Name", RES_TYPE_STRING);
   if (!STRINGP (name)