changeset 108561:23f4cd23ea89

merge trunk
author Kenichi Handa <handa@etlken>
date Fri, 14 May 2010 13:15:58 +0900
parents 03ab6621f67d (current diff) 76b847a16569 (diff)
children be6f5247ebb4
files src/ChangeLog src/xdisp.c
diffstat 106 files changed, 1676 insertions(+), 1576 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri May 14 13:14:23 2010 +0900
+++ b/ChangeLog	Fri May 14 13:15:58 2010 +0900
@@ -1,3 +1,37 @@
+2010-05-14  Glenn Morris  <rgm@gnu.org>
+
+	* configure.in (cpp_undefs): Add mktime, register, X11.
+
+	* configure.in (GPM_MOUSE_SUPPORT): Remove.
+	(MOUSE_SUPPORT, TOOLTIP_SUPPORT, WINDOW_SUPPORT): New output variables.
+	(HAVE_WINDOW_SYSTEM, HAVE_MOUSE): Move out of AC_BOTTOM.
+
+	* configure.in (NS_IMPL_GNUSTEP_INC): New output variable.
+	(GNUSTEP_MAKEFILES): Do not output.
+
+2010-05-13  Glenn Morris  <rgm@gnu.org>
+
+	* configure.in: Fix some paren typos.
+
+	* configure.in (OLDXMENU, LIBXMENU): Set to empty if !HAVE_MENUS.
+
+	* configure.in (LD_SWITCH_X_SITE, C_SWITCH_X_SITE): Do not define.
+
+2010-05-12  Glenn Morris  <rgm@gnu.org>
+
+	* configure.in (LIB_SRC_EXTRA_INSTALLABLES): Remove, unused.
+
+	* configure.in (LIB_GCC): New output variable.
+
+2010-05-11  Glenn Morris  <rgm@gnu.org>
+
+	* make-dist (msdos): No more mainmake.
+
+	* configure.in: Generate lib-src/Makefile directly, do not run cpp.
+	* config.bat: Do not run cpp on lib-src/Makefile.in.
+
+	* config.bat [HAVE_X11]: Run sed3x.inp on lib-src/Makefile.
+
 2010-05-10  Glenn Morris  <rgm@gnu.org>
 
 	* configure.in (LIBS_SYSTEM): New output variable, replacing cpp.
@@ -5864,7 +5898,7 @@
 1994-05-09  David J. MacKenzie  (djm@nutrimat.gnu.ai.mit.edu)
 
 	* configure.in: Remove AC_LANG_C call.  Not needed with Autoconf
-	 version > 1.8.
+	version > 1.8.
 
 1994-05-08  Morten Welinder  (terra@diku.dk)
 
--- a/admin/CPP-DEFINES	Fri May 14 13:14:23 2010 +0900
+++ b/admin/CPP-DEFINES	Fri May 14 13:15:58 2010 +0900
@@ -22,7 +22,6 @@
 NS_IMPL_COCOA	Compile support for Cocoa (Apple) implementation of NS GUI API.
 HAVE_X11	Compile support for the X11 GUI.
 HAVE_X_WINDOWS	Compile support for X Window system
-X11		??  Makefile.in suggests it's equivalent to HAVE_X11
 USE_LUCID	Use the Lucid toolkit for menus&scrollbars.  Requires HAVE_X11.
 USE_MOTIF	Use the Motif toolkit for menus&scrollbars.  Requires HAVE_X11.
 USE_GTK		Use the Gtk   toolkit for menus&scrollbars.  Requires HAVE_X11.
@@ -55,7 +54,6 @@
 HAVE_TERMIO
 HAVE_TERMIOS
 INTERRUPT_INPUT
-MAIL_USE_FLOCK
 NARROWPROTO
 SEPCHAR
 SIGTYPE
@@ -85,6 +83,9 @@
 BCOPY_UPWARD_SAFE
 BITS_PER_EMACS_INT
 BITS_PER_LONG
+BITS_PER_CHAR
+BITS_PER_SHORT
+BITS_PER_INT
 BROKEN_DATAGRAM_SOCKETS
 BROKEN_FIONREAD
 BROKEN_GET_CURRENT_DIR_NAME
@@ -99,7 +100,6 @@
 BSD4_3
 BSD_SYSTEM
 CLASH_DETECTION
-C_SWITCH_X_SYSTEM
 DATA_SEG_BITS
 DATA_START
 DBL_MIN_REPLACEMENT
@@ -115,7 +115,6 @@
 EMACS_CONFIG_OPTIONS
 EMACS_INT
 EMACS_UINT
-END_FILES_1
 FILE_SYSTEM_CASE
 FLOAT_CHECK_DOMAIN
 FSCALE
@@ -134,7 +133,6 @@
 HAVE_BCOPY
 HAVE_CBRT
 HAVE_CLOSEDIR
-HAVE_CRTIN
 HAVE_DUP2
 HAVE_EUIDACCESS
 HAVE_FMOD
@@ -155,9 +153,6 @@
 HAVE_INET_SOCKETS
 HAVE_INVERSE_HYPERBOLIC
 HAVE_LIBKSTAT
-HAVE_LIBNCURSES
-HAVE_LIBPTHREADS
-HAVE_LIBXMU
 HAVE_LIMITS_H
 HAVE_LINUX_VERSION_H
 HAVE_LOGB
@@ -220,6 +215,7 @@
 LISP_FLOAT_TYPE
 LNOFLSH
 LOCALTIME_CACHE
+MAIL_USE_FLOCK
 MAIL_USE_LOCKF
 MAIL_USE_POP
 MAIL_USE_SYSTEM_LOCK
@@ -266,8 +262,6 @@
 SIGTRAP
 SIGTYPE
 SOLARIS2
-START_FILES
-START_FILES_1
 STDC_HEADERS
 SYMS_SYSTEM
 SYSTEM_PURESIZE_EXTRA
@@ -310,7 +304,6 @@
 _WINSOCK_H
 __ELF__
 __FreeBSD__
-__FreeBSD_version
 __GNUC__
 __GNU_LIBRARY__
 __GNUC_MINOR__
--- a/admin/notes/cpp	Fri May 14 13:14:23 2010 +0900
+++ b/admin/notes/cpp	Fri May 14 13:15:58 2010 +0900
@@ -1,11 +1,7 @@
 ttn 2003-04-09
 
 we use a C preprocesor not only in the normal compilation of .c files
-into object files, but also for creating
-
-	src/Makefile
-	lib-src/Makefile
-
+into object files, but also for creating src/Makefile.
 (delimited by comment "start of cpp stuff").  some cpp implementations
 insert whitespace in between tokens.
 
--- a/config.bat	Fri May 14 13:14:23 2010 +0900
+++ b/config.bat	Fri May 14 13:15:58 2010 +0900
@@ -221,16 +221,17 @@
 rem   ----------------------------------------------------------------------
 Echo Configuring the library source directory...
 cd lib-src
-rem   Create "makefile" from "makefile.in".
-sed -e "1,/== start of cpp stuff ==/s@^##*[ 	].*$@@" <Makefile.in >junk.c
-gcc -E -traditional -I. -I../src junk.c | sed -e "s/^ /	/" -e "/^#/d" -e "/^[ 	]*$/d" >makefile.new
 If "%DJGPP_VER%" == "2" goto libsrc-v2
-sed -f ../msdos/sed3.inp <makefile.new >Makefile
+sed -f ../msdos/sed3.inp <Makefile.in >Makefile
 Goto libsrc2
 :libsrc-v2
-sed -f ../msdos/sed3v2.inp <makefile.new >Makefile
+sed -f ../msdos/sed3v2.inp <Makefile.in >Makefile
 :libsrc2
-rm -f makefile.new junk.c
+if "%X11%" == "" goto libsrc2a
+mv Makefile makefile.tmp
+sed -f ../msdos/sed3x.inp <makefile.tmp >Makefile
+rm -f makefile.tmp
+:libsrc2a
 if "%nodebug%" == "" goto libsrc3
 sed -e "/^CFLAGS *=/s/ *-gcoff//" <Makefile >makefile.tmp
 sed -e "/^ALL_CFLAGS *=/s/=/= -s/" <makefile.tmp >Makefile
--- a/configure	Fri May 14 13:14:23 2010 +0900
+++ b/configure	Fri May 14 13:15:58 2010 +0900
@@ -717,6 +717,7 @@
 XMKMF
 LD_SWITCH_X_SITE_AUX
 LD_SWITCH_X_SITE_AUX_RPATH
+NS_IMPL_GNUSTEP_INC
 NS_OBJ
 NS_SUPPORT
 LIB_STANDARD
@@ -751,7 +752,6 @@
 LIBTIFF
 LIBGIF
 LIBGPM
-GPM_MOUSE_SUPPORT
 LIBXSM
 ALLOCA
 liblockfile
@@ -796,11 +796,9 @@
 ns_appbindir
 ns_appresdir
 ns_appsrc
-GNUSTEP_MAKEFILES
 GNUSTEP_SYSTEM_HEADERS
 GNUSTEP_SYSTEM_LIBRARIES
 GNU_OBJC_CFLAGS
-LIB_SRC_EXTRA_INSTALLABLES
 OTHER_FILES
 XMENU_OBJ
 XOBJ
@@ -815,6 +813,10 @@
 POST_ALLOC_OBJ
 LD_SWITCH_SYSTEM_TEMACS
 LD_SWITCH_SYSTEM_EXTRA
+LIB_GCC
+MOUSE_SUPPORT
+TOOLTIP_SUPPORT
+WINDOW_SUPPORT
 LTLIBOBJS'
 ac_subst_files=''
 ac_user_opts='
@@ -6484,7 +6486,7 @@
     START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o'
     ;;
   netbsd | openbsd )
-    if test -f $(CRT_DIR)/crti.o; then
+    if test -f $CRT_DIR/crti.o; then
 	LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o $(CRT_DIR)/crtn.o'
         START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o $(CRT_DIR)/crti.o $(CRT_DIR)/crtbegin.o'
     else
@@ -9929,6 +9931,7 @@
 HAVE_NS=no
 NS_IMPL_COCOA=no
 NS_IMPL_GNUSTEP=no
+NS_IMPL_GNUSTEP_INC=
 tmp_CPPFLAGS="$CPPFLAGS"
 tmp_CFLAGS="$CFLAGS"
 CPPFLAGS="$CPPFLAGS -x objective-c"
@@ -9949,6 +9952,13 @@
           GNUSTEP_MAKEFILES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_MAKEFILES)"
      GNUSTEP_SYSTEM_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_HEADERS)"
      GNUSTEP_SYSTEM_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_LIBRARIES)"
+     ## Pull in stuff from GNUstep-make.
+     NS_IMPL_GNUSTEP_INC="FOUNDATION_LIB=gnu
+GUI_LIB=gnu
+include $GNUSTEP_MAKEFILES/Additional/base.make
+include $GNUSTEP_MAKEFILES/Additional/gui.make
+shared=no
+"
      CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS}"
      CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS}"
      REAL_CFLAGS="$REAL_CFLAGS -I${GNUSTEP_SYSTEM_HEADERS}"
@@ -10141,6 +10151,7 @@
   fi
 fi
 
+
 NS_OBJ=
 NS_SUPPORT=
 if test "${HAVE_NS}" = yes; then
@@ -15991,7 +16002,7 @@
 ### Use -lgpm if available, unless `--with-gpm=no'.
 HAVE_GPM=no
 LIBGPM=
-GPM_MOUSE_SUPPORT=
+MOUSE_SUPPORT=
 if test "${with_gpm}" != "no"; then
   if test "${ac_cv_header_gpm_h+set}" = set; then
   { $as_echo "$as_me:$LINENO: checking for gpm.h" >&5
@@ -16201,10 +16212,10 @@
 _ACEOF
 
     LIBGPM=-lgpm
-    GPM_MOUSE_SUPPORT="\${lispsource}mouse.elc"
-  fi
-fi
-
+    ## May be reset below.
+    MOUSE_SUPPORT="\$(GPM_MOUSE_SUPPORT)"
+  fi
+fi
 
 
 if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
@@ -26313,27 +26324,31 @@
 ### Use configuration here uncanonicalized to avoid exceeding size limits.
 
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+## Unused?
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+## FIXME? Nothing uses @LD_SWITCH_X_SITE@.
+## src/Makefile.in did add LD_SWITCH_X_SITE (as a cpp define) to the
+## end of LIBX_BASE, but nothing ever set it.
 
 
 
@@ -26353,8 +26368,6 @@
 
 
 
-
-
 cat >>confdefs.h <<_ACEOF
 #define EMACS_CONFIGURATION "${canonical}"
 _ACEOF
@@ -26375,16 +26388,6 @@
 _ACEOF
 
 
-cat >>confdefs.h <<_ACEOF
-#define LD_SWITCH_X_SITE ${LD_SWITCH_X_SITE}
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define C_SWITCH_X_SITE ${C_SWITCH_X_SITE}
-_ACEOF
-
-
 XMENU_OBJ=
 XOBJ=
 if test "${HAVE_X_WINDOWS}" = "yes" ; then
@@ -26481,7 +26484,7 @@
   LIBX_OTHER=
 fi
 
-if test "$HAVE_GTK" = "yes"; then
+if test "$HAVE_GTK" = "yes" || test "$HAVE_MENUS" != "yes"; then
   OLDXMENU=
   LIBXMENU=
 fi
@@ -26568,6 +26571,61 @@
 
 
 
+LIB_GCC=
+if test "x$GCC" = "xyes"; then
+
+  case "$opsys" in
+    ## cygwin: don't link against static libgcc.
+    cygwin|freebsd|netbsd|openbsd) LIB_GCC= ;;
+
+    gnu-*)
+      ## armin76@gentoo.org reported that the lgcc_s flag is necessary to
+      ## build on ARM EABI under GNU/Linux.  (Bug#5518)
+      ## Note that m/arm.h never bothered to undefine LIB_GCC first.
+      if test "$machine" = "arm"; then
+        LIB_GCC="-lgcc_s"
+      else
+        ## FIXME? s/gnu-linux.h used to define LIB_GCC as below, then
+        ## immediately undefine it again and redefine it to empty.
+        ## Was the C_SWITCH_X_SITE part really necessary?
+##      LIB_GCC=`$CC $C_SWITCH_X_SITE -print-libgcc-file-name`
+        LIB_GCC=
+      fi
+      ;;
+
+    ## Ask GCC where to find libgcc.a.
+    *) LIB_GCC=`$CC -print-libgcc-file-name 2> /dev/null` ;;
+  esac
+fi
+
+
+TOOLTIP_SUPPORT=
+WINDOW_SUPPORT=
+## If we're using X11/GNUstep, define some consequences.
+if test "$HAVE_X_WINDOWS" = "yes" || test "$HAVE_NS" = "yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_WINDOW_SYSTEM 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_MOUSE 1
+_ACEOF
+
+  MOUSE_SUPPORT="\$(REAL_MOUSE_SUPPORT)"
+  TOOLTIP_SUPPORT="\${lispsource}mouse.elc"
+
+  WINDOW_SUPPORT="\$(BASE_WINDOW_SUPPORT)"
+  test "$HAVE_X_WINDOWS" = "yes" && \
+    WINDOW_SUPPORT="$WINDOW_SUPPORT \$(X_WINDOW_SUPPORT)"
+
+fi
+
+
+
+
+
 
 
 
@@ -26664,7 +26722,7 @@
 # the C preprocessor to some helpful value like 1, or maybe the empty
 # string.  Needless to say consequent macro substitutions are less
 # than conducive to the makefile finding the correct directory.
-cpp_undefs="`echo $srcdir $configuration $canonical unix |
+cpp_undefs="`echo $srcdir $configuration $canonical unix mktime register X11 |
   sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/  *$//' \
   -e 's/  */ -U/g' -e 's/-U[0-9][^ ]*//g'`"
 
@@ -26690,7 +26748,7 @@
 rm -f conftest*
 
 
-ac_config_files="$ac_config_files Makefile lib-src/Makefile.c:lib-src/Makefile.in oldXMenu/Makefile doc/emacs/Makefile doc/misc/Makefile doc/lispintro/Makefile doc/lispref/Makefile src/Makefile.c:src/Makefile.in lwlib/Makefile lisp/Makefile leim/Makefile"
+ac_config_files="$ac_config_files Makefile lib-src/Makefile oldXMenu/Makefile doc/emacs/Makefile doc/misc/Makefile doc/lispintro/Makefile doc/lispref/Makefile src/Makefile.c:src/Makefile.in lwlib/Makefile lisp/Makefile leim/Makefile"
 
 ac_config_commands="$ac_config_commands default"
 
@@ -27289,7 +27347,7 @@
   case $ac_config_target in
     "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;;
     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
-    "lib-src/Makefile.c") CONFIG_FILES="$CONFIG_FILES lib-src/Makefile.c:lib-src/Makefile.in" ;;
+    "lib-src/Makefile") CONFIG_FILES="$CONFIG_FILES lib-src/Makefile" ;;
     "oldXMenu/Makefile") CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;;
     "doc/emacs/Makefile") CONFIG_FILES="$CONFIG_FILES doc/emacs/Makefile" ;;
     "doc/misc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/misc/Makefile" ;;
@@ -27934,22 +27992,6 @@
   CPPFLAGS="$CPPFLAGS -traditional"
 fi
 
-echo creating lib-src/Makefile
-( cd lib-src
-  rm -f junk.c junk1.c junk2.c
-  sed -e '/start of cpp stuff/q' \
-      < Makefile.c > junk1.c
-  sed -e '1,/start of cpp stuff/d'\
-      -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
-      < Makefile.c > junk.c
-  $CPP -P $cpp_undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
-      sed -e 's/^ /	/' -e '/^#/d' -e '/^[ 	]*$/d' > junk2.c
-  cat junk1.c junk2.c > Makefile.new
-  rm -f junk.c junk1.c junk2.c
-  chmod 444 Makefile.new
-  mv -f Makefile.new Makefile
-)
-
 echo creating src/Makefile
 ( cd src
   rm -f junk.c junk1.c junk2.c
--- a/configure.in	Fri May 14 13:14:23 2010 +0900
+++ b/configure.in	Fri May 14 13:15:58 2010 +0900
@@ -1094,7 +1094,7 @@
     START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o'
     ;;
   netbsd | openbsd )
-    if test -f $(CRT_DIR)/crti.o; then
+    if test -f $CRT_DIR/crti.o; then
 	LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o $(CRT_DIR)/crtn.o'
         START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o $(CRT_DIR)/crti.o $(CRT_DIR)/crtbegin.o'
     else
@@ -1452,6 +1452,7 @@
 HAVE_NS=no
 NS_IMPL_COCOA=no
 NS_IMPL_GNUSTEP=no
+NS_IMPL_GNUSTEP_INC=
 tmp_CPPFLAGS="$CPPFLAGS"
 tmp_CFLAGS="$CFLAGS"
 CPPFLAGS="$CPPFLAGS -x objective-c"
@@ -1473,6 +1474,13 @@
      GNUSTEP_MAKEFILES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_MAKEFILES)"
      GNUSTEP_SYSTEM_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_HEADERS)"
      GNUSTEP_SYSTEM_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_LIBRARIES)"
+     ## Pull in stuff from GNUstep-make.
+     NS_IMPL_GNUSTEP_INC="FOUNDATION_LIB=gnu
+GUI_LIB=gnu
+include $GNUSTEP_MAKEFILES/Additional/base.make
+include $GNUSTEP_MAKEFILES/Additional/gui.make
+shared=no
+"
      CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS}"
      CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS}"
      REAL_CFLAGS="$REAL_CFLAGS -I${GNUSTEP_SYSTEM_HEADERS}"
@@ -1491,6 +1499,7 @@
     NS_HAVE_NSINTEGER=no
   fi
 fi
+AC_SUBST(NS_IMPL_GNUSTEP_INC)
 
 NS_OBJ=
 NS_SUPPORT=
@@ -2391,7 +2400,7 @@
 ### Use -lgpm if available, unless `--with-gpm=no'.
 HAVE_GPM=no
 LIBGPM=
-GPM_MOUSE_SUPPORT=
+MOUSE_SUPPORT=
 if test "${with_gpm}" != "no"; then
   AC_CHECK_HEADER(gpm.h,
     [AC_CHECK_LIB(gpm, Gpm_Open, HAVE_GPM=yes)])
@@ -2399,11 +2408,11 @@
   if test "${HAVE_GPM}" = "yes"; then
     AC_DEFINE(HAVE_GPM, 1, [Define to 1 if you have the gpm library (-lgpm).])
     LIBGPM=-lgpm
-    GPM_MOUSE_SUPPORT="\${lispsource}mouse.elc"
+    ## May be reset below.
+    MOUSE_SUPPORT="\$(GPM_MOUSE_SUPPORT)"
   fi
 fi
 AC_SUBST(LIBGPM)
-AC_SUBST(GPM_MOUSE_SUPPORT)
 
 dnl Check for malloc/malloc.h on darwin
 AC_CHECK_HEADER(malloc/malloc.h, [AC_DEFINE(HAVE_MALLOC_MALLOC_H, 1, [Define to 1 if you have the <malloc/malloc.h> header file.])])
@@ -3012,6 +3021,7 @@
 ### Use configuration here uncanonicalized to avoid exceeding size limits.
 AC_SUBST(version)
 AC_SUBST(configuration)
+## Unused?
 AC_SUBST(canonical)
 AC_SUBST(srcdir)
 AC_SUBST(prefix)
@@ -3033,6 +3043,9 @@
 AC_SUBST(gamedir)
 AC_SUBST(gameuser)
 AC_SUBST(unexec)
+## FIXME? Nothing uses @LD_SWITCH_X_SITE@.
+## src/Makefile.in did add LD_SWITCH_X_SITE (as a cpp define) to the
+## end of LIBX_BASE, but nothing ever set it.
 AC_SUBST(LD_SWITCH_X_SITE)
 AC_SUBST(C_SWITCH_X_SITE)
 AC_SUBST(C_SWITCH_X_SYSTEM)
@@ -3046,11 +3059,9 @@
 AC_SUBST(ns_appbindir)
 AC_SUBST(ns_appresdir)
 AC_SUBST(ns_appsrc)
-AC_SUBST(GNUSTEP_MAKEFILES)
 AC_SUBST(GNUSTEP_SYSTEM_HEADERS)
 AC_SUBST(GNUSTEP_SYSTEM_LIBRARIES)
 AC_SUBST(GNU_OBJC_CFLAGS)
-AC_SUBST(LIB_SRC_EXTRA_INSTALLABLES)
 AC_SUBST(OTHER_FILES)
 
 AC_DEFINE_UNQUOTED(EMACS_CONFIGURATION,  "${canonical}",
@@ -3061,18 +3072,6 @@
 		   [Define to the used machine dependent file.])
 AC_DEFINE_UNQUOTED(config_opsysfile, "${opsysfile}",
 		   [Define to the used os dependent file.])
-AC_DEFINE_UNQUOTED(LD_SWITCH_X_SITE, ${LD_SWITCH_X_SITE},
-[Define LD_SWITCH_X_SITE to contain any special flags your loader
- may need to deal with X Windows.  For instance, if you've defined
- HAVE_X_WINDOWS above and your X libraries aren't in a place that
- your loader can find on its own, you might want to add "-L/..." or
- something similar.])
-AC_DEFINE_UNQUOTED(C_SWITCH_X_SITE,  ${C_SWITCH_X_SITE},
-[Define C_SWITCH_X_SITE to contain any special flags your compiler
- may need to deal with X Windows.  For instance, if you've defined
- HAVE_X_WINDOWS above and your X include files aren't in a place
- that your compiler can find on its own, you might want to add
- "-I/..." or something similar.])
 
 XMENU_OBJ=
 XOBJ=
@@ -3153,7 +3152,7 @@
   LIBX_OTHER=
 fi
 
-if test "$HAVE_GTK" = "yes"; then
+if test "$HAVE_GTK" = "yes" || test "$HAVE_MENUS" != "yes"; then
   OLDXMENU=
   LIBXMENU=
 fi
@@ -3234,6 +3233,54 @@
 AC_SUBST(LD_SWITCH_SYSTEM_EXTRA)
 
 
+LIB_GCC=
+if test "x$GCC" = "xyes"; then
+
+  case "$opsys" in
+    ## cygwin: don't link against static libgcc.
+    cygwin|freebsd|netbsd|openbsd) LIB_GCC= ;;
+
+    gnu-*)
+      ## armin76@gentoo.org reported that the lgcc_s flag is necessary to
+      ## build on ARM EABI under GNU/Linux.  (Bug#5518)
+      ## Note that m/arm.h never bothered to undefine LIB_GCC first.
+      if test "$machine" = "arm"; then
+        LIB_GCC="-lgcc_s"
+      else
+        ## FIXME? s/gnu-linux.h used to define LIB_GCC as below, then
+        ## immediately undefine it again and redefine it to empty.
+        ## Was the C_SWITCH_X_SITE part really necessary?
+##      LIB_GCC=`$CC $C_SWITCH_X_SITE -print-libgcc-file-name`
+        LIB_GCC=
+      fi
+      ;;
+
+    ## Ask GCC where to find libgcc.a.
+    *) LIB_GCC=`$CC -print-libgcc-file-name 2> /dev/null` ;;
+  esac
+fi                              dnl if $GCC
+AC_SUBST(LIB_GCC)
+
+
+TOOLTIP_SUPPORT=
+WINDOW_SUPPORT=
+## If we're using X11/GNUstep, define some consequences.
+if test "$HAVE_X_WINDOWS" = "yes" || test "$HAVE_NS" = "yes"; then
+  AC_DEFINE(HAVE_WINDOW_SYSTEM, 1, [Define if you have a window system.])
+  AC_DEFINE(HAVE_MOUSE, 1, [Define if you have mouse support.])
+  MOUSE_SUPPORT="\$(REAL_MOUSE_SUPPORT)"
+  TOOLTIP_SUPPORT="\${lispsource}mouse.elc"
+
+  WINDOW_SUPPORT="\$(BASE_WINDOW_SUPPORT)"
+  test "$HAVE_X_WINDOWS" = "yes" && \
+    WINDOW_SUPPORT="$WINDOW_SUPPORT \$(X_WINDOW_SUPPORT)"
+
+fi
+AC_SUBST(MOUSE_SUPPORT)
+AC_SUBST(TOOLTIP_SUPPORT)
+AC_SUBST(WINDOW_SUPPORT)
+
+
 AH_TOP([/* GNU Emacs site configuration template file.
    Copyright (C) 1988, 1993, 1994, 1999, 2000, 2001, 2002, 2004, 2005,
      2006, 2007, 2008, 2009, 2010  Free Software Foundation, Inc.
@@ -3262,12 +3309,6 @@
 ])dnl
 
 AH_BOTTOM([
-/* If we're using X11/Carbon/GNUstep, define some consequences.  */
-#if defined(HAVE_X_WINDOWS) || defined(HAVE_NS)
-#define HAVE_WINDOW_SYSTEM
-#define HAVE_MOUSE
-#endif
-
 /* Define AMPERSAND_FULL_NAME if you use the convention
    that & in the full name stands for the login id.  */
 /* Turned on June 1996 supposing nobody will mind it.  */
@@ -3292,7 +3333,7 @@
 #endif
 #endif /* __FreeBSD__ || __NetBSD__ || __linux__  */
 
-/* If using GNU, then support inline function declarations. */
+/* If using GNU, then support inline function declarations.  */
 /* Don't try to switch on inline handling as detected by AC_C_INLINE
    generally, because even if non-gcc compilers accept `inline', they
    may reject `extern inline'.  */
@@ -3317,7 +3358,7 @@
 /* Set up some defines, C and LD flags for NeXTstep interface on GNUstep.
   (There is probably a better place to do this, but right now the Cocoa
    side does this in s/darwin.h and we cannot
-   parallel this exactly since GNUstep is multi-OS. */
+   parallel this exactly since GNUstep is multi-OS.  */
 #ifdef HAVE_NS
 # ifdef NS_IMPL_GNUSTEP
 /* GNUstep needs a bit more pure memory.  Of the existing knobs,
@@ -3414,7 +3455,7 @@
 #include "string.h"
 #endif
 #ifdef HAVE_STRINGS_H
-#include "strings.h"  /* May be needed for bcopy & al. */
+#include "strings.h"  /* May be needed for bcopy & al.  */
 #endif
 #ifdef HAVE_STDLIB_H
 #include <stdlib.h>
@@ -3581,7 +3622,10 @@
 # the C preprocessor to some helpful value like 1, or maybe the empty
 # string.  Needless to say consequent macro substitutions are less
 # than conducive to the makefile finding the correct directory.
-[cpp_undefs="`echo $srcdir $configuration $canonical unix |
+# src/Makefile.in used to treat X11 as equivalent to HAVE_X11.
+# But nothing in Emacs defines X11, and everywhere else uses HAVE_X11,
+# so that cannot have been doing anything.
+[cpp_undefs="`echo $srcdir $configuration $canonical unix mktime register X11 |
   sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/  *$//' \
   -e 's/  */ -U/g' -e 's/-U[0-9][^ ]*//g'`"]
 
@@ -3595,7 +3639,7 @@
 	CPP_NEED_TRADITIONAL=no,
 	CPP_NEED_TRADITIONAL=yes)
 
-AC_OUTPUT(Makefile lib-src/Makefile.c:lib-src/Makefile.in oldXMenu/Makefile \
+AC_OUTPUT(Makefile lib-src/Makefile oldXMenu/Makefile \
 	doc/emacs/Makefile doc/misc/Makefile doc/lispintro/Makefile \
 	doc/lispref/Makefile src/Makefile.c:src/Makefile.in \
 	lwlib/Makefile lisp/Makefile leim/Makefile, [
@@ -3619,22 +3663,6 @@
   CPPFLAGS="$CPPFLAGS -traditional"
 fi
 
-echo creating lib-src/Makefile
-( cd lib-src
-  rm -f junk.c junk1.c junk2.c
-  sed -e '/start of cpp stuff/q' \
-      < Makefile.c > junk1.c
-  sed -e '1,/start of cpp stuff/d'\
-      -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
-      < Makefile.c > junk.c
-  $CPP -P $cpp_undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
-      sed -e 's/^ /	/' -e '/^#/d' -e '/^[ 	]*$/d' > junk2.c
-  cat junk1.c junk2.c > Makefile.new
-  rm -f junk.c junk1.c junk2.c
-  chmod 444 Makefile.new
-  mv -f Makefile.new Makefile
-)
-
 echo creating src/Makefile
 ( cd src
   rm -f junk.c junk1.c junk2.c
--- a/doc/lispintro/ChangeLog	Fri May 14 13:14:23 2010 +0900
+++ b/doc/lispintro/ChangeLog	Fri May 14 13:15:58 2010 +0900
@@ -309,11 +309,11 @@
 2006-08-21  Robert J. Chassell  <bob@rattlesnake.com>
 
 	* emacs-lisp-intro.texi: Deleted in directory copy of texinfo.tex
-	  and pointed towards ../man/texinfo.tex so only one file
-	  needs updating.  Added comment of what to do when building on own.
+	and pointed towards ../man/texinfo.tex so only one file
+	needs updating.  Added comment of what to do when building on own.
 
 	* texinfo.tex: Changed to version 2006-02-13.16
-	  to enable a DVI build using the more recent versions of TeX.
+	to enable a DVI build using the more recent versions of TeX.
 
 2006-05-25  David Kastrup  <dak@gnu.org>
 
--- a/doc/misc/ChangeLog	Fri May 14 13:14:23 2010 +0900
+++ b/doc/misc/ChangeLog	Fri May 14 13:15:58 2010 +0900
@@ -1,3 +1,7 @@
+2010-05-13  Jay Belanger  <jay.p.belanger@gmail.com>
+
+	* calc.texi: Remove "\turnoffactive" commands througout.
+
 2010-05-08  Štěpán Němec  <stepnem@gmail.com>  (tiny change)
 
 	* url.texi (HTTP language/coding, Customization):
@@ -593,7 +597,7 @@
 	(Agenda commands): Document new bulk commands.
 	(Plain lists): Document new behavior of
 	`org-cycle-include-plain-lists'.
-	 Hyphenation only in TeX.
+	Hyphenation only in TeX.
 	(Clocking work time): Document the key to update effort
 	estimates.
 	(Clocking work time): Document the clock time display.
@@ -1660,7 +1664,7 @@
 2008-06-15  Reiner Steib  <Reiner.Steib@gmx.de>
 
 	* gnus.texi (Mail Source Customization): Correct values of
-	 `mail-source-delete-incoming'.  Reported by Tassilo Horn.
+	`mail-source-delete-incoming'.  Reported by Tassilo Horn.
 	(Oort Gnus): Fix version comment for mml-dnd-protocol-alist.
 
 2008-06-14  Reiner Steib  <Reiner.Steib@gmx.de>
--- a/doc/misc/calc.texi	Fri May 14 13:14:23 2010 +0900
+++ b/doc/misc/calc.texi	Fri May 14 13:15:58 2010 +0900
@@ -76,7 +76,6 @@
 @newcount@calcpageno
 @newtoks@calcoldeverypar @calcoldeverypar=@everypar
 @everypar={@calceverypar@the@calcoldeverypar}
-@ifx@turnoffactive@undefinedzzz@def@turnoffactive{}@fi
 @ifx@ninett@undefinedzzz@font@ninett=cmtt9@fi
 @catcode`@\=0 \catcode`\@=11
 \r@ggedbottomtrue
@@ -1804,7 +1803,6 @@
 @end example
 @end ifnottex
 @tex
-\turnoffactive
 \beforedisplay
 $$ 2 + { 3 \times 4 \times 5 \over 6 \times 7^8 } - 9 $$
 \afterdisplay
@@ -3358,7 +3356,6 @@
 @end group
 @end ifnottex
 @tex
-\turnoffactive
 \beforedisplayh
 $$ \openup1\jot \tabskip=0pt plus1fil
 \halign to\displaywidth{\tabskip=0pt
@@ -3385,7 +3382,6 @@
 @end group
 @end ifnottex
 @tex
-\turnoffactive
 \beforedisplay
 $$ \pmatrix{ 1 & 2 & 3 \cr 4 & 5 & 6 \cr 7 & 6 & 0 }
    \times
@@ -3457,7 +3453,6 @@
 @end group
 @end ifnottex
 @tex
-\turnoffactive
 \beforedisplay
 $$ \eqalign{ x &+ a y = 6 \cr
              x &+ b y = 10}
@@ -3483,7 +3478,6 @@
 @samp{trn(A)*A*X = trn(A)*B}.
 @end ifnottex
 @tex
-\turnoffactive
 $A^T A \, X = A^T B$, where $A^T$ is the transpose \samp{trn(A)}.
 @end tex
 Now 
@@ -3506,7 +3500,6 @@
 @end group
 @end ifnottex
 @tex
-\turnoffactive
 \beforedisplayh
 $$ \openup1\jot \tabskip=0pt plus1fil
 \halign to\displaywidth{\tabskip=0pt
@@ -3778,7 +3771,6 @@
 @end example
 @end ifnottex
 @tex
-\turnoffactive
 \beforedisplay
 $$ m = {N \sum x y - \sum x \sum y  \over
         N \sum x^2 - \left( \sum x \right)^2} $$
@@ -3820,7 +3812,6 @@
 @samp{sum(x y)}.)
 @end ifnottex
 @tex
-\turnoffactive
 These are $\sum x$, $\sum x^2$, $\sum y$, and $\sum x y$,
 respectively.  (We could have used \kbd{*} to compute $\sum x^2$ and
 $\sum x y$.)
@@ -3874,7 +3865,6 @@
 @end example
 @end ifnottex
 @tex
-\turnoffactive
 \beforedisplay
 $$ b = {\sum y - m \sum x \over N} $$
 \afterdisplay
@@ -5223,7 +5213,6 @@
 @end example
 @end ifnottex
 @tex
-\turnoffactive
 \beforedisplay
 $$ \displaylines{
       \qquad {h \over 3} (f(a) + 4 f(a+h) + 2 f(a+2h) + 4 f(a+3h) + \cdots
@@ -5245,7 +5234,6 @@
 @end example
 @end ifnottex
 @tex
-\turnoffactive
 \beforedisplay
 $$ h (f(a) + f(a+h) + f(a+2h) + f(a+3h) + \cdots
            + f(a+(n-2)h) + f(a+(n-1)h)) $$
@@ -5686,7 +5674,6 @@
 @end example
 @end ifnottex
 @tex
-\turnoffactive
 \beforedisplay
 $$ \cos x = 1 - {x^2 \over 2!} + {x^4 \over 4!} - {x^6 \over 6!} + \cdots $$
 \afterdisplay
@@ -5704,7 +5691,6 @@
 @end example
 @end ifnottex
 @tex
-\turnoffactive
 \beforedisplay
 $$ \cos x = 1 - {x^2 \over 2!} + O(x^3) $$
 \afterdisplay
@@ -6336,7 +6322,6 @@
 @end example
 @end ifnottex
 @tex
-\turnoffactive
 \beforedisplay
 $$ \eqalign{ s(n,n)   &= 1 \qquad \hbox{for } n \ge 0,  \cr
              s(n,0)   &= 0 \qquad \hbox{for } n > 0, \cr
@@ -6875,7 +6860,6 @@
 @end example
 @end ifnottex
 @tex
-\turnoffactive
 \beforedisplay
 $$ \eqalign{ x &+ a y = 6 \cr
              x &+ b y = 10}
@@ -6939,7 +6923,6 @@
 @end example
 @end ifnottex
 @tex
-\turnoffactive
 \beforedisplayh
 $$ \openup1\jot \tabskip=0pt plus1fil
 \halign to\displaywidth{\tabskip=0pt
@@ -7074,7 +7057,6 @@
 @end example
 @end ifnottex
 @tex
-\turnoffactive
 \beforedisplay
 $$ m \times x + b \times 1 = y $$
 \afterdisplay
@@ -7865,7 +7847,6 @@
 @end example
 @end ifnottex
 @tex
-\turnoffactive
 \beforedisplay
 $$ 3 (3 a + b - 511 m) + c - 511 n $$
 \afterdisplay
@@ -7881,7 +7862,6 @@
 @end example
 @end ifnottex
 @tex
-\turnoffactive
 \beforedisplay
 $$ 9 a + 3 b + c - 511\times3 m - 511 n $$
 \afterdisplay
@@ -7899,7 +7879,6 @@
 @end example
 @end ifnottex
 @tex
-\turnoffactive
 \beforedisplay
 $$ 9 a + 3 b + c - 511 n^{\prime} $$
 \afterdisplay
@@ -14408,7 +14387,6 @@
 @end group
 @end example
 @tex
-\turnoffactive
 $$ [3 + 4i, {3 \over 4}, 3 \pm 4, [ 3 \ldots \infty)] $$
 @end tex
 @sp 1
@@ -14434,7 +14412,6 @@
 @end group
 @end example
 @tex
-\turnoffactive
 $$ [\sin{a}, \sin{2 a}, \sin(2 + a), \sin\left( {a \over b} \right)] $$
 @end tex
 @sp 2
@@ -14467,7 +14444,6 @@
 @end group
 @end example
 @tex
-\turnoffactive
 $$ 2 + 3 \to 5 $$
 $$ 5 $$
 @end tex
@@ -14482,7 +14458,6 @@
 @end group
 @end example
 @tex
-\turnoffactive
 $$ [{2 + 3 \to 5}, {{a \over 2} \to {b + c \over 2}}] $$
 {\let\to\Rightarrow
 $$ [{2 + 3 \to 5}, {{a \over 2} \to {b + c \over 2}}] $$}
@@ -14499,7 +14474,6 @@
 @end group
 @end example
 @tex
-\turnoffactive
 $$ \matrix{ {a \over b} & 0 \cr 0 & 2^{(x + 1)} } $$
 $$ \pmatrix{ {a \over b} & 0 \cr 0 & 2^{(x + 1)} } $$
 @end tex
@@ -17935,7 +17909,6 @@
 @end example
 @end ifnottex
 @tex
-\turnoffactive
 $$ \code{fv}(r, n, p) = p { (1 + r)^n - 1 \over r } $$
 $$ \code{fvb}(r, n, p) = p { ((1 + r)^n - 1) (1 + r) \over r } $$
 $$ \code{fvl}(r, n, p) = p (1 + r)^n $$
@@ -18591,7 +18564,6 @@
 and @kbd{H I f G} [@code{gammaG}] commands.
 @end ifnottex
 @tex
-\turnoffactive
 The functions corresponding to the integrals that define $P(a,x)$
 and $Q(a,x)$ but without the normalizing $1/\Gamma(a)$
 factor are called $\gamma(a,x)$ and $\Gamma(a,x)$, respectively.
@@ -20559,7 +20531,6 @@
 @texline @math{1 /\sigma^2}.
 @infoline @expr{1 / s^2}.
 @tex
-\turnoffactive
 $$ \mu = { \displaystyle \sum { x_i \over \sigma_i^2 } \over
            \displaystyle \sum { 1 \over \sigma_i^2 } } $$
 @end tex
@@ -20593,7 +20564,6 @@
 of the input errors.  (I.e., the variance is the reciprocal of the
 sum of the reciprocals of the variances.)
 @tex
-\turnoffactive
 $$ \sigma_\mu^2 = {1 \over \displaystyle \sum {1 \over \sigma_i^2}} $$
 @end tex
 If the inputs are plain
@@ -20603,7 +20573,6 @@
 then assuming each value's error is equal to this standard
 deviation.)
 @tex
-\turnoffactive
 $$ \sigma_\mu^2 = {\sigma^2 \over N} $$
 @end tex
 
@@ -20636,7 +20605,6 @@
 defined as the reciprocal of the arithmetic mean of the reciprocals
 of the values.
 @tex
-\turnoffactive
 $$ { N \over \displaystyle \sum {1 \over x_i} } $$
 @end tex
 
@@ -20650,7 +20618,6 @@
 equal to the @code{exp} of the arithmetic mean of the logarithms
 of the data values.
 @tex
-\turnoffactive
 $$ \exp \left ( \sum { \ln x_i } \right ) =
    \left ( \prod { x_i } \right)^{1 / N} $$
 @end tex
@@ -20662,7 +20629,6 @@
 replacing the two numbers with their arithmetic mean and geometric
 mean, then repeating until the two values converge.
 @tex
-\turnoffactive
 $$ a_{i+1} = { a_i + b_i \over 2 } , \qquad b_{i+1} = \sqrt{a_i b_i} $$
 @end tex
 
@@ -20685,7 +20651,6 @@
 the differences between the values and the mean of the @expr{N} values,
 divided by @expr{N-1}.
 @tex
-\turnoffactive
 $$ \sigma^2 = {1 \over N - 1} \sum (x_i - \mu)^2 $$
 @end tex
 
@@ -20712,7 +20677,6 @@
 data values, so that the mean computed from the input is itself
 only an estimate of the true mean.
 @tex
-\turnoffactive
 $$ \sigma^2 = {1 \over N} \sum (x_i - \mu)^2 $$
 @end tex
 
@@ -20777,7 +20741,6 @@
 is taken as the square root of the sum of the squares of the two
 input errors.
 @tex
-\turnoffactive
 $$ \sigma_{x\!y}^2 = {1 \over N-1} \sum (x_i - \mu_x) (y_i - \mu_y) $$
 $$ \sigma_{x\!y}^2 =
     {\displaystyle {1 \over N-1}
@@ -20805,7 +20768,6 @@
 product of their standard deviations.  (There is no difference
 between sample or population statistics here.)
 @tex
-\turnoffactive
 $$ r_{x\!y} = { \sigma_{x\!y}^2 \over \sigma_x^2 \sigma_y^2 } $$
 @end tex
 
@@ -24361,8 +24323,6 @@
 @end example
 @end ifnottex
 @tex
-\turnoffactive
-\turnoffactive
 \beforedisplay
 $$ \pmatrix{ 1 & 2 & 3 & 4  & 5  \cr
              5 & 7 & 9 & 11 & 13 }
@@ -24422,7 +24382,6 @@
 @end example
 @end ifnottex
 @tex
-\turnoffactive
 \beforedisplay
 $$ \chi^2 = \sum_{i=1}^N (y_i - (a + b x_i))^2 $$
 \afterdisplay
@@ -24613,7 +24572,6 @@
 @end example
 @end ifnottex
 @tex
-\turnoffactive
 \beforedisplay
 $$ \chi^2 = \sum_{i=1}^N \left(y_i - (a + b x_i) \over \sigma_i\right)^2 $$
 \afterdisplay
@@ -25388,7 +25346,6 @@
 the stack.  Thus, @kbd{' k^2 @key{RET} ' k @key{RET} 1 @key{RET} 5 @key{RET} a + @key{RET}}
 produces the result 55.
 @tex
-\turnoffactive
 $$ \sum_{k=1}^5 k^2 = 55 $$
 @end tex
 
--- a/etc/ChangeLog	Fri May 14 13:14:23 2010 +0900
+++ b/etc/ChangeLog	Fri May 14 13:15:58 2010 +0900
@@ -1839,7 +1839,7 @@
 2006-11-05  Slawomir Nowaczyk  <slawek@cs.lth.se>
 
 	* emacs.py (eargs): Provide eldoc message for builtin types.
-	  Make sure eargs always outputs sentinel, to avoid Emacs freeze.
+	Make sure eargs always outputs sentinel, to avoid Emacs freeze.
 
 2006-10-22  Chong Yidong  <cyd@stupidchicken.com>
 
@@ -4646,8 +4646,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/etc/NEWS	Fri May 14 13:14:23 2010 +0900
+++ b/etc/NEWS	Fri May 14 13:15:58 2010 +0900
@@ -43,6 +43,8 @@
 
 * Changes in Emacs 24.1
 
+** Completion can cycle, depending on completion-cycle-threshold.
+
 ** auto-mode-case-fold is now enabled by default.
 
 +++
--- a/lib-src/ChangeLog	Fri May 14 13:14:23 2010 +0900
+++ b/lib-src/ChangeLog	Fri May 14 13:15:58 2010 +0900
@@ -1,3 +1,20 @@
+2010-05-12  Glenn Morris  <rgm@gnu.org>
+
+	* Makefile.in (INSTALLABLES): Remove @LIB_SRC_EXTRA_INSTALLABLES@.
+
+2010-05-11  Glenn Morris  <rgm@gnu.org>
+
+	* Makefile.in (.m.o): Remove, there are no .m files.
+	(BASE_CFLAGS): New variable.
+	(ALL_CFLAGS, LINK_CFLAGS, CPP_CFLAGS): Use $BASE_CFLAGS.
+	(check): Update the message.
+	(update-game-score${EXEEXT}): Do not use $MOVE_FLAGS.
+
+	* Makefile.in: Convert comments to makefile format.
+
+	* Makefile.in (LIBS_SYSTEM) [MSDOS]: Do not reset.
+	(config.h) [MSDOS]: Do not include.
+
 2010-05-10  Glenn Morris  <rgm@gnu.org>
 
 	* Makefile.in (LIBS_SYSTEM): Set with configure, not cpp.
--- a/lib-src/Makefile.in	Fri May 14 13:14:23 2010 +0900
+++ b/lib-src/Makefile.in	Fri May 14 13:15:58 2010 +0900
@@ -31,6 +31,7 @@
 CC=@CC@
 CFLAGS=@CFLAGS@
 version=@version@
+## Used in $archlibdir.
 configuration=@configuration@
 EXEEXT=@EXEEXT@
 C_SWITCH_SYSTEM=@C_SWITCH_SYSTEM@
@@ -107,7 +108,7 @@
 
 # Things that a user might actually run,
 # which should be installed in bindir.
-INSTALLABLES = etags${EXEEXT} ctags${EXEEXT} emacsclient${EXEEXT} b2m${EXEEXT} ebrowse${EXEEXT} @LIB_SRC_EXTRA_INSTALLABLES@
+INSTALLABLES = etags${EXEEXT} ctags${EXEEXT} emacsclient${EXEEXT} b2m${EXEEXT} ebrowse${EXEEXT}
 INSTALLABLE_SCRIPTS = rcs-checkin grep-changelog
 
 # Things that Emacs runs internally, or during the build process,
@@ -127,8 +128,8 @@
 # Specify additional -D flags for movemail. Options:
 # -DMAIL_USE_FLOCK or -DMAIL_USE_LOCKF (use flock or lockf for file locking).
 # See the comments about locking in movemail.c.  Normally the values
-# in ../src/[ms]/*.h should be correct and you should not need to do anything.
-# If neither flag is set, blessmail is used.
+# set by configure should be correct and you should not need to do anything.
+# If neither flag is set, you need to use blessmail.
 MOVE_FLAGS=
 
 ## Empty if either MAIL_USE_FLOCK or MAIL_USE_LOCKF, else need-blessmail.
@@ -160,40 +161,28 @@
 # Those files shared with other GNU utilities need HAVE_CONFIG_H
 # defined before they know they can take advantage of the information
 # in ../src/config.h.
-ALL_CFLAGS = $(C_SWITCH_SYSTEM) $(C_SWITCH_MACHINE) -DHAVE_CONFIG_H -I. -I../src -I${srcdir} -I${srcdir}/../src ${LDFLAGS} ${CPPFLAGS} ${CFLAGS}
-LINK_CFLAGS = $(C_SWITCH_SYSTEM) $(C_SWITCH_MACHINE) -DHAVE_CONFIG_H -I. -I../src -I${srcdir} -I${srcdir}/../src ${LDFLAGS} ${CFLAGS}
-CPP_CFLAGS = $(C_SWITCH_SYSTEM) $(C_SWITCH_MACHINE) -DHAVE_CONFIG_H -I. -I../src -I${srcdir} -I${srcdir}/../src ${CPPFLAGS} ${CFLAGS}
+BASE_CFLAGS = $(C_SWITCH_SYSTEM) $(C_SWITCH_MACHINE) -DHAVE_CONFIG_H -I. -I../src -I${srcdir} -I${srcdir}/../src
 
-# ========================== start of cpp stuff =======================
-/* From here on, comments must be done in C syntax.  */
-
-#ifdef MSDOS
-#include "../src/config.h"
-LIBS_SYSTEM = MSDOS_LIBS_SYSTEM
-#endif
+ALL_CFLAGS = ${BASE_CFLAGS} ${LDFLAGS} ${CPPFLAGS} ${CFLAGS}
+LINK_CFLAGS = ${BASE_CFLAGS} ${LDFLAGS} ${CFLAGS}
+CPP_CFLAGS = ${BASE_CFLAGS} ${CPPFLAGS} ${CFLAGS}
 
 LOADLIBES=$(LIBS_SYSTEM)
 
 
-.SUFFIXES: .m
-
-/* This is the default compilation command.
-   But we should never rely on it, because some make version
-   failed to find it for getopt.o.
-   Using an explicit command made it work.  */
+## This is the default compilation command.
+## But we should never rely on it, because some make version failed to
+## find it for getopt.o.
+## Using an explicit command made it work.
 .c.o:
 	${CC} -c ${CPP_CFLAGS} $<
 
-.m.o:
-	$(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $<
-
 all: ${DONT_INSTALL} ${UTILITIES} ${INSTALLABLES} ${SCRIPTS} ${INSTALLABLE_SCRIPTS}
 
-/* These targets copy the scripts into the build directory
-so that they can be run from there in an uninstalled Emacs.
-The "-" is prepended because some versions of cp barf when
-srcdir is the current directory, and thus the file will be
-copied into itself.  */
+## These targets copy the scripts into the build directory so that
+## they can be run from there in an uninstalled Emacs.
+## The "-" is prepended because some versions of cp barf when srcdir
+## is the current directory, and thus the file will be copied into itself.
 rcs2log: $(srcdir)/rcs2log
 	-cp -p $(srcdir)/rcs2log rcs2log
 
@@ -206,16 +195,15 @@
 vcdiff: $(srcdir)/vcdiff
 	-cp -p $(srcdir)/vcdiff vcdiff
 
-/* Only used if we need blessmail, but no harm in always defining.
-   This makes the actual blessmail executable.  */
+## Only used if we need blessmail, but no harm in always defining.
+## This makes the actual blessmail executable.
 blessmail:
 	$(EMACS) $(EMACSOPT) -l $(srcdir)/../lisp/mail/blessmail.el
 	chmod +x blessmail
 
-/* This checks if we need to run blessmail.  */
+## This checks if we need to run blessmail.
+## Do not charge ahead and do it!  Let the installer decide.
 need-blessmail: blessmail
-/* Don\'t charge ahead and do it!  Let the installer decide.
-	  ./blessmail $(DESTDIR)${archlibdir}/movemail${EXEEXT}  */
 	@if [ `wc -l <blessmail` != 2 ] ; then \
 	  dir=`sed -n -e 's/echo mail directory = \(.*\)/\1/p' blessmail`; \
 	  echo Assuming $$dir is really the mail spool directory, you should; \
@@ -224,11 +212,14 @@
 	  echo Do that after running  make install.; \
 	fi
 
-/* This is the target invoked by the top-level Makefile.  */
+## This is the target invoked by the top-level Makefile.
 maybe-blessmail: $(BLESSMAIL_TARGET)
 
-/* Install the internal utilities.  Until they are installed, we can
-   just run them directly from lib-src.  */
+## Install the internal utilities.  Until they are installed, we can
+## just run them directly from lib-src.
+## If the chown/chmod commands fail, that is not a big deal.
+## update-game-score will detect at runtime that it is not setuid,
+## and handle things accordingly.
 $(DESTDIR)${archlibdir}: all
 	@echo
 	@echo "Installing utilities run internally by Emacs."
@@ -241,9 +232,6 @@
 	umask 022; $(top_srcdir)/mkinstalldirs $(DESTDIR)${gamedir}; \
 	touch $(DESTDIR)${gamedir}/snake-scores; \
 	touch $(DESTDIR)${gamedir}/tetris-scores
-/* If the following commands fail, that is not a big deal.
-   update-game-score will detect at runtime that it is not setuid,
-   and handle things accordingly. */
 	-if chown ${gameuser} $(DESTDIR)${archlibdir}/update-game-score && chmod u+s $(DESTDIR)${archlibdir}/update-game-score; then \
 	  chown ${gameuser} $(DESTDIR)${gamedir}; \
 	  chmod u=rwx,g=rwx,o=rx $(DESTDIR)${gamedir}; \
@@ -294,24 +282,24 @@
 extraclean: maintainer-clean
 	-rm -f *~ \#*
 
-/* Test the contents of the directory.  */
+## Test the contents of the directory.
 check:
-	@echo "We don't have any tests for GNU Emacs yet."
+	@echo "We don't have any tests for the lib-src/ directory yet."
 
 tags: TAGS
 TAGS: etags${EXEEXT}
 	etags *.[ch]
 
-/* This verifies that the non-ASCII characters in the file \`testfile\'
-   have not been clobbered by whatever means were used to copy and
-   distribute Emacs.  If they were clobbered, all the .elc files were
-   clobbered too.  */
+## This verifies that the non-ASCII characters in the file \`testfile\'
+## have not been clobbered by whatever means were used to copy and
+## distribute Emacs.  If they were clobbered, all the .elc files were
+## clobbered too.
 test-distrib${EXEEXT}: ${srcdir}/test-distrib.c
 	$(CC) ${ALL_CFLAGS} -o test-distrib ${srcdir}/test-distrib.c
 	./test-distrib ${srcdir}/testfile
 
-/* We need the following in order to create a <getopt.h> when the system
-   does not have one that works with the given compiler.  */
+## We need the following in order to create a <getopt.h> when the system
+## does not have one that works with the given compiler.
 GETOPT_H = @GETOPT_H@
 getopt.h: getopt_.h
 	cp $(srcdir)/getopt_.h $@-t
@@ -336,8 +324,8 @@
 ebrowse${EXEEXT}: ${srcdir}/ebrowse.c $(GETOPTDEPS) ../src/config.h
 	$(CC) ${ALL_CFLAGS} -DVERSION="\"${version}\"" ${srcdir}/ebrowse.c $(GETOPTOBJS) $(LOADLIBES) -o ebrowse
 
-/* We depend on etags to assure that parallel makes don\'t write two
-   etags.o files on top of each other.  */
+## We depend on etags to assure that parallel makes do not write two
+## etags.o files on top of each other.
 ctags${EXEEXT}: etags${EXEEXT}
 	$(CC) ${ALL_CFLAGS} -DCTAGS -DEMACS_NAME="\"GNU Emacs\"" -DVERSION="\"${version}\"" ${srcdir}/etags.c $(GETOPTOBJS) $(REGEXPOBJ) $(LOADLIBES) -o ctags
 
@@ -360,7 +348,7 @@
 movemail${EXEEXT}: movemail.o pop.o $(GETOPTDEPS)
 	$(CC) ${LINK_CFLAGS} ${MOVE_FLAGS} movemail.o pop.o $(GETOPTOBJS) $(LOADLIBES) $(LIBS_MOVE) -o movemail
 
-/*  We need to define emacs to get the right version of something (what?).  */
+## We need to define emacs to get the right version of something (what?).
 movemail.o: ${srcdir}/movemail.c ../src/config.h $(GETOPT_H)
 	$(CC) -c ${CPP_CFLAGS} ${MOVE_FLAGS} ${srcdir}/movemail.c
 
@@ -379,8 +367,10 @@
 	$(CC) ${ALL_CFLAGS} ${srcdir}/hexl.c $(LOADLIBES) -o hexl
 
 update-game-score${EXEEXT}: update-game-score.o $(GETOPTDEPS)
-	$(CC) ${LINK_CFLAGS} ${MOVE_FLAGS} update-game-score.o $(GETOPTOBJS) $(LOADLIBES) -o update-game-score
+	$(CC) ${LINK_CFLAGS} update-game-score.o $(GETOPTOBJS) $(LOADLIBES) -o update-game-score
 
 update-game-score.o: ${srcdir}/update-game-score.c ../src/config.h $(GETOPT_H)
 	$(CC) -c ${CPP_CFLAGS} ${srcdir}/update-game-score.c \
 	  -DHAVE_SHARED_GAME_DIR="\"$(gamedir)\""
+
+## Makefile ends here.
--- a/lisp/ChangeLog	Fri May 14 13:14:23 2010 +0900
+++ b/lisp/ChangeLog	Fri May 14 13:15:58 2010 +0900
@@ -1,13 +1,111 @@
+2010-05-13  Chong Yidong  <cyd@stupidchicken.com>
+
+	Add TeX open-block and close-block keybindings to SGML, and vice
+	versa.
+
+	* textmodes/tex-mode.el (tex-mode-map): Bind C-c C-t to
+	latex-open-block and C-c / to latex-close-block.
+
+	* textmodes/sgml-mode.el (sgml-mode-map): Bind C-c C-o to sgml-tag
+	and C-c C-e to sgml-close-tag.
+
+2010-05-13  Michael Albinus  <michael.albinus@gmx.de>
+
+	* net/tramp.el (with-progress-reporter): Create reporter object
+	only when the message would be displayed.  Handled nested calls.
+	(tramp-handle-load, tramp-handle-file-local-copy)
+	(tramp-handle-insert-file-contents, tramp-handle-write-region)
+	(tramp-maybe-send-script, tramp-find-shell): Use
+	`with-progress-reporter'.
+	(tramp-handle-dired-compress-file, tramp-maybe-open-connection):
+	Fix message text.
+
+	* net/tramp-smb.el (tramp-smb-handle-copy-file)
+	(tramp-smb-handle-file-local-copy, tramp-smb-handle-rename-file)
+	(tramp-smb-handle-write-region, tramp-smb-maybe-open-connection):
+	Use `with-progress-reporter'.
+
+2010-05-13  Agustín Martín  <agustin.martin@hispalinux.es>
+
+	* ispell.el (ispell-init-process): Do not kill ispell process
+	everytime when spellchecking from the minibuffer (bug#6143).
+
+2010-05-13  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* progmodes/sh-script.el (sh-mode): Use define-derived-mode.
+
+	* dos-fns.el: Add "dos-" prefix for namespace control.
+	(convert-standard-filename): Define as alias for
+	dos-convert-standard-filename but only if applicable.
+
+2010-05-12  Alan Mackenzie  <acm@muc.de>
+
+	* progmodes/cc-cmds.el (c-beginning-of-defun, c-end-of-defun):
+	Push the mark at the start of these functions when appropriate.
+
+2010-05-12  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* minibuffer.el (completion-cycle-threshold): New custom var.
+	(completion--do-completion): Use it.
+	(minibuffer-complete): Use cycling if appropriate.
+
+2010-05-11  Juanma Barranquero  <lekktu@gmail.com>
+
+	* dirtrack.el (dirtrackp): Remove defcustom; don't make automatically
+	buffer-local (it's an obsolete alias for `dirtrack-mode') (bug#6173).
+
+2010-05-11  Juri Linkov  <juri@jurta.org>
+
+	* scroll-all.el (scroll-all-check-to-scroll):
+	Add `scroll-up-command' and `scroll-down-command' (bug#6164).
+
+2010-05-11  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* iimage.el (iimage-mode-map): Move initialization into declaration.
+	(iimage-mode-buffer): Use with-silent-modifications.
+	Simplify calling convention.  Adjust callers.
+	(iimage-mode): Don't run hook redundantly.
+
+	* minibuffer.el (completion-pcm--pattern->regex):
+	Fix last change (bug#6160).
+
+2010-05-10  Juri Linkov  <juri@jurta.org>
+
+	Remove nodes visited during Isearch from the Info history.
+	* info.el (Info-isearch-initial-history)
+	(Info-isearch-initial-history-list): New variables.
+	(Info-isearch-start): Record initial values of
+	Info-isearch-initial-history and Info-isearch-initial-history-list.
+	Add Info-isearch-end to isearch-mode-end-hook.
+	(Info-isearch-end): New function.
+
+2010-05-10  Michael Albinus  <michael.albinus@gmx.de>
+
+	* net/tramp.el (tramp-do-file-attributes-with-stat): Add space in
+	format string, in order to work around a bug in pdksh.
+	Reported by Gilles Pion <gpion@lfdj.com>.
+	(tramp-handle-verify-visited-file-modtime): Do not send a command
+	when the connection is not established.
+	(tramp-handle-set-file-times): Simplify the check for utc.
+
+2010-05-10  Juanma Barranquero  <lekktu@gmail.com>
+
+	Fix use of `filter-buffer-substring' (rework previous change).
+	* emulation/cua-base.el (cua--filter-buffer-noprops): New function.
+	(cua-repeat-replace-region):
+	* emulation/cua-rect.el (cua--extract-rectangle, cua-incr-rectangle):
+	* emulation/cua-gmrk.el (cua-copy-region-to-global-mark)
+	(cua-cut-region-to-global-mark): Use it.
+
 2010-05-09  Michael R. Mauger  <mmaug@yahoo.com>
 
-	* progmodes/sql.el: Version 2.1
-	(sql-product-alist): Redesigned structure of product info.
-        (sql-product, sql-user, sql-server, sql-database): Safe
-	variables.
+	* progmodes/sql.el: Version 2.1.
+	(sql-product-alist): Redesign structure of product info.
+	(sql-product, sql-user, sql-server, sql-database): Safe variables.
 	(sql-port, sql-port-history): New variables.
 	(sql-interactive-product): New variable.
 	(sql-send-terminator): New variable.
-	(sql-imenu-generic-expression): Added "Types" imenu entry.
+	(sql-imenu-generic-expression): Add "Types" imenu entry.
 	(sql-oracle-login-params, sql-sqlite-login-params)
 	(sql-mysql-login-params, sql-solid-login-params)
 	(sql-sybase-login-params, sql-informix-login-params)
@@ -15,10 +113,9 @@
 	(sql-postgres-login-params, sql-interbase-login-params)
 	(sql-db2-login-params, sql-linter-login-params)
 	(sql-oracle-scan-on): New variables.
-	(sql-mode-map): Added C-c C-i to start interactive mode.
-	(sql-mode-menu): Updated existing menu entries.
-        (sql-font-lock-keywords-builder): Compile-time font-lock
-	optimization.
+	(sql-mode-map): Add C-c C-i to start interactive mode.
+	(sql-mode-menu): Update existing menu entries.
+	(sql-font-lock-keywords-builder): Compile-time font-lock optimization.
 	(sql-mode-oracle-font-lock-keywords)
 	(sql-mode-postgres-font-lock-keywords)
 	(sql-mode-ms-font-lock-keywords)
@@ -30,7 +127,7 @@
 	(sql-mode-mysql-font-lock-keywords)
 	(sql-mode-sqlite-font-lock-keywords)
 	(sql-mode-db2-font-lock-keywords)
-	(sql-mode-linter-font-lock-keywords): Updated initialization to
+	(sql-mode-linter-font-lock-keywords): Update initialization to
 	reduce run-time complexity.
 	(sql-add-product, sql-del-product): New functions.
 	(sql-set-product-feature, sql-get-product-feature): New functions.
@@ -39,12 +136,12 @@
 	(sql-highlight-product): Update product API.
 	(sql-help-list-products): New function.
 	(sql-help): Dynamically lists free and non-free products.
-	(sql-get-login): Corrected bug in handling history and added
+	(sql-get-login): Correct bug in handling history and added
 	prompt for port.
 	(sql-copy-column): Copy without properties.
 	(sqli-input-sender): Apply filters to SQLi input.
-	(sql-query-placeholders-and-send): Obey `sql-oracle-scan-on'
-	setting.  Implement as a filter.
+	(sql-query-placeholders-and-send): Obey `sql-oracle-scan-on' setting.
+	Implement as a filter.
 	(sql-escape-newlines-filter): Implement as a filter.
 	(sql-remove-tabs-filter): New function.
 	(sql-send-magic-terminator): New function.
@@ -59,8 +156,8 @@
 	(sql-connect-oracle, sql-connect-sybase, sql-connect-informix)
 	(sql-connect-sqlite, sql-connect-mysql, sql-connect-solid)
 	(sql-connect-ingres, sql-connect-ms, sql-connect-postgres)
-	(sql-connect-interbase, sql-connect-db2, sql-connect-linter): Use
-	`sql-connect'.
+	(sql-connect-interbase, sql-connect-db2, sql-connect-linter):
+	Use `sql-connect'.
 
 2010-05-09  Stefan Monnier  <monnier@iro.umontreal.ca>
 
@@ -109,7 +206,7 @@
 
 2010-05-08  Chong Yidong  <cyd@stupidchicken.com>
 
-	* international/mule.el (auto-coding-alist):  Only purecopy
+	* international/mule.el (auto-coding-alist): Only purecopy
 	car of each item, not the whole list (Bug#6083).
 
 2010-05-08  Chong Yidong  <cyd@stupidchicken.com>
@@ -122,7 +219,7 @@
 	* composite.el (compose-region, reference-point-alist): Fix typos
 	in the doc strings.
 
-2010-05-08  Alexander Klimov <alserkli@inbox.ru> (tiny change)
+2010-05-08  Alexander Klimov  <alserkli@inbox.ru>  (tiny change)
 
 	* calc/calc-graph.el (calc-graph-plot): Use the proper form for
 	gnuplot's "set" command.
@@ -465,7 +562,7 @@
 	(ede-dired-add-to-target): Use dolist.
 
 2010-05-01  Toru TSUNEYOSHI  <t_tuneyosi@hotmail.com>
-	    Michael Albinus  <michael.albinus@gmx.de>
+            Michael Albinus  <michael.albinus@gmx.de>
 
 	Implement compression for inline methods.
 
@@ -769,6 +866,8 @@
 
 2010-04-21  Stefan Monnier  <monnier@iro.umontreal.ca>
 
+	Make the log-edit comments use RFC822 format throughout.
+
 	* vc.el (vc-checkin, vc-modify-change-comment):
 	Adjust to new vc-start/finish-logentry.
 	(vc-find-conflicted-file): New command.
@@ -974,7 +1073,7 @@
 	(calc-hyperbolic): Add "Option" to message, as appropriate.
 	(calc-option, calc-is-option): New functions.
 
-	* calc-help.el (calc-full-help):  Add `calc-option-help'.
+	* calc-help.el (calc-full-help): Add `calc-option-help'.
 	(calc-option-prefix-help): New function.
 
 	* calc-misc.el (calc-help): Add "Option" entry.
@@ -1537,7 +1636,7 @@
 	values.
 
 2010-03-29  Phil Hagelberg  <phil@evri.com>
-	    Chong Yidong  <cyd@stupidchicken.com>
+            Chong Yidong  <cyd@stupidchicken.com>
 
 	* subr.el: Extend progress reporters to perform "spinning".
 	(progress-reporter-update, progress-reporter-do-update):
@@ -5180,7 +5279,7 @@
 	* Makefile.in (ELCFILES): Adapt to subword.el move.
 
 2009-11-21  Thierry Volpiatto  <thierry.volpiatto@gmail.com>
-	    Stefan Monnier  <monnier@iro.umontreal.ca>
+            Stefan Monnier  <monnier@iro.umontreal.ca>
 
 	* bookmark.el (bookmark-bmenu-bookmark-column): Remove var.
 	(bookmark-bmenu-list): Save name on `bookmark-name-prop' text-prop.
@@ -9266,7 +9365,7 @@
 	indent buffer only if called interactively (Bug#4452).
 
 2009-09-19  Juanma Barranquero  <lekktu@gmail.com>
-	    Eli Zaretskii  <eliz@gnu.org>
+            Eli Zaretskii  <eliz@gnu.org>
 
 	This fixes bug#4197 (merged to bug#865, though not identical).
 	* server.el (server-auth-dir): Add docstring note about FAT32.
@@ -10083,7 +10182,7 @@
 	Don't call substitute-in-file-name on diary-file.
 
 2009-09-03  Eduard Wiebe  <usenet@pusto.de>
-	    Stefan Monnier  <monnier@iro.umontreal.ca>
+            Stefan Monnier  <monnier@iro.umontreal.ca>
 
 	* mail/footnote.el (footnote-prefix): Make it a defcustom.
 	(footnote-mode-map): Move initialization into the declaration.
@@ -11194,7 +11293,7 @@
 	* progmodes/hideshow.el (hs-special-modes-alist): Add js-mode entry.
 
 2009-08-14  Daniel Colascione  <dan.colascione@gmail.com>
-	    Karl Landstrom  <karl.landstrom@brgeight.se>
+            Karl Landstrom  <karl.landstrom@brgeight.se>
 
 	* progmodes/js.el: New file.
 
@@ -12961,7 +13060,7 @@
 	XZ is the successor to LZMA: <http://tukaani.org/xz/>
 
 2009-06-22  Dmitry Dzhus  <dima@sphinx.net.ru>
-	    Nick Roberts  <nickrob@snap.net.nz>
+            Nick Roberts  <nickrob@snap.net.nz>
 
 	* progmodes/gdb-mi.el: Pull further modified changes from Dmitry's
 	repository (http://sphinx.net.ru/hg/gdb-mi/).
--- a/lisp/ChangeLog.1	Fri May 14 13:14:23 2010 +0900
+++ b/lisp/ChangeLog.1	Fri May 14 13:15:58 2010 +0900
@@ -990,7 +990,7 @@
 	* info.el:
 	(Info-select-node): Was searching unboundedly for "execute:".
 	(Info-follow-reference): Was called Info-footnote.
-	  Also, handle presence of spaces and newlines in ref names.
+	 Also, handle presence of spaces and newlines in ref names.
 	(Info-extract-menu-node-name): Handle presence of spaces and
 	 newlines in the node name.
 	(Info-menu): Handle presence of spaces and newlines in item
@@ -1465,7 +1465,7 @@
 1985-10-28  Richard M. Stallman  (rms@prep)
 
 	* rmail.el, rmailsum.el, rmailkwd.el, rmailmsc.el,
-	  rmailout.el, rmailedit.el:
+	* rmailout.el, rmailedit.el:
 	Install thoroughly rewritten rmail with many new features.
 
 	* debug.el (debug, debugger-mode):
@@ -3100,7 +3100,7 @@
 	(also, mail-yank-ignored-headers had a typo)
 
 	* rmail.el (rmail-get-new-mail, convert-to-babyl-format, ...)
-	  loaddefs.el
+	* loaddefs.el:
 	Remodularize inbox parsing.  Add support(?) for mmdf inboxes.
 	Note that I can't seem to define definitive documentation of
 	what this format is; however the code installed seems to work
--- a/lisp/ChangeLog.12	Fri May 14 13:14:23 2010 +0900
+++ b/lisp/ChangeLog.12	Fri May 14 13:15:58 2010 +0900
@@ -32509,7 +32509,7 @@
 	(bibtex-field-list, bibtex-find-crossref): Fix typos in error messages.
 
 2005-01-24  Dan Nicolaescu  <dann@ics.uci.edu>
-	    Juri Linkov  <juri@jurta.org>
+            Juri Linkov  <juri@jurta.org>
 
 	* textmodes/reftex-global.el (reftex-isearch-push-state-function)
 	(reftex-isearch-pop-state-function, reftex-isearch-isearch-search)
--- a/lisp/ChangeLog.13	Fri May 14 13:14:23 2010 +0900
+++ b/lisp/ChangeLog.13	Fri May 14 13:15:58 2010 +0900
@@ -721,7 +721,7 @@
 	char-width-table.  Don't make ethiopic and tibetan double column.
 
 	* textmodes/fill.el (fill-find-break-point-function-table):
-	 Don't set it up in defvar.
+	Don't set it up in defvar.
 	(fill-nospace-between-words-table): New variable.
 	(fill-delete-newlines): Check fill-nospace-between-words-table
 	instead of charset property nospace-between-words.
@@ -1872,8 +1872,8 @@
 2008-02-01  Dave Love  <fx@gnu.org>
 
 	* emacs-lisp/byte-opt.el (side-effect-free-fns):
-	 Add string-make-unibyte string-make-multibyte string-to-multibyte
-	 string-as-multibyte string-as-unibyte.
+	Add string-make-unibyte string-make-multibyte string-to-multibyte
+	string-as-multibyte string-as-unibyte.
 
 2008-02-01  Dave Love  <fx@gnu.org>
 
@@ -3983,7 +3983,7 @@
 	* ibuffer.el (ibuffer-mode): Fix typo in previous change.
 
 2008-01-17  Vinicius Jose Latorre  <viniciusjl@ig.com.br>
-	    Miles Bader  <miles@gnu.org>
+            Miles Bader  <miles@gnu.org>
 
 	* blank-mode.el: New file.  Minor mode to visualize (HARD) SPACE,
 	TAB, NEWLINE.  Miles Bader <miles@gnu.org> wrote the original code
@@ -5479,7 +5479,7 @@
 	(verilog-insert-indices): Escape braces in doc strings.
 
 2007-12-08  Michael McNamara  <mac@verilog.com>
-	    Wilson Snyder  <wsnyder@wsnyder.org>
+            Wilson Snyder  <wsnyder@wsnyder.org>
 
 	* progmodes/verilog-mode.el: New file.
 
@@ -13484,7 +13484,7 @@
 	Use native Emacs functions, when appropriate.
 
 2007-08-01  Dan Nicolaescu  <dann@ics.uci.edu>
-	    Stefan Monnier  <monnier@iro.umontreal.ca>
+            Stefan Monnier  <monnier@iro.umontreal.ca>
 
 	* vc.el: Document new VC operation `extra-menu'.
 
--- a/lisp/ChangeLog.14	Fri May 14 13:14:23 2010 +0900
+++ b/lisp/ChangeLog.14	Fri May 14 13:15:58 2010 +0900
@@ -1029,7 +1029,7 @@
 
 	* paren.el (show-paren-function):
 	* simple.el (kill-forward-chars, kill-backward-chars):
-	 Use (+/- (point) N), instead of `forward-point'.
+	Use (+/- (point) N), instead of `forward-point'.
 
 2009-03-19  Glenn Morris  <rgm@gnu.org>
 
@@ -3012,12 +3012,12 @@
 	Don't activate node nil.  (Bug#1569)
 
 2009-01-22  Paul Reilly  <pmr@pajato.com>
-	    Henrik Enberg  <enberg@printf.se>
-	    Alex Schroeder  <alex@gnu.org>
-	    Chong Yidong  <cyd@stupidchicken.com>
-	    Richard M Stallman  <rms@gnu.org>
-	    Glenn Morris  <rgm@gnu.org>
-	    Juanma Barranquero  <lekktu@gmail.com>
+            Henrik Enberg  <enberg@printf.se>
+            Alex Schroeder  <alex@gnu.org>
+            Chong Yidong  <cyd@stupidchicken.com>
+            Richard M Stallman  <rms@gnu.org>
+            Glenn Morris  <rgm@gnu.org>
+            Juanma Barranquero  <lekktu@gmail.com>
 
 	* mail/rmail.el: Code implementing Rmail-mbox functionality.
 	(rmail-attribute-header, rmail-keyword-header)
@@ -4310,7 +4310,7 @@
 	was orderly adjusted, nil otherwise.
 
 2008-12-12  Juanma Barranquero  <lekktu@gmail.com>
-	    Stefan Monnier  <monnier@iro.umontreal.ca>
+            Stefan Monnier  <monnier@iro.umontreal.ca>
 
 	* server.el (server-sentinel): Uncomment code to delete connection file.
 	(server-start): Save the connection file in the server property list.
@@ -4369,7 +4369,7 @@
 	terminal variable assignment.
 
 2008-12-10  Yukihiro Matsumoto  <matz@ruby-lang.org>
-	    Nobuyoshi Nakada  <nobu@ruby-lang.org>
+            Nobuyoshi Nakada  <nobu@ruby-lang.org>
 
 	* progmodes/ruby-mode.el: New file.
 
@@ -5599,7 +5599,7 @@
 	New aliases, to satisfy `define-derived-mode' expectations.
 
 2008-11-15  Glenn Morris  <rgm@gnu.org>
-	    Martin Rudalics  <rudalics@gmx.at>
+            Martin Rudalics  <rudalics@gmx.at>
 
 	* emacs-lisp/find-func.el (find-function-advised-original): New.
 	(find-function-C-source, find-function-noselect):
@@ -10308,8 +10308,8 @@
 	(newsticker--treeview-propertize-tag): Show item title in tooltip.
 
 2008-06-20  Martin Blais  <blais@furius.ca>
-	    Stefan Merten  <smerten@oekonux.de>
-	    David Goodger  <goodger@python.org>
+            Stefan Merten  <smerten@oekonux.de>
+            David Goodger  <goodger@python.org>
 
 	* textmodes/rst.el: New file.
 
@@ -10627,7 +10627,7 @@
 	* term/linux.el (terminal-init-linux): Load t-mouse.
 
 2008-06-13  Stefan Monnier  <monnier@iro.umontreal.ca>
-	    Drew Adams  <drew.adams@oracle.com>
+            Drew Adams  <drew.adams@oracle.com>
 
 	* info.el (Info-breadcrumbs-depth): New var.
 	(Info-insert-breadcrumbs): New function.
@@ -18798,7 +18798,7 @@
 	for useful options.
 
 2008-03-01  Dan Nicolaescu  <dann@ics.uci.edu>
-	    Glenn Morris  <rgm@gnu.org>
+            Glenn Morris  <rgm@gnu.org>
 
 	* emacs-lisp/bytecomp.el (byte-recompile-directory)
 	(byte-compile-file, batch-byte-compile, batch-byte-compile-file):
--- a/lisp/ChangeLog.5	Fri May 14 13:14:23 2010 +0900
+++ b/lisp/ChangeLog.5	Fri May 14 13:15:58 2010 +0900
@@ -7051,7 +7051,7 @@
 	* ediff.el (ediff-toggle-read-only, ediff-patch-file): Check out
 	version controlled files before their buffers are modified.
 	(ediff-local-checkout-flag, ediff-toggle-read-only-function):
-	 New variables.
+	New variables.
 
 	* ediff.el (ediff-find-file, ediff-patch-file): Were getting
 	confused by symbolic links.  Fixed.
@@ -8050,7 +8050,7 @@
 1994-07-23  enami tsugutomo  <enami@sys.ptg.sony.co.jp>
 
 	* lisp/add-log.el (add-log-current-defun): Skip doc string
-	  correctly even if it ends with line that starts space.
+	correctly even if it ends with line that starts space.
 
 1994-07-22  Ed Reingold  <reingold@albert.gnu.ai.mit.edu>
 
@@ -9194,11 +9194,11 @@
 	* solar.el (solar-sunrise, solar-sunset): Fix doc string.
 	(solar-time-string): Rewritten.
 	(solar-adj-time-for-dst): New function.
-	(solar-sunrise-sunset, diary-sabbath-candles,
-	 solar-equinoxes-solstices): Revised to use the rewritten and new fcns.
+	(solar-sunrise-sunset, diary-sabbath-candles)
+	(solar-equinoxes-solstices): Revised to use the rewritten and new fcns.
 
 	* calendar.el (solar-holidays): Revised to use the rewritten and
-	 new fcns.
+	new fcns.
 
 	* lunar.el (lunar-phase): Revised to use the rewritten and new fcns.
 
--- a/lisp/ChangeLog.6	Fri May 14 13:14:23 2010 +0900
+++ b/lisp/ChangeLog.6	Fri May 14 13:15:58 2010 +0900
@@ -3687,7 +3687,7 @@
 	When changing the environment, avoid need for setenv.
 
 1996-01-05  Karl Eichwalder  <ke@ke.Central.DE>
-	    Karl Fogel  <kfogel@floss.red-bean.com>
+            Karl Fogel  <kfogel@floss.red-bean.com>
 
 	* bookmark.el: "cyclic.com" addresses changed to "red-bean.com".
 	(bookmark-bmenu-mode-map): Don't bind C-k.
@@ -5837,7 +5837,7 @@
 1995-10-09  Roland McGrath  <roland@churchy.gnu.ai.mit.edu>
 
 	* etags.el (tags-table-check-computed-list): Map
-	 tags-expand-table-name over lists of included tables.
+	tags-expand-table-name over lists of included tables.
 
 1995-10-09  Erik Naggum  <erik@naggum.no>
 
--- a/lisp/ChangeLog.7	Fri May 14 13:14:23 2010 +0900
+++ b/lisp/ChangeLog.7	Fri May 14 13:15:58 2010 +0900
@@ -2749,7 +2749,7 @@
 	* abbrev.el: Likewise.
 
 1998-05-26  Emilio Lopes  <Emilio.Lopes@Physik.TU-Muenchen.DE>
-	    Karl Fogel  <kfogel@red-bean.com>
+            Karl Fogel  <kfogel@red-bean.com>
 
 	* bookmark.el: Changes so bookmark list mode works with Info:
 	(bookmark-jump-noselect): Use an inner save-window-excursion.
--- a/lisp/ChangeLog.9	Fri May 14 13:14:23 2010 +0900
+++ b/lisp/ChangeLog.9	Fri May 14 13:15:58 2010 +0900
@@ -2739,8 +2739,8 @@
 
 2001-06-27  Francesco Potortì  <pot@gnu.org>
 
-	* uniquify.el: (uniquify-rationalize-file-buffer-names):
-	  Undo previous change.
+	* uniquify.el (uniquify-rationalize-file-buffer-names):
+	Undo previous change.
 
 2001-06-27  Francesco Potortì  <pot@gnu.org>
 
@@ -12205,7 +12205,7 @@
 
 2000-09-05  Stefan Monnier  <monnier@cs.yale.edu>
 
-	* vc.el: (toplevel): Don't require `dired' at run-time.
+	* vc.el (toplevel): Don't require `dired' at run-time.
 	(vc-dired-resynch-file): Remove autoload cookie.
 
 2000-09-05  Andre Spiegel  <spiegel@gnu.org>
@@ -12998,7 +12998,7 @@
 	`vc-locking-user' semantics.
 	(vc-backend-merge): Remove.
 
-	* vc-rcs.el, vc-scc.el: (vc-{sc,r}cs-check{in,out}): Update 'vc-state
+	* vc-rcs.el, vc-scc.el (vc-{sc,r}cs-check{in,out}): Update 'vc-state
 	rather than 'vc-locking-user.
 
 	* vc-rcs-hooks.el (vc-rcs-consult-headers): Adapt to new `vc-state'.
@@ -15318,8 +15318,8 @@
 	leading comma nicely. Extended to handle member initializers
 	too.
 
-	* cc-engine.el: (c-beginning-of-inheritance-list,
-	c-guess-basic-syntax): Fixed recognition of inheritance lists
+	* cc-engine.el (c-beginning-of-inheritance-list)
+	(c-guess-basic-syntax): Fixed recognition of inheritance lists
 	when the lines begins with a comma.
 
 	* cc-vars.el (c-offsets-alist): Changed default for
@@ -19574,7 +19574,7 @@
 	(backward-kill-word): Revert addition of * to interactive spec --
 	it's a feature.
 
-	* paragraphs.el: (kill-paragraph, backward-kill-paragraph)
+	* paragraphs.el (kill-paragraph, backward-kill-paragraph)
 	(backward-kill-sentence, kill-sentence): Likewise.
 
 	* gud.el (gud-jdb-build-class-source-alist): Prepend space to
@@ -19918,7 +19918,7 @@
 
 2000-02-10  Dave Love  <fx@gnu.org>
 
-	* wid-edit.el: (widgets) [defgroup]: Remove url link.
+	* wid-edit.el (widgets) [defgroup]: Remove url link.
 	(widget-color-choice-list, widget-color-history, widget-mouse-help):
 	Deleted.
 	(widget-specify-field, widget-specify-button): Don't use
--- a/lisp/dirtrack.el	Fri May 14 13:14:23 2010 +0900
+++ b/lisp/dirtrack.el	Fri May 14 13:15:58 2010 +0900
@@ -143,13 +143,6 @@
   :group 'dirtrack
   :type  'string)
 
-(defcustom dirtrackp t
-  "If non-nil, directory tracking via `dirtrack' is enabled."
-  :group 'dirtrack
-  :type  'boolean)
-
-(make-variable-buffer-local 'dirtrackp)
-
 (defcustom dirtrack-directory-function
   (if (memq system-type (list 'ms-dos 'windows-nt 'cygwin))
       'dirtrack-windows-directory-function
--- a/lisp/dos-fns.el	Fri May 14 13:14:23 2010 +0900
+++ b/lisp/dos-fns.el	Fri May 14 13:15:58 2010 +0900
@@ -31,7 +31,7 @@
 (declare-function msdos-long-file-names "msdos.c")
 
 ;; This overrides a trivial definition in files.el.
-(defun convert-standard-filename (filename)
+(defun dos-convert-standard-filename (filename)
   "Convert a standard file's name to something suitable for the current OS.
 This means to guarantee valid names and perhaps to canonicalize
 certain patterns.
@@ -48,7 +48,7 @@
     (let ((flen (length filename)))
       ;; If FILENAME has a trailing slash, remove it and recurse.
       (if (memq (aref filename (1- flen)) '(?/ ?\\))
-	  (concat (convert-standard-filename
+	  (concat (dos-convert-standard-filename
 		   (substring filename 0 (1- flen)))
 		  "/")
 	(let* (;; ange-ftp gets in the way for names like "/foo:bar".
@@ -122,12 +122,17 @@
 		(aset string (1- (length string)) lastchar))))
 	  (concat (if (and (stringp dir)
 			   (memq (aref dir dlen-m-1) '(?/ ?\\)))
-		      (concat (convert-standard-filename
+		      (concat (dos-convert-standard-filename
 			       (substring dir 0 dlen-m-1))
 			      "/")
-		    (convert-standard-filename dir))
+		    (dos-convert-standard-filename dir))
 		  string))))))
 
+;; Only redirect convert-standard-filename if it has a chance of working,
+;; otherwise loading dos-fns.el might make your non-DOS Emacs misbehave.
+(when (fboundp 'msdos-long-file-names)
+  (defalias 'convert-standard-filename 'dos-convert-standard-filename))
+
 (defun dos-8+3-filename (filename)
   "Truncate FILENAME to DOS 8+3 limits."
   (if (or (not (stringp filename))
@@ -188,12 +193,12 @@
 
 ;; This is for the sake of standard file names elsewhere in Emacs that
 ;; are defined as constant strings or via defconst, and whose
-;; conversion via `convert-standard-filename' does not give good
+;; conversion via `dos-convert-standard-filename' does not give good
 ;; enough results.
 (defun dosified-file-name (file-name)
   "Return a variant of FILE-NAME that is valid on MS-DOS filesystems.
 
-This function is for those rare cases where `convert-standard-filename'
+This function is for those rare cases where `dos-convert-standard-filename'
 does not do a job that is good enough, e.g. if you need to preserve the
 file-name extension.  It recognizes only certain specific file names
 that are used in Emacs Lisp sources; any other file name will be
@@ -209,13 +214,13 @@
 (defvar msdos-shells)
 
 ;; Override settings chosen at startup.
-(defun set-default-process-coding-system ()
+(defun dos-set-default-process-coding-system ()
   (setq default-process-coding-system
 	(if (default-value 'enable-multibyte-characters)
 	    '(undecided-dos . undecided-dos)
 	  '(raw-text-dos . raw-text-dos))))
 
-(add-hook 'before-init-hook 'set-default-process-coding-system)
+(add-hook 'before-init-hook 'dos-set-default-process-coding-system)
 
 ;; File names defined in preloaded packages can be incorrect or
 ;; invalid if long file names were available during dumping, but not
@@ -232,17 +237,17 @@
 
 (add-hook 'before-init-hook 'dos-reevaluate-defcustoms)
 
-(defvar register-name-alist
+(defvar dos-register-name-alist
   '((ax . 0) (bx . 1) (cx . 2) (dx . 3) (si . 4) (di . 5)
     (cflag . 6) (flags . 7)
     (al . (0 . 0)) (bl . (1 . 0)) (cl . (2 . 0)) (dl . (3 . 0))
     (ah . (0 . 1)) (bh . (1 . 1)) (ch . (2 . 1)) (dh . (3 . 1))))
 
-(defun make-register ()
+(defun dos-make-register ()
   (make-vector 8 0))
 
-(defun register-value (regs name)
-  (let ((where (cdr (assoc name register-name-alist))))
+(defun dos-register-value (regs name)
+  (let ((where (cdr (assoc name dos-register-name-alist))))
     (cond ((consp where)
 	   (let ((tem (aref regs (car where))))
 	     (if (zerop (cdr where))
@@ -252,10 +257,10 @@
 	   (aref regs where))
 	  (t nil))))
 
-(defun set-register-value (regs name value)
+(defun dos-set-register-value (regs name value)
   (and (numberp value)
        (>= value 0)
-       (let ((where (cdr (assoc name register-name-alist))))
+       (let ((where (cdr (assoc name dos-register-name-alist))))
 	 (cond ((consp where)
 		(let ((tem (aref regs (car where)))
 		      (value (logand value 255)))
@@ -268,18 +273,18 @@
 		(aset regs where (logand value 65535))))))
   regs)
 
-(defsubst intdos (regs)
+(defsubst dos-intdos (regs)
   (int86 33 regs))
 
 ;; Backward compatibility for obsolescent functions which
 ;; set screen size.
 
-(defun mode25 ()
+(defun dos-mode25 ()
   "Changes the number of screen rows to 25."
   (interactive)
   (set-frame-size (selected-frame) 80 25))
 
-(defun mode4350 ()
+(defun dos-mode4350 ()
   "Changes the number of rows to 43 or 50.
 Emacs always tries to set the screen height to 50 rows first.
 If this fails, it will try to set it to 43 rows, on the assumption
--- a/lisp/emulation/cua-base.el	Fri May 14 13:14:23 2010 +0900
+++ b/lisp/emulation/cua-base.el	Fri May 14 13:15:58 2010 +0900
@@ -780,6 +780,10 @@
     (setq mark-active nil)
     (run-hooks 'deactivate-mark-hook)))
 
+(defun cua--filter-buffer-noprops (start end)
+  (let ((str (filter-buffer-substring start end)))
+    (set-text-properties 0 (length str) nil str)
+    str))
 
 ;; The current register prefix
 (defvar cua--register nil)
@@ -1039,10 +1043,7 @@
 		    (setq s (car u))
 		  (setq s (car u) e (cdr u)))))))
 	  (cond ((and s e (<= s e) (= s (mark t)))
-		 (setq cua--repeat-replace-text
-		       (filter-buffer-substring s e))
-		 (set-text-properties 0 (length cua--repeat-replace-text)
-				      nil cua--repeat-replace-text))
+		 (setq cua--repeat-replace-text (cua--filter-buffer-noprops s e)))
 		((and (null s) (eq u elt)) ;; nothing inserted
 		 (setq cua--repeat-replace-text
 		       ""))
--- a/lisp/emulation/cua-gmrk.el	Fri May 14 13:14:23 2010 +0900
+++ b/lisp/emulation/cua-gmrk.el	Fri May 14 13:15:58 2010 +0900
@@ -137,9 +137,8 @@
       (let ((src-buf (current-buffer)))
 	(save-excursion
 	  (if (equal (marker-buffer cua--global-mark-marker) src-buf)
-	      (let ((text (filter-buffer-substring start end)))
+	      (let ((text (cua--filter-buffer-noprops start end)))
 		(goto-char (marker-position cua--global-mark-marker))
-		(set-text-properties 0 (length text) text)
 		(insert text))
 	    (set-buffer (marker-buffer cua--global-mark-marker))
 	    (goto-char (marker-position cua--global-mark-marker))
@@ -162,11 +161,10 @@
 	      (if (and (< start (marker-position cua--global-mark-marker))
 		       (< (marker-position cua--global-mark-marker) end))
 		  (message "Can't move region into itself")
-		(let ((text (filter-buffer-substring start end))
+		(let ((text (cua--filter-buffer-noprops start end))
 		      (p1 (copy-marker start))
 		      (p2 (copy-marker end)))
 		  (goto-char (marker-position cua--global-mark-marker))
-		  (set-text-properties 0 (length text) text)
 		  (insert text)
 		  (cua--activate-global-mark)
 		  (delete-region (marker-position p1) (marker-position p2))
--- a/lisp/emulation/cua-rect.el	Fri May 14 13:14:23 2010 +0900
+++ b/lisp/emulation/cua-rect.el	Fri May 14 13:15:58 2010 +0900
@@ -625,7 +625,7 @@
     (if (not (cua--rectangle-virtual-edges))
 	(cua--rectangle-operation nil nil nil nil nil ; do not tabify
 	  '(lambda (s e l r)
-	     (setq rect (cons (filter-buffer-substring s e nil t) rect))))
+	     (setq rect (cons (cua--filter-buffer-noprops s e) rect))))
       (cua--rectangle-operation nil 1 nil nil nil ; do not tabify
 	'(lambda (s e l r v)
 	   (let ((copy t) (bs 0) (as 0) row)
@@ -643,7 +643,7 @@
 	       (setq as (- r (max (current-column) l))
 		     e (point)))
        	     (setq row (if (and copy (> e s))
-			   (filter-buffer-substring s e nil t)
+			   (cua--filter-buffer-noprops s e)
 			 ""))
     	     (when (> bs 0)
     	       (setq row (concat (make-string bs ?\s) row)))
@@ -1124,12 +1124,12 @@
      '(lambda (s e l r)
         (cond
          ((re-search-forward "0x\\([0-9a-fA-F]+\\)" e t)
-          (let* ((txt (filter-buffer-substring (match-beginning 1) (match-end 1) nil t))
+          (let* ((txt (cua--filter-buffer-noprops (match-beginning 1) (match-end 1)))
                  (n (string-to-number txt 16))
                  (fmt (format "0x%%0%dx" (length txt))))
             (replace-match (format fmt (+ n increment)))))
          ((re-search-forward "\\( *-?[0-9]+\\)" e t)
-          (let* ((txt (filter-buffer-substring (match-beginning 1) (match-end 1) nil t))
+          (let* ((txt (cua--filter-buffer-noprops (match-beginning 1) (match-end 1)))
                  (prefix (if (= (aref txt 0) ?0) "0" ""))
                  (n (string-to-number txt 10))
                  (fmt (format "%%%s%dd" prefix (length txt))))
--- a/lisp/erc/ChangeLog.03	Fri May 14 13:14:23 2010 +0900
+++ b/lisp/erc/ChangeLog.03	Fri May 14 13:15:58 2010 +0900
@@ -145,7 +145,7 @@
 	to delete-if-not.
 
 	* erc.el 1.580 (erc-update-current-channel-member):
-	 Use erc-downcase when comparing
+	Use erc-downcase when comparing
 	nick entries.  Cleanup indentation.
 
 2003-11-01  Lawrence Mitchell  <wence@gmx.li>
@@ -171,7 +171,7 @@
 2003-10-24  Mario Lang  <mlang@delysid.org>
 
 	* erc-dcc.el 1.80: From Stephan Stahl <stl@isogmbh.de>:
-	 * (erc-dcc-send-block): Kill buffer if transfer completed correctly.
+	(erc-dcc-send-block): Kill buffer if transfer completed correctly.
 
 2003-10-22  Mario Lang  <mlang@delysid.org>
 
--- a/lisp/erc/ChangeLog.04	Fri May 14 13:14:23 2010 +0900
+++ b/lisp/erc/ChangeLog.04	Fri May 14 13:15:58 2010 +0900
@@ -72,7 +72,7 @@
 2004-12-24  Jorgen Schaefer  <forcer@users.sourceforge.net>
 
 	* erc-goodies.el, erc.el: The Small Extraction of Stuff[tm] commit.
-	 Moved some functions from erc.el to erc-goodies.el, and
+	Moved some functions from erc.el to erc-goodies.el, and
 	transformed them to erc modules in the process.
 	- imenu autoload stuff moved.  I don't know why it is here at all.
 	- Moved: scroll-to-bottom, make-read-only, distinguish-noncommands,
--- a/lisp/gnus/ChangeLog	Fri May 14 13:14:23 2010 +0900
+++ b/lisp/gnus/ChangeLog	Fri May 14 13:15:58 2010 +0900
@@ -1,4 +1,66 @@
-2010-05-07  Christian von Roques <roques@mti.ag> (tiny change)
+2010-05-13  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+	* mml1991.el (mml1991-mailcrypt-encrypt, mml1991-gpg-encrypt)
+	* mml2015.el (mml2015-gpg-encrypt): Disable multibyte in buffers
+	generated within the mm-with-unibyte-current-buffer macro.
+
+2010-05-13  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+	* gnus-art.el (gnus-bind-safe-url-regexp): Bind mm-w3m-safe-url-regexp
+	to nil when we're in a mml-preview buffer and no group is selected.
+
+2010-05-12  Andreas Seltenreich  <seltenreich@gmx.de>
+
+	* gnus-sum.el (gnus-summary-read-group-1): Don't jump to next group
+	when catching the `C-g'.  Reported by: "Leo"
+
+2010-05-12  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+	* message.el (message-forward-make-body-plain)
+	(message-forward-make-body-mml): Use mm-multibyte-string-p instead of
+	multibyte-string-p.
+
+2010-05-12  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+	* message.el (message-forward-make-body-mml): Assume original message
+	is multibyte string; error on unibyte.
+	(message-forward-make-body-plain): Ditto; don't add excessive newline
+	in body end.
+
+2010-05-11  Andreas Seltenreich  <seltenreich@gmx.de>
+
+	* gnus-sum.el (gnus-summary-kill-thread): Use gnus-summary-mark-article
+	instead of g-s-m-a-as-unread to set the expirable mark.  (Bug#5284)
+
+2010-05-11  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+	* mm-extern.el (mm-extern-url): Don't use
+	mm-with-unibyte-current-buffer.
+	(mm-extern-cache-contents): Use with-current-buffer instead of
+	save-excursion + set-buffer.
+
+2010-05-10  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+	* mm-util.el (mm-emacs-mule): Remove.
+
+2010-05-10  Andreas Seltenreich  <seltenreich@gmx.de>
+
+	* gnus-sum.el (gnus-summary-mode): Don't make minor-mode-alist
+	buffer-local as it's incompatible with Stefan Monnier's 2010-05-03
+	change.
+
+2010-05-10  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+	* mm-util.el (mm-with-unibyte-current-buffer): Redefine it so as not to
+	bind the default value of enable-multibyte-characters to nil.
+
+2010-05-10  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+	* message.el (message-forward-make-body-plain)
+	(message-forward-make-body-mml):
+	Don't use mm-with-unibyte-current-buffer.
+
+2010-05-07  Christian von Roques  <roques@mti.ag>  (tiny change)
 
 	* mml2015.el (mml2015-epg-find-usable-key): Skip disabled key
 	(Bug#5592).
--- a/lisp/gnus/ChangeLog.1	Fri May 14 13:14:23 2010 +0900
+++ b/lisp/gnus/ChangeLog.1	Fri May 14 13:15:58 2010 +0900
@@ -28,10 +28,10 @@
 
 	* gnus-start.el (gnus-slave-save-newsrc):
 	* gnus-uu.el (gnus-uu-tmp-dir, gnus-uu-decode-binhex)
-	  (gnus-uu-decode-binhex-view, gnus-uu-digest-mail-forward)
-	  (gnus-uu-initialize):
+	(gnus-uu-decode-binhex-view, gnus-uu-digest-mail-forward)
+	(gnus-uu-initialize):
 	* nnmail.el (nnmail-make-complex-temp-name, nnmail-get-new-mail):
-	  Use make-temp-file.
+	Use make-temp-file.
 
 1999-09-07  Eli Zaretskii  <eliz@gnu.org>
 
--- a/lisp/gnus/ChangeLog.2	Fri May 14 13:14:23 2010 +0900
+++ b/lisp/gnus/ChangeLog.2	Fri May 14 13:15:58 2010 +0900
@@ -4905,8 +4905,8 @@
 2003-02-08  Michael Welsh Duggan  <md5i@cs.cmu.edu>
 
 	* nnmail.el (nnmail-split-it): If a message ends up matching the
-	  same mailbox more than once, it will cause duplicates to appear
-	  in the mailbox.
+	same mailbox more than once, it will cause duplicates to appear
+	in the mailbox.
 
 2003-02-08  Simon Josefsson  <jas@extundo.com>
 
@@ -5553,8 +5553,8 @@
 2003-01-13  Jhair Tocancipa Triana  <jhair_tocancipa@@gmx.net>
 
 	* gnus-audio.el (gnus-audio-au-player, gnus-audio-wav-player): Use
-	  /usr/bin/play as default player.
-	  (gnus-audio-play): Added ARG-DESCRIPTOR to prompt for a file to play.
+	/usr/bin/play as default player.
+	(gnus-audio-play): Added ARG-DESCRIPTOR to prompt for a file to play.
 
 2003-01-14  Katsumi Yamaoka  <yamaoka@jpl.org>
 
@@ -9034,7 +9034,7 @@
 	boolean not a string
 	* gnus-group.el (gnus-group-line-format): Add description of %C
 	* gnus-group.el (gnus-group-line-format-alist): Add gnus-tmp-comment
-	  as %C
+	as %C
 	* gnus-group.el (gnus-group-insert-group-line): Add gnus-tmp-comment.
 
 2002-04-22  Paul Jarc  <prj@po.cwru.edu>
@@ -11326,7 +11326,7 @@
 2002-01-02  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
 	* gnus-picon.el (gnus-picon-transform-newsgroups): Fix for the case
-	  "Newsgroups: rec.music.beatles.moderated, rec.music.beatles".
+	"Newsgroups: rec.music.beatles.moderated, rec.music.beatles".
 
 2002-01-03  Steve Youngs  <youngs@xemacs.org>
 
@@ -12256,7 +12256,7 @@
 	(imap-stream-alist): Backslash.
 
 	* gnus-sum.el (gnus-summary-limit-to-author): Missing arguments.
-	  Thanks to david.goldberg6@verizon.net (David S. Goldberg).
+	Thanks to david.goldberg6@verizon.net (David S. Goldberg).
 
 2001-11-27 14:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
@@ -12755,7 +12755,7 @@
 2001-10-30 13:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
 	* gnus-spec.el (gnus-parse-simple-format): Use
-	  buffer-substring-no-properties.
+	buffer-substring-no-properties.
 
 2001-10-30  Katsumi Yamaoka  <yamaoka@jpl.org>
 
--- a/lisp/gnus/gnus-art.el	Fri May 14 13:14:23 2010 +0900
+++ b/lisp/gnus/gnus-art.el	Fri May 14 13:15:58 2010 +0900
@@ -4822,7 +4822,11 @@
 			   (with-current-buffer gnus-article-current-summary
 			     gnus-newsgroup-name)
 			 gnus-newsgroup-name)))
-	    (if (cond ((stringp gnus-safe-html-newsgroups)
+	    (if (cond ((not group)
+		       ;; Maybe we're in a mml-preview buffer
+		       ;; and no group is selected.
+		       t)
+		      ((stringp gnus-safe-html-newsgroups)
 		       (string-match gnus-safe-html-newsgroups group))
 		      ((consp gnus-safe-html-newsgroups)
 		       (member group gnus-safe-html-newsgroups)))
--- a/lisp/gnus/gnus-sum.el	Fri May 14 13:14:23 2010 +0900
+++ b/lisp/gnus/gnus-sum.el	Fri May 14 13:15:58 2010 +0900
@@ -3056,7 +3056,6 @@
   (gnus-simplify-mode-line)
   (setq major-mode 'gnus-summary-mode)
   (setq mode-name "Summary")
-  (make-local-variable 'minor-mode-alist)
   (use-local-map gnus-summary-mode-map)
   (buffer-disable-undo)
   (setq buffer-read-only t		;Disable modification
@@ -3932,7 +3931,6 @@
 	  (progn
 	    (set-buffer gnus-group-buffer)
 	    (gnus-group-jump-to-group group)
-	    (gnus-group-next-unread-group 1)
 	    (gnus-configure-windows 'group 'force))
 	(gnus-handle-ephemeral-exit quit-config))
       ;; Finally signal the quit.
@@ -11509,7 +11507,7 @@
 	      ((> unmark 0)
 	       (gnus-summary-mark-article-as-unread gnus-unread-mark))
 	      ((= unmark 0)
-	       (gnus-summary-mark-article-as-unread gnus-expirable-mark))
+	       (gnus-summary-mark-article nil gnus-expirable-mark))
 	      (t
 	       (gnus-summary-mark-article-as-unread gnus-ticked-mark)))
 	(setq articles (cdr articles))))
--- a/lisp/gnus/message.el	Fri May 14 13:14:23 2010 +0900
+++ b/lisp/gnus/message.el	Fri May 14 13:15:58 2010 +0900
@@ -7161,22 +7161,28 @@
 (defun message-forward-make-body-plain (forward-buffer)
   (insert
    "\n-------------------- Start of forwarded message --------------------\n")
-  (let ((b (point)) e)
-    (insert
-     (with-temp-buffer
-       (mm-disable-multibyte)
-       (insert
-	(with-current-buffer forward-buffer
-	  (mm-with-unibyte-current-buffer (buffer-string))))
-       (mm-enable-multibyte)
-       (mime-to-mml)
-       (goto-char (point-min))
-       (when (looking-at "From ")
-	 (replace-match "X-From-Line: "))
-       (buffer-string)))
+  (let ((b (point))
+	(contents (with-current-buffer forward-buffer (buffer-string)))
+	e)
+    (unless (featurep 'xemacs)
+      (unless (mm-multibyte-string-p contents)
+	(error "Attempt to insert unibyte string from the buffer \"%s\"\
+ to the multibyte buffer \"%s\""
+	       (if (bufferp forward-buffer)
+		   (buffer-name forward-buffer)
+		 forward-buffer)
+	       (buffer-name))))
+    (insert (mm-with-multibyte-buffer
+	      (insert contents)
+	      (mime-to-mml)
+	      (goto-char (point-min))
+	      (when (looking-at "From ")
+		(replace-match "X-From-Line: "))
+	      (buffer-string)))
+    (unless (bolp) (insert "\n"))
     (setq e (point))
     (insert
-     "\n-------------------- End of forwarded message --------------------\n")
+     "-------------------- End of forwarded message --------------------\n")
     (message-remove-ignored-headers b e)))
 
 (defun message-remove-ignored-headers (b e)
@@ -7212,18 +7218,22 @@
   (insert "\n\n<#mml type=message/rfc822 disposition=inline>\n")
   (let ((b (point)) e)
     (if (not message-forward-decoded-p)
-	(insert
-	 (with-temp-buffer
-	   (mm-disable-multibyte)
-	   (insert
-	    (with-current-buffer forward-buffer
-	      (mm-with-unibyte-current-buffer (buffer-string))))
-	   (mm-enable-multibyte)
-	   (mime-to-mml)
-	   (goto-char (point-min))
-	   (when (looking-at "From ")
-	     (replace-match "X-From-Line: "))
-	   (buffer-string)))
+	(let ((contents (with-current-buffer forward-buffer (buffer-string))))
+	  (unless (featurep 'xemacs)
+	    (unless (mm-multibyte-string-p contents)
+	      (error "Attempt to insert unibyte string from the buffer \"%s\"\
+ to the multibyte buffer \"%s\""
+		     (if (bufferp forward-buffer)
+			 (buffer-name forward-buffer)
+		       forward-buffer)
+		     (buffer-name))))
+	  (insert (mm-with-multibyte-buffer
+		    (insert contents)
+		    (mime-to-mml)
+		    (goto-char (point-min))
+		    (when (looking-at "From ")
+		      (replace-match "X-From-Line: "))
+		    (buffer-string))))
       (save-restriction
 	(narrow-to-region (point) (point))
 	(mml-insert-buffer forward-buffer)
--- a/lisp/gnus/mm-extern.el	Fri May 14 13:14:23 2010 +0900
+++ b/lisp/gnus/mm-extern.el	Fri May 14 13:15:58 2010 +0900
@@ -67,9 +67,8 @@
 	(coding-system-for-read mm-binary-coding-system))
     (unless url
       (error "URL is not specified"))
-    (mm-with-unibyte-current-buffer
-      (mm-url-insert-file-contents url))
     (mm-disable-multibyte)
+    (mm-url-insert-file-contents url)
     (setq buffer-file-name name)))
 
 (defun mm-extern-anon-ftp (handle)
@@ -125,7 +124,7 @@
 			    (or access-type
 				(error "Couldn't find access type"))))
 			  mm-extern-function-alist)))
-	 buf handles)
+	 handles)
     (unless func
       (error "Access type (%s) is not supported" access-type))
     (mm-with-part handle
@@ -136,8 +135,7 @@
     (unless (bufferp (car handles))
       (mm-destroy-parts handles)
       (error "Multipart external body is not supported"))
-    (save-excursion
-      (set-buffer (setq buf (mm-handle-buffer handles)))
+    (with-current-buffer (mm-handle-buffer handles)
       (let (good)
 	(unwind-protect
 	    (progn
--- a/lisp/gnus/mm-util.el	Fri May 14 13:14:23 2010 +0900
+++ b/lisp/gnus/mm-util.el	Fri May 14 13:15:58 2010 +0900
@@ -902,12 +902,6 @@
       out)))
 
 (eval-and-compile
-  (defvar mm-emacs-mule (and (not (featurep 'xemacs))
-			     (boundp 'enable-multibyte-characters)
-			     (default-value 'enable-multibyte-characters)
-			     (fboundp 'set-buffer-multibyte))
-    "True in Emacs with Mule.")
-
   (if (featurep 'xemacs)
       (defalias 'mm-enable-multibyte 'ignore)
     (defun mm-enable-multibyte ()
@@ -1230,33 +1224,23 @@
 
 (defmacro mm-with-unibyte-current-buffer (&rest forms)
   "Evaluate FORMS with current buffer temporarily made unibyte.
-Also bind the default-value of `enable-multibyte-characters' to nil.
-Equivalent to `progn' in XEmacs
+Equivalent to `progn' in XEmacs.
 
-NOTE: Use this macro with caution in multibyte buffers (it is not
-worth using this macro in unibyte buffers of course).  Use of
-`(set-buffer-multibyte t)', which is run finally, is generally
-harmful since it is likely to modify existing data in the buffer.
-For instance, it converts \"\\300\\255\" into \"\\255\" in
-Emacs 23 (unicode)."
+Note: We recommend not using this macro any more; there should be
+better ways to do a similar thing.  The previous version of this macro
+bound the default value of `enable-multibyte-characters' to nil while
+evaluating FORMS but it is no longer done.  So, some programs assuming
+it if any may malfunction."
   (if (featurep 'xemacs)
       `(progn ,@forms)
-    ;; FIXME: (default-value 'enable-multibyte-characters) is read-only
-    ;; so let-binding it is wrong.  The right fix is to not use this
-    ;; macro at all any more, since it's been ill-defined from the start.
-    (let ((multibyte (make-symbol "multibyte"))
-	  (buffer (make-symbol "buffer")))
-      `(if mm-emacs-mule
-	   (let ((,multibyte enable-multibyte-characters)
-		 (,buffer (current-buffer)))
-	     (unwind-protect
-		 (letf (((default-value 'enable-multibyte-characters) nil))
-		       (set-buffer-multibyte nil)
-		       ,@forms)
-	       (set-buffer ,buffer)
-	       (set-buffer-multibyte ,multibyte)))
-	 (letf (((default-value 'enable-multibyte-characters) nil))
-	       ,@forms)))))
+    (let ((multibyte (make-symbol "multibyte")))
+      `(let ((,multibyte enable-multibyte-characters))
+	 (when ,multibyte
+	   (set-buffer-multibyte nil))
+	 (prog1
+	     (progn ,@forms)
+	   (when ,multibyte
+	     (set-buffer-multibyte t)))))))
 (put 'mm-with-unibyte-current-buffer 'lisp-indent-function 0)
 (put 'mm-with-unibyte-current-buffer 'edebug-form-spec '(body))
 
--- a/lisp/gnus/mml1991.el	Fri May 14 13:14:23 2010 +0900
+++ b/lisp/gnus/mml1991.el	Fri May 14 13:15:58 2010 +0900
@@ -145,6 +145,7 @@
       (delete-region (point-min) (point)))
     (mm-with-unibyte-current-buffer
       (with-temp-buffer
+	(inline (mm-disable-multibyte))
 	(setq cipher (current-buffer))
 	(insert-buffer-substring text)
 	(unless (mc-encrypt-generic
@@ -225,6 +226,7 @@
       (delete-region (point-min) (point)))
     (mm-with-unibyte-current-buffer
       (with-temp-buffer
+	(inline (mm-disable-multibyte))
 	(flet ((gpg-encrypt-func
 		(sign plaintext ciphertext result recipients &optional
 		      passphrase sign-with-key armor textmode)
--- a/lisp/gnus/mml2015.el	Fri May 14 13:14:23 2010 +0900
+++ b/lisp/gnus/mml2015.el	Fri May 14 13:15:58 2010 +0900
@@ -680,6 +680,7 @@
 	cipher)
     (mm-with-unibyte-current-buffer
       (with-temp-buffer
+	(mm-disable-multibyte)
 	;; set up a function to call the correct gpg encrypt routine
 	;; with the right arguments. (FIXME: this should be done
 	;; differently.)
--- a/lisp/iimage.el	Fri May 14 13:14:23 2010 +0900
+++ b/lisp/iimage.el	Fri May 14 13:15:58 2010 +0900
@@ -55,19 +55,17 @@
   :group 'image)
 
 (defconst iimage-version "1.1")
-(defvar iimage-mode nil)
-(defvar iimage-mode-map nil)
 
-;; Set up key map.
-(unless iimage-mode-map
-  (setq iimage-mode-map (make-sparse-keymap))
-  (define-key iimage-mode-map "\C-l" 'iimage-recenter))
+(defvar iimage-mode-map
+  (let ((map (make-sparse-keymap)))
+    (define-key map "\C-l" 'iimage-recenter)
+    map))
 
 (defun iimage-recenter (&optional arg)
-"Re-draw images and recenter."
+  "Re-draw images and recenter."
   (interactive "P")
-  (iimage-mode-buffer 0)
-  (iimage-mode-buffer 1)
+  (iimage-mode-buffer nil)
+  (iimage-mode-buffer t)
   (recenter arg))
 
 (defvar iimage-mode-image-filename-regex
@@ -81,7 +79,7 @@
   `((,(concat "\\(`?file://\\|\\[\\[\\|<\\|`\\)?"
 	      "\\(" iimage-mode-image-filename-regex "\\)"
 	      "\\(\\]\\]\\|>\\|'\\)?") . 2))
-"*Alist of filename REGEXP vs NUM.
+  "*Alist of filename REGEXP vs NUM.
 Each element looks like (REGEXP . NUM).
 NUM specifies which parenthesized expression in the regexp.
 
@@ -90,54 +88,43 @@
     `file://foo.png'
     \\[\\[foo.gif]]
     <foo.png>
-     foo.JPG
-")
+     foo.JPG")
 
 (defvar iimage-mode-image-search-path nil
-"*List of directories to search for image files for iimage-mode.")
+  "*List of directories to search for image files for `iimage-mode'.")
 
 ;;;###autoload
-(defun turn-on-iimage-mode ()
-"Unconditionally turn on iimage mode."
-  (interactive)
-  (iimage-mode 1))
+(define-obsolete-function-alias 'turn-on-iimage-mode 'iimage-mode "24.1")
 
 (defun turn-off-iimage-mode ()
-"Unconditionally turn off iimage mode."
+  "Unconditionally turn off iimage mode."
   (interactive)
   (iimage-mode 0))
 
-(defalias 'iimage-locate-file 'locate-file)
-
 (defun iimage-mode-buffer (arg)
-"Display/undisplay images.
-With numeric ARG, display the images if and only if ARG is positive."
-  (interactive)
-  (let ((ing (if (numberp arg)
-		 (> arg 0)
-	       iimage-mode))
-	(modp (buffer-modified-p (current-buffer)))
-	file buffer-read-only)
-    (save-excursion
-      (goto-char (point-min))
-      (dolist (pair iimage-mode-image-regex-alist)
-	(while (re-search-forward (car pair) nil t)
-	  (if (and (setq file (match-string (cdr pair)))
-		   (setq file (iimage-locate-file file
-				   (cons default-directory
-					 iimage-mode-image-search-path))))
-	      (if ing
-		  (add-text-properties (match-beginning 0) (match-end 0)
-				       (list 'display (create-image file)))
-		(remove-text-properties (match-beginning 0) (match-end 0)
-					'(display)))))))
-    (set-buffer-modified-p modp)))
+  "Display images if ARG is non-nil, undisplay them otherwise."
+  (let ((image-path (cons default-directory iimage-mode-image-search-path))
+	file)
+    (with-silent-modifications
+      (save-excursion
+        (goto-char (point-min))
+        (dolist (pair iimage-mode-image-regex-alist)
+          (while (re-search-forward (car pair) nil t)
+            (if (and (setq file (match-string (cdr pair)))
+                     (setq file (locate-file file image-path)))
+                ;; FIXME: we don't mark our images, so we can't reliably
+                ;; remove them either (we may leave some of ours, and we
+                ;; may remove other packages's display properties).
+                (if arg
+                    (add-text-properties (match-beginning 0) (match-end 0)
+                                         (list 'display (create-image file)))
+                  (remove-text-properties (match-beginning 0) (match-end 0)
+                                          '(display))))))))))
 
 ;;;###autoload
 (define-minor-mode iimage-mode
   "Toggle inline image minor mode."
   :group 'iimage :lighter " iImg" :keymap iimage-mode-map
-  (run-hooks 'iimage-mode-hook)
   (iimage-mode-buffer iimage-mode))
 
 (provide 'iimage)
--- a/lisp/info.el	Fri May 14 13:14:23 2010 +0900
+++ b/lisp/info.el	Fri May 14 13:15:58 2010 +0900
@@ -266,6 +266,8 @@
   :group 'info)
 
 (defvar Info-isearch-initial-node nil)
+(defvar Info-isearch-initial-history nil)
+(defvar Info-isearch-initial-history-list nil)
 
 (defcustom Info-mode-hook
   ;; Try to obey obsolete Info-fontify settings.
@@ -1914,7 +1916,27 @@
   (setq Info-isearch-initial-node
 	;; Don't stop at initial node for nonincremental search.
 	;; Otherwise this variable is set after first search failure.
-	(and isearch-nonincremental Info-current-node)))
+	(and isearch-nonincremental Info-current-node))
+  (setq Info-isearch-initial-history      Info-history
+	Info-isearch-initial-history-list Info-history-list)
+  (add-hook 'isearch-mode-end-hook 'Info-isearch-end nil t))
+
+(defun Info-isearch-end ()
+  ;; Remove intermediate nodes (visited while searching)
+  ;; from the history.  Add only the last node (where Isearch ended).
+  (if (> (length Info-history)
+	 (length Info-isearch-initial-history))
+      (setq Info-history
+	    (nthcdr (- (length Info-history)
+		       (length Info-isearch-initial-history)
+		       1)
+		    Info-history)))
+  (if (> (length Info-history-list)
+	 (length Info-isearch-initial-history-list))
+      (setq Info-history-list
+	    (cons (car Info-history-list)
+		  Info-isearch-initial-history-list)))
+  (remove-hook 'isearch-mode-end-hook  'Info-isearch-end t))
 
 (defun Info-isearch-filter (beg-found found)
   "Test whether the current search hit is a visible useful text.
--- a/lisp/mh-e/ChangeLog.1	Fri May 14 13:14:23 2010 +0900
+++ b/lisp/mh-e/ChangeLog.1	Fri May 14 13:15:58 2010 +0900
@@ -195,11 +195,11 @@
 
 2005-05-28  Bill Wohler  <wohler@newt.com>
 
-	 Released MH-E version 7.84.
-
-         * MH-E-NEWS, README: Updated for release 7.84.
-
-         * mh-e.el (Version, mh-version): Updated for release 7.84.
+	Released MH-E version 7.84.
+
+	* MH-E-NEWS, README: Updated for release 7.84.
+
+	* mh-e.el (Version, mh-version): Updated for release 7.84.
 
 2005-05-28  Bill Wohler  <wohler@newt.com>
 
@@ -4396,7 +4396,6 @@
 	mh-xemacs-toolbar.el: Removed RCS keywords per Emacs conventions
 	(closes SF #680731).
 
-
 2003-03-26  Satyaki Das  <satyaki@theforce.stanford.edu>
 
 	* mh-index.el: Fix commentary to mention that mairix is supported
@@ -7556,10 +7555,10 @@
 	the MH pick command to give the user more information when
 	choosing between mh-search-folder and mh-index-folder.
 
-	* mh-index.el (mh-index-search): Edited the docstring. Direct the
-	 user to mh-index-program if necessary.
-	 (mh-index-program): Edited this docstring too. Viewing the help
-	 in a *Help* buffer really exposes grammatical flaws.
+	* mh-index.el (mh-index-search): Edited the docstring.  Direct the
+	user to mh-index-program if necessary.
+	(mh-index-program): Edited this docstring too.  Viewing the help
+	in a *Help* buffer really exposes grammatical flaws.
 
 2002-11-05  Peter S Galbraith  <psg@debian.org>
 
@@ -7839,7 +7838,6 @@
 	(.PHONY): Added emacs, xemacs, autoloads, custom-loads. Broke up
 	target and moved pieces into their own sections.
 
-
 2002-10-30  Peter S Galbraith  <psg@debian.org>
 
 	* mh-utils.el (mh-show-font-lock-keywords): Wrap an
@@ -8494,11 +8492,10 @@
 2002-10-22  Mark D. Baushke  <mdb@gnu.org>
 
 	* mh-mime.el (mh-graphical-smileys-flag): Renamed from
-	 mh-graphical-smileys-p.
-	 (mh-display-smileys): Use it.
-	 (mh-graphical-emphasis-flag): Renamed from
-	 mh-graphical-emphasis-p.
-	 (mh-display-emphasis): Use it. This addresses part of SF #627015.
+	mh-graphical-smileys-p.
+	(mh-display-smileys): Use it.
+	(mh-graphical-emphasis-flag): Renamed from mh-graphical-emphasis-p.
+	(mh-display-emphasis): Use it.  This addresses part of SF #627015.
 
 2002-10-22  Satyaki Das  <satyaki@theforce.stanford.edu>
 
@@ -9301,7 +9298,7 @@
 	* mh-mime.el (mh-store-mime-parts-directory): New defcustom.
 	Default directory to use for mh-store-mime-parts.
 	(mh-store-mime-parts): New Command.  Store the MIME parts of the
-	 current message.
+	current message.
 	(mh-store-mime-parts-directory-default): New internal working
 	variable.  Default to use for mh-store-mime-parts-directory, set
 	from last use.
@@ -9309,7 +9306,6 @@
 	* mh-e.el (mh-folder-seq-tool-bar-map): Add mh-store-mime-parts to
 	toolbar.
 
-
 2002-08-22  Satyaki Das  <satyaki@theforce.stanford.edu>
 
 	* mh-seq.el (mh-thread-generate-scan-lines): In threaded view,
@@ -10487,7 +10483,6 @@
 	(clean): New target that blows away MH-E-OBJ.
 	(dist): Added $(MH-E-OBJ) to tarball.
 
-
 	Attempt to quiet compilation errors to a dull roar.
 
 	* mh-e.el: Require easymenu, added autoload of info.
@@ -10506,7 +10501,6 @@
 	* mh-comp.el: Require mh-e and easymenu, moved autoloads to top of
 	file.
 
-
 	* Makefile: (EMACS): New constant to hold emacs calling sequence.
 	(install): Renamed to install-emacs.
 	(compile): New target to compile all files.
--- a/lisp/minibuffer.el	Fri May 14 13:14:23 2010 +0900
+++ b/lisp/minibuffer.el	Fri May 14 13:15:58 2010 +0900
@@ -76,6 +76,9 @@
 ;;     the provided string (as is the case in filecache.el), in which
 ;;     case partial-completion (for example) doesn't make any sense
 ;;     and neither does the completions-first-difference highlight.
+;;   - indicate how to display the completions in *Completions* (turn
+;;     \n into something else, add special boundaries between
+;;     completions).  E.g. when completing from the kill-ring.
 
 ;; - make partial-completion-mode obsolete:
 ;;   - (?) <foo.h> style completion for file names.
@@ -489,6 +492,18 @@
   (insert newtext)
   (delete-region (point) (+ (point) (- end beg))))
 
+(defcustom completion-cycle-threshold nil
+  "Number of completion candidates below which cycling is used.
+Depending on this setting `minibuffer-complete' may use cycling,
+like `minibuffer-force-complete'.
+If nil, cycling is never used.
+If t, cycling is always used.
+If an integer, cycling is used as soon as there are fewer completion
+candidates than this number."
+  :type '(choice (const :tag "No cycling" nil)
+          (const :tag "Always cycle" t)
+          (integer :tag "Threshold")))
+
 (defun completion--do-completion (&optional try-completion-function)
   "Do the completion and return a summary of what happened.
 M = completion was performed, the text was Modified.
@@ -548,14 +563,43 @@
           ;; It did find a match.  Do we match some possibility exactly now?
           (let ((exact (test-completion completion
 					minibuffer-completion-table
-					minibuffer-completion-predicate)))
-            (if completed
+					minibuffer-completion-predicate))
+                (comps
+                 ;; Check to see if we want to do cycling.  We do it
+                 ;; here, after having performed the normal completion,
+                 ;; so as to take advantage of the difference between
+                 ;; try-completion and all-completions, for things
+                 ;; like completion-ignored-extensions.
+                 (when (and completion-cycle-threshold
+                            ;; Check that the completion didn't make
+                            ;; us jump to a different boundary.
+                            (or (not completed)
+                                (< (car (completion-boundaries
+                                         (substring completion 0 comp-pos)
+                                         minibuffer-completion-table
+                                         minibuffer-completion-predicate
+                                         ""))
+                                   comp-pos)))
+                   (completion-all-sorted-completions))))
+            (setq completion-all-sorted-completions nil)
+            (cond
+             ((and (not (ignore-errors
+                          ;; This signal an (intended) error if comps is too
+                          ;; short or if completion-cycle-threshold is t.
+                          (consp (nthcdr completion-cycle-threshold comps))))
+                   ;; More than 1, so there's something to cycle.
+                   (consp (cdr comps)))
+              ;; Fewer than completion-cycle-threshold remaining
+              ;; completions: let's cycle.
+              (setq completed t exact t)
+              (setq completion-all-sorted-completions comps)
+              (minibuffer-force-complete))
+             (completed
                 ;; We could also decide to refresh the completions,
                 ;; if they're displayed (and assuming there are
                 ;; completions left).
-                (minibuffer-hide-completions)
+              (minibuffer-hide-completions))
               ;; Show the completion table, if requested.
-              (cond
                ((not exact)
                 (if (case completion-auto-help
                       (lazy (eq this-command last-command))
@@ -566,7 +610,7 @@
                ;; means we've already given a "Next char not unique" message
                ;; and the user's hit TAB again, so now we give him help.
                ((eq this-command last-command)
-                (if completion-auto-help (minibuffer-completion-help)))))
+              (if completion-auto-help (minibuffer-completion-help))))
 
             (minibuffer--bitset completed t exact))))))))
 
@@ -580,21 +624,26 @@
   ;; If the previous command was not this,
   ;; mark the completion buffer obsolete.
   (unless (eq this-command last-command)
+    (setq completion-all-sorted-completions nil)
     (setq minibuffer-scroll-window nil))
 
-  (let ((window minibuffer-scroll-window))
+  (cond
     ;; If there's a fresh completion window with a live buffer,
     ;; and this command is repeated, scroll that window.
-    (if (window-live-p window)
+   ((window-live-p minibuffer-scroll-window)
+    (let ((window minibuffer-scroll-window))
         (with-current-buffer (window-buffer window)
           (if (pos-visible-in-window-p (point-max) window)
 	      ;; If end is in view, scroll up to the beginning.
 	      (set-window-start window (point-min) nil)
 	    ;; Else scroll down one screen.
 	    (scroll-other-window))
-	  nil)
-
-      (case (completion--do-completion)
+        nil)))
+   ;; If we're cycling, keep on cycling.
+   (completion-all-sorted-completions
+    (minibuffer-force-complete)
+    t)
+   (t (case (completion--do-completion)
         (#b000 nil)
         (#b001 (minibuffer-message "Sole completion")
                t)
@@ -1835,8 +1884,8 @@
                   (lambda (x)
                     (cond
                      ((stringp x) (regexp-quote x))
-                     ((if (consp group) (memq x group) group)
-                      "\\(.*?\\)" ".*?")))
+                     ((if (consp group) (memq x group) group) "\\(.*?\\)")
+		     (t ".*?")))
                   pattern
                   ""))))
     ;; Avoid pathological backtracking.
--- a/lisp/net/tramp-smb.el	Fri May 14 13:14:23 2010 +0900
+++ b/lisp/net/tramp-smb.el	Fri May 14 13:15:58 2010 +0900
@@ -334,41 +334,41 @@
 PRESERVE-UID-GID is completely ignored."
   (setq filename (expand-file-name filename)
 	newname (expand-file-name newname))
+  (with-progress-reporter
+      (tramp-dissect-file-name (if (file-remote-p filename) filename newname))
+      0 (format "Copying %s to %s" filename newname)
 
-  (let ((tmpfile (file-local-copy filename)))
+    (let ((tmpfile (file-local-copy filename)))
 
-    (if tmpfile
-	;; Remote filename.
-	(condition-case err
-	    (rename-file tmpfile newname ok-if-already-exists)
-	  ((error quit)
-	   (tramp-compat-delete-file tmpfile 'force)
-	   (signal (car err) (cdr err))))
-
-      ;; Remote newname.
-      (when (file-directory-p newname)
-	(setq newname (expand-file-name
-		       (file-name-nondirectory filename) newname)))
+      (if tmpfile
+	  ;; Remote filename.
+	  (condition-case err
+	      (rename-file tmpfile newname ok-if-already-exists)
+	    ((error quit)
+	     (tramp-compat-delete-file tmpfile 'force)
+	     (signal (car err) (cdr err))))
 
-      (with-parsed-tramp-file-name newname nil
-	(when (and (not ok-if-already-exists)
-		   (file-exists-p newname))
-	  (tramp-error v 'file-already-exists newname))
+	;; Remote newname.
+	(when (file-directory-p newname)
+	  (setq newname
+		(expand-file-name (file-name-nondirectory filename) newname)))
+
+	(with-parsed-tramp-file-name newname nil
+	  (when (and (not ok-if-already-exists)
+		     (file-exists-p newname))
+	    (tramp-error v 'file-already-exists newname))
 
-	;; We must also flush the cache of the directory, because
-	;; `file-attributes' reads the values from there.
-	(tramp-flush-file-property v (file-name-directory localname))
-	(tramp-flush-file-property v localname)
-	(unless (tramp-smb-get-share v)
-	  (tramp-error
-	   v 'file-error "Target `%s' must contain a share name" newname))
-	(tramp-message v 0 "Copying file %s to file %s..." filename newname)
-	(if (tramp-smb-send-command
-	     v (format "put \"%s\" \"%s\""
-		       filename (tramp-smb-get-localname v)))
-	    (tramp-message
-	     v 0 "Copying file %s to file %s...done" filename newname)
-	  (tramp-error v 'file-error "Cannot copy `%s'" filename)))))
+	  ;; We must also flush the cache of the directory, because
+	  ;; `file-attributes' reads the values from there.
+	  (tramp-flush-file-property v (file-name-directory localname))
+	  (tramp-flush-file-property v localname)
+	  (unless (tramp-smb-get-share v)
+	    (tramp-error
+	     v 'file-error "Target `%s' must contain a share name" newname))
+	  (unless (tramp-smb-send-command
+		   v (format "put \"%s\" \"%s\""
+			     filename (tramp-smb-get-localname v)))
+	    (tramp-error v 'file-error "Cannot copy `%s'" filename))))))
 
   ;; KEEP-DATE handling.
   (when keep-date (set-file-times newname (nth 5 (file-attributes filename)))))
@@ -605,15 +605,15 @@
        v 'file-error
        "Cannot make local copy of non-existing file `%s'" filename))
     (let ((tmpfile (tramp-compat-make-temp-file filename)))
-      (tramp-message v 4 "Fetching %s to tmp file %s..." filename tmpfile)
-      (if (tramp-smb-send-command
-	   v (format "get \"%s\" \"%s\"" (tramp-smb-get-localname v) tmpfile))
-	  (tramp-message
-	   v 4 "Fetching %s to tmp file %s...done" filename tmpfile)
-	;; Oops, an error.  We shall cleanup.
-	(tramp-compat-delete-file tmpfile 'force)
-	(tramp-error
-	 v 'file-error "Cannot make local copy of file `%s'" filename))
+      (with-progress-reporter
+	  v 3 (format "Fetching %s to tmp file %s" filename tmpfile)
+	(unless (tramp-smb-send-command
+		 v (format "get \"%s\" \"%s\""
+			   (tramp-smb-get-localname v) tmpfile))
+	  ;; Oops, an error.  We shall cleanup.
+	  (tramp-compat-delete-file tmpfile 'force)
+	  (tramp-error
+	   v 'file-error "Cannot make local copy of file `%s'" filename)))
       tmpfile)))
 
 ;; This function should return "foo/" for directories and "bar" for
@@ -850,38 +850,39 @@
   "Like `rename-file' for Tramp files."
   (setq filename (expand-file-name filename)
 	newname (expand-file-name newname))
+  (with-progress-reporter
+      (tramp-dissect-file-name (if (file-remote-p filename) filename newname))
+      0 (format "Renaming %s to %s" filename newname)
 
-  (let ((tmpfile (file-local-copy filename)))
+    (let ((tmpfile (file-local-copy filename)))
 
-    (if tmpfile
-	;; Remote filename.
-	(condition-case err
-	    (rename-file tmpfile newname ok-if-already-exists)
-	  ((error quit)
-	   (tramp-compat-delete-file tmpfile 'force)
-	   (signal (car err) (cdr err))))
-
-      ;; Remote newname.
-      (when (file-directory-p newname)
-	(setq newname (expand-file-name
-		      (file-name-nondirectory filename) newname)))
+      (if tmpfile
+	  ;; Remote filename.
+	  (condition-case err
+	      (rename-file tmpfile newname ok-if-already-exists)
+	    ((error quit)
+	     (tramp-compat-delete-file tmpfile 'force)
+	     (signal (car err) (cdr err))))
 
-      (with-parsed-tramp-file-name newname nil
-	(when (and (not ok-if-already-exists)
-		   (file-exists-p newname))
-	  (tramp-error v 'file-already-exists newname))
-	;; We must also flush the cache of the directory, because
-	;; `file-attributes' reads the values from there.
-	(tramp-flush-file-property v (file-name-directory localname))
-	(tramp-flush-file-property v localname)
-	(tramp-message v 0 "Copying file %s to file %s..." filename newname)
-	(if (tramp-smb-send-command
-	     v (format "put %s \"%s\"" filename (tramp-smb-get-localname v)))
-	    (tramp-message
-	     v 0 "Copying file %s to file %s...done" filename newname)
-	  (tramp-error v 'file-error "Cannot rename `%s'" filename)))))
+	;; Remote newname.
+	(when (file-directory-p newname)
+	  (setq newname (expand-file-name
+			 (file-name-nondirectory filename) newname)))
 
-  (tramp-compat-delete-file filename 'force))
+	(with-parsed-tramp-file-name newname nil
+	  (when (and (not ok-if-already-exists)
+		     (file-exists-p newname))
+	    (tramp-error v 'file-already-exists newname))
+	  ;; We must also flush the cache of the directory, because
+	  ;; `file-attributes' reads the values from there.
+	  (tramp-flush-file-property v (file-name-directory localname))
+	  (tramp-flush-file-property v localname)
+	  (unless (tramp-smb-send-command
+		   v (format "put %s \"%s\""
+			     filename (tramp-smb-get-localname v)))
+	    (tramp-error v 'file-error "Cannot rename `%s'" filename)))))
+
+    (tramp-compat-delete-file filename 'force)))
 
 (defun tramp-smb-handle-set-file-modes (filename mode)
   "Like `set-file-modes' for Tramp files."
@@ -938,14 +939,14 @@
 	   (list start end tmpfile append 'no-message lockname confirm)
 	 (list start end tmpfile append 'no-message lockname)))
 
-      (tramp-message v 5 "Writing tmp file %s to file %s..." tmpfile filename)
-      (unwind-protect
-	  (if (tramp-smb-send-command
-	       v (format "put %s \"%s\"" tmpfile (tramp-smb-get-localname v)))
-	      (tramp-message
-	       v 5 "Writing tmp file %s to file %s...done" tmpfile filename)
-	    (tramp-error v 'file-error "Cannot write `%s'" filename))
-	(tramp-compat-delete-file tmpfile 'force))
+      (with-progress-reporter
+	  v 3 (format "Moving tmp file %s to %s" tmpfile filename)
+	(unwind-protect
+	    (unless (tramp-smb-send-command
+		     v (format "put %s \"%s\""
+			       tmpfile (tramp-smb-get-localname v)))
+	      (tramp-error v 'file-error "Cannot write `%s'" filename))
+	  (tramp-compat-delete-file tmpfile 'force)))
 
       (unless (equal curbuf (current-buffer))
 	(tramp-error
@@ -1302,60 +1303,57 @@
 	    (setq args (append args (list "-s" tramp-smb-conf))))
 
 	  ;; OK, let's go.
-	  (tramp-message
-	   vec 3 "Opening connection for //%s%s/%s..."
-	   (if (not (zerop (length user))) (concat user "@") "")
-	   host (or share ""))
+	  (with-progress-reporter
+	      vec 3
+	      (format "Opening connection for //%s%s/%s"
+		      (if (not (zerop (length user))) (concat user "@") "")
+		      host (or share ""))
 
-	  (let* ((coding-system-for-read nil)
-		 (process-connection-type tramp-process-connection-type)
-		 (p (let ((default-directory
-			    (tramp-compat-temporary-file-directory)))
-		      (apply #'start-process
-			     (tramp-buffer-name vec) (tramp-get-buffer vec)
-			     tramp-smb-program args))))
+	    (let* ((coding-system-for-read nil)
+		   (process-connection-type tramp-process-connection-type)
+		   (p (let ((default-directory
+			      (tramp-compat-temporary-file-directory)))
+			(apply #'start-process
+			       (tramp-buffer-name vec) (tramp-get-buffer vec)
+			       tramp-smb-program args))))
 
-	    (tramp-message
-	     vec 6 "%s" (mapconcat 'identity (process-command p) " "))
-	    (tramp-set-process-query-on-exit-flag p nil)
+	      (tramp-message
+	       vec 6 "%s" (mapconcat 'identity (process-command p) " "))
+	      (tramp-set-process-query-on-exit-flag p nil)
 
-	    ;; Set variables for computing the prompt for reading password.
-	    (setq tramp-current-method tramp-smb-method
-		  tramp-current-user user
-		  tramp-current-host host)
+	      ;; Set variables for computing the prompt for reading password.
+	      (setq tramp-current-method tramp-smb-method
+		    tramp-current-user user
+		    tramp-current-host host)
 
-	    ;; Play login scenario.
-	    (tramp-process-actions
-	     p vec
-	     (if share
-		 tramp-smb-actions-with-share
-	       tramp-smb-actions-without-share))
+	      ;; Play login scenario.
+	      (tramp-process-actions
+	       p vec
+	       (if share
+		   tramp-smb-actions-with-share
+		 tramp-smb-actions-without-share))
 
-	    ;; Check server version.
-	    (with-current-buffer (tramp-get-connection-buffer vec)
-	      (goto-char (point-min))
-	      (search-forward-regexp
-	       "Domain=\\[[^]]*\\] OS=\\[[^]]*\\] Server=\\[[^]]*\\]" nil t)
-	      (let ((smbserver-version (match-string 0)))
-		(unless
-		    (string-equal
-		     smbserver-version
-		     (tramp-get-connection-property
-		      vec "smbserver-version" smbserver-version))
-		  (tramp-flush-directory-property vec "")
-		  (tramp-flush-connection-property vec))
-		(tramp-set-connection-property
-		 vec "smbserver-version" smbserver-version)))
+	      ;; Check server version.
+	      (with-current-buffer (tramp-get-connection-buffer vec)
+		(goto-char (point-min))
+		(search-forward-regexp
+		 "Domain=\\[[^]]*\\] OS=\\[[^]]*\\] Server=\\[[^]]*\\]" nil t)
+		(let ((smbserver-version (match-string 0)))
+		  (unless
+		      (string-equal
+		       smbserver-version
+		       (tramp-get-connection-property
+			vec "smbserver-version" smbserver-version))
+		    (tramp-flush-directory-property vec "")
+		    (tramp-flush-connection-property vec))
+		  (tramp-set-connection-property
+		   vec "smbserver-version" smbserver-version)))
 
-	    ;; Set chunksize.  Otherwise, `tramp-send-string' might
-	    ;; try it itself.
-	    (tramp-set-connection-property p "smb-share" share)
-	    (tramp-set-connection-property p "chunksize" tramp-chunksize)
-
-	    (tramp-message
-	     vec 3 "Opening connection for //%s%s/%s...done"
-	     (if (not (zerop (length user))) (concat user "@") "")
-	     host (or share ""))))))))
+	      ;; Set chunksize.  Otherwise, `tramp-send-string' might
+	      ;; try it itself.
+	      (tramp-set-connection-property p "smb-share" share)
+	      (tramp-set-connection-property
+	       p "chunksize" tramp-chunksize))))))))
 
 ;; We don't use timeouts.  If needed, the caller shall wrap around.
 (defun tramp-smb-wait-for-output (vec)
--- a/lisp/net/tramp.el	Fri May 14 13:14:23 2010 +0900
+++ b/lisp/net/tramp.el	Fri May 14 13:15:58 2010 +0900
@@ -2271,14 +2271,18 @@
      (tramp-message ,vec ,level "%s..." ,message)
      ;; We start a pulsing progress reporter after 3 seconds.  Feature
      ;; introduced in Emacs 24.1.
-     (when (<= ,level tramp-verbose)
+     (when (and tramp-message-show-message
+		;; Display only when there is a minimum level.
+		(<= ,level (min tramp-verbose 3)))
        (condition-case nil
 	   (setq pr (tramp-compat-funcall 'make-progress-reporter ,message)
 		 tm (if pr (run-at-time 3 0.1 'progress-reporter-update pr)))
 	 (error nil)))
      (unwind-protect
 	 ;; Execute the body.
-	 (progn ,@body)
+	 (let ((tramp-message-show-message
+		(and tramp-message-show-message (not tm))))
+	   ,@body)
        ;; Stop progress reporter.
        (if tm (tramp-compat-funcall 'cancel-timer tm))
        (tramp-message ,vec ,level "%s...done" ,message))))
@@ -2558,13 +2562,13 @@
 	(tramp-error v 'file-error "Cannot load nonexistent file `%s'" file)))
     (if (not (file-exists-p file))
 	nil
-      (unless nomessage (tramp-message v 0 "Loading %s..." file))
-      (let ((local-copy (file-local-copy file)))
-	;; MUST-SUFFIX doesn't exist on XEmacs, so let it default to nil.
-	(unwind-protect
-	    (load local-copy noerror t t)
-	  (tramp-compat-delete-file local-copy 'force)))
-      (unless nomessage (tramp-message v 0 "Loading %s...done" file))
+      (let ((tramp-message-show-message (not nomessage)))
+	(with-progress-reporter v 0 (format "Loading %s" file)
+	  (let ((local-copy (file-local-copy file)))
+	    ;; MUST-SUFFIX doesn't exist on XEmacs, so let it default to nil.
+	    (unwind-protect
+		(load local-copy noerror t t)
+	      (tramp-compat-delete-file local-copy 'force)))))
       t)))
 
 ;; Localname manipulation functions that grok Tramp localnames...
@@ -2867,7 +2871,9 @@
   (tramp-send-command-and-read
    vec
    (format
-    "((%s %s || %s -h %s) && %s -c '((\"%%N\") %%h %s %s %%X.0 %%Y.0 %%Z.0 %%s.0 \"%%A\" t %%i.0 -1)' %s || echo nil)"
+    ;; On Opsware, pdksh (which is the true name of ksh there) doesn't
+    ;; parse correctly the sequence "((".  Therefore, we add a space.
+    "( (%s %s || %s -h %s) && %s -c '( (\"%%N\") %%h %s %s %%X.0 %%Y.0 %%Z.0 %%s.0 \"%%A\" t %%i.0 -1)' %s || echo nil)"
     (tramp-get-file-exists-command vec)
     (tramp-shell-quote-argument localname)
     (tramp-get-test-command vec)
@@ -2920,12 +2926,14 @@
 function directly, unless those two cases are already taken care
 of."
   (with-current-buffer buf
-    ;; There is no file visiting the buffer, or the buffer has no
-    ;; recorded last modification time.
-    (if (or (not (buffer-file-name))
-	    (eq (visited-file-modtime) 0))
-	t
-      (let ((f (buffer-file-name)))
+    (let ((f (buffer-file-name)))
+      ;; There is no file visiting the buffer, or the buffer has no
+      ;; recorded last modification time, or there is no established
+      ;; connection.
+      (if (or (not f)
+	      (eq (visited-file-modtime) 0)
+	      (not (tramp-file-name-handler 'file-remote-p f nil 'connected)))
+	  t
 	(with-parsed-tramp-file-name f nil
 	  (tramp-flush-file-property v localname)
 	  (let* ((attr (file-attributes f))
@@ -2984,16 +2992,11 @@
 	 (let ((time (if (or (null time) (equal time '(0 0)))
 			 (current-time)
 		       time))
-	       (utc
-		;; With GNU Emacs, `format-time-string' has an
-		;; optional parameter UNIVERSAL.  This is preferred,
-		;; because we could handle the case when the remote
-		;; host is located in a different time zone as the
-		;; local host.
-		(and (functionp 'subr-arity)
-		     (subrp (symbol-function 'format-time-string))
-		     (= 3 (cdr (tramp-compat-funcall
-				'subr-arity 'format-time-string))))))
+	       ;; With GNU Emacs, `format-time-string' has an optional
+	       ;; parameter UNIVERSAL.  This is preferred, because we
+	       ;; could handle the case when the remote host is
+	       ;; located in a different time zone as the local host.
+	       (utc (not (featurep 'xemacs))))
 	   (tramp-send-command-and-check
 	    v (format "%s touch -t %s %s"
 		      (if utc "TZ=UTC; export TZ;" "")
@@ -4154,7 +4157,7 @@
 	       nil)
 	      ((and suffix (nth 2 suffix))
 	       ;; We found an uncompression rule.
-	       (with-progress-reporter v 0 (format "Uncompressing %s..." file)
+	       (with-progress-reporter v 0 (format "Uncompressing %s" file)
 		 (when (zerop
 			(tramp-send-command-and-check
 			 v (concat (nth 2 suffix) " "
@@ -4166,7 +4169,7 @@
 	      (t
 	       ;; We don't recognize the file as compressed, so compress it.
 	       ;; Try gzip.
-	       (with-progress-reporter v 0 (format "Compressing %s..." file)
+	       (with-progress-reporter v 0 (format "Compressing %s" file)
 		 (when (zerop
 			(tramp-send-command-and-check
 			 v (concat "gzip -f "
@@ -4748,11 +4751,11 @@
 	   ;; Use inline encoding for file transfer.
 	   (rem-enc
 	    (save-excursion
-	      (tramp-message v 5 "Encoding remote file %s..." filename)
-	      (tramp-barf-unless-okay
-	       v (format rem-enc (tramp-shell-quote-argument localname))
-	       "Encoding remote file failed")
-	      (tramp-message v 5 "Encoding remote file %s...done" filename)
+	      (with-progress-reporter
+	       v 5 (format "Encoding remote file %s" filename)
+	       (tramp-barf-unless-okay
+		v (format rem-enc (tramp-shell-quote-argument localname))
+		"Encoding remote file failed"))
 
 	      (if (functionp loc-dec)
 		  ;; If local decoding is a function, we call it.  We
@@ -4762,15 +4765,15 @@
 		  (with-temp-buffer
 		    (set-buffer-multibyte nil)
 		    (insert-buffer-substring (tramp-get-buffer v))
-		    (tramp-message
-		     v 5 "Decoding remote file %s with function %s..."
-		     filename loc-dec)
-		    (funcall loc-dec (point-min) (point-max))
-		    ;; Unset `file-name-handler-alist'.  Otherwise,
-		    ;; epa-file gets confused.
-		    (let (file-name-handler-alist
-			  (coding-system-for-write 'binary))
-		      (write-region (point-min) (point-max) tmpfile)))
+		    (with-progress-reporter
+			v 3 (format "Decoding remote file %s with function %s"
+				    filename loc-dec)
+		      (funcall loc-dec (point-min) (point-max))
+		      ;; Unset `file-name-handler-alist'.  Otherwise,
+		      ;; epa-file gets confused.
+		      (let (file-name-handler-alist
+			    (coding-system-for-write 'binary))
+			(write-region (point-min) (point-max) tmpfile))))
 
 		;; If tramp-decoding-function is not defined for this
 		;; method, we invoke tramp-decoding-command instead.
@@ -4780,14 +4783,14 @@
 		  (let (file-name-handler-alist
 			(coding-system-for-write 'binary))
 		    (write-region (point-min) (point-max) tmpfile2))
-		  (tramp-message
-		   v 5 "Decoding remote file %s with command %s..."
-		   filename loc-dec)
-		  (unwind-protect
-		      (tramp-call-local-coding-command loc-dec tmpfile2 tmpfile)
-		    (tramp-compat-delete-file tmpfile2 'force))))
-
-	      (tramp-message v 5 "Decoding remote file %s...done" filename)
+		  (with-progress-reporter
+		      v 3 (format "Decoding remote file %s with command %s"
+				  filename loc-dec)
+		    (unwind-protect
+			(tramp-call-local-coding-command
+			 loc-dec tmpfile2 tmpfile)
+		      (tramp-compat-delete-file tmpfile2 'force)))))
+
 	      ;; Set proper permissions.
 	      (set-file-modes tmpfile (tramp-default-file-modes filename))
 	      ;; Set local user ownership.
@@ -4843,7 +4846,7 @@
   "Like `insert-file-contents' for Tramp files."
   (barf-if-buffer-read-only)
   (setq filename (expand-file-name filename))
-  (let (coding-system-used result local-copy remote-copy)
+  (let (result local-copy remote-copy)
     (with-parsed-tramp-file-name filename nil
       (unwind-protect
 	  (if (not (file-exists-p filename))
@@ -4914,27 +4917,16 @@
 		(setq tramp-temp-buffer-file-name local-copy)
 		(put 'tramp-temp-buffer-file-name 'permanent-local t))
 
-	      (tramp-message
-	       v 4 "Inserting local temp file `%s'..." local-copy)
-
-	      ;; We must ensure that `file-coding-system-alist'
-	      ;; matches `local-copy'.
-	      (let ((file-coding-system-alist
-		     (tramp-find-file-name-coding-system-alist
-		      filename local-copy)))
-		(setq result
-		      (insert-file-contents
-		       local-copy nil nil nil replace))
-		;; Now `last-coding-system-used' has right value.
-		;; Remember it.
-		(when (boundp 'last-coding-system-used)
-		  (setq coding-system-used
-			(symbol-value 'last-coding-system-used))))
-
-	      (tramp-message
-	       v 4 "Inserting local temp file `%s'...done" local-copy)
-	      (when (boundp 'last-coding-system-used)
-		(set 'last-coding-system-used coding-system-used))))
+	      (with-progress-reporter
+		  v 3 (format "Inserting local temp file `%s'" local-copy)
+		;; We must ensure that `file-coding-system-alist'
+		;; matches `local-copy'.
+		(let ((file-coding-system-alist
+		       (tramp-find-file-name-coding-system-alist
+			filename local-copy)))
+		  (setq result
+			(insert-file-contents
+			 local-copy nil nil nil replace))))))
 
 	;; Save exit.
 	(progn
@@ -5194,15 +5186,14 @@
 	     ;; Use inline file transfer.
 	     (rem-dec
 	      ;; Encode tmpfile.
-	      (tramp-message v 5 "Encoding region...")
 	      (unwind-protect
 		  (with-temp-buffer
 		    (set-buffer-multibyte nil)
 		    ;; Use encoding function or command.
 		    (if (functionp loc-enc)
-			(progn
-			  (tramp-message
-			   v 5 "Encoding region using function `%s'..." loc-enc)
+			(with-progress-reporter
+			    v 3 (format "Encoding region using function `%s'"
+					loc-enc)
 			  (let ((coding-system-for-read 'binary))
 			    (insert-file-contents-literally tmpfile))
 			  ;; The following `let' is a workaround for the
@@ -5218,59 +5209,61 @@
 				  (tramp-compat-temporary-file-directory)))
 			    (funcall loc-enc (point-min) (point-max))))
 
-		      (tramp-message
-		       v 5 "Encoding region using command `%s'..." loc-enc)
-		      (unless (zerop (tramp-call-local-coding-command
-				      loc-enc tmpfile t))
-			(tramp-error
-			 v 'file-error
-			 "Cannot write to `%s', local encoding command `%s' failed"
-			 filename loc-enc)))
+		      (with-progress-reporter
+			  v 3 (format "Encoding region using command `%s'"
+				      loc-enc)
+			(unless (zerop (tramp-call-local-coding-command
+					loc-enc tmpfile t))
+			  (tramp-error
+			   v 'file-error
+			   (concat "Cannot write to `%s', "
+				   "local encoding command `%s' failed")
+			   filename loc-enc))))
 
 		    ;; Send buffer into remote decoding command which
 		    ;; writes to remote file.  Because this happens on
 		    ;; the remote host, we cannot use the function.
-		    (goto-char (point-max))
-		    (unless (bolp) (newline))
-		    (tramp-message
-		     v 5 "Decoding region into remote file %s..." filename)
-		    (tramp-send-command
-		     v
-		     (format
-		      (concat rem-dec " <<'EOF'\n%sEOF")
-		      (tramp-shell-quote-argument localname)
-		      (buffer-string)))
-		    (tramp-barf-unless-okay
-		     v nil
-		     "Couldn't write region to `%s', decode using `%s' failed"
-		     filename rem-dec)
-		    ;; When `file-precious-flag' is set, the region is
-		    ;; written to a temporary file.  Check that the
-		    ;; checksum is equal to that from the local tmpfile.
-		    (when file-precious-flag
-		      (erase-buffer)
-		      (and
-		       ;; cksum runs locally, if possible.
-		       (zerop (tramp-local-call-process "cksum" tmpfile t))
-		       ;; cksum runs remotely.
-		       (zerop
-			(tramp-send-command-and-check
-			 v
-			 (format
-			  "cksum <%s" (tramp-shell-quote-argument localname))))
-		       ;; ... they are different.
-		       (not
-			(string-equal
-			 (buffer-string)
-			 (with-current-buffer (tramp-get-buffer v)
-			   (buffer-string))))
-		       (tramp-error
-			v 'file-error
-			(concat "Couldn't write region to `%s',"
-				" decode using `%s' failed")
-			filename rem-dec)))
-		    (tramp-message
-		     v 5 "Decoding region into remote file %s...done" filename))
+		    (with-progress-reporter
+			v 3
+			(format "Decoding region into remote file %s" filename)
+		      (goto-char (point-max))
+		      (unless (bolp) (newline))
+		      (tramp-send-command
+		       v
+		       (format
+			(concat rem-dec " <<'EOF'\n%sEOF")
+			(tramp-shell-quote-argument localname)
+			(buffer-string)))
+		      (tramp-barf-unless-okay
+		       v nil
+		       "Couldn't write region to `%s', decode using `%s' failed"
+		       filename rem-dec)
+		      ;; When `file-precious-flag' is set, the region is
+		      ;; written to a temporary file.  Check that the
+		      ;; checksum is equal to that from the local tmpfile.
+		      (when file-precious-flag
+			(erase-buffer)
+			(and
+			 ;; cksum runs locally, if possible.
+			 (zerop (tramp-local-call-process "cksum" tmpfile t))
+			 ;; cksum runs remotely.
+			 (zerop
+			  (tramp-send-command-and-check
+			   v
+			   (format
+			    "cksum <%s"
+			    (tramp-shell-quote-argument localname))))
+			 ;; ... they are different.
+			 (not
+			  (string-equal
+			   (buffer-string)
+			   (with-current-buffer (tramp-get-buffer v)
+			     (buffer-string))))
+			 (tramp-error
+			  v 'file-error
+			  (concat "Couldn't write region to `%s',"
+				  " decode using `%s' failed")
+			  filename rem-dec)))))
 
 		;; Save exit.
 		(tramp-compat-delete-file tmpfile 'force)))
@@ -6287,14 +6280,13 @@
   (let* ((p (tramp-get-connection-process vec))
 	 (scripts (tramp-get-connection-property p "scripts" nil)))
     (unless (member name scripts)
-      (tramp-message vec 5 "Sending script `%s'..." name)
-      ;; The script could contain a call of Perl.  This is masked with `%s'.
-      (tramp-send-command-and-check
-       vec
-       (format "%s () {\n%s\n}" name
-	       (format script (tramp-get-remote-perl vec))))
-      (tramp-set-connection-property p "scripts" (cons name scripts))
-      (tramp-message vec 5 "Sending script `%s'...done." name))))
+      (with-progress-reporter vec 5 (format "Sending script `%s'" name)
+	;; The script could contain a call of Perl.  This is masked with `%s'.
+	(tramp-send-command-and-check
+	 vec
+	 (format "%s () {\n%s\n}" name
+		 (format script (tramp-get-remote-perl vec))))
+	(tramp-set-connection-property p "scripts" (cons name scripts))))))
 
 (defun tramp-set-auto-save ()
   (when (and ;; ange-ftp has its own auto-save mechanism
@@ -6573,7 +6565,7 @@
 		(setq extra-args (cdr item))))
 	    (when extra-args (setq shell (concat shell " " extra-args))))
 	  (tramp-message
-	   vec 5 "Starting remote shell `%s' for tilde expansion..." shell)
+	   vec 5 "Starting remote shell `%s' for tilde expansion" shell)
 	  (let ((tramp-end-of-output tramp-initial-end-of-output))
 	    (tramp-send-command
 	     vec
@@ -6581,13 +6573,12 @@
 		     (shell-quote-argument tramp-end-of-output) shell)
 	     t))
 	  ;; Setting prompts.
-	  (tramp-message vec 5 "Setting remote shell prompt...")
-	  (tramp-send-command
-	   vec (format "PS1=%s" (shell-quote-argument tramp-end-of-output)) t)
-	  (tramp-send-command vec "PS2=''" t)
-	  (tramp-send-command vec "PS3=''" t)
-	  (tramp-send-command vec "PROMPT_COMMAND=''" t)
-	  (tramp-message vec 5 "Setting remote shell prompt...done"))
+	  (with-progress-reporter vec 5 (format "Setting remote shell prompt")
+	    (tramp-send-command
+	     vec (format "PS1=%s" (shell-quote-argument tramp-end-of-output)) t)
+	    (tramp-send-command vec "PS2=''" t)
+	    (tramp-send-command vec "PS3=''" t)
+	    (tramp-send-command vec "PROMPT_COMMAND=''" t)))
 
 	 (t (tramp-message
 	     vec 5 "Remote `%s' groks tilde expansion, good"
@@ -7424,11 +7415,11 @@
 	(tramp-get-buffer vec)
 	(if (zerop (length (tramp-file-name-user vec)))
 	    (tramp-message
-	     vec 3 "Opening connection for %s using %s..."
+	     vec 3 "Opening connection for %s using %s"
 	     (tramp-file-name-host vec)
 	     (tramp-file-name-method vec))
 	  (tramp-message
-	   vec 3 "Opening connection for %s@%s using %s..."
+	   vec 3 "Opening connection for %s@%s using %s"
 	   (tramp-file-name-user vec)
 	   (tramp-file-name-host vec)
 	   (tramp-file-name-method vec)))
--- a/lisp/org/ChangeLog	Fri May 14 13:14:23 2010 +0900
+++ b/lisp/org/ChangeLog	Fri May 14 13:15:58 2010 +0900
@@ -127,7 +127,7 @@
 	(org-ascii-replace-entities): New function.
 
 2010-04-10  Carsten Dominik  <carsten.dominik@gmail.com>
-	    Ulf Stegemann  <ulf@zeitform.de>
+            Ulf Stegemann  <ulf@zeitform.de>
 
 	* org-entities.el: New file.
 
--- a/lisp/progmodes/cc-cmds.el	Fri May 14 13:14:23 2010 +0900
+++ b/lisp/progmodes/cc-cmds.el	Fri May 14 13:15:58 2010 +0900
@@ -1501,6 +1501,11 @@
   (interactive "p")
   (or arg (setq arg 1))
 
+  (or (not (eq this-command 'c-beginning-of-defun))
+      (eq last-command 'c-beginning-of-defun)
+      (and transient-mark-mode mark-active)
+      (push-mark))
+
   (c-save-buffer-state
       (beginning-of-defun-function end-of-defun-function
        (start (point))
@@ -1604,6 +1609,11 @@
   (interactive "p")
   (or arg (setq arg 1))
 
+  (or (not (eq this-command 'c-end-of-defun))
+      (eq last-command 'c-end-of-defun)
+      (and transient-mark-mode mark-active)
+      (push-mark))
+
   (c-save-buffer-state
       (beginning-of-defun-function end-of-defun-function
        (start (point))
--- a/lisp/progmodes/sh-script.el	Fri May 14 13:14:23 2010 +0900
+++ b/lisp/progmodes/sh-script.el	Fri May 14 13:15:58 2010 +0900
@@ -1480,7 +1480,7 @@
 ;; mode-command and utility functions
 
 ;;;###autoload
-(defun sh-mode ()
+(define-derived-mode sh-mode prog-mode "Shell-script"
   "Major mode for editing shell scripts.
 This mode works for many shells, since they all have roughly the same syntax,
 as far as commands, arguments, variables, pipes, comments etc. are concerned.
@@ -1533,11 +1533,6 @@
 
 If your shell gives error messages with line numbers, you can use \\[executable-interpret]
 with your script for an edit-interpret-debug cycle."
-  (interactive)
-  (kill-all-local-variables)
-  (setq major-mode 'sh-mode
-	mode-name "Shell-script")
-  (use-local-map sh-mode-map)
   (make-local-variable 'skeleton-end-hook)
   (make-local-variable 'paragraph-start)
   (make-local-variable 'paragraph-separate)
@@ -1613,8 +1608,7 @@
           "sh")
          (t
           sh-shell-file))
-   nil nil)
-  (run-mode-hooks 'sh-mode-hook))
+   nil nil))
 
 ;;;###autoload
 (defalias 'shell-script-mode 'sh-mode)
--- a/lisp/scroll-all.el	Fri May 14 13:14:23 2010 +0900
+++ b/lisp/scroll-all.el	Fri May 14 13:15:58 2010 +0900
@@ -90,9 +90,9 @@
 	 (call-interactively 'scroll-all-scroll-down-all))
 	((eq this-command 'previous-line)
 	 (call-interactively 'scroll-all-scroll-up-all))
-	((eq this-command 'scroll-up)
+	((memq this-command '(scroll-up scroll-up-command))
 	 (call-interactively 'scroll-all-page-down-all))
-	((eq this-command 'scroll-down)
+	((memq this-command '(scroll-down scroll-down-command))
 	 (call-interactively 'scroll-all-page-up-all))
 	((eq this-command 'beginning-of-buffer)
 	 (call-interactively 'scroll-all-beginning-of-buffer-all))
--- a/lisp/textmodes/ispell.el	Fri May 14 13:14:23 2010 +0900
+++ b/lisp/textmodes/ispell.el	Fri May 14 13:15:58 2010 +0900
@@ -2630,11 +2630,22 @@
 	     (or ispell-local-dictionary ispell-dictionary "default"))
     (sit-for 0)
     (setq ispell-library-directory (ispell-check-version)
-	  ispell-process-directory default-directory
 	  ispell-process (ispell-start-process)
 	  ispell-filter nil
-	  ispell-filter-continue nil
-	  ispell-process-buffer-name (buffer-name))
+	  ispell-filter-continue nil)
+    ;; When spellchecking minibuffer contents, make sure ispell process
+    ;; is not restarted every time the minibuffer is killed.
+    (if (window-minibuffer-p)
+	(if (fboundp 'minibuffer-selected-window)
+	    ;; Assign ispell process to parent buffer
+	    (setq ispell-process-directory default-directory
+		  ispell-process-buffer-name (window-buffer (minibuffer-selected-window)))
+	  ;; Force `ispell-process-directory' to $HOME and use a dummy name
+	  (setq ispell-process-directory (expand-file-name "~/")
+		ispell-process-buffer-name " * Minibuffer-has-spellcheck-enabled"))
+      ;; Not in a minibuffer
+      (setq ispell-process-directory default-directory
+	    ispell-process-buffer-name (buffer-name)))
     (if ispell-async-processp
 	(set-process-filter ispell-process 'ispell-filter))
     ;; protect against bogus binding of `enable-multibyte-characters' in XEmacs
--- a/lisp/textmodes/sgml-mode.el	Fri May 14 13:14:23 2010 +0900
+++ b/lisp/textmodes/sgml-mode.el	Fri May 14 13:15:58 2010 +0900
@@ -101,6 +101,11 @@
     (define-key map "\C-c\^?" 'sgml-delete-tag)
     (define-key map "\C-c?" 'sgml-tag-help)
     (define-key map "\C-c/" 'sgml-close-tag)
+
+    ;; Redundant keybindings, for consistency with TeX mode.
+    (define-key map "\C-c\C-o" 'sgml-tag)
+    (define-key map "\C-c\C-e" 'sgml-close-tag)
+
     (define-key map "\C-c8" 'sgml-name-8bit-mode)
     (define-key map "\C-c\C-v" 'sgml-validate)
     (when sgml-quick-keys
--- a/lisp/textmodes/tex-mode.el	Fri May 14 13:14:23 2010 +0900
+++ b/lisp/textmodes/tex-mode.el	Fri May 14 13:15:58 2010 +0900
@@ -808,6 +808,11 @@
     (define-key map "\C-c\C-c" 'tex-compile)
     (define-key map "\C-c\C-i" 'tex-bibtex-file)
     (define-key map "\C-c\C-o" 'latex-insert-block)
+
+    ;; Redundant keybindings, for consistency with SGML mode.
+    (define-key map "\C-c\C-t" 'latex-insert-block)
+    (define-key map "\C-c/" 'latex-close-block)
+
     (define-key map "\C-c\C-e" 'latex-close-block)
     (define-key map "\C-c\C-u" 'tex-goto-last-unclosed-latex-block)
     (define-key map "\C-c\C-m" 'tex-feed-input)
--- a/lwlib/ChangeLog	Fri May 14 13:14:23 2010 +0900
+++ b/lwlib/ChangeLog	Fri May 14 13:15:58 2010 +0900
@@ -1,3 +1,7 @@
+2010-05-13  Jan Djärv  <jan.h.d@swipnet.se>
+
+	* lwlib-Xaw.c (make_dialog): Remove extra arg to XtVaGetSubresources.
+
 2010-05-08  Jan Djärv  <jan.h.d@swipnet.se>
 
 	* xlwmenu.c (XlwMenuDestroy): Remove XtDestroyWidget on subwidgets
--- a/lwlib/lwlib-Xaw.c	Fri May 14 13:14:23 2010 +0900
+++ b/lwlib/lwlib-Xaw.c	Fri May 14 13:15:58 2010 +0900
@@ -664,7 +664,7 @@
               (XtPointer)"Sans-14" }};
         char *faceName;
         XtVaGetSubresources (dialog, &faceName, "Dialog", "dialog",
-                             rec, 1, 0, NULL);
+                             rec, 1, (String)NULL);
         if (strcmp ("none", faceName) != 0)
           xft_font = openFont (dialog, faceName);
         if (xft_font) 
--- a/make-dist	Fri May 14 13:14:23 2010 +0900
+++ b/make-dist	Fri May 14 13:15:58 2010 +0900
@@ -537,7 +537,7 @@
 echo "Making links to \`msdos'"
 (cd msdos
  ln ChangeLog INSTALL README emacs.ico emacs.pif ../${tempdir}/msdos
- ln is_exec.c sigaction.c mainmake mainmake.v2 sed*.inp ../${tempdir}/msdos
+ ln is_exec.c sigaction.c mainmake.v2 sed*.inp ../${tempdir}/msdos
  cd ../${tempdir}/msdos
  rm -f =*)
 
--- a/msdos/ChangeLog	Fri May 14 13:14:23 2010 +0900
+++ b/msdos/ChangeLog	Fri May 14 13:15:58 2010 +0900
@@ -1,3 +1,44 @@
+2010-05-14  Glenn Morris  <rgm@gnu.org>
+
+	* sed1v2.inp (MSDOS_OBJ): Edit to dosfns.o msdos.o.
+	(MSDOS_SUPPORT): Edit to $(MSDOS_SUPPORT_REAL).
+	* sed1x.inp (MSDOS_X_OBJ): Edit to w16select.o termcap.o.
+
+	* sed2x.inp (HAVE_WINDOW_SYSTEM): Define.
+	* sed1x.inp (TOOLTIP_SUPPORT): Edit to ${lispsource}tooltip.elc.
+	(WINDOW_SUPPORT): Edit to $(BASE_WINDOW_SUPPORT) $(X_WINDOW_SUPPORT).
+	* sed1v2.inp (MOUSE_SUPPORT): Edit to $(REAL_MOUSE_SUPPORT).
+	(TOOLTIP_SUPPORT, WINDOW_SUPPORT): Edit to empty.
+
+	* sed1v2.inp (FONT_OBJ): Use the plain X version (no XFT, Freetype).
+
+	* sed1v2.inp (@NS_IMPL_GNUSTEP_INC@): Edit to nil.
+
+2010-05-13  Glenn Morris  <rgm@gnu.org>
+
+	* sed1x.inp (OLDXMENU): Edit to ${oldXMenudir}libXMenu11.a.
+	(LIBXMENU): Edit to ${OLDXMENU}.
+	(LIBX_OTHER): Edit to ${LIBXT} ${LIBX_EXTRA}.
+
+	* sed1v2.inp (C_SWITCH_X_SYSTEM, C_SWITCH_X_SITE, LIB_STANDARD)
+	(FONTCONFIG_CFLAGS, FONTCONFIG_LIBS, FREETYPE_CFLAGS, FREETYPE_LIBS)
+	(LIBOTF_CFLAGS, LIBOTF_LIBS, M17N_FLT_CFLAGS, M17N_FLT_LIBS)
+	(GNU_OBJC_CFLAGS, GNUSTEP_SYSTEM_LIBRARIES, LIBRESOLV, LIBGPM):
+	Edit to empty,
+	(LIB_MATH): Edit to -lm.
+	(UNEXEC_OBJ): Edit to unexec.o.
+
+2010-05-12  Glenn Morris  <rgm@gnu.org>
+
+	* sed3v2.inp (INSTALLABLES): No more @LIB_SRC_EXTRA_INSTALLABLES@.
+
+	* sed1v2.inp (LIB_GCC): Edit to -Lgcc.
+
+2010-05-11  Glenn Morris  <rgm@gnu.org>
+
+	* sed1x.inp (LIBS_SYSTEM): Edit to -lxext -lsys.
+	* sed3x.inp: New file.
+
 2010-05-10  Glenn Morris  <rgm@gnu.org>
 
 	* sed1v2.inp, sed3v2.inp (LIBS_SYSTEM): Edit to empty.
--- a/msdos/sed1v2.inp	Fri May 14 13:14:23 2010 +0900
+++ b/msdos/sed1v2.inp	Fri May 14 13:15:58 2010 +0900
@@ -38,25 +38,38 @@
 /^CPPFLAGS *=/s/@[^@\n]*@//
 /^LDFLAGS *=/s/@[^@\n]*@//
 /^LIBS *=/s/@[^@\n]*@//
-s/@LIB_MATH@/-lm/
 /^LIBES *=/,/^ *$/ {
   s/@[^@\n]*@//g
 }
 /^LIBOBJS *=/s/@[^@\n]*@/getloadavg.o/
 /^C_SWITCH_MACHINE *=/s/@C_SWITCH_MACHINE@//
 /^C_SWITCH_SYSTEM *=/s/@C_SWITCH_SYSTEM@//
+/^C_SWITCH_X_SYSTEM *=/s/@C_SWITCH_X_SYSTEM@//
+/^C_SWITCH_X_SITE *=/s/@C_SWITCH_X_SITE@//
+#/^LD_SWITCH_X_SITE *=/s/@LD_SWITCH_X_SITE@//
 /^LD_SWITCH_SYSTEM_TEMACS *=/s/@LD_SWITCH_SYSTEM_TEMACS@//
 /^LD_SWITCH_X_SITE_AUX *=/s/@LD_SWITCH_X_SITE_AUX@//
 /^LD_SWITCH_X_SITE_AUX_RPATH *=/s/@LD_SWITCH_X_SITE_AUX_RPATH@//
 /^LD_SWITCH_SYSTEM *=/s/@LD_SWITCH_SYSTEM@//
 /^LD_SWITCH_SYSTEM_EXTRA *=/s/@LD_SWITCH_SYSTEM_EXTRA@//
 /^LIBS_SYSTEM *=/s/@LIBS_SYSTEM@//
+/^LIB_GCC *=/s/@LIB_GCC@/-Lgcc/
+/^LIB_STANDARD *=/s/@LIB_STANDARD@//
+/^LIB_MATH *=/s/@LIB_MATH@/-lm/
 /^LIBTIFF *=/s/@LIBTIFF@//
 /^LIBJPEG *=/s/@LIBJPEG@//
 /^LIBPNG *=/s/@LIBPNG@//
 /^LIBGIF *=/s/@LIBGIF@//
 /^LIBXPM *=/s/@LIBXPM@//
 /^XFT_LIBS *=/s/@XFT_LIBS@//
+/^FONTCONFIG_CFLAGS *=/s/@FONTCONFIG_CFLAGS@//
+/^FONTCONFIG_LIBS *=/s/@FONTCONFIG_LIBS@//
+/^FREETYPE_CFLAGS *=/s/@FREETYPE_CFLAGS@//
+/^FREETYPE_LIBS *=/s/@FREETYPE_LIBS@//
+/^LIBOTF_CFLAGS *=/s/@LIBOTF_CFLAGS@//
+/^LIBOTF_LIBS *=/s/@LIBOTF_LIBS@//
+/^M17N_FLT_CFLAGS *=/s/@M17N_FLT_CFLAGS@//
+/^M17N_FLT_LIBS *=/s/@M17N_FLT_LIBS@//
 /^DBUS_CFLAGS *=/s/@DBUS_CFLAGS@//
 /^DBUS_LIBS *=/s/@DBUS_LIBS@//
 /^DBUS_OBJ *=/s/@DBUS_OBJ@//
@@ -76,22 +89,32 @@
 /^RSVG_CFLAGS *=/s/@RSVG_CFLAGS@//
 /^WIDGET_OBJ *=/s/@WIDGET_OBJ@//
 /^CYGWIN_OBJ *=/s/@CYGWIN_OBJ@//
+/^MSDOS_OBJ *=/s/= */= dosfns.o msdos.o/
+/^MSDOS_SUPPORT *=/s/= */= $(MSDOS_SUPPORT_REAL)/
 /^NS_OBJ *=/s/@NS_OBJ@//
 /^NS_SUPPORT *=/s/@NS_SUPPORT@//
+/^GNU_OBJC_CFLAGS*=/s/@GNU_OBJC_CFLAGS@//
+/^GNUSTEP_SYSTEM_LIBRARIES *=/s/@GNUSTEP_SYSTEM_LIBRARIES@//
+/^LIBRESOLV *=/s/@LIBRESOLV@//
 /^LIBSELINUX_LIBS *=/s/@LIBSELINUX_LIBS@//
 /^GETLOADAVG_LIBS *=/s/@[^@\n]*@//
 /^START_FILES *=/s/@START_FILES@//
 /^OTHER_FILES *=/s/@OTHER_FILES@//
 /^XMENU_OBJ *=/s/@XMENU_OBJ@/xmenu.o/
-/^FONT_OBJ *=/s/@FONT_OBJ@/xfont.o ftfont.o xftfont.o ftxfont.o/
+/^FONT_OBJ *=/s/@FONT_OBJ@/xfont.o/
+/^MOUSE_SUPPORT *=/s/@MOUSE_SUPPORT@/$(REAL_MOUSE_SUPPORT)/
+/^TOOLTIP_SUPPORT *=/s/@TOOLTIP_SUPPORT@//
+/^WINDOW_SUPPORT *=/s/@WINDOW_SUPPORT@//
+/^LIBGPM *=/s/@LIBGPM@//
 /^EXEEXT *=/s/@EXEEXT@/.exe/
 /^PRE_ALLOC_OBJ *=/s/@PRE_ALLOC_OBJ@/lastfile.o/
 /^POST_ALLOC_OBJ *=/s/@POST_ALLOC_OBJ@/$(vmlimitobj)/
-s/@unexec@/unexec.o/g
+/^UNEXEC_OBJ *=/s/@unexec@/unexec.o/
 /^version *=/s/@[^@\n]*@//
 /^M_FILE *=/s!@[^@\n]*@!m/intel386.h!
 /^S_FILE *=/s!@[^@\n]*@!s/msdos.h!
 /^@SET_MAKE@$/s/@SET_MAKE@//
+/^@NS_IMPL_GNUSTEP_INC@/s/@NS_IMPL_GNUSTEP_INC@//
 /^.\${libsrc}make-docfile.*>/s!make-docfile!make-docfile -o ../etc/DOC!
 /^.\${libsrc}make-doc/s!>.*$!!
 /^[ 	]*$/d
--- a/msdos/sed1x.inp	Fri May 14 13:14:23 2010 +0900
+++ b/msdos/sed1x.inp	Fri May 14 13:15:58 2010 +0900
@@ -4,7 +4,13 @@
 s!^	cd \${oldXMenudir}; \${MAKE}.*$!	${MAKE} -C ${oldXMenudir}.!
 s!^	@true *$!	@rem!
 s/DOC/DOC-X/g
-#/^LIBXMENU *=/s!= *!= ../oldxmenu/!
+/^OLDXMENU *=/s!@OLDXMENU@!${oldXMenudir}libXMenu11.a!
+/^LIBXMENU *=/s!@LIBXMENU@!${OLDXMENU}!
+/^LIBX_OTHER *=/s!@LIBX_OTHER@!${LIBXT} ${LIBX_EXTRA}!
+/^LIBS_SYSTEM *=/s!= *!= -lxext -lsys!
+/^MSDOS_X_OBJ *=/s!= *!= w16select.o termcap.o!
+/^TOOLTIP_SUPPORT *=/s!= *!= ${lispsource}tooltip.elc!
+/^WINDOW_SUPPORT *=/s!= *!= $(BASE_WINDOW_SUPPORT) $(X_WINDOW_SUPPORT)!
 /^temacs *:/s!OLDXMENU!LIBXMENU!
 
 # arch-tag: 3e8a78f2-3dec-44f3-81f6-3785a562da19
--- a/msdos/sed2x.inp	Fri May 14 13:14:23 2010 +0900
+++ b/msdos/sed2x.inp	Fri May 14 13:15:58 2010 +0900
@@ -2,8 +2,8 @@
 # Extra configuration script for src/config.h for DesqView/X
 # ----------------------------------------------------------------------
 #
-# Copyright (C) 1994, 2001, 2002, 2003, 2004, 2005,
-#   2006, 2007, 2008, 2009, 2010  Free Software Foundation, Inc.
+# Copyright (C) 1994, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
+#   2009, 2010  Free Software Foundation, Inc.
 #
 # This file is part of GNU Emacs.
 #
@@ -17,6 +17,7 @@
 #
 # ----------------------------------------------------------------------
 /^#undef HAVE_X_WINDOWS *$/s/undef/define/
+/^#undef HAVE_WINDOW_SYSTEM *$/s/undef/define/
 /^#undef HAVE_X11 *$/s/undef/define/
 /^#undef HAVE_X_MENU *$/s/undef/define/
 /^#undef HAVE_XSCREENNUMBEROFSCREEN *$/s/undef/define/
--- a/msdos/sed3v2.inp	Fri May 14 13:14:23 2010 +0900
+++ b/msdos/sed3v2.inp	Fri May 14 13:15:58 2010 +0900
@@ -45,7 +45,6 @@
 /^GETOPT_H *=/s!@GETOPT_H@!getopt.h!
 /^GETOPTOBJS *=/s!@GETOPTOBJS@!getopt.o getopt1.o!
 /^INSTALLABLES/s/emacsclient *//
-/^INSTALLABLES/s/ @LIB_SRC_EXTRA_INSTALLABLES@//
 s!^	\./!	!
 /^UTILITIES=/s/ wakeup//
 /^UTILITIES=/s/ movemail//
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/msdos/sed3x.inp	Fri May 14 13:15:58 2010 +0900
@@ -0,0 +1,5 @@
+# -sed3x.inp------------------------------------------------------------
+# Extra configuration script for lib-src/makefile for DesqView/X
+# ----------------------------------------------------------------------
+/^LIBS_SYSTEM *=/s!= *!= -lxext -lsys!
+
--- a/nt/ChangeLog	Fri May 14 13:14:23 2010 +0900
+++ b/nt/ChangeLog	Fri May 14 13:15:58 2010 +0900
@@ -1,3 +1,7 @@
+2010-05-13  Glenn Morris  <rgm@gnu.org>
+
+	* config.nt (LD_SWITCH_X_SITE, C_SWITCH_X_SITE): Remove undefs.
+
 2010-05-07  Chong Yidong  <cyd@stupidchicken.com>
 
 	* Version 23.2 released.
@@ -112,7 +116,7 @@
 	* config.nt (HAVE_FACES): Remove, unused.
 
 2008-06-26  Juanma Barranquero  <lekktu@gmail.com>
-	    Eli Zaretskii  <eliz@gnu.org>
+            Eli Zaretskii  <eliz@gnu.org>
 
 	* nmake.defs (FONT_CFLAGS):
 	* gmake.defs (FONT_CFLAGS): Remove.
@@ -128,7 +132,7 @@
 	* config.nt: Remove reference to UNEXEC_SRC.
 
 2008-06-23  Juanma Barranquero  <lekktu@gmail.com>
-	    Eli Zaretskii  <eliz@gnu.org>
+            Eli Zaretskii  <eliz@gnu.org>
 
 	* gmake.defs (DEBUG_FLAG, DEBUG_LINK) [!NODEBUG]:
 	Don't hardcode -gstabs+, use DEBUG_INFO.
--- a/nt/config.nt	Fri May 14 13:14:23 2010 +0900
+++ b/nt/config.nt	Fri May 14 13:15:58 2010 +0900
@@ -1,6 +1,7 @@
 /* GNU Emacs site configuration template file.  -*- C -*-
-   Copyright (C) 1988, 1993, 1994, 2001, 2002, 2003, 2004, 2005, 2006,
-     2007, 2008, 2009, 2010  Free Software Foundation, Inc.
+
+Copyright (C) 1988, 1993, 1994, 2001, 2002, 2003, 2004, 2005, 2006,
+  2007, 2008, 2009, 2010  Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -318,20 +319,6 @@
 
 #define subprocesses
 
-/* Define LD_SWITCH_X_SITE to contain any special flags your loader
-   may need to deal with X Windows.  For instance, if you've defined
-   HAVE_X_WINDOWS above and your X libraries aren't in a place that
-   your loader can find on its own, you might want to add "-L/..." or
-   something similar.  */
-#undef LD_SWITCH_X_SITE
-
-/* Define C_SWITCH_X_SITE to contain any special flags your compiler
-   may need to deal with X Windows.  For instance, if you've defined
-   HAVE_X_WINDOWS above and your X include files aren't in a place
-   that your compiler can find on its own, you might want to add
-   "-I/..." or something similar.  */
-#undef C_SWITCH_X_SITE
-
 /* Define STACK_DIRECTION here, but not if m/foo.h did.  */
 #ifndef STACK_DIRECTION
 #undef STACK_DIRECTION
--- a/src/ChangeLog	Fri May 14 13:14:23 2010 +0900
+++ b/src/ChangeLog	Fri May 14 13:15:58 2010 +0900
@@ -17,6 +17,91 @@
 	(next_element_from_composition): Pay attention to
 	IT->cmp_it.reversed_p.
 
+2010-05-14  Kenichi Handa  <handa@m17n.org>
+
+	* font.c (font_range): Return the range for the font found at
+	first.
+
+2010-05-14  Glenn Morris  <rgm@gnu.org>
+
+	* Makefile.in (mktime, X11, register): Move undefs to configure.
+
+	* Makefile.in (MSDOS_OBJ): Default to empty, let msdos scripts set it.
+	(MSDOS_X_OBJ): New variable.
+	(MSDOS_SUPPORT_REAL): New constant.
+	(MSDOS_SUPPORT): Set as a variable, not with cpp.
+	(obj): Use MSDOS_X_OBJ.
+	(lisp): Use MSDOS_SUPPORT as a variable.
+
+	* Makefile.in (REAL_MOUSE_SUPPORT): New constant.
+	(GPM_MOUSE_SUPPORT): Now it's a constant.
+	(MOUSE_SUPPORT, TOOLTIP_SUPPORT, WINDOW_SUPPORT): Set with configure,
+	not cpp.
+
+	* Makefile.in (@NS_IMPL_GNUSTEP_INC@): Use in place of #ifdef.
+	(ns_appresdir): Remove, unused.
+
+	* Makefile.in (SHELL): Move outside cpp section.
+
+	* s/netbsd.h (AMPERSAND_FULL_NAME): Remove (defined in AH_BOTTOM).
+
+2010-05-13  Glenn Morris  <rgm@gnu.org>
+
+	* Makefile.in (FONT_DRIVERS): Place with other HAVE_X_WINDOWS stuff.
+	(TOOLTIP_SUPPORT): Place with other HAVE_WINDOW_SYSTEM stuff.
+
+	* Makefile.in (FONT_DRIVERS): If HAVE_X_WINDOWS is defined,
+	HAVE_WINDOW_SYSTEM must be too.
+
+	* Makefile.in (WINNT_SUPPORT): Remove, nt build does not use this file.
+	(lisp): Remove WINNT_SUPPORT.
+
+	* Makefile.in (OLDXMENU, LIBXMENU) [!HAVE_MENUS]:
+	Let configure set these variables (to empty) in this case as well.
+
+	* Makefile.in (LD_SWITCH_X_SITE): Define as a variable, not via cpp.
+	(LIBX_BASE): Use $LD_SWITCH_X_SITE.
+
+	* Makefile.in (C_SWITCH_X_SYSTEM, C_SWITCH_X_SITE, LIB_STANDARD)
+	(LIB_MATH, FONTCONFIG_CFLAGS, FONTCONFIG_LIBS, FREETYPE_CFLAGS)
+	(FREETYPE_LIBS, LIBOTF_CFLAGS, LIBOTF_LIBS, M17N_FLT_CFLAGS)
+	(M17N_FLT_LIBS, GNU_OBJC_CFLAGS, GNUSTEP_SYSTEM_LIBRARIES, LIBGPM)
+	(LIBRESOLV, UNEXEC_OBJ): For clarity, define variables to hold
+	the values output by configure.
+	(ALL_CFLAGS, obj, LIBES, temacs${EXEEXT}): Use the above variables.
+
+2010-05-12  Glenn Morris  <rgm@gnu.org>
+
+	* Makefile.in (YMF_PASS_LDFLAGS, LD, LINKER): Simplify the logic.
+	(LINKER_WAS_SPECIFIED): Remove.
+
+	* Makefile.in (LIB_GCC): Set using configure, not cpp.
+	(GNULIB_VAR) [!ORDINARY_LINK]: Always set to $LIB_GCC.
+	* m/arm.h (LIB_GCC) [GNU_LINUX]:
+	* s/cygwin.h (LIB_GCC):
+	* s/freebsd.h (LIB_GCC):
+	* s/gnu-linux.h (LIB_GCC):
+	* s/msdos.h (LIB_GCC):
+	* s/netbsd.h (LIB_GCC):
+	Move to configure.
+
+2010-05-11  Karel Klic  <kklic@redhat.com>
+
+	* ftfont.c: Fix incorrect parentheses of #if condition for
+	definining M17N_FLT_USE_NEW_FEATURE.
+
+2010-05-11  Glenn Morris  <rgm@gnu.org>
+
+	* Makefile.in (LIBS_SYSTEM) [MSDOS]: Do not reset.
+	* s/msdos.h (MSDOS_LIBS_SYSTEM): Remove.
+
+2010-05-10  Eli Zaretskii  <eliz@gnu.org>
+
+	* xdisp.c (init_iterator): Don't turn on bidi reordering in
+	unibyte buffers.  See
+	http://lists.gnu.org/archive/html/emacs-devel/2010-05/msg00263.html.
+>>>>>>> MERGE-SOURCE
+
 2010-05-10  Glenn Morris  <rgm@gnu.org>
 
 	* Makefile.in (LIBS_SYSTEM): Set using configure, not cpp.
@@ -750,7 +835,7 @@
 	(Frename_file): Preserve selinux context when renaming by copy-file.
 
 2010-04-21  Juanma Barranquero  <lekktu@gmail.com>
-	    Eli Zaretskii  <eliz@gnu.org>
+            Eli Zaretskii  <eliz@gnu.org>
 
 	Don't depend on cm.c or termcap.c on Windows, use stubs.
 	* makefile.w32-in (OBJ1): Remove cm.$(O) and termcap.$(O).
@@ -8941,7 +9026,7 @@
 	<after-change-functions>: Reflow docstrings.
 
 2008-08-04  Adrian Robert  <Adrian.B.Robert@gmail.com>
-	    Ken Raeburn  <raeburn@gnu.org>
+            Ken Raeburn  <raeburn@gnu.org>
 
 	Dock menu customization, based on a patch by Ken Raeburn, plus some
 	other fixes.
@@ -10006,7 +10091,7 @@
 	batch-compiling for bootstrap).
 
 2008-07-15  Chris Hall  <chris@web.workinglinux.com>  (tiny change)
-	    YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
+            YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
 
 	(make_initial_frame): Call init_frame_faces(f) in CANNOT_DUMP case --
 	fix crash due to different init order.
@@ -10624,7 +10709,7 @@
 	(USG_SHARED_LIBRARIES): Remove duplicate definition.
 
 2008-06-26  Juanma Barranquero  <lekktu@gmail.com>
-	    Eli Zaretskii  <eliz@gnu.org>
+            Eli Zaretskii  <eliz@gnu.org>
 
 	* makefile.w32-in (LOCAL_FLAGS):
 	Don't include WINDOWSNT, DOS_NT and _UCHAR_T.
@@ -10872,7 +10957,7 @@
 	the property of LFACE_FONT of LFACE (if any).
 
 2008-06-21  Seiji Zenitani  <zenitani@mac.com>
-	    Ryo Yoshitake  <ryo@shiftmode.net>
+            Ryo Yoshitake  <ryo@shiftmode.net>
 
 	* xterm.c (x_set_frame_alpha): Add x_catch_errors for bug#437.
 
@@ -11968,7 +12053,7 @@
 	* xterm.c (x_set_frame_alpha): Move declarations before statements.
 
 2008-05-21  Seiji Zenitani  <zenitani@mac.com>
-	    Ryo Yoshitake  <ryo@shiftmode.net>
+            Ryo Yoshitake  <ryo@shiftmode.net>
 
 	* frame.c (Qalpha): Add a new frame parameter `alpha'.
 	(Vframe_alpha_lower_limit): New variable.
--- a/src/ChangeLog.1	Fri May 14 13:14:23 2010 +0900
+++ b/src/ChangeLog.1	Fri May 14 13:15:58 2010 +0900
@@ -1187,7 +1187,7 @@
 	prompt.
 	(various): Pass window being displayed as arg to vmotion.
 	(various): Compute starting-hpos arg to compute_motion
-	 using minibuf_prompt_width if in minibuf starting at top.
+	using minibuf_prompt_width if in minibuf starting at top.
 
 	* window.c (Fdisplay_buffer & callers):
 	Take second arg, non-nil means do not use selected window
@@ -1645,8 +1645,8 @@
 	Use signal, not sigset, since we simulate signal on
 	all system versions when nec.
 
-	* buffer.c (syms_of_buffer, init_buffer_once,
-	            reset_buffer_local_variables):
+	* buffer.c (syms_of_buffer, init_buffer_once)
+	(reset_buffer_local_variables):
 	Define default-abbrev-mode, and init new buffers' abbrev-mode
 	from it.  Move definition of abbrev-mode here from abbrev.c.
 
@@ -2861,7 +2861,7 @@
 	* keymap.c, callint.c, minibuf.c, fns.c, commands.h:
 	Rename MinbufLocalMap to Vminibuffer_local_map, etc.
 	Rename minibuf-local-{,-ns,-completion,must-match}map,
-	 and DefLispVar them (document even!).
+	and DefLispVar them (document even!).
 	=> New lisp variables minibuffer-local-map, minibuffer-local-ns-map,
 	minibuffer-local-completion-map, minibuffer-local-must-match-map.
 
--- a/src/ChangeLog.2	Fri May 14 13:14:23 2010 +0900
+++ b/src/ChangeLog.2	Fri May 14 13:15:58 2010 +0900
@@ -984,7 +984,7 @@
 1988-01-06  Richard Stallman  (rms@frosted-flakes)
 
 	* s-hpux.h: Don't define nomultiplejobs, LDAV_SYMBOL, LIBS_DEBUG
-	 or BROKEN_FIONREAD.
+	or BROKEN_FIONREAD.
 	* m-hp9000s300.h: Define those four.
 	* s-hpux.h: Define BSTRING, and define bcopy, etc., as macros.
 
@@ -2817,7 +2817,7 @@
 1986-11-26  Richard M. Stallman  (rms@prep)
 
 	* sysdep.c (get_system_name):
-	 Eliminate internal static var in USG case.
+	Eliminate internal static var in USG case.
 
 	* lisp.h: New case testing and conversion macros
 	UPPERCASEP, LOWERCASEP, NOCASEP, UPCASE, DOWNCASE.
@@ -3852,7 +3852,7 @@
 	(so now (let ((case-fold-search t))) doesn't force buffer-localness)
 	However, setting a binding will still make it buffer-local.
 	(ie (let ((case-fold-search t)) (setq case-fold-search t))
-	 will cause case-fold-search be buffer-local even outside the let)
+	will cause case-fold-search be buffer-local even outside the let)
 
 	* xfns.c:
 	Preserve studlycaps: "Gnuemacs" => "GNU Emacs"
@@ -4452,16 +4452,16 @@
 	* search.c (Freplace_match): Delete unused some_multiletter_word init.
 	* alloc.c (gc_sweep): Delete unused next initializers.
 	* fns.c (concat): After error on non-int elt for string,
-	   do store the new value from the error handler.
+	do store the new value from the error handler.
 	* lread.c (read1): Comment out unused end =.
 	* lread.c (read_list): Delete unused tail =.
 	* data.c (Fmake_variable_buffer_local):
-	  If value type is Lisp_Some_Buffer_Local_Value,
-	  change it to Lisp_Buffer_Local_Value permanently.
+	If value type is Lisp_Some_Buffer_Local_Value,
+	change it to Lisp_Buffer_Local_Value permanently.
 	* undo.c (record_block): Delete unused cp =.
-	  Don't bother reallocing if n = 0 after first batch.
+	Don't bother reallocing if n = 0 after first batch.
 	* fileio.c (Fverify_visited_file_modtime):
-	  If CHECK_BUFFER changes buf, use the changed value.
+	If CHECK_BUFFER changes buf, use the changed value.
 
 1986-07-07  Richard M. Stallman  (rms@prep)
 
--- a/src/ChangeLog.3	Fri May 14 13:14:23 2010 +0900
+++ b/src/ChangeLog.3	Fri May 14 13:15:58 2010 +0900
@@ -14197,7 +14197,7 @@
 1989-12-14  Joseph Arceneaux  (jla@spiff)
 
 	* xfns.c: New variable Vx_no_window_manager.
-	 (Fx_track_pointer): If bufp < 0, abort.
+	(Fx_track_pointer): If bufp < 0, abort.
 
 	* xterm.c (XTread_socket): When leaving window, set x_mouse_x and
 	x_mouse_y to -1.
--- a/src/ChangeLog.4	Fri May 14 13:14:23 2010 +0900
+++ b/src/ChangeLog.4	Fri May 14 13:15:58 2010 +0900
@@ -4411,7 +4411,7 @@
 
 	* keyboard.c (read_key_sequence): Don't declare first_event; it is
 	no longer used.  Change "#if 0" for first_event reading to
-	 "#if defined (GOBBLE_FIRST_EVENT)".
+	"#if defined (GOBBLE_FIRST_EVENT)".
 
 1993-10-03  Brian J. Fox  (bfox@ai.mit.edu)
 
--- a/src/ChangeLog.5	Fri May 14 13:14:23 2010 +0900
+++ b/src/ChangeLog.5	Fri May 14 13:15:58 2010 +0900
@@ -6107,7 +6107,7 @@
 	* fileio.c (Fmake_symbolic_link, Ffile_accessible_directory_p,
 	Finsert_file_contents, auto_save_error, Fwrite_region): Likewise.
 	(Fcopy_file, build_annotations, Fdo_auto_save): Delete unused
-	 variables.
+	variables.
 
 1994-08-23  Richard Stallman  <rms@mole.gnu.ai.mit.edu>
 
--- a/src/ChangeLog.9	Fri May 14 13:14:23 2010 +0900
+++ b/src/ChangeLog.9	Fri May 14 13:15:58 2010 +0900
@@ -3913,7 +3913,7 @@
 2001-01-05  Gerd Moellmann  <gerd@gnu.org>
 
 	* sysdep.c: Don't prototype srandom; it takes an unsigned argument
-	 on some systems, and an unsigned long on others, like FreeBSD 4.1.
+	on some systems, and an unsigned long on others, like FreeBSD 4.1.
 
 2001-01-04  Gerd Moellmann  <gerd@gnu.org>
 
@@ -5161,9 +5161,9 @@
 	`vertical-line', `mode-line' and `header-line' events.
 
 	* xdisp.c (try_window_id): Avoid starting to display in the middle
-	 of a character, a TAB for instance.  This is easier than to set
-	 up the iterator exactly, and it's not a frequent case, so the
-	 additional effort wouldn't really pay off.
+	of a character, a TAB for instance.  This is easier than to set
+	up the iterator exactly, and it's not a frequent case, so the
+	additional effort wouldn't really pay off.
 
 2000-11-26  Andrew Choi  <akochoi@i-cable.com>
 
@@ -5196,9 +5196,9 @@
 2000-11-24  Gerd Moellmann  <gerd@gnu.org>
 
 	* xdisp.c (init_from_display_pos): If POS says we're already after
-	 an overlay string ending at POS, make sure to pop the iterator
-	 because it will be in front of that overlay string.  When POS is
-	 ZV, we've thereby also ``processed'' overlay strings at ZV.
+	an overlay string ending at POS, make sure to pop the iterator
+	because it will be in front of that overlay string.  When POS is
+	ZV, we've thereby also ``processed'' overlay strings at ZV.
 
 	* xfaces.c (lface_from_face_name): Function comment fix.
 
--- a/src/Makefile.in	Fri May 14 13:14:23 2010 +0900
+++ b/src/Makefile.in	Fri May 14 13:15:58 2010 +0900
@@ -1,7 +1,7 @@
 # Makefile for GNU Emacs.
 # Copyright (C) 1985, 1987, 1988, 1993, 1994, 1995, 1999, 2000, 2001, 2002,
-#               2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
-#               Free Software Foundation, Inc.
+#   2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+#   Free Software Foundation, Inc.
 
 # This file is part of GNU Emacs.
 
@@ -30,6 +30,7 @@
 # Some of the conditionals might be dead now.  Finding them and
 # deleting them would be fine.
 
+SHELL = /bin/sh
 
 # Here are the things that we expect ../configure to edit.
 # We use $(srcdir) explicitly in dependencies so as not to depend on VPATH.
@@ -72,25 +73,59 @@
 C_SWITCH_MACHINE=@C_SWITCH_MACHINE@
 ## System-specific CFLAGS.
 C_SWITCH_SYSTEM=@C_SWITCH_SYSTEM@
+
+## Currently only set if NS_IMPL_GNUSTEP.
+## C_SWITCH_X_SITE may override this.
+C_SWITCH_X_SYSTEM=@C_SWITCH_X_SYSTEM@
+
+## Define C_SWITCH_X_SITE to contain any special flags your compiler
+## may need to deal with X Windows.  For instance, if you've defined
+## HAVE_X_WINDOWS and your X include files aren't in a place that your
+## compiler can find on its own, you might want to add "-I/..." or
+## something similar.  This is normally set by configure.
+## This is used before C_SWITCH_X_SYSTEM and may override it.
+C_SWITCH_X_SITE=@C_SWITCH_X_SITE@
+
+## Define LD_SWITCH_X_SITE to contain any special flags your loader
+## may need to deal with X Windows.  For instance, if your X libraries
+## aren't in a place that your loader can find on its own, you might
+## want to add "-L/..." or something similar.  Only used if
+## HAVE_X_WINDOWS.
+## FIXME? configure sets a value for this, but it has never been
+## substituted in this or any other Makefile. Cf C_SWITCH_X_SITE.
+LD_SWITCH_X_SITE=
+
 ## This holds any special options for linking temacs only (ie, not
 ## used by configure).  Not used elsewhere because it sometimes
 ## contains options that have to do with using Emacs's crt0, 
 ## which are only good with temacs.
 LD_SWITCH_SYSTEM_TEMACS=@LD_SWITCH_SYSTEM_TEMACS@
+
 ## Next two must come before LD_SWITCH_SYSTEM.
 ## If needed, a -R option that says where to find X windows at run time.
 LD_SWITCH_X_SITE_AUX=@LD_SWITCH_X_SITE_AUX@
 ## As above, but using -rpath instead.
 LD_SWITCH_X_SITE_AUX_RPATH=@LD_SWITCH_X_SITE_AUX_RPATH@
+
 ## System-specific LDFLAGS.
 LD_SWITCH_SYSTEM=@LD_SWITCH_SYSTEM@
 LD_SWITCH_SYSTEM_EXTRA=@LD_SWITCH_SYSTEM_EXTRA@
+
 ## Flags to pass to ld only for temacs.
 TEMACS_LDFLAGS = $(LD_SWITCH_SYSTEM) $(LD_SWITCH_SYSTEM_EXTRA) $(LD_SWITCH_SYSTEM_TEMACS)
 
 ## Some systems define this to request special libraries.
 LIBS_SYSTEM=@LIBS_SYSTEM@
 
+## Where to find libgcc.a, if using gcc and necessary.
+LIB_GCC=@LIB_GCC@
+
+## May use $CRT_DIR.
+LIB_STANDARD=@LIB_STANDARD@
+
+## -lm, or empty.
+LIB_MATH=@LIB_MATH@
+
 LIBTIFF=@LIBTIFF@
 LIBJPEG=@LIBJPEG@
 LIBPNG=@LIBPNG@
@@ -99,6 +134,15 @@
 XFT_LIBS=@XFT_LIBS@
 LIBX_EXTRA=$(LIBTIFF) $(LIBJPEG) $(LIBPNG) $(LIBGIF) $(LIBXPM) -lX11 $(XFT_LIBS)
 
+FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@
+FONTCONFIG_LIBS = @FONTCONFIG_LIBS@
+FREETYPE_CFLAGS = @FREETYPE_CFLAGS@
+FREETYPE_LIBS = @FREETYPE_LIBS@
+LIBOTF_CFLAGS = @LIBOTF_CFLAGS@
+LIBOTF_LIBS = @LIBOTF_LIBS@
+M17N_FLT_CFLAGS = @M17N_FLT_CFLAGS@
+M17N_FLT_LIBS = @M17N_FLT_LIBS@
+
 DBUS_CFLAGS = @DBUS_CFLAGS@
 DBUS_LIBS = @DBUS_LIBS@
 DBUS_OBJ = @DBUS_OBJ@
@@ -140,15 +184,36 @@
 ## sheap.o if CYGWIN, otherwise empty.
 CYGWIN_OBJ=@CYGWIN_OBJ@
 
+## dosfns.o msdos.o if MSDOS.
+MSDOS_OBJ =
+## w16select.o termcap.o if MSDOS && HAVE_X_WINDOWS.
+MSDOS_X_OBJ =
+MSDOS_SUPPORT_REAL = ${lispsource}ls-lisp.elc ${lispsource}disp-table.elc \
+ ${lispsource}dos-fns.elc ${lispsource}dos-w32.elc ${lispsource}dos-vars.elc \
+ ${lispsource}term/internal.elc ${lispsource}term/pc-win.elc
+## $MSDOS_SUPPORT_REAL if MSDOS.
+MSDOS_SUPPORT = 
+
 NS_OBJ=@NS_OBJ@
 NS_SUPPORT=@NS_SUPPORT@
+## Next two only set if NS_IMPL_GNUSTEP.
+GNU_OBJC_CFLAGS=@GNU_OBJC_CFLAGS@
+GNUSTEP_SYSTEM_LIBRARIES=@GNUSTEP_SYSTEM_LIBRARIES@
 
-## Only used if HAVE_X_WINDOWS and HAVE_WINDOW_SYSTEM.
+## Only used if HAVE_X_WINDOWS.
 FONT_OBJ=@FONT_OBJ@
 
-## ${lispsource}mouse.elc if HAVE_GPM, otherwise empty.
-## Not used if HAVE_MOUSE.
-GPM_MOUSE_SUPPORT=@GPM_MOUSE_SUPPORT@
+## Used if HAVE_MOUSE.
+REAL_MOUSE_SUPPORT=${lispsource}mouse.elc ${lispsource}select.elc \
+  ${lispsource}scroll-bar.elc
+## Used if HAVE_GPM && !HAVE_MOUSE
+GPM_MOUSE_SUPPORT=${lispsource}mouse.elc
+LIBGPM = @LIBGPM@
+## Either of the two preceding options, or empty.
+MOUSE_SUPPORT=@MOUSE_SUPPORT@
+
+## ${lispsource}tooltip.elc if HAVE_WINDOW_SYSTEM, else empty.
+TOOLTIP_SUPPORT=@TOOLTIP_SUPPORT@
 
 BASE_WINDOW_SUPPORT=${lispsource}fringe.elc ${lispsource}image.elc \
   ${lispsource}international/fontset.elc ${lispsource}dnd.elc \
@@ -157,6 +222,13 @@
 X_WINDOW_SUPPORT=${lispsource}x-dnd.elc ${lispsource}term/common-win.elc \
   ${lispsource}term/x-win.elc ${lispsource}dynamic-setting.elc
 
+## If HAVE_X_WINDOWS, both the above
+## else if HAVE_WINDOW_SYSTEM (ie, HAVE_NS) just the former; else empty.
+WINDOW_SUPPORT=@WINDOW_SUPPORT@
+
+## -lresolv, or empty.
+LIBRESOLV = @LIBRESOLV@
+
 LIBSELINUX_LIBS = @LIBSELINUX_LIBS@
 
 INTERVALS_H = dispextern.h intervals.h composite.h
@@ -167,12 +239,11 @@
 
 START_FILES = @START_FILES@
 
+UNEXEC_OBJ = @unexec@
+
 # ========================== start of cpp stuff =======================
 /* From here on, comments must be done in C syntax.  */
 
-/* just to be sure the sh is used */
-SHELL=/bin/sh
-
 #define NOT_C_CODE
 #include "config.h"
 
@@ -180,42 +251,13 @@
 DEPFLAGS = -MMD -MF deps/$*.d
 #endif
 
-/* Do not let the file name mktime.c get messed up.  */
-#ifdef mktime
-#undef mktime
-#endif
-
-/* Use HAVE_X11 as an alias for X11 in this file
-   to avoid problems with X11 as a subdirectory name
-   in -I and other such options which pass through this file. */
-
-#ifdef X11
-#define HAVE_X11
-#undef X11
-#endif
-
-/* On some machines #define register is done in config;
-   do not let it interfere with this file.  */
-#undef register
-
-/* This macro is for switches specifically related to X Windows.  */
-#ifndef LD_SWITCH_X_SITE
-#define LD_SWITCH_X_SITE
-#endif
-
-#ifdef NS_IMPL_GNUSTEP
-/* Pull in stuff from GNUstep-make. */
-FOUNDATION_LIB=gnu
-GUI_LIB=gnu
-include @GNUSTEP_MAKEFILES@/Additional/base.make
-include @GNUSTEP_MAKEFILES@/Additional/gui.make
-shared=no
-#endif
+/* If NS_IMPL_GNUSTEP, some definitions and includes are expanded here.  */
+@NS_IMPL_GNUSTEP_INC@
 
 /* DO NOT use -R.  There is a special hack described in lastfile.c
    which is used instead.  Some initialized data areas are modified
    at initial startup, then labeled as part of the text area when
-   Emacs is dumped for the first time, and never changed again. */
+   Emacs is dumped for the first time, and never changed again.  */
 
 /* -Demacs is needed to make some files produce the correct version
    for use in Emacs.
@@ -224,10 +266,10 @@
    the information in ``config.h''.  */
 
 /* C_SWITCH_X_SITE must come before C_SWITCH_X_SYSTEM
-   since it may have -I options that should override those two.  */
+   since it may have -I options that should override those.  */
 /* MYCPPFLAGS only referenced in etc/DEBUG.  */
-ALL_CFLAGS=-Demacs -DHAVE_CONFIG_H $(MYCPPFLAGS) -I. -I${srcdir} ${C_SWITCH_MACHINE} ${C_SWITCH_SYSTEM} @C_SWITCH_X_SITE@ @C_SWITCH_X_SYSTEM@ ${CFLAGS_SOUND} ${RSVG_CFLAGS} ${DBUS_CFLAGS} ${GCONF_CFLAGS} ${CFLAGS} @FREETYPE_CFLAGS@ @FONTCONFIG_CFLAGS@ @LIBOTF_CFLAGS@ @M17N_FLT_CFLAGS@ ${DEPFLAGS}
-ALL_OBJC_CFLAGS=$(ALL_CFLAGS) @GNU_OBJC_CFLAGS@
+ALL_CFLAGS=-Demacs -DHAVE_CONFIG_H $(MYCPPFLAGS) -I. -I${srcdir} ${C_SWITCH_MACHINE} ${C_SWITCH_SYSTEM} ${C_SWITCH_X_SITE} ${C_SWITCH_X_SYSTEM} ${CFLAGS_SOUND} ${RSVG_CFLAGS} ${DBUS_CFLAGS} ${GCONF_CFLAGS} ${CFLAGS} ${FREETYPE_CFLAGS} ${FONTCONFIG_CFLAGS} ${LIBOTF_CFLAGS} ${M17N_FLT_CFLAGS} ${DEPFLAGS}
+ALL_OBJC_CFLAGS=$(ALL_CFLAGS) $(GNU_OBJC_CFLAGS)
 
 .SUFFIXES: .m
 .c.o:
@@ -242,29 +284,30 @@
 	$(CC) -c $(CPPFLAGS) $(ALL_OBJC_CFLAGS) $<
 
 #ifdef HAVE_X_WINDOWS
-/* This test needs to say in cpp for the time being, since s/msdos.h
-   defines HAVE_MENUS, and does not use the configure script.  */
-#ifdef HAVE_MENUS
 OLDXMENU=@OLDXMENU@
 LIBXMENU=@LIBXMENU@
-#else /* not HAVE_MENUS */
-OLDXMENU=
-LIBXMENU=
-#endif /* not HAVE_MENUS */
-
 LIBXT=$(TOOLKIT_LIBW) $(LIBXT_OTHER)
-LIBX_BASE=$(LIBXMENU) LD_SWITCH_X_SITE
+LIBX_BASE=$(LIBXMENU) $(LD_SWITCH_X_SITE)
 LIBX_OTHER=@LIBX_OTHER@
-#endif /* not HAVE_X_WINDOWS */
+FONT_DRIVERS=$(FONT_OBJ)
+#endif /* HAVE_X_WINDOWS */
+
 
-#ifndef ORDINARY_LINK
+/* A macro which other sections of Makefile can redefine to munge the
+   flags before they are passed to LD.  This is helpful if you have
+   redefined LD to something odd, like "gcc".
+   (The YMF prefix is a holdover from the old name "ymakefile".)  */
+#define YMF_PASS_LDFLAGS(flags) flags
+
+
+#ifdef ORDINARY_LINK
+LD = $(CC)
+
+#else /* not ORDINARY_LINK */
+GNULIB_VAR = $(LIB_GCC)
+
 /* Fix linking if compiled with GCC.  */
-#ifdef __GNUC__
-
-#ifdef LINKER
-#define LINKER_WAS_SPECIFIED
-#endif
-
+#if defined (__GNUC__) && ! defined (LINKER)
 /* Versions of GCC >= 2.0 put their library, libgcc.a, in obscure
    places that are difficult to figure out at make time.  Fortunately,
    these same versions allow you to pass arbitrary flags on to the
@@ -273,78 +316,31 @@
    Well, it is not quite perfect.  The "-nostdlib" keeps GCC from
    searching for libraries in its internal directories, so we have to
    ask GCC explicitly where to find libgcc.a.  */
-
-#ifndef LINKER
 #define LINKER $(CC) -nostdlib
-#endif
-
-#ifndef LIB_GCC
-/* Ask GCC where to find libgcc.a.  */
-#define LIB_GCC `$(CC) -print-libgcc-file-name`
-#endif /* not LIB_GCC */
-
-GNULIB_VAR = LIB_GCC
+/* GCC passes any argument prefixed with -Xlinker directly to the linker.
+   See prefix-args.c for an explanation of why we do not do this with the
+   shell''s ``for'' construct.  Note that sane people do not have '.' in
+   their paths, so we must use ./prefix-args.  */
+#undef YMF_PASS_LDFLAGS
+#define YMF_PASS_LDFLAGS(flags) `./prefix-args -Xlinker flags`
+#endif /* defined (__GNUC__) && ! defined (LINKER) */
 
-#ifndef LINKER_WAS_SPECIFIED
-/* GCC passes any argument prefixed with -Xlinker directly to the
-   linker.  See prefix-args.c for an explanation of why we do not do
-   this with the shell''s ``for'' construct.
-   Note that some people do not have '.'  in their paths, so we must
-   use ./prefix-args.  */
-#define YMF_PASS_LDFLAGS(flags) `./prefix-args -Xlinker flags`
-#else
-#define YMF_PASS_LDFLAGS(flags) flags
-#endif
-
-#else /* not __GNUC__ */
-GNULIB_VAR =
-
-#endif /* not __GNUC__ */
-#endif /* not ORDINARY_LINK */
-
-#ifdef ORDINARY_LINK
-LD = $(CC)
-#else
 #ifdef LINKER
 LD=LINKER
 #else /* not LINKER */
 LD=ld
 #endif /* not LINKER */
+
 #endif /* not ORDINARY_LINK */
 
-/* A macro which other sections of Makefile can redefine to munge the
-   flags before they are passed to LD.  This is helpful if you have
-   redefined LD to something odd, like "gcc".
-   (The YMF prefix is a holdover from the old name "ymakefile".)
-  */
-#ifndef YMF_PASS_LDFLAGS
-#define YMF_PASS_LDFLAGS(flags) flags
-#endif
-
-#ifdef MSDOS
-LIBS_SYSTEM = MSDOS_LIBS_SYSTEM
-#ifdef HAVE_X_WINDOWS
-MSDOS_OBJ = dosfns.o msdos.o
-#else
-MSDOS_OBJ = dosfns.o msdos.o w16select.o termcap.o
-#endif
-#endif
-
 #ifdef HAVE_NS
 ns_appdir=@ns_appdir@/
 ns_appbindir=@ns_appbindir@/
-ns_appresdir=@ns_appresdir@/
 ns_appsrc=@ns_appsrc@
 #endif  /* HAVE_NS */
 
-#ifdef HAVE_WINDOW_SYSTEM
-#ifdef HAVE_X_WINDOWS
-FONT_DRIVERS=$(FONT_OBJ)
-#endif /* HAVE_X_WINDOWS */
-#endif /* HAVE_WINDOW_SYSTEM */
-
-/* lastfile must follow all files
-   whose initialized data areas should be dumped as pure by dump-emacs.  */
+/* lastfile must follow all files whose initialized data areas should
+   be dumped as pure by dump-emacs.  */
 obj=    dispnew.o frame.o scroll.o xdisp.o menu.o $(XMENU_OBJ) window.o \
 	charset.o coding.o category.o ccl.o character.o chartab.o bidi.o \
 	cm.o term.o terminal.o xfaces.o $(XOBJ) $(GTK_OBJ) $(DBUS_OBJ) \
@@ -354,15 +350,14 @@
 	cmds.o casetab.o casefiddle.o indent.o search.o regex.o undo.o \
 	alloc.o data.o doc.o editfns.o callint.o \
 	eval.o floatfns.o fns.o font.o print.o lread.o \
-	syntax.o @unexec@ bytecode.o \
+	syntax.o $(UNEXEC_OBJ) bytecode.o \
 	process.o callproc.o \
 	region-cache.o sound.o atimer.o \
 	doprnt.o strftime.o intervals.o textprop.o composite.o md5.o \
-	$(MSDOS_OBJ) $(NS_OBJ) $(CYGWIN_OBJ) $(FONT_DRIVERS)
+	$(MSDOS_OBJ) $(MSDOS_X_OBJ) $(NS_OBJ) $(CYGWIN_OBJ) $(FONT_DRIVERS)
 
 /* Object files used on some machine or other.
-   These go in the DOC file on all machines
-   in case they are needed there.  */
+   These go in the DOC file on all machines in case they are needed.  */
 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 dbusbind.o \
@@ -394,47 +389,6 @@
 otherobj= $(TERMCAP_OBJ) $(PRE_ALLOC_OBJ) $(gmallocobj) $(rallocobj) \
   $(POST_ALLOC_OBJ) $(WIDGET_OBJ) $(LIBOBJS)
 
-#ifdef HAVE_MOUSE
-#define MOUSE_SUPPORT ${lispsource}mouse.elc \
-  ${lispsource}select.elc ${lispsource}scroll-bar.elc
-#else
-#define MOUSE_SUPPORT $(GPM_MOUSE_SUPPORT)
-#endif
-
-#ifdef MSDOS
-#define MSDOS_SUPPORT ${lispsource}ls-lisp.elc ${lispsource}disp-table.elc \
- ${lispsource}dos-fns.elc ${lispsource}dos-w32.elc ${lispsource}dos-vars.elc \
- ${lispsource}term/internal.elc ${lispsource}term/pc-win.elc
-
-#else
-#define MSDOS_SUPPORT
-#endif
-
-#ifdef HAVE_WINDOW_SYSTEM
-#ifdef HAVE_X_WINDOWS
-#define WINDOW_SUPPORT $(BASE_WINDOW_SUPPORT) $(X_WINDOW_SUPPORT)
-#else
-#define WINDOW_SUPPORT $(BASE_WINDOW_SUPPORT)
-#endif
-#else
-#define WINDOW_SUPPORT
-#endif
-
-#ifdef WINDOWSNT
-#define WINNT_SUPPORT ${lispsource}ls-lisp.elc ${lispsource}disp-table.elc \
-  ${lispsource}dos-w32.elc ${lispsource}w32-vars.elc \
-  ${lispsource}w32-fns.elc ${lispsource}term/common-win.elc \
-  ${lispsource}term/w32-win.elc
-#else
-#define WINNT_SUPPORT
-#endif
-
-#ifdef HAVE_WINDOW_SYSTEM
-#define TOOLTIP_SUPPORT ${lispsource}tooltip.elc
-#else
-#define TOOLTIP_SUPPORT
-#endif
-
 /* This is the platform-specific list of Lisp files loaded into the
    dumped Emacs.  It is arranged like this because it is easier to generate
    it semi-mechanically from loadup.el this way.
@@ -468,7 +422,7 @@
 	${lispsource}files.elc \
 	${lispsource}format.elc \
 	${lispsource}facemenu.elc \
-	MOUSE_SUPPORT \
+	${MOUSE_SUPPORT} \
 	${lispsource}emacs-lisp/float-sup.elc \
 	${lispsource}frame.elc \
 	${lispsource}help.elc \
@@ -531,10 +485,9 @@
 	${lispsource}vc-hooks.elc \
 	${lispsource}ediff-hook.elc \
 	${lispsource}epa-hook.elc \
-	TOOLTIP_SUPPORT \
-	MSDOS_SUPPORT \
-	WINNT_SUPPORT \
-	WINDOW_SUPPORT \
+	${TOOLTIP_SUPPORT} \
+	${MSDOS_SUPPORT} \
+	${WINDOW_SUPPORT} \
 	${NS_SUPPORT} \
 	${lispsource}widget.elc \
 	${lispsource}window.elc \
@@ -654,10 +607,10 @@
    with GCC, we might need gnulib again after them.  */
 
 LIBES = $(LOADLIBES) $(LIBS) $(LIBX_BASE) $(LIBX_OTHER) $(LIBSOUND) \
-   $(RSVG_LIBS) $(DBUS_LIBS) @LIBGPM@ @LIBRESOLV@ $(LIBS_SYSTEM) \
+   $(RSVG_LIBS) $(DBUS_LIBS) $(LIBGPM) $(LIBRESOLV) $(LIBS_SYSTEM) \
    $(LIBS_TERMCAP) $(GETLOADAVG_LIBS) ${GCONF_LIBS} ${LIBSELINUX_LIBS} \
-   @FREETYPE_LIBS@ @FONTCONFIG_LIBS@ @LIBOTF_LIBS@ @M17N_FLT_LIBS@ \
-   $(GNULIB_VAR) @LIB_MATH@ @LIB_STANDARD@ $(GNULIB_VAR)
+   $(FREETYPE_LIBS) $(FONTCONFIG_LIBS) $(LIBOTF_LIBS) $(M17N_FLT_LIBS) \
+   $(GNULIB_VAR) $(LIB_MATH) $(LIB_STANDARD) $(GNULIB_VAR)
 
 all: emacs${EXEEXT} $(OTHER_FILES)
 
@@ -702,7 +655,7 @@
 temacs${EXEEXT}: $(LOCALCPP) $(START_FILES) stamp-oldxmenu ${obj} ${otherobj} prefix-args${EXEEXT}
 #ifdef NS_IMPL_GNUSTEP
 	$(CC) -rdynamic YMF_PASS_LDFLAGS ( ${TEMACS_LDFLAGS} \
-	-L@GNUSTEP_SYSTEM_LIBRARIES@ -lgnustep-gui -lgnustep-base \
+	-L$(GNUSTEP_SYSTEM_LIBRARIES) -lgnustep-gui -lgnustep-base \
 	-lobjc $(CONFIG_SYSTEM_LIBS) -lpthread ) -o temacs \
 	${obj} ${otherobj} ${LIBES}
 #else
@@ -716,9 +669,8 @@
 
 #if defined (HAVE_X_WINDOWS) && defined (HAVE_X11) && defined (HAVE_MENUS) && ! defined (USE_GTK)
 
-/* We use stamp-xmenu with these two deps
-   to both ensure that lwlib gets remade based on its dependencies
-   in its own makefile,
+/* We use stamp-xmenu with these two deps to both ensure that lwlib
+   gets remade based on its dependencies in its own makefile,
    and remake temacs if lwlib gets changed by this.  */
 stamp-oldxmenu: ${OLDXMENU} ../src/$(OLDXMENU)
 	touch stamp-oldxmenu
@@ -772,6 +724,8 @@
 Eg callproc.c only depends on w32.h for WINDOWSNT builds.
 One way to fix this would be to replace w32.h (etc) by $(W32_H),
 a variable set by configure.  Does not seem worth the trouble.
+Since the w32 build does not even use this file, you might ask
+why these dependencies are here at all...
 
 nsgui.h: In fact, every .o file depends directly or indirectly on
 dispextern.h and hence nsgui.h under NS.  But the ones that actually
@@ -981,8 +935,8 @@
 xsettings.o: xterm.h xsettings.h lisp.h frame.h termhooks.h $(config_h) \
   dispextern.h keyboard.h systime.h coding.h composite.h blockinput.h atimer.h \
   termopts.h
-/* The files of Lisp proper */
 
+/* The files of Lisp proper.  */
 alloc.o: alloc.c process.h frame.h window.h buffer.h  puresize.h syssignal.h \
  keyboard.h blockinput.h atimer.h systime.h character.h lisp.h $(config_h) \
  $(INTERVALS_H) termhooks.h
@@ -1004,7 +958,7 @@
  charset.h lisp.h $(config_h) $(INTERVALS_H) termhooks.h coding.h msdos.h \
  systime.h frame.h blockinput.h atimer.h
 
-/* Text properties support */
+/* Text properties support.  */
 composite.o: composite.c buffer.h character.h coding.h font.h ccl.h \
 	 frame.h termhooks.h $(INTERVALS_H) window.h lisp.h $(config_h)
 intervals.o: intervals.c buffer.h $(INTERVALS_H) keyboard.h puresize.h \
@@ -1015,8 +969,7 @@
 #endif /* ! AUTO_DEPEND */
 
 /* System-specific programs to be made.
-   OTHER_FILES
-   select which of these should be compiled.  */
+   OTHER_FILES select which of these should be compiled.  */
 
 #ifdef HAVE_NS
 ${ns_appdir}: ${ns_appsrc}
--- a/src/config.in	Fri May 14 13:14:23 2010 +0900
+++ b/src/config.in	Fri May 14 13:15:58 2010 +0900
@@ -44,12 +44,6 @@
 /* Define to 1 if using `getloadavg.c'. */
 #undef C_GETLOADAVG
 
-/* Define C_SWITCH_X_SITE to contain any special flags your compiler may need
-   to deal with X Windows. For instance, if you've defined HAVE_X_WINDOWS
-   above and your X include files aren't in a place that your compiler can
-   find on its own, you might want to add "-I/..." or something similar. */
-#undef C_SWITCH_X_SITE
-
 /* Define to 1 for DGUX with <sys/dg_sys_info.h>. */
 #undef DGUX
 
@@ -488,6 +482,9 @@
 /* Define to 1 if you have a working `mmap' system call. */
 #undef HAVE_MMAP
 
+/* Define if you have mouse support. */
+#undef HAVE_MOUSE
+
 /* Define to 1 if you have the `mremap' function. */
 #undef HAVE_MREMAP
 
@@ -743,6 +740,9 @@
 /* Define to 1 if you have the <vfork.h> header file. */
 #undef HAVE_VFORK_H
 
+/* Define if you have a window system. */
+#undef HAVE_WINDOW_SYSTEM
+
 /* Define to 1 if `fork' works. */
 #undef HAVE_WORKING_FORK
 
@@ -804,12 +804,6 @@
 /* Define to use Kerberos 5 instead of Kerberos 4. */
 #undef KERBEROS5
 
-/* Define LD_SWITCH_X_SITE to contain any special flags your loader may need
-   to deal with X Windows. For instance, if you've defined HAVE_X_WINDOWS
-   above and your X libraries aren't in a place that your loader can find on
-   its own, you might want to add "-L/..." or something similar. */
-#undef LD_SWITCH_X_SITE
-
 /* Define to 1 if localtime caches TZ. */
 #undef LOCALTIME_CACHE
 
@@ -1016,12 +1010,6 @@
 #undef volatile
 
 
-/* If we're using X11/Carbon/GNUstep, define some consequences.  */
-#if defined(HAVE_X_WINDOWS) || defined(HAVE_NS)
-#define HAVE_WINDOW_SYSTEM
-#define HAVE_MOUSE
-#endif
-
 /* Define AMPERSAND_FULL_NAME if you use the convention
    that & in the full name stands for the login id.  */
 /* Turned on June 1996 supposing nobody will mind it.  */
@@ -1046,7 +1034,7 @@
 #endif
 #endif /* __FreeBSD__ || __NetBSD__ || __linux__  */
 
-/* If using GNU, then support inline function declarations. */
+/* If using GNU, then support inline function declarations.  */
 /* Don't try to switch on inline handling as detected by AC_C_INLINE
    generally, because even if non-gcc compilers accept `inline', they
    may reject `extern inline'.  */
@@ -1071,7 +1059,7 @@
 /* Set up some defines, C and LD flags for NeXTstep interface on GNUstep.
   (There is probably a better place to do this, but right now the Cocoa
    side does this in s/darwin.h and we cannot
-   parallel this exactly since GNUstep is multi-OS. */
+   parallel this exactly since GNUstep is multi-OS.  */
 #ifdef HAVE_NS
 # ifdef NS_IMPL_GNUSTEP
 /* GNUstep needs a bit more pure memory.  Of the existing knobs,
@@ -1168,7 +1156,7 @@
 #include "string.h"
 #endif
 #ifdef HAVE_STRINGS_H
-#include "strings.h"  /* May be needed for bcopy & al. */
+#include "strings.h"  /* May be needed for bcopy & al.  */
 #endif
 #ifdef HAVE_STDLIB_H
 #include <stdlib.h>
--- a/src/font.c	Fri May 14 13:14:23 2010 +0900
+++ b/src/font.c	Fri May 14 13:15:58 2010 +0900
@@ -3961,7 +3961,7 @@
      struct face *face;
      Lisp_Object string;
 {
-  EMACS_INT pos_byte, ignore, start, start_byte;
+  EMACS_INT pos_byte, ignore;
   int c;
   Lisp_Object font_object = Qnil;
 
@@ -3983,7 +3983,6 @@
       pos_byte = string_char_to_byte (string, pos);
     }
 
-  start = pos, start_byte = pos_byte;
   while (pos < *limit)
     {
       Lisp_Object category;
@@ -3992,6 +3991,10 @@
 	FETCH_CHAR_ADVANCE_NO_CHECK (c, pos, pos_byte);
       else
 	FETCH_STRING_CHAR_ADVANCE_NO_CHECK (c, string, pos, pos_byte);
+      category = CHAR_TABLE_REF (Vunicode_category_table, c);
+      if (EQ (category, QCf)
+	  || CHAR_VARIATION_SELECTOR_P (c))
+	continue;
       if (NILP (font_object))
 	{
 	  font_object = font_for_char (face, c, pos - 1, string);
@@ -3999,40 +4002,8 @@
 	    return Qnil;
 	  continue;
 	}
-
-      category = CHAR_TABLE_REF (Vunicode_category_table, c);
-      if (! EQ (category, QCf)
-	  && ! CHAR_VARIATION_SELECTOR_P (c)
-	  && font_encode_char (font_object, c) == FONT_INVALID_CODE)
-	{
-	  Lisp_Object f = font_for_char (face, c, pos - 1, string);
-	  EMACS_INT i, i_byte;
-
-
-	  if (NILP (f))
-	    {
-	      *limit = pos - 1;
-	      return font_object;
-	    }
-	  i = start, i_byte = start_byte;
-	  while (i < pos - 1)
-	    {
-
-	      if (NILP (string))
-		FETCH_CHAR_ADVANCE_NO_CHECK (c, i, i_byte);
-	      else
-		FETCH_STRING_CHAR_ADVANCE_NO_CHECK (c, string, i, i_byte);
-	      category = CHAR_TABLE_REF (Vunicode_category_table, c);
-	      if (! EQ (category, QCf)
-		  && ! CHAR_VARIATION_SELECTOR_P (c)
-		  && font_encode_char (f, c) == FONT_INVALID_CODE)
-		{
-		  *limit = pos - 1;
-		  return font_object;
-		}
-	    }
-	  font_object = f;
-	}
+      if (font_encode_char (font_object, c) == FONT_INVALID_CODE)
+	*limit = pos - 1;
     }
   return font_object;
 }
--- a/src/ftfont.c	Fri May 14 13:14:23 2010 +0900
+++ b/src/ftfont.c	Fri May 14 13:15:58 2010 +0900
@@ -1578,8 +1578,8 @@
 
 #ifdef HAVE_M17N_FLT
 
-#if ((LIBOTF_MAJOR_VERSION > 1) || (LIBOTF_RELEASE_NUMBER >= 10) \
-     && (M17NLIB_MAJOR_VERSION > 1) || (M17NLIB_MINOR_VERSION >= 6))
+#if (((LIBOTF_MAJOR_VERSION > 1) || (LIBOTF_RELEASE_NUMBER >= 10))	\
+     && ((M17NLIB_MAJOR_VERSION > 1) || (M17NLIB_MINOR_VERSION >= 6)))
 /* We can use the new feature of libotf and m17n-flt to handle the
    character encoding scheme introduced in Unicode 5.1 and 5.2 for
    some Agian scripts.  */
--- a/src/m/alpha.h	Fri May 14 13:14:23 2010 +0900
+++ b/src/m/alpha.h	Fri May 14 13:15:58 2010 +0900
@@ -1,6 +1,7 @@
 /* Machine description file for the alpha chip.
-   Copyright (C) 1994, 1997, 1999, 2001, 2002, 2003, 2004, 2005, 2006,
-                 2007, 2008, 2009, 2010  Free Software Foundation, Inc.
+
+Copyright (C) 1994, 1997, 1999, 2001, 2002, 2003, 2004, 2005, 2006,
+  2007, 2008, 2009, 2010  Free Software Foundation, Inc.
 
 Author: Rainer Schoepf
 (according to authors.el)
@@ -30,7 +31,6 @@
 
 /* Now define a symbol for the cpu type, if your compiler
    does not define it automatically.  */
-
 /* __alpha defined automatically */
 
 
@@ -75,12 +75,10 @@
 #else  /* not __ELF__ */
 
 /* Describe layout of the address space in an executing process.  */
-
 #define TEXT_START    0x120000000
 #define DATA_START    0x140000000
 
 /* The program to be used for unexec. */
-
 #define UNEXEC unexalpha.o
 
 #endif /* __ELF__ */
--- a/src/m/amdx86-64.h	Fri May 14 13:14:23 2010 +0900
+++ b/src/m/amdx86-64.h	Fri May 14 13:15:58 2010 +0900
@@ -1,6 +1,7 @@
 /* machine description file for AMD x86-64.
-   Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
-     Free Software Foundation, Inc.
+
+Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+  Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -17,16 +18,11 @@
 You should have received a copy of the GNU General Public License
 along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
-/* The following line tells the configuration script what sort of
-   operating system this machine is likely to run.
-   USUAL-OPSYS="linux"  */
-
 #define BITS_PER_LONG           64
 #define BITS_PER_EMACS_INT      64
 
 /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word
    is the most significant byte.  */
-
 #undef WORDS_BIG_ENDIAN
 
 /* Now define a symbol for the cpu type, if your compiler
@@ -44,15 +40,12 @@
    are always unsigned.
 
    This flag only matters if you use USE_LISP_UNION_TYPE.  */
-
 #define EXPLICIT_SIGN_EXTEND
 
 /* Data type of load average, as read out of kmem.  */
-
 #define LOAD_AVE_TYPE long
 
 /* Convert that into an integer that is 100 for a load average of 1.0  */
-
 #define LOAD_AVE_CVT(x) (int) (((double) (x)) * 100.0 / FSCALE)
 
 /* Define XPNTR to avoid or'ing with DATA_SEG_BITS */
--- a/src/m/arm.h	Fri May 14 13:14:23 2010 +0900
+++ b/src/m/arm.h	Fri May 14 13:15:58 2010 +0900
@@ -1,6 +1,7 @@
 /* Machine description file for ARM-based non-RISCiX machines.
-   Copyright (C) 1994, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
-                 2008, 2009, 2010  Free Software Foundation, Inc.
+
+Copyright (C) 1994, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
+  2009, 2010  Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -17,20 +18,11 @@
 You should have received a copy of the GNU General Public License
 along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
-
-
 /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word
    is the most significant byte.  */
-
 #undef WORDS_BIG_ENDIAN
 
 #define NO_REMAP
 
-/* armin76@gentoo.org reported that the lgcc_s flag is necessary to
-   build on ARM EABI under GNU/Linux (Bug#5518).  */
-#ifdef GNU_LINUX
-#define LIB_GCC -lgcc_s
-#endif
-
 /* arch-tag: 07856f0c-f0c8-4bd8-99af-0b7fa1e5ee42
    (do not change this comment) */
--- a/src/m/hp800.h	Fri May 14 13:14:23 2010 +0900
+++ b/src/m/hp800.h	Fri May 14 13:15:58 2010 +0900
@@ -1,6 +1,7 @@
 /* machine description file for hp9000 series 800 machines.
-   Copyright (C) 1987, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
-                 2008, 2009, 2010  Free Software Foundation, Inc.
+
+Copyright (C) 1987, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
+  2009, 2010  Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -17,14 +18,8 @@
 You should have received a copy of the GNU General Public License
 along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
-
-/* The following line tells the configuration script what sort of
-   operating system this machine is likely to run.
-   USUAL-OPSYS="hpux"  */
-
 /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word
    is the most significant byte.  */
-
 #define WORDS_BIG_ENDIAN
 
 /* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
@@ -32,7 +27,6 @@
    are always unsigned.
 
    This flag only matters if you use USE_LISP_UNION_TYPE.  */
-
 #define EXPLICIT_SIGN_EXTEND
 
 /* Systems with GCC don't need to lose. */
--- a/src/m/ia64.h	Fri May 14 13:14:23 2010 +0900
+++ b/src/m/ia64.h	Fri May 14 13:15:58 2010 +0900
@@ -1,7 +1,9 @@
 /* machine description file for the IA-64 architecture.
-   Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
-                 2008, 2009, 2010  Free Software Foundation, Inc.
-     Contributed by David Mosberger <davidm@hpl.hp.com>
+
+Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
+  2009, 2010  Free Software Foundation, Inc.
+
+Contributed by David Mosberger <davidm@hpl.hp.com>
 
 This file is part of GNU Emacs.
 
@@ -23,15 +25,12 @@
 
 /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word
    is the most significant byte.  */
-
 #undef WORDS_BIG_ENDIAN
 
 /* Now define a symbol for the cpu type, if your compiler
    does not define it automatically.  */
-
 /* __ia64__ defined automatically */
 
-
 /* Define the type to use.  */
 #define EMACS_INT		long
 #define EMACS_UINT		unsigned long
@@ -41,15 +40,12 @@
    are always unsigned.
 
    This flag only matters if you use USE_LISP_UNION_TYPE.  */
-
 #define EXPLICIT_SIGN_EXTEND
 
 /* Data type of load average, as read out of kmem.  */
-
 #define LOAD_AVE_TYPE		long
 
 /* Convert that into an integer that is 100 for a load average of 1.0  */
-
 #define LOAD_AVE_CVT(x) (int) (((double) (x)) * 100.0 / FSCALE)
 
 #ifdef __ELF__
--- a/src/m/ibmrs6000.h	Fri May 14 13:14:23 2010 +0900
+++ b/src/m/ibmrs6000.h	Fri May 14 13:15:58 2010 +0900
@@ -1,6 +1,7 @@
 /* R2 AIX machine/system dependent defines
-   Copyright (C) 1988, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
-                 2009, 2010  Free Software Foundation, Inc.
+
+Copyright (C) 1988, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
+  2009, 2010  Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -21,7 +22,6 @@
 /* The data segment in this machine always starts at address 0x20000000.
    An address of data cannot be stored correctly in a Lisp object;
    we always lose the high bits.  We must tell XPNTR to add them back.  */
-
 #define TEXT_START 0x10000000
 #define DATA_START 0x20000000
 #define WORDS_BIG_ENDIAN
--- a/src/m/ibms390.h	Fri May 14 13:14:23 2010 +0900
+++ b/src/m/ibms390.h	Fri May 14 13:15:58 2010 +0900
@@ -1,6 +1,7 @@
 /* machine description file template.
-   Copyright (C) 1985, 1986, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
-                 2008, 2009, 2010 Free Software Foundation, Inc.
+
+Copyright (C) 1985, 1986, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
+  2008, 2009, 2010  Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
--- a/src/m/ibms390x.h	Fri May 14 13:14:23 2010 +0900
+++ b/src/m/ibms390x.h	Fri May 14 13:15:58 2010 +0900
@@ -1,6 +1,7 @@
 /* machine description file for IBM S390 in 64-bit mode
-   Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
-     Free Software Foundation, Inc.
+
+Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+  Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -20,7 +21,6 @@
 /* This file was made by copying the significant parts of amdx86-64.h
    into ibms390.h.  */
 
-
 /* Used for machine IBM s390 64 bits with opsys gnu-linux.  */
 #define BITS_PER_LONG 64
 #define BITS_PER_EMACS_INT 64
--- a/src/m/intel386.h	Fri May 14 13:14:23 2010 +0900
+++ b/src/m/intel386.h	Fri May 14 13:15:58 2010 +0900
@@ -1,6 +1,7 @@
 /* Machine description file for intel 386.
-   Copyright (C) 1987, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
-                 2009, 2010  Free Software Foundation, Inc.
+
+Copyright (C) 1987, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
+  2009, 2010  Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
--- a/src/m/iris4d.h	Fri May 14 13:14:23 2010 +0900
+++ b/src/m/iris4d.h	Fri May 14 13:15:58 2010 +0900
@@ -1,6 +1,7 @@
 /* machine description file for Iris-4D machines.  Use with s/irix*.h.
-   Copyright (C) 1987, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
-                 2008, 2009, 2010  Free Software Foundation, Inc.
+
+Copyright (C) 1987, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
+  2009, 2010  Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -20,7 +21,6 @@
 
 /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word
    is the most significant byte.  */
-
 #define WORDS_BIG_ENDIAN
 
 /* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
@@ -28,17 +28,13 @@
    are always unsigned.
 
    This flag only matters if you use USE_LISP_UNION_TYPE.  */
-
 #define EXPLICIT_SIGN_EXTEND
 
 #define TEXT_START 0x400000
 
-/*
- * DATA_SEG_BITS forces extra bits to be or'd in with any pointers which
- * were stored in a Lisp_Object (as Emacs uses fewer than 32 bits for
- * the value field of a LISP_OBJECT).
- */
-
+/* DATA_SEG_BITS forces extra bits to be or'd in with any pointers which
+   were stored in a Lisp_Object (as Emacs uses fewer than 32 bits for
+   the value field of a LISP_OBJECT).  */
 #define DATA_START 0x10000000
 #define DATA_SEG_BITS	0x10000000
 
@@ -48,7 +44,6 @@
 
 /* The standard definitions of these macros would work ok,
    but these are faster because the constants are short.  */
-
 #define XUINT(a) (((unsigned)(a) << BITS_PER_INT-VALBITS) >> BITS_PER_INT-VALBITS)
 
 #define XSET(var, type, ptr) \
--- a/src/m/m68k.h	Fri May 14 13:14:23 2010 +0900
+++ b/src/m/m68k.h	Fri May 14 13:15:58 2010 +0900
@@ -1,6 +1,7 @@
 /* Machine description file for generic Motorola 68k.
-   Copyright (C) 1985, 1995, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
-                 2008, 2009, 2010  Free Software Foundation, Inc.
+
+Copyright (C) 1985, 1995, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
+  2008, 2009, 2010  Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -19,12 +20,10 @@
 
 /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word
    is the most significant byte.  */
-
 #define WORDS_BIG_ENDIAN
 
 /* Now define a symbol for the cpu type, if your compiler
    does not define it automatically.  */
-
 #ifndef m68k
 #define m68k
 #endif
@@ -34,7 +33,6 @@
    are always unsigned.
 
    This flag only matters if you use USE_LISP_UNION_TYPE.  */
-
 #define EXPLICIT_SIGN_EXTEND
 
 #ifdef GNU_LINUX
--- a/src/m/macppc.h	Fri May 14 13:14:23 2010 +0900
+++ b/src/m/macppc.h	Fri May 14 13:15:58 2010 +0900
@@ -1,6 +1,7 @@
 /* machine description file For the powerpc Macintosh.
-   Copyright (C) 1994, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
-                 2008, 2009, 2010  Free Software Foundation, Inc.
+
+Copyright (C) 1994, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
+  2009, 2010  Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -19,15 +20,12 @@
 
 /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word
    is the most significant byte.  */
-
 #define WORDS_BIG_ENDIAN
 
 /* Data type of load average, as read out of kmem.  */
-
 #define LOAD_AVE_TYPE long
 
 /* Convert that into an integer that is 100 for a load average of 1.0  */
-
 #define LOAD_AVE_CVT(x) (int) (((double) (x)) * 100.0 / FSCALE)
 
 #if (defined (__NetBSD__) || defined (__OpenBSD__)) && defined (__ELF__)
@@ -36,7 +34,6 @@
 
 /* NAKAJI Hiroyuki <nakaji@tutrp.tut.ac.jp> says this is needed
    For MkLinux/LinuxPPC.  */
-
 #ifdef GNU_LINUX
 #define LINKER $(CC) -nostdlib
 #endif
--- a/src/m/mips.h	Fri May 14 13:14:23 2010 +0900
+++ b/src/m/mips.h	Fri May 14 13:15:58 2010 +0900
@@ -1,6 +1,7 @@
 /* m- file for Mips machines.
-   Copyright (C) 1987, 1992, 1999, 2001, 2002, 2003, 2004, 2005, 2006,
-                 2007, 2008, 2009, 2010  Free Software Foundation, Inc.
+
+Copyright (C) 1987, 1992, 1999, 2001, 2002, 2003, 2004, 2005, 2006,
+  2007, 2008, 2009, 2010  Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -17,18 +18,8 @@
 You should have received a copy of the GNU General Public License
 along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
-
-/* The following line tells the configuration script what sort of
-   operating system this machine is likely to run.
-   USUAL-OPSYS="note"
-
-NOTE-START
-This is used on GNU/Linux and netbsd.
-NOTE-END  */
-
 /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word
    is the most significant byte.  */
-
 #if ! (defined (__MIPSEL__) || defined (MIPSEL) || defined (_MIPSEL))
 #define WORDS_BIG_ENDIAN
 #endif
@@ -38,13 +29,10 @@
    are always unsigned.
 
    This flag only matters if you use USE_LISP_UNION_TYPE.  */
-
 #define EXPLICIT_SIGN_EXTEND
 
 /* Describe layout of the address space in an executing process.  */
-
 #define TEXT_START      0x00400000
 
 /* arch-tag: 8fd020ee-78a7-4d87-96ce-6129f52f7bee
    (do not change this comment) */
-
--- a/src/m/sparc.h	Fri May 14 13:14:23 2010 +0900
+++ b/src/m/sparc.h	Fri May 14 13:15:58 2010 +0900
@@ -1,6 +1,7 @@
 /* machine description file for Sun 4 SPARC.
-   Copyright (C) 1987, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
-                 2009, 2010  Free Software Foundation, Inc.
+
+Copyright (C) 1987, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
+  2009, 2010  Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
--- a/src/m/template.h	Fri May 14 13:14:23 2010 +0900
+++ b/src/m/template.h	Fri May 14 13:15:58 2010 +0900
@@ -1,6 +1,7 @@
 /* machine description file template.
-   Copyright (C) 1985, 1986, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
-                 2008, 2009, 2010  Free Software Foundation, Inc.
+
+Copyright (C) 1985, 1986, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
+  2008, 2009, 2010  Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -17,14 +18,8 @@
 You should have received a copy of the GNU General Public License
 along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
-
-/* The following line tells the configuration script what sort of
-   operating system this machine is likely to run.
-   USUAL-OPSYS="<name of system .h file here, without the s- or .h>"  */
-
 /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word
    is the most significant byte.  */
-
 #define WORDS_BIG_ENDIAN
 
 /* Now define a symbol for the cpu type, if your compiler
@@ -36,21 +31,17 @@
    are always unsigned.
 
    This flag only matters if you use USE_LISP_UNION_TYPE.  */
-
 #define EXPLICIT_SIGN_EXTEND
 
 /* Data type of load average, as read out of kmem.  */
-
 #define LOAD_AVE_TYPE long
 
 /* Convert that into an integer that is 100 for a load average of 1.0  */
-
 #define LOAD_AVE_CVT(x) (int) (((double) (x)) * 100.0 / FSCALE)
 
 /* Define CANNOT_DUMP on machines where unexec does not work.
    Then the function dump-emacs will not be defined
    and temacs will do (load "loadup") automatically unless told otherwise.  */
-
 #define CANNOT_DUMP
 
 /* Define VIRT_ADDR_VARIES if the virtual addresses of
@@ -59,31 +50,25 @@
 
    Otherwise Emacs assumes that text space precedes data space,
    numerically.  */
-
 #define VIRT_ADDR_VARIES
 
 /* Define NO_REMAP if memory segmentation makes it not work well
    to change the boundary between the text section and data section
    when Emacs is dumped.  If you define this, the preloaded Lisp
    code will not be sharable; but that's better than failing completely.  */
-
 #define NO_REMAP
 
 /* Some really obscure 4.2-based systems (like Sequent DYNIX)
- * do not support asynchronous I/O (using SIGIO) on sockets,
- * even though it works fine on tty's.  If you have one of
- * these systems, define the following, and then use it in
- * config.h (or elsewhere) to decide when (not) to use SIGIO.
- *
- * You'd think this would go in an operating-system description file,
- * but since it only occurs on some, but not all, BSD systems, the
- * reasonable place to select for it is in the machine description
- * file.
- */
+   do not support asynchronous I/O (using SIGIO) on sockets,
+   even though it works fine on tty's.  If you have one of
+   these systems, define the following, and then use it in
+   config.h (or elsewhere) to decide when (not) to use SIGIO.
 
+   You'd think this would go in an operating-system description file,
+   but since it only occurs on some, but not all, BSD systems, the
+   reasonable place to select for it is in the machine description file.  */
 #define NO_SOCK_SIGIO
 
-
 /* After adding support for a new system, modify the large case
    statement in the `configure' script to recognize reasonable
    configuration names, and add a description of the system to
--- a/src/m/vax.h	Fri May 14 13:14:23 2010 +0900
+++ b/src/m/vax.h	Fri May 14 13:15:58 2010 +0900
@@ -1,6 +1,7 @@
 /* machine description file for vax.
-   Copyright (C) 1985, 1986, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
-                 2008, 2009, 2010  Free Software Foundation, Inc.
+
+Copyright (C) 1985, 1986, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
+  2008, 2009, 2010  Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
--- a/src/s/aix4-2.h	Fri May 14 13:14:23 2010 +0900
+++ b/src/s/aix4-2.h	Fri May 14 13:15:58 2010 +0900
@@ -17,68 +17,48 @@
 You should have received a copy of the GNU General Public License
 along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
-/*
- *	Define symbols to identify the version of Unix this is.
- *	Define all the symbols that apply correctly.
- */
-
+/* Define symbols to identify the version of Unix this is.
+   Define all the symbols that apply correctly.  */
 #define USG				/* System III, System V, etc */
 #define USG5
 
-/*      This symbol should be defined on AIX Version 3  ??????? */
+/* This symbol should be defined on AIX Version 3  ??????? */
 #ifndef _AIX
 #define _AIX
 #endif
 
 /* SYSTEM_TYPE should indicate the kind of system you are using.
  It sets the Lisp variable system-type.  */
-
 #define SYSTEM_TYPE "aix"
 
 /* In AIX, you allocate a pty by opening /dev/ptc to get the master side.
    To get the name of the slave side, you just ttyname() the master side.  */
-
 #define PTY_ITERATION for (c = 0; !c ; c++)
 #define PTY_NAME_SPRINTF strcpy (pty_name, "/dev/ptc");
 #define PTY_TTY_NAME_SPRINTF strcpy (pty_name, ttyname (fd));
 
-/*
- *	Define HAVE_TERMIO if the system provides sysV-style ioctls
- *	for terminal control.
- */
-
+/* Define HAVE_TERMIO if the system provides sysV-style ioctls
+   for terminal control.  */
 #define HAVE_TERMIOS
 
-/*
- *	Define HAVE_PTYS if the system supports pty devices.
- */
-
+/* Define HAVE_PTYS if the system supports pty devices.  */
 #define HAVE_PTYS
 
 /* Define HAVE_SOCKETS if system supports 4.2-compatible sockets.  */
-
 #define HAVE_SOCKETS
 
 
-/*
- * 	Define SYSV_SYSTEM_DIR to use the V.3 getdents/readir
- *	library functions.  Almost, but not quite the same as
- *	the 4.2 functions
- */
-
+/* Define SYSV_SYSTEM_DIR to use the V.3 getdents/readir library
+   functions.  Almost, but not quite the same as the 4.2 functions.  */
 #define SYSV_SYSTEM_DIR
 
-/* Define this symbol if your system has the functions bcopy, etc. */
-
+/* Define this symbol if your system has the functions bcopy, etc.  */
 #define BSTRING
 
 /* The file containing the kernel's symbol table is called /unix.  */
-
 #define KERNEL_FILE "/unix"
 
-/* The symbol in the kernel where the load average is found
-   is named avenrun.  */
-
+/* The kernel symbol where the load average is found is named avenrun.  */
 #define LDAV_SYMBOL "avenrun"
 
 /* Special itemss needed to make Emacs run on this system.  */
@@ -125,8 +105,7 @@
    that shared library.
 
    Emacs currently calls xrealloc on the results of get_current_dir name,
-   to avoid a crash just use the Emacs implementation for that function.
-*/
+   to avoid a crash just use the Emacs implementation for that function.  */
 #define BROKEN_GET_CURRENT_DIR_NAME 1
 
 #define UNEXEC unexaix.o
--- a/src/s/bsd-common.h	Fri May 14 13:14:23 2010 +0900
+++ b/src/s/bsd-common.h	Fri May 14 13:15:58 2010 +0900
@@ -19,8 +19,8 @@
 along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 
-/*      Define symbols to identify the version of Unix this is.
- *	Define all the symbols that apply correctly.   */
+/* Define symbols to identify the version of Unix this is.
+   Define all the symbols that apply correctly.   */
 
 /* We give these symbols the numeric values found in <sys/param.h> to
    avoid warnings about redefined macros.  */
@@ -84,8 +84,7 @@
 /* The file containing the kernel's symbol table is called /vmunix.  */
 #define KERNEL_FILE "/vmunix"
 
-/* The symbol in the kernel where the load average is found
-   is named _avenrun.  */
+/* The kernel symbol where the load average is found is named _avenrun.  */
 #define LDAV_SYMBOL "_avenrun"
 
 /* Send signals to subprocesses by "typing" special chars at them.  */
--- a/src/s/cygwin.h	Fri May 14 13:14:23 2010 +0900
+++ b/src/s/cygwin.h	Fri May 14 13:15:58 2010 +0900
@@ -1,6 +1,7 @@
 /* System description header file for Cygwin.
-   Copyright (C) 1985, 1986, 1992, 1999, 2002, 2003, 2004, 2005, 2006,
-                 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+
+Copyright (C) 1985, 1986, 1992, 1999, 2002, 2003, 2004, 2005, 2006,
+  2007, 2008, 2009, 2010 Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -19,7 +20,6 @@
 
 /* SYSTEM_TYPE should indicate the kind of system you are using.
  It sets the Lisp variable system-type.  */
-
 #define SYSTEM_TYPE "cygwin"
 
 /* Emacs can read input using SIGIO and buffering characters itself,
@@ -43,26 +43,19 @@
    It would have Emacs fork off a separate process
    to read the input and send it to the true Emacs process
    through a pipe. */
-
 #undef INTERRUPT_INPUT
 
-/*
- *	Define HAVE_TERMIOS if the system provides POSIX-style
- *	functions and macros for terminal control.
- *
- *	Define HAVE_TERMIO if the system provides sysV-style ioctls
- *	for terminal control.
- *
- *	Do not define both.  HAVE_TERMIOS is preferred, if it is
- *	supported on your system.
- */
+/* Define HAVE_TERMIOS if the system provides POSIX-style
+   functions and macros for terminal control.
 
+   Define HAVE_TERMIO if the system provides sysV-style ioctls
+   for terminal control.
+
+   Do not define both.  HAVE_TERMIOS is preferred, if it is
+   supported on your system.  */
 #define HAVE_TERMIOS
 
-/*
- *	Define HAVE_PTYS if the system supports pty devices.
- */
-
+/* Define HAVE_PTYS if the system supports pty devices.  */
 #define HAVE_PTYS
 #define PTY_ITERATION		for (i = 0; i < 1; i++) /* ick */
 #define PTY_NAME_SPRINTF	/* none */
@@ -81,13 +74,11 @@
   while (0)
 
 /* Define this symbol if your system has the functions bcopy, etc. */
-
 #define BSTRING
 
 /* Define CLASH_DETECTION if you want lock files to be written
    so that Emacs can tell instantly when you try to modify
    a file that someone else has modified in his Emacs.  */
-
 #define CLASH_DETECTION
 
 /* If the system's imake configuration file defines `NeedWidePrototypes'
@@ -95,10 +86,9 @@
    generated in the Makefile generated by `xmkmf'.  If we don't
    define NARROWPROTO, we will see the wrong function prototypes
    for X functions taking float or double parameters.  */
-
 #define NARROWPROTO 1
 
-/* used in various places to enable cygwin-specific code changes */
+/* Used in various places to enable cygwin-specific code changes.  */
 #define CYGWIN 1
 
 #define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_p - (FILE)->_bf._base)
@@ -127,10 +117,5 @@
    returns ENOSYS.  A workaround is to set G_SLICE=always-malloc. */
 #define G_SLICE_ALWAYS_MALLOC
 
-/* Don't link against static libgcc */
-#define LIB_GCC
-
-/* the end */
-
 /* arch-tag: 5ae7ba00-83b0-4ab3-806a-3e845779191b
    (do not change this comment) */
--- a/src/s/darwin.h	Fri May 14 13:14:23 2010 +0900
+++ b/src/s/darwin.h	Fri May 14 13:15:58 2010 +0900
@@ -19,9 +19,8 @@
 along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 
-/*	Define symbols to identify the version of Unix this is.
- *	Define all the symbols that apply correctly.  */
-
+/* Define symbols to identify the version of Unix this is.
+   Define all the symbols that apply correctly.  */
 #define BSD4_2
 /* BSD4_3 and BSD4_4 are already defined in sys/param.h */
 #define BSD_SYSTEM
@@ -29,12 +28,12 @@
 /* More specific than the above two.  We cannot use __APPLE__ as this
    may not be defined on non-OSX Darwin, and we cannot define DARWIN
    here because Panther and lower CoreFoundation.h uses DARWIN to
-   distinguish OS X from pure Darwin. */
+   distinguish OS X from pure Darwin.  */
 #define DARWIN_OS
 
 
 /* SYSTEM_TYPE should indicate the kind of system you are using.
- It sets the Lisp variable system-type.  */
+   It sets the Lisp variable system-type.  */
 #define SYSTEM_TYPE "darwin"
 
 /* Emacs can read input using SIGIO and buffering characters itself,
@@ -64,26 +63,21 @@
   if system supports pty's.  'a' means it is /dev/ptya0  */
 #define FIRST_PTY_LETTER 'p'
 
-/*
- *	Define HAVE_TERMIOS if the system provides POSIX-style
- *	functions and macros for terminal control.
- *
- *	Define HAVE_TERMIO if the system provides sysV-style ioctls
- *	for terminal control.
- *
- *	Do not define both.  HAVE_TERMIOS is preferred, if it is
- *	supported on your system.
- */
+/* Define HAVE_TERMIOS if the system provides POSIX-style
+   functions and macros for terminal control.
+
+   Define HAVE_TERMIO if the system provides sysV-style ioctls
+   for terminal control.
+
+   Do not define both.  HAVE_TERMIOS is preferred, if it is supported
+   on your system. */
 #define HAVE_TERMIOS
 #define NO_TERMIO
 
-/*
- *	Define HAVE_PTYS if the system supports pty devices.
- *      Note: PTYs are broken on darwin <6.  Use at your own risk.
- */
+/* Define HAVE_PTYS if the system supports pty devices.
+   Note: PTYs are broken on darwin <6.  Use at your own risk.  */
 #define HAVE_PTYS
-/* Run only once.  We need a `for'-loop because the code uses
-   `continue'.  */
+/* Run only once.  We need a `for'-loop because the code uses `continue'.  */
 #define PTY_ITERATION	for (i = 0; i < 1; i++)
 #define PTY_NAME_SPRINTF	/* none */
 #define PTY_TTY_NAME_SPRINTF	/* none */
@@ -101,11 +95,8 @@
     }								\
   while (0)
 
-/**
- * PTYs only work correctly on Darwin 7 or higher.  So make the
- * default for process-connection-type dependent on the kernel
- * version.
- */
+/* PTYs only work correctly on Darwin 7 or higher.  So make the default
+   for process-connection-type dependent on the kernel version.  */
 #define MIN_PTY_KERNEL_VERSION '7'
 
 /* Define this symbol if your system has the functions bcopy, etc. */
@@ -123,12 +114,10 @@
 /* Used in dispnew.c.  Copied from freebsd.h. */
 #define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_p - (FILE)->_bf._base)
 
-/* System uses OXTABS instead of the expected TAB3.  (Copied from
-   bsd386.h.)  */
+/* System uses OXTABS instead of the expected TAB3.  (Copied from bsd386.h.)  */
 #define TAB3 OXTABS
 
-/* Darwin ld insists on the use of malloc routines in the System
-   framework.  */
+/* Darwin ld insists on the use of malloc routines in the System framework.  */
 #define SYSTEM_MALLOC
 
 /* Define HAVE_SOCKETS if system supports 4.2-compatible sockets.  */
@@ -154,8 +143,7 @@
 #define malloc unexec_malloc
 #define realloc unexec_realloc
 #define free unexec_free
-/* Don't use posix_memalign because it is not compatible with
-   unexmacosx.c.  */
+/* Don't use posix_memalign because it is not compatible with unexmacosx.c.  */
 #undef HAVE_POSIX_MEMALIGN
 #endif
 
@@ -183,8 +171,7 @@
    ioctl TIOCSCTTY.  */
 #define DONT_REOPEN_PTY
 
-/* Use the GC_MAKE_GCPROS_NOOPS (see lisp.h) method for marking the
-   stack.  */
+/* Use the GC_MAKE_GCPROS_NOOPS (see lisp.h) method for marking the stack.  */
 #define GC_MARK_STACK   GC_MAKE_GCPROS_NOOPS
 
 /* arch-tag: 481d443d-4f89-43ea-b5fb-49706d95fa41
--- a/src/s/freebsd.h	Fri May 14 13:14:23 2010 +0900
+++ b/src/s/freebsd.h	Fri May 14 13:15:58 2010 +0900
@@ -30,13 +30,10 @@
 
 #define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_p - (FILE)->_bf._base)
 
-#undef LIB_GCC
-#define LIB_GCC
-
 #define HAVE_GETLOADAVG 1
 #define DECLARE_GETPWUID_WITH_UID_T
 
-/* this silences a few compilation warnings */
+/* This silences a few compilation warnings.  */
 #undef BSD_SYSTEM
 #if __FreeBSD__ == 1
 #define BSD_SYSTEM 199103
@@ -64,23 +61,17 @@
    successfully after processing (for example with CRs added if the
    terminal is set up that way which it is here).  The same bytes will
    be seen again in a later read(2), without the CRs.  */
-
 #define BROKEN_PTY_READ_AFTER_EAGAIN 1
 
 /* Tell that garbage collector that setjmp is known to save all
-   registers relevant for conservative garbage collection in the
-   jmp_buf.  */
-
+   registers relevant for conservative garbage collection in the jmp_buf.  */
 #define GC_SETJMP_WORKS 1
 
-/* Use the GC_MAKE_GCPROS_NOOPS (see lisp.h) method for marking the
-   stack.  */
-
+/* Use the GC_MAKE_GCPROS_NOOPS (see lisp.h) method for marking the stack.  */
 #define GC_MARK_STACK 	GC_MAKE_GCPROS_NOOPS
 
 /* Define USE_MMAP_FOR_BUFFERS to let Emacs use mmap(2) to allocate
    buffer text.  This overrides REL_ALLOC.  */
-
 #define USE_MMAP_FOR_BUFFERS	1
 
 /* arch-tag: 426529ca-b7c4-448f-b10a-d4dcdc9c78eb
--- a/src/s/gnu-linux.h	Fri May 14 13:14:23 2010 +0900
+++ b/src/s/gnu-linux.h	Fri May 14 13:15:58 2010 +0900
@@ -3,6 +3,8 @@
 Copyright (C) 1985, 1986, 1992, 1994, 1996, 1999, 2001, 2002, 2003, 2004,
   2005, 2006, 2007, 2008, 2009, 2010  Free Software Foundation, Inc.
 
+This file was put together by Michael K. Johnson and Rik Faith.
+
 This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
@@ -18,20 +20,13 @@
 You should have received a copy of the GNU General Public License
 along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
-/* This file was put together by Michael K. Johnson and Rik Faith.  */
-
-
-/*
- *	Define symbols to identify the version of Unix this is.
- *	Define all the symbols that apply correctly.
- */
-
+/* Define symbols to identify the version of Unix this is.
+   Define all the symbols that apply correctly.  */
 #define USG
 #define GNU_LINUX
 
 /* SYSTEM_TYPE should indicate the kind of system you are using.
- It sets the Lisp variable system-type.  */
-
+   It sets the Lisp variable system-type.  */
 #define SYSTEM_TYPE "gnu/linux"		/* All the best software is free. */
 
 #ifndef NOT_C_CODE
@@ -50,9 +45,7 @@
 #if defined HAVE_GRANTPT
 #define UNIX98_PTYS
 
-/* Run only once.  We need a `for'-loop because the code uses
-   `continue'.  */
-
+/* Run only once.  We need a `for'-loop because the code uses `continue'.  */
 #define PTY_ITERATION	for (i = 0; i < 1; i++)
 
 #ifdef HAVE_GETPT
@@ -64,7 +57,6 @@
 
 /* Note that grantpt and unlockpt may fork.  We must block SIGCHLD to
    prevent sigchld_handler from intercepting the child's death.  */
-
 #define PTY_TTY_NAME_SPRINTF				\
   {							\
     char *ptyname;					\
@@ -86,23 +78,20 @@
 
 /* Letter to use in finding device name of first pty,
    if system supports pty's.  'p' means it is /dev/ptyp0  */
-
 #define FIRST_PTY_LETTER 'p'
 
 #endif  /* not HAVE_GRANTPT */
 
 /*  Define HAVE_TERMIOS if the system provides POSIX-style
     functions and macros for terminal control.  */
-
 #define HAVE_TERMIOS
 
-/* Define HAVE_PTYS if the system supports pty devices. */
-
+/* Define HAVE_PTYS if the system supports pty devices.  */
 #define HAVE_PTYS
 
 #define HAVE_SOCKETS
 
-/* Define this symbol if your system has the functions bcopy, etc. */
+/* Define this symbol if your system has the functions bcopy, etc.  */
 #define BSTRING
 
 /* This is used in list_system_processes.  */
@@ -121,28 +110,24 @@
    your system and must be used only through an encapsulation
    (Which you should place, by convention, in sysdep.c).  */
 
-/* This is needed for dispnew.c:update_frame */
-
+/* This is needed for dispnew.c:update_frame.  */
 #ifdef emacs
 #include <stdio.h>  /* Get the definition of _IO_STDIO_H.  */
 #if defined(_IO_STDIO_H) || defined(_STDIO_USES_IOSTREAM)
-/* new C libio names */
+/* New C libio names.  */
 #define GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE) \
   ((FILE)->_IO_write_ptr - (FILE)->_IO_write_base)
 #elif defined (__UCLIBC__)
-/* using the uClibc library */
+/* Using the uClibc library.  */
 #define GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE) \
   ((FILE)->__bufpos - (FILE)->__bufstart)
 #else /* !_IO_STDIO_H && ! __UCLIBC__ */
-/* old C++ iostream names */
+/* Old C++ iostream names.  */
 #define GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE) \
   ((FILE)->_pptr - (FILE)->_pbase)
 #endif /* !_IO_STDIO_H && ! __UCLIBC__ */
 #endif /* emacs */
 
-/* Ask GCC where to find libgcc.a.  */
-#define LIB_GCC `$(CC) $(C_SWITCH_X_SITE) -print-libgcc-file-name`
-
 #ifdef emacs
 #define INTERRUPT_INPUT
 #endif
@@ -151,9 +136,6 @@
 
 #define POSIX                 /* affects getpagesize.h and systty.h */
 
-#undef LIB_GCC
-#define LIB_GCC
-
 #define UNEXEC unexelf.o
 
 /* This is to work around mysterious gcc failures in some system versions.
@@ -171,8 +153,7 @@
 #endif
 
 /* Tell that garbage collector that setjmp is known to save all
-   registers relevant for conservative garbage collection in the
-   jmp_buf.  */
+   registers relevant for conservative garbage collection in the jmp_buf.  */
 /* Not all the architectures are tested, but there are Debian packages
    for SCM and/or Guile on them, so the technique must work.  See also
    comments in alloc.c concerning setjmp and gcc.  Fixme:  it's
@@ -180,7 +161,6 @@
    register window-flushing.  */
 /* Don't use #cpu here since in newest development versions of GCC,
    we must call cpp with -traditional, and that disables #cpu.  */
-
 #if defined __i386__ || defined __sparc__ || defined __mc68000__ \
     || defined __alpha__ || defined __mips__ || defined __s390__ \
     || defined __arm__ || defined __powerpc__ || defined __amd64__ \
--- a/src/s/hpux10-20.h	Fri May 14 13:14:23 2010 +0900
+++ b/src/s/hpux10-20.h	Fri May 14 13:15:58 2010 +0900
@@ -21,56 +21,39 @@
 
 #define RUN_TIME_REMAP
 
-/*
- *	Define symbols to identify the version of Unix this is.
- *	Define all the symbols that apply correctly.
- */
-
+/* Define symbols to identify the version of Unix this is.
+   Define all the symbols that apply correctly.  */
 #define USG				/* System III, System V, etc */
-
 #define USG5
-
 #define HPUX
 
 /* SYSTEM_TYPE should indicate the kind of system you are using.
- It sets the Lisp variable system-type.  */
-
+   It sets the Lisp variable system-type.  */
 #define SYSTEM_TYPE "hpux"
 
 /* Letter to use in finding device name of first pty,
-  if system supports pty's.  'p' means it is /dev/ptym/ptyp0  */
-
+   if system supports pty's.  'p' means it is /dev/ptym/ptyp0  */
 #define FIRST_PTY_LETTER 'p'
 
-/*
- *	Define HAVE_TERMIO if the system provides sysV-style ioctls
- *	for terminal control.
- */
-
+/* Define HAVE_TERMIO if the system provides sysV-style ioctls
+   for terminal control.  */
 #define HAVE_TERMIO
 
-/*
- *	Define HAVE_PTYS if the system supports pty devices.
- */
-
+/* Define HAVE_PTYS if the system supports pty devices.  */
 #define HAVE_PTYS
 
 /* Define HAVE_SOCKETS if system supports 4.2-compatible sockets.  */
-
 #define HAVE_SOCKETS
 
 /* Define this symbol if your system has the functions bcopy, etc.
- * s800 and later versions of s300 (s200) kernels have equivalents
- * of the BSTRING functions of BSD.  If your s200 kernel doesn't have
- * em comment out this section.
- */
-
+   s800 and later versions of s300 (s200) kernels have equivalents
+   of the BSTRING functions of BSD.  If your s200 kernel doesn't have
+   em comment out this section.  */
 #define BSTRING
 
 /* Define CLASH_DETECTION if you want lock files to be written
    so that Emacs can tell instantly when you try to modify
    a file that someone else has modified in his Emacs.  */
-
 #define CLASH_DETECTION
 
 /* The symbol in the kernel where the load average is found
@@ -80,11 +63,9 @@
 
 /* In hpux, the symbol SIGIO is defined, but the feature
    doesn't work in the way Emacs needs it to.  */
-
 #define BROKEN_SIGIO
 
 /* Some additional system facilities exist.  */
-
 #define HAVE_PERROR  /* Delete this line for version 6.  */
 
 #define UNEXEC unexhp9k800.o
@@ -112,7 +93,7 @@
    version number A.09.05.
 
    You can fix the math library by installing patch number PHSS_4630.
-   But we can fix it more reliably for Emacs like this. */
+   But we can fix it more reliably for Emacs like this.  */
 #undef HAVE_RINT
 
 /* We have to go this route, rather than hpux9's approach of renaming the
@@ -129,8 +110,7 @@
 
 
 /* Rainer Malzbender <rainer@displaytech.com> says definining
-   HAVE_XRMSETDATABASE allows Emacs to compile on HP-UX 10.20
-   using GCC.  */
+   HAVE_XRMSETDATABASE allows Emacs to compile on HP-UX 10.20 using GCC.  */
 #ifndef HAVE_XRMSETDATABASE
 #define HAVE_XRMSETDATABASE
 #endif
@@ -145,7 +125,6 @@
    to change the boundary between the text section and data section
    when Emacs is dumped.  If you define this, the preloaded Lisp
    code will not be sharable; but that's better than failing completely.  */
-
 #define NO_REMAP
 
 /* Define VIRT_ADDR_VARIES if the virtual addresses of
@@ -154,35 +133,29 @@
 
    Otherwise Emacs assumes that text space precedes data space,
    numerically.  */
-
 #define VIRT_ADDR_VARIES
 
-/* the data segment on this machine always starts at address 0x40000000. */
-
+/* The data segment on this machine always starts at address 0x40000000.  */
 #define DATA_SEG_BITS 0x40000000
 
 #define DATA_START    0x40000000
 #define TEXT_START    0x00000000
 
 /* Data type of load average, as read out of kmem.  */
-
 #define LOAD_AVE_TYPE double
 
 /* Convert that into an integer that is 100 for a load average of 1.0  */
-
 #define LOAD_AVE_CVT(x) ((int) (x * 100.0))
 
-/* The symbol in the kernel where the load average is found
-   is named _avenrun.  At this time there are two major flavors
-   of hp-ux (there is the s800 and s300 (s200) flavors).  The
-   differences are thusly moved to the corresponding machine description file.
-*/
+/* The kernel symbol where the load average is found is named _avenrun.
+   At this time there are two major flavors of hp-ux (there is the s800
+   and s300 (s200) flavors).  The differences are thusly moved to the
+   corresponding machine description file.  */
 
-/* no underscore please */
+/* No underscore please.  */
 #define LDAV_SYMBOL "avenrun"
 
-/* On USG systems these have different names. */
-
+/* On USG systems these have different names.  */
 #define index strchr
 #define rindex strrchr
 
--- a/src/s/irix6-5.h	Fri May 14 13:14:23 2010 +0900
+++ b/src/s/irix6-5.h	Fri May 14 13:15:58 2010 +0900
@@ -41,7 +41,7 @@
 #define SIGNALS_VIA_CHARACTERS
 
 /* Letter to use in finding device name of first pty,
-  if system supports pty's.  'a' means it is /dev/ptya0  */
+   if system supports pty's.  'a' means it is /dev/ptya0  */
 #undef FIRST_PTY_LETTER
 #define FIRST_PTY_LETTER 'q'
 
--- a/src/s/ms-w32.h	Fri May 14 13:14:23 2010 +0900
+++ b/src/s/ms-w32.h	Fri May 14 13:15:58 2010 +0900
@@ -18,10 +18,8 @@
 You should have received a copy of the GNU General Public License
 along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
-/*
- *      Define symbols to identify the version of Unix this is.
- *      Define all the symbols that apply correctly.
- */
+/* Define symbols to identify the version of Unix this is.
+   Define all the symbols that apply correctly.  */
 
 #ifndef WINDOWSNT
 #define WINDOWSNT
@@ -31,63 +29,53 @@
 #endif
 
 /* If you are compiling with a non-C calling convention but need to
-   declare vararg routines differently, put it here */
+   declare vararg routines differently, put it here.  */
 #define _VARARGS_ __cdecl
 
 /* If you are providing a function to something that will call the
    function back (like a signal handler and signal, or main) its calling
-   convention must be whatever standard the libraries expect */
+   convention must be whatever standard the libraries expect.  */
 #define _CALLBACK_ __cdecl
 
 /* SYSTEM_TYPE should indicate the kind of system you are using.
- It sets the Lisp variable system-type.  */
-
+   It sets the Lisp variable system-type.  */
 #define SYSTEM_TYPE "windows-nt"
 #define SYMS_SYSTEM syms_of_ntterm ()
 
 #define NO_MATHERR 1
 
 /* Letter to use in finding device name of first pty,
-  if system supports pty's.  'a' means it is /dev/ptya0  */
-
+   if system supports pty's.  'a' means it is /dev/ptya0  */
 #define FIRST_PTY_LETTER 'a'
 
-/*
- *      Define HAVE_TIMEVAL if the system supports the BSD style clock values.
- *      Look in <sys/time.h> for a timeval structure.
- */
-
+/* Define HAVE_TIMEVAL if the system supports the BSD style clock values.
+   Look in <sys/time.h> for a timeval structure.  */
 #define HAVE_TIMEVAL 1
 
-/* NT supports Winsock which is close enough (with some hacks) */
-
+/* NT supports Winsock which is close enough (with some hacks).  */
 #define HAVE_SOCKETS 1
 
 /* But our select implementation doesn't allow us to make non-blocking
    connects.  So until that is fixed, this is necessary:  */
-
 #define BROKEN_NON_BLOCKING_CONNECT 1
 
 /* And the select implementation does 1-byte read-ahead waiting
    for received packets, so datagrams are broken too.  */
-
 #define BROKEN_DATAGRAM_SOCKETS 1
 
-/* Define this symbol if your system has the functions bcopy, etc. */
-
+/* Define this symbol if your system has the functions bcopy, etc.  */
 #define BSTRING
 #define bzero(b, l) memset(b, 0, l)
 #define bcopy(s, d, l) memmove(d, s, l)
 #define bcmp(a, b, l) memcmp(a, b, l)
 
-/* bcopy (aka memmove aka memcpy at least on x86) under MSVC is quite safe */
+/* bcopy (aka memmove aka memcpy at least on x86) under MSVC is quite safe.  */
 #define GAP_USE_BCOPY 1
 #define BCOPY_UPWARD_SAFE 1
 #define BCOPY_DOWNWARD_SAFE 1
 
 /* If your system uses COFF (Common Object File Format) then define the
-   preprocessor symbol "COFF". */
-
+   preprocessor symbol "COFF".  */
 #define COFF 1
 
 #define MAIL_USE_POP 1
@@ -101,17 +89,16 @@
 
 /* ============================================================ */
 
-/* Here, add any special hacks needed
-   to make Emacs work on this system.  For example,
-   you might define certain system call names that don't
-   exist on your system, or that do different things on
-   your system and must be used only through an encapsulation
-   (Which you should place, by convention, in sysdep.c).  */
+/* Here, add any special hacks needed to make Emacs work on this
+   system.  For example, you might define certain system call names
+   that don't exist on your system, or that do different things on
+   your system and must be used only through an encapsulation (which
+   you should place, by convention, in sysdep.c).  */
 
-/* Define this to be the separator between path elements */
+/* Define this to be the separator between path elements.  */
 #define DIRECTORY_SEP XINT (Vdirectory_sep_char)
 
-/* Define this to be the separator between devices and paths */
+/* Define this to be the separator between devices and paths.  */
 #define DEVICE_SEP ':'
 
 /* We'll support either convention on NT.  */
@@ -128,7 +115,7 @@
 #define SIG_SETMASK     2
 #define SIG_UNBLOCK     3
 
-/* The null device on Windows NT. */
+/* The null device on Windows NT.  */
 #define NULL_DEVICE     "NUL:"
 
 #ifndef MAXPATHLEN
@@ -218,11 +205,11 @@
 
 #define MODE_LINE_BINARY_TEXT(_b_) (NILP ((_b_)->buffer_file_type) ? "T" : "B")
 
-/* get some redefinitions in place */
+/* Get some redefinitions in place.  */
 
 #ifdef emacs
 
-/* calls that are emulated or shadowed */
+/* Calls that are emulated or shadowed.  */
 #undef access
 #define access  sys_access
 #undef chdir
@@ -259,17 +246,17 @@
 #undef write
 #define write   sys_write
 
-/* subprocess calls that are emulated */
+/* Subprocess calls that are emulated.  */
 #define spawnve sys_spawnve
 #define wait    sys_wait
 #define kill    sys_kill
 #define signal  sys_signal
 
-/* termcap.c calls that are emulated */
+/* termcap.c calls that are emulated.  */
 #define tputs   sys_tputs
 #define tgetstr sys_tgetstr
 
-/* cm.c calls that are emulated */
+/* cm.c calls that are emulated.  */
 #define chcheckmagic sys_chcheckmagic
 #define cmcostinit   sys_cmcostinit
 #define cmgoto       sys_cmgoto
@@ -278,7 +265,7 @@
 
 #endif /* emacs */
 
-/* map to MSVC names */
+/* Map to MSVC names.  */
 #define execlp    _execlp
 #define execvp    _execvp
 #define fdopen	  _fdopen
@@ -312,8 +299,8 @@
 #define utime	  _utime
 #endif
 
-/* this is hacky, but is necessary to avoid warnings about macro
-   redefinitions using the SDK compilers */
+/* This is hacky, but is necessary to avoid warnings about macro
+   redefinitions using the SDK compilers.  */
 #ifndef __STDC__
 #define __STDC__ 1
 #define MUST_UNDEF__STDC__
@@ -326,7 +313,7 @@
 #undef MUST_UNDEF__STDC__
 #endif
 
-/* Defines that we need that aren't in the standard signal.h  */
+/* Defines that we need that aren't in the standard signal.h.  */
 #define SIGHUP  1               /* Hang up */
 #define SIGQUIT 3               /* Quit process */
 #define SIGTRAP 5               /* Trace trap */
@@ -369,8 +356,7 @@
 
 #include <sys/stat.h>
 
-/* Define for those source files that do not include enough NT
-   system files.  */
+/* Define for those source files that do not include enough NT system files.  */
 #ifndef NULL
 #ifdef __cplusplus
 #define NULL	0
@@ -405,7 +391,7 @@
    removed.  Also, obviously, all files that define initialized data
    must include config.h to pick up this pragma.  */
 
-/* Names must be < 8 bytes */
+/* Names must be < 8 bytes.  */
 #ifdef _MSC_VER
 #pragma data_seg("EMDATA")
 #pragma bss_seg("EMBSS")
--- a/src/s/msdos.h	Fri May 14 13:14:23 2010 +0900
+++ b/src/s/msdos.h	Fri May 14 13:15:58 2010 +0900
@@ -21,11 +21,8 @@
 /* Note: lots of stuff here was taken from s-msdos.h in demacs. */
 
 
-/*
- *	Define symbols to identify the version of Unix this is.
- *	Define all the symbols that apply correctly.
- */
-
+/* Define symbols to identify the version of Unix this is.
+   Define all the symbols that apply correctly.  */
 #ifndef MSDOS
 #define MSDOS
 #endif
@@ -38,40 +35,34 @@
 #undef BSD_SYSTEM
 
 /* SYSTEM_TYPE should indicate the kind of system you are using.
- It sets the Lisp variable system-type.  */
-
+   It sets the Lisp variable system-type.  */
 #define SYSTEM_TYPE "ms-dos"
 
 #define SYMS_SYSTEM syms_of_dosfns();syms_of_msdos();syms_of_win16select()
 
 #define SYSV_SYSTEM_DIR
 
-/* Define this symbol if your system has the functions bcopy, etc. */
-
+/* Define this symbol if your system has the functions bcopy, etc.  */
 #define BSTRING
 
 /* Define this is the compiler understands `volatile'.  */
 #define HAVE_VOLATILE
 
 
-/* subprocesses should be defined if you want to
-   have code for asynchronous subprocesses
-   (as used in M-x compile and M-x shell).
+/* subprocesses should be defined if you want to have code for
+   asynchronous subprocesses (as used in M-x compile and M-x shell).
    This is the only system that needs this.  */
-
 #undef subprocesses
 
 /* If your system uses COFF (Common Object File Format) then define the
-   preprocessor symbol "COFF". */
-
+   preprocessor symbol "COFF".  */
 #define COFF
 
-/* Here, on a separate page, add any special hacks needed
-   to make Emacs work on this system.  For example,
-   you might define certain system call names that don't
-   exist on your system, or that do different things on
-   your system and must be used only through an encapsulation
-   (Which you should place, by convention, in sysdep.c).  */
+/* Here, on a separate page, add any special hacks needed to make
+   Emacs work on this system.  For example, you might define certain
+   system call names that don't exist on your system, or that do
+   different things on your system and must be used only through an
+   encapsulation (which you should place, by convention, in sysdep.c).  */
 
 /* Avoid incompatibilities between gmalloc.c and system header files
    in how to declare valloc.  */
@@ -83,7 +74,6 @@
 
 /* setjmp and longjmp can safely replace _setjmp and _longjmp,
    but they will run slower.  */
-
 #define _setjmp setjmp
 #define _longjmp longjmp
 
@@ -95,7 +85,6 @@
 #define ORDINARY_LINK
 
 /* command.com does not understand `...` so we define this.  */
-#define LIB_GCC -Lgcc
 #define SEPCHAR ';'
 
 #define NULL_DEVICE "nul"
@@ -110,17 +99,17 @@
 :AB=<BG %d>:AF=<FG %d>:op=<DefC>:"
 
 /* Define this to a function (Fdowncase, Fupcase) if your file system
-   likes that */
+   likes that.  */
 #define FILE_SYSTEM_CASE Fmsdos_downcase_filename
 
-/* Define this to be the separator between devices and paths */
+/* Define this to be the separator between devices and paths.  */
 #define DEVICE_SEP ':'
 
 /* We'll support either convention on MSDOG.  */
 #define IS_DIRECTORY_SEP(_c_) ((_c_) == '/' || (_c_) == '\\')
 #define IS_ANY_SEP(_c_) (IS_DIRECTORY_SEP (_c_) || IS_DEVICE_SEP (_c_))
 
-/* bcopy under djgpp is quite safe */
+/* bcopy under djgpp is quite safe.  */
 #define GAP_USE_BCOPY
 #define BCOPY_UPWARD_SAFE 1
 #define BCOPY_DOWNWARD_SAFE 1
@@ -140,9 +129,7 @@
    commentary below, in the non-X branch.  The 140KB number was
    measured on GNU/Linux and on MS-WIndows.  */
 #define SYSTEM_PURESIZE_EXTRA (-170000+140000)
-#define MSDOS_LIBS_SYSTEM -lxext -lsys
 #else
-#define MSDOS_LIBS_SYSTEM
 /* We need a little extra space, see ../../lisp/loadup.el.
    As of 20091024, DOS-specific files use up 62KB of pure space.  But
    overall, we end up wasting 130KB of pure space, because
@@ -156,9 +143,7 @@
 #endif
 
 /* Tell the garbage collector that setjmp is known to save all
-   registers relevant for conservative garbage collection in the
-   jmp_buf.  */
-
+   registers relevant for conservative garbage collection in the jmp_buf.  */
 #define GC_SETJMP_WORKS 1
 #define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS
 
--- a/src/s/netbsd.h	Fri May 14 13:14:23 2010 +0900
+++ b/src/s/netbsd.h	Fri May 14 13:15:58 2010 +0900
@@ -19,23 +19,17 @@
 along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 
-/* Get most of the stuff from bsd-common */
+/* Get most of the stuff from bsd-common.  */
 #include "bsd-common.h"
 
 #define HAVE_GETLOADAVG 1
 
 #define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_p - (FILE)->_bf._base)
 
-#undef LIB_GCC
-#define LIB_GCC
-
-#define AMPERSAND_FULL_NAME
-
 /* On post 1.3 releases of NetBSD, gcc -nostdlib also clears
    the library search parth, i.e. it won't search /usr/lib
-   for libc and friends. Using -nostartfiles instead avoids
-   this problem, and will also work on earlier NetBSD releases */
-
+   for libc and friends.  Using -nostartfiles instead avoids
+   this problem, and will also work on earlier NetBSD releases.  */
 #define LINKER $(CC) -nostartfiles
 
 #define DEFAULT_SOUND_DEVICE "/dev/audio"
@@ -43,7 +37,6 @@
 /* Greg A. Woods <woods@weird.com> says we must include signal.h
    before syssignal.h is included, to work around interface conflicts
    that are handled with CPP __RENAME() macro in signal.h.  */
-
 #ifndef NOT_C_CODE
 #include <signal.h>
 #endif
@@ -51,17 +44,13 @@
 /* Don't close pty in process.c to make it as controlling terminal.
    It is already a controlling terminal of subprocess, because we did
    ioctl TIOCSCTTY.  */
-
 #define DONT_REOPEN_PTY
 
 /* Tell that garbage collector that setjmp is known to save all
-   registers relevant for conservative garbage collection in the
-   jmp_buf.  */
-
+   registers relevant for conservative garbage collection in the jmp_buf.  */
 #define GC_SETJMP_WORKS 1
 
 /* Use the GC_MAKE_GCPROS_NOOPS (see lisp.h) method.  */
-
 #define GC_MARK_STACK	GC_MAKE_GCPROS_NOOPS
 
 /* arch-tag: e80f364a-04e9-4faf-93cb-f36a0fe95c81
--- a/src/s/sol2-10.h	Fri May 14 13:14:23 2010 +0900
+++ b/src/s/sol2-10.h	Fri May 14 13:15:58 2010 +0900
@@ -4,20 +4,18 @@
 
 #define SYSTEM_MALLOC
 
-/*
- * Use the Solaris dldump() function, called from unexsol.c, to dump
- * emacs, instead of the generic ELF dump code found in unexelf.c.
- * The resulting binary has a complete symbol table, and is better
- * for debugging and other observabilty tools (debuggers, pstack, etc).
- *
- * If you encounter a problem using dldump(), please consider sending
- * a message to the OpenSolaris tools-linking mailing list:
- *      http://mail.opensolaris.org/mailman/listinfo/tools-linking
- *
- * It is likely that dldump() works with older Solaris too,
- * but this has not been tested, and so, this change is for
- * Solaris 10 and newer only at this time.
- */
+/* Use the Solaris dldump() function, called from unexsol.c, to dump
+   emacs, instead of the generic ELF dump code found in unexelf.c.
+   The resulting binary has a complete symbol table, and is better
+   for debugging and other observabilty tools (debuggers, pstack, etc).
+
+   If you encounter a problem using dldump(), please consider sending
+   a message to the OpenSolaris tools-linking mailing list:
+        http://mail.opensolaris.org/mailman/listinfo/tools-linking
+
+   It is likely that dldump() works with older Solaris too,
+   but this has not been tested, and so, this change is for
+   Solaris 10 and newer only at this time.  */
 #undef UNEXEC
 #define UNEXEC unexsol.o
 
--- a/src/s/template.h	Fri May 14 13:14:23 2010 +0900
+++ b/src/s/template.h	Fri May 14 13:15:58 2010 +0900
@@ -21,10 +21,8 @@
 along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 
-/*
- *	Define symbols to identify the version of Unix this is.
- *	Define all the symbols that apply correctly.
- */
+/* Define symbols to identify the version of Unix this is.
+   Define all the symbols that apply correctly.  */
 
 /* #define USG5 */
 /* #define USG */
@@ -34,7 +32,7 @@
 /* #define BSD_SYSTEM */
 
 /* SYSTEM_TYPE should indicate the kind of system you are using.
- It sets the Lisp variable system-type.  */
+   It sets the Lisp variable system-type.  */
 
 #define SYSTEM_TYPE "berkeley-unix"
 
@@ -58,55 +56,46 @@
    Another method of doing input is planned but not implemented.
    It would have Emacs fork off a separate process
    to read the input and send it to the true Emacs process
-   through a pipe. */
-
+   through a pipe.  */
 #define INTERRUPT_INPUT
 
 /* Letter to use in finding device name of first pty,
-  if system supports pty's.  'a' means it is /dev/ptya0  */
-
+   if system supports pty's.  'a' means it is /dev/ptya0.  */
 #define FIRST_PTY_LETTER 'a'
 
-/*
- *	Define HAVE_TERMIOS if the system provides POSIX-style
- *	functions and macros for terminal control.
- *
- *	Define HAVE_TERMIO if the system provides sysV-style ioctls
- *	for terminal control.
- *
- *	Do not define both.  HAVE_TERMIOS is preferred, if it is
- *	supported on your system.
- */
+/* Define HAVE_TERMIOS if the system provides POSIX-style
+   functions and macros for terminal control.
+
+   Define HAVE_TERMIO if the system provides sysV-style ioctls
+   for terminal control.
+
+   Do not define both.  HAVE_TERMIOS is preferred, if it is
+   supported on your system.  */
 
 #define HAVE_TERMIOS
 /* #define HAVE_TERMIO */
 
-/*
- *	Define HAVE_PTYS if the system supports pty devices.
- */
-
+/* Define HAVE_PTYS if the system supports pty devices.  */
 #define HAVE_PTYS
 
-/* Define this symbol if your system has the functions bcopy, etc. */
-
+/* Define this symbol if your system has the functions bcopy, etc.  */
 #define BSTRING
 
 /* subprocesses should be undefined if you do NOT want to
    have code for asynchronous subprocesses
    (as used in M-x compile and M-x shell).
-   Currently only MSDOS does not support this. */
+   Currently only MSDOS does not support this.  */
 
 /* #undef subprocesses */
 
 /* If your system uses COFF (Common Object File Format) then define the
-   preprocessor symbol "COFF". */
+   preprocessor symbol "COFF".  */
 
 /* #define COFF */
 
 /* Define CLASH_DETECTION if you want lock files to be written
    so that Emacs can tell instantly when you try to modify
    a file that someone else has modified in his Emacs.  */
-
 #define CLASH_DETECTION
 
 /* Define this if your operating system declares signal handlers to
@@ -127,12 +116,11 @@
 
 /* ============================================================ */
 
-/* Here, add any special hacks needed
-   to make Emacs work on this system.  For example,
-   you might define certain system call names that don't
-   exist on your system, or that do different things on
-   your system and must be used only through an encapsulation
-   (Which you should place, by convention, in sysdep.c).  */
+/* Here, add any special hacks needed to make Emacs work on this
+   system.  For example, you might define certain system call names
+   that don't exist on your system, or that do different things on
+   your system and must be used only through an encapsulation (which
+   you should place, by convention, in sysdep.c).  */
 
 /* If the system's imake configuration file defines `NeedWidePrototypes'
    as `NO', we must define NARROWPROTO manually.  Such a define is
--- a/src/s/unixware.h	Fri May 14 13:14:23 2010 +0900
+++ b/src/s/unixware.h	Fri May 14 13:15:58 2010 +0900
@@ -35,8 +35,7 @@
 /* This sets the name of the slave side of the PTY.  On SysVr4,
    grantpt(3) forks a subprocess, so keep sigchld_handler() from
    intercepting that death.  If any child but grantpt's should die
-   within, it should be caught after sigrelse(2). */
-
+   within, it should be caught after sigrelse(2).  */
 #define PTY_TTY_NAME_SPRINTF			\
   {						\
     char *ptsname(), *ptyname;			\
@@ -54,12 +53,10 @@
   }
 
 /* Data type of load average, as read out of kmem.  */
-
 #define LOAD_AVE_TYPE long
 
 /* Convert that into an integer that is 100 for a load average of 1.0  */
 /* This is totally uncalibrated. */
-
 #define LOAD_AVE_CVT(x) ((int) (((double) (x)) * 100.0 / FSCALE))
 #define FSCALE 256.0
 
--- a/src/s/usg5-4.h	Fri May 14 13:14:23 2010 +0900
+++ b/src/s/usg5-4.h	Fri May 14 13:15:58 2010 +0900
@@ -3,6 +3,9 @@
 Copyright (C) 1987, 1990, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
   2006, 2007, 2008, 2009, 2010  Free Software Foundation, Inc.
 
+Written by James Van Artsdalen of Dell Computer Corp. james@bigtex.cactus.org.
+Subsequently improved for Dell 2.2 by Eric S. Raymond <esr@snark.thyrsus.com>.
+
 This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
@@ -18,57 +21,36 @@
 You should have received a copy of the GNU General Public License
 along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
-/* This file written by James Van Artsdalen of Dell Computer Corporation.
- * james@bigtex.cactus.org.  Subsequently improved for Dell 2.2 by Eric
- * S. Raymond <esr@snark.thyrsus.com>.
- */
-
-/* Use the SysVr3 file for at least base configuration. */
-
+/* Use the SysVr3 file for at least base configuration.  */
 #define USG				/* System III, System V, etc */
 
 #define USG5
 #define USG5_4
 
 /* SYSTEM_TYPE should indicate the kind of system you are using.
- It sets the Lisp variable system-type.  */
-
+   It sets the Lisp variable system-type.  */
 #define SYSTEM_TYPE "usg-unix-v"
 
-/*
- *	Define HAVE_TERMIO if the system provides sysV-style ioctls
- *	for terminal control.
- */
-
+/* Define HAVE_TERMIO if the system provides sysV-style ioctls
+   for terminal control.  */
 #define HAVE_TERMIO
 
-/*
- *	Define HAVE_PTYS if the system supports pty devices.
- */
-
-/*
- * 	Define SYSV_SYSTEM_DIR to use the V.3 getdents/readir
- *	library functions.  Almost, but not quite the same as
- *	the 4.2 functions
- */
+/* Define SYSV_SYSTEM_DIR to use the V.3 getdents/readir library
+   functions. Almost, but not quite the same as the 4.2 functions.  */
 #define SYSV_SYSTEM_DIR
 
 /* The file containing the kernel's symbol table is called /unix.  */
-
 #define KERNEL_FILE "/unix"
 
-/* The symbol in the kernel where the load average is found
-   is named avenrun.  */
-
+/* The kernel symbol where the load average is found is named avenrun.  */
 #define LDAV_SYMBOL "avenrun"
 
 /* setjmp and longjmp can safely replace _setjmp and _longjmp,
    but they will run slower.  */
-
 #define _setjmp setjmp
 #define _longjmp longjmp
 
-/* On USG systems these have different names */
+/* On USG systems these have different names.  */
 #ifndef HAVE_INDEX
 #define index strchr
 #endif /* ! defined (HAVE_INDEX) */
@@ -76,35 +58,27 @@
 #define rindex strrchr
 #endif /* ! defined (HAVE_RINDEX) */
 
-
-/* The docs for system V/386 suggest v.3 has sigpause,
-   so let's give it a try.  */
+/* The docs for system V/386 suggest v.3 has sigpause, so let's try it.  */
 #define HAVE_SYSV_SIGPAUSE
 
-
-/* If we're using the System V X port, BSD bstring functions will be handy */
-
+/* If we're using the System V X port, BSD bstring functions will be handy.  */
 #ifdef HAVE_X_WINDOWS
 #define BSTRING
 #endif /* HAVE_X_WINDOWS */
 
-/* On USG systems signal handlers return void */
-
+/* On USG systems signal handlers return void.  */
 #define SIGTYPE void
 
 #define ORDINARY_LINK
 
-/* Undump with ELF */
-
+/* Undump with ELF.  */
 #undef COFF
 
 #define UNEXEC unexelf.o
 
-/* Get FIONREAD from <sys/filio.h>.  Get <sys/ttold.h> to get struct
- * tchars. But get <termio.h> first to make sure ttold.h doesn't
- * interfere.  And don't try to use SIGIO yet.
- */
-
+/* Get FIONREAD from <sys/filio.h>.  Get <sys/ttold.h> to get struct tchars.
+   But get <termio.h> first to make sure ttold.h doesn't interfere.
+   And don't try to use SIGIO yet.  */
 #ifndef NOT_C_CODE
 #include <sys/wait.h>
 #endif
@@ -121,15 +95,14 @@
 #endif
 
 /* Some SVr4s don't define NSIG in sys/signal.h for ANSI environments;
- * instead, there's a system variable _sys_nsig.  Unfortunately, we need the
- * constant to dimension an array.  So wire in the appropriate value here.
- */
+   instead, there's a system variable _sys_nsig.  Unfortunately, we need the
+   constant to dimension an array.  So wire in the appropriate value here.  */
 #define NSIG_MINIMUM 32
 
-/* We can support this */
-
+/* We can support this.  */
 #define CLASH_DETECTION
 
+/* Define HAVE_PTYS if the system supports pty devices.  */
 #define HAVE_PTYS
 #define HAVE_TERMIOS
 
@@ -137,7 +110,6 @@
    waiting, because a previous waitsys(2) cleaned up the carcass of child
    without clearing the SIGCHLD pending info.  So, use a non-blocking
    wait3 instead, which maps to waitpid(2) in SysVr4. */
-
 #define wait3(status, options, rusage) \
   waitpid ((pid_t) -1, (status), (options))
 #define WRETCODE(w) (w >> 8)
@@ -145,20 +117,16 @@
 /* TIOCGPGRP is broken in SysVr4, so we can't send signals to PTY
    subprocesses the usual way.  But TIOCSIGNAL does work for PTYs, and
    this is all we need.  */
-
 #define TIOCSIGSEND TIOCSIGNAL
 
 /* This change means that we don't loop through allocate_pty too many
-   times in the (rare) event of a failure. */
-
+   times in the (rare) event of a failure.  */
 #define FIRST_PTY_LETTER 'z'
 
-/* This sets the name of the master side of the PTY. */
-
+/* This sets the name of the master side of the PTY.  */
 #define PTY_NAME_SPRINTF strcpy (pty_name, "/dev/ptmx");
 
-/* Push various streams modules onto a PTY channel. */
-
+/* Push various streams modules onto a PTY channel.  */
 #define SETUP_SLAVE_PTY \
   if (ioctl (xforkin, I_PUSH, "ptem") == -1)	\
     fatal ("ioctl I_PUSH ptem", errno);		\
@@ -167,8 +135,7 @@
   if (ioctl (xforkin, I_PUSH, "ttcompat") == -1) \
     fatal ("ioctl I_PUSH ttcompat", errno);
 
-/* This definition was suggested for next release.
-   So give it a try.  */
+/* This definition was suggested for next release.  So give it a try.  */
 #define HAVE_SOCKETS
 
 /* arch-tag: 1a0ed909-5faa-434b-b7c3-9d86c63d53a6
--- a/src/xdisp.c	Fri May 14 13:14:23 2010 +0900
+++ b/src/xdisp.c	Fri May 14 13:15:58 2010 +0900
@@ -2698,8 +2698,12 @@
   /* Are multibyte characters enabled in current_buffer?  */
   it->multibyte_p = !NILP (current_buffer->enable_multibyte_characters);
 
-  /* Do we need to reorder bidirectional text?  */
-  it->bidi_p = !NILP (current_buffer->bidi_display_reordering);
+  /* Do we need to reorder bidirectional text?  Not if this is a
+     unibyte buffer: by definition, none of the single-byte characters
+     are strong R2L, so no reordering is needed.  And bidi.c doesn't
+     support unibyte buffers anyway.  */
+  it->bidi_p
+    = !NILP (current_buffer->bidi_display_reordering) && it->multibyte_p;
 
   /* Non-zero if we should highlight the region.  */
   highlight_region_p