changeset 4453:29efd169efe7

Automated merge with file:/Sources/xemacs-21.5-checked-out
author Aidan Kehoe <kehoea@parhasard.net>
date Sun, 11 May 2008 11:24:01 +0200
parents 82f8351e71c8 (current diff) ac6231e0c1df (diff)
children 1f0aa40cafe0
files install.sh lisp/ChangeLog lisp/font.el lisp/gtk-iso8859-1.el lisp/x-iso8859-1.el version.sh
diffstat 97 files changed, 6773 insertions(+), 3802 deletions(-) [+]
line wrap: on
line diff
--- a/.hgignore	Sun May 11 11:20:24 2008 +0200
+++ b/.hgignore	Sun May 11 11:24:01 2008 +0200
@@ -45,3 +45,11 @@
 ^src/xemacs\.dmp$
 ^src/Emacs\.ad\.h$
 ^etc/bundled-packages/.*\.tar\.gz$
+^lib-src/(etags|hexl|i|make-docfile|make-dump-id|minitar|mmencode|movemail|sorted-doc|wakeup|winclient)\.(exe|exe\.manifest|pdb)$
+\.obj$
+^nt/obj
+^nt/config.inc
+^src/REBUILD_AUTOLOADS$
+^src/(temacs|xemacs)\.(exe|exe\.manifest|pdb|map|bsc)$
+^TAGS$
+^version\.sh$
\ No newline at end of file
--- a/.hgtags	Sun May 11 11:20:24 2008 +0200
+++ b/.hgtags	Sun May 11 11:24:01 2008 +0200
@@ -235,3 +235,4 @@
 223736d75acb5265cfd9352497e8483d787d8eab r21-2-45
 0784d089fdc93fb58040b6efbec55cd4fdf650c2 r21-2-46
 5aa1854ad5374fa936e99e22e7b1242097292f16 r21-2-47
+1af222c7586991f690ea06d1b8c75fb5a6a0a352 r21-5-28
--- a/ChangeLog	Sun May 11 11:20:24 2008 +0200
+++ b/ChangeLog	Sun May 11 11:24:01 2008 +0200
@@ -1,3 +1,81 @@
+2008-05-07  Aidan Kehoe  <kehoea@parhasard.net>
+
+	* configure.ac (XE_EXPAND_VARIABLE): Call AC_SUBST on
+	SHEBANG_PATHNAME, as suggested by Michael Sperber in
+	y9ly7aj1wfc.fsf@deinprogramm.de.
+	* Makefile.in.in: Regenerate.
+	* configure: Ditto.
+
+2008-01-20  Aidan Kehoe  <kehoea@parhasard.net>
+
+	* Makefile.in.in (SHEBANG_PROGNAME): 
+	New variable; a symbol link to the XEmacs binary to tell it it
+	should read a script from stdin. 
+	* configure.ac (XE_EXPAND_VARIABLE): 
+	Set SHEBANG_PROGNAME. 
+	* configure: 
+	Regenerate.
+
+2008-04-01  Andreas Schwab  <schwab@suse.de>
+
+	Thanks to Mike Fabian for posting a patch to the mainline, to Martin
+	Buchholz for writing the ChangeLog, and to Aidan Kehoe for finding
+	the 2003-01-27 ChangeLog.  Tested against Xaw3d. -- stephen
+
+	* configure.ac (athena_3d):
+	AC_CHECK_LIB must always take a function as
+	argument, never a global variable.  Some linkers can tell the
+	difference.  So change:
+	threeDClassRec ==> XawSme3dComputeTopShadowRGB
+
+2008-02-15  Marcus Crestani  <crestani@xemacs.org>
+
+	* configure.ac: Look for all x86 machines to determine which write
+	barrier to use on MacOSX.
+	* configure : Rebuild.
+
+2008-02-12  Jerry James  <james@xemacs.org>
+
+	* install.sh: Rename to install-sh and update to latest FSF version.
+
+2008-01-25  Stephen J. Turnbull  <stephen@xemacs.org>
+
+	* configure.ac (--with-database): 'gnudbm' -> 'gdbm' in docstrings.
+
+2008-01-25  Michael Sperber  <mike@xemacs.org>
+
+	* Makefile.in.in:
+	* configure.ac:
+	* version.sh.in: Use Mercurial tip hash to identify version
+	instead of old CVS method.
+
+2008-01-17  Aidan Kehoe  <kehoea@parhasard.net>
+
+	* configure.ac:
+	If using a version of the gdbm library that sticks dbm_open in
+	libgdbm_compat.so, also link to that library. 
+	Correct a thinko with DBM version 4 checks. Both from Hans de
+	Graaff, in 
+	http://mid.gmane.org/20050812092756.6850.qmail@graaff.xs4all.nl
+	and
+	http://mid.gmane.org/pan.2007.06.24.10.10.57@gentoo.org; thank you
+	Hans!
+	* configure:
+	Regenerate.
+
+2008-01-01  Stephen J. Turnbull  <stephen@xemacs.org>
+
+	* Makefile.in.in (mkpkgdir): Fix incorrect comment convention.
+
+2007-12-26  Stephen J. Turnbull  <stephen@xemacs.org>
+
+	* Makefile.in.in (mkpkgdir): Ensure only one late package directory.
+
+2007-12-26  Stephen J. Turnbull  <stephen@xemacs.org>
+
+	* Makefile.in.in (check-available-packages): Say where to install.
+	(mkpkgdir): 
+
 2007-12-23  Stephen J. Turnbull  <stephen@xemacs.org>
 
 	* Makefile.in.in (mkpkgdir):
--- a/Makefile.in.in	Sun May 11 11:20:24 2008 +0200
+++ b/Makefile.in.in	Sun May 11 11:24:01 2008 +0200
@@ -92,6 +92,7 @@
 ## This will be the name of the generated binary and is set automatically
 ## by configure.
 PROGNAME=@PROGNAME@
+SHEBANG_PROGNAME=@SHEBANG_PROGNAME@
 
 ## ==================== Where To Install Things ====================
 
@@ -256,7 +257,7 @@
 .PHONY: ${SUBDIR} all beta
 
 ## Convenience target for XEmacs beta testers
-beta: elcclean all
+beta: elcclean update-version all
 
 ## Convenience target for XEmacs maintainers
 ## This would run `make-xemacsdist' if I were really confident that everything
@@ -316,6 +317,13 @@
 ${SUBDIR}: ${SUBDIR_MAKEFILES} ${GENERATED_HEADERS} FRC
 	cd ./$@ && $(MAKE) $(RECURSIVE_MAKE_ARGS) all
 
+## This should be the same code as in configure.ac.
+update-version:
+	cp ${srcdir}/version.sh.in ${srcdir}/version.sh
+	if test -d ${srcdir}/.hg; then \
+	    (cd ${srcdir}; hg identify | cut -d " " -f 1 >> version.sh); \
+	fi
+
 ## Building modules depends on ellcc, found in lib-src.
 modules/sample modules/ldap modules/zlib modules/base64: lib-src
 modules/postgresql modules/canna: lib-src
@@ -407,10 +415,12 @@
 	${INSTALL_PROGRAM} src/${PROGNAME} ${bindir}/${PROGNAME}-${version}.exe
 	-chmod 0755 ${bindir}/${PROGNAME}-${version}.exe
 	cd ${bindir} && $(RM) ./${PROGNAME} && ${LN_S} ${PROGNAME}-${version}.exe ./${PROGNAME}
+	cd ${bindir} && $(RM) ./${SHEBANG_PROGNAME} && ${LN_S} ${PROGNAME}-${version}.exe ./${SHEBANG_PROGNAME}
 # else
 	${INSTALL_PROGRAM} src/${PROGNAME} ${bindir}/${PROGNAME}-${version}
 	-chmod 0755 ${bindir}/${PROGNAME}-${version}
 	cd ${bindir} && $(RM) ./${PROGNAME} && ${LN_S} ${PROGNAME}-${version} ./${PROGNAME}
+	cd ${bindir} && $(RM) ./${SHEBANG_PROGNAME} && ${LN_S} ${PROGNAME}-${version} ./${SHEBANG_PROGNAME}
 # endif /* CYGWIN */
 #endif /* WIN32_NATIVE */
 	if test "${prefix}" != "${exec_prefix}"; then \
@@ -500,21 +510,31 @@
 
 check-available-packages:
 	@if test -r ${pkgsrcdir}/bootstrap.tar.gz; \
-	then echo "To install a set of bootstrap packages, type:"; \
+	then echo "To install a set of bootstrap packages in"; \
+	     echo "${package_path}/xemacs-packages, type:"; \
 	     echo "  make install-bootstrap-packages"; \
 	fi; \
 	if test -r ${pkgsrcdir}/xemacs-sumo.tar.gz; \
-	then echo "To install the full set of non-mule packages, type:"; \
+	then echo "To install the full set of non-mule packages in"; \
+	     echo "${package_path}/xemacs-packages, type:"; \
 	     echo "  make install-nonmule-packages"; \
 	fi; \
 	if test -r ${pkgsrcdir}/xemacs-mule-sumo.tar.gz; \
-	then echo "To install the full set of packages with mule, type:"; \
+	then echo "To install the full set of packages with mule in"; \
+	     echo "${package_path}/mule-packages, type:"; \
 	     echo "  make install-all-packages"; \
-	fi;
+	fi
+
+## The test for a non-trivial path simply checks for the conventional Unix
+## path separator ":".  This is reasonable because this is basically just
+## a convenience feature, anyway.
 
 mkpkgdir: FRC.mkdir ${MAKEPATH}
 	@if test -z ${package_path}; \
-	then echo "not configured --with-late-packages; no place to install."; \
+	then echo "Not configured --with-late-packages; no place to install."; \
+		exit -1; \
+	elif echo ${package_path} | grep ":"; \
+	then echo "Configured with multiple late package directories; you decide where to install."; \
 		exit -1; \
 	elif test -e ${package_path}/xemacs-packages \
 		-o -e ${package_path}/mule-packages; \
--- a/configure	Sun May 11 11:20:24 2008 +0200
+++ b/configure	Sun May 11 11:24:01 2008 +0200
@@ -706,6 +706,7 @@
 build_cpu
 build_vendor
 build_os
+SHEBANG_PROGNAME
 configuration
 CC
 CFLAGS
@@ -1661,7 +1662,7 @@
 
   --with-database=TYPE    Compile with database support. Valid types are `no'
                           or a comma-separated list of one or more of `berkdb'
-                          and either `dbm' or `gnudbm'.
+                          and either `dbm' or `gdbm'.
   --with-ldap             Support the LDAP protocol.
   --with-postgresql       Support the PostgreSQL RDBMS.
 
@@ -3772,7 +3773,7 @@
 
 if test "$enable_database_dbm"  = "yes" -a "$enable_database_gdbm" = "yes"; then
 	(echo "$progname: Usage error:"
-echo " " "Only one of \`dbm' and \`gnudbm' may be specified
+echo " " "Only one of \`dbm' and \`gdbm' may be specified
 with the \`--with-database' option."
 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
 fi
@@ -4779,6 +4780,10 @@
 
 
 
+cp "$srcdir/version.sh.in" "$srcdir/version.sh"
+if test -d "$srcdir/.hg"; then
+    (cd "$srcdir"; hg identify | cut -d " " -f 1 >> version.sh)
+fi
 . "$srcdir/version.sh" || exit 1;
 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
 : "${verbose=$beta}"
@@ -4851,16 +4856,25 @@
 
   version=${infodock_major_version}.${infodock_minor_version}.${infodock_build_version}
   PROGNAME=infodock
+  SHEBANG_PROGNAME=infodock-script
   CPPFLAGS="$CPPFLAGS -DINFODOCK"
 else
   PROGNAME=xemacs
-fi
+  SHEBANG_PROGNAME=xemacs-script
+fi
+
+
 
 cat >>confdefs.h <<_ACEOF
 #define EMACS_PROGNAME "$PROGNAME"
 _ACEOF
 
 
+cat >>confdefs.h <<_ACEOF
+#define SHEBANG_PROGNAME "${PROGNAME}-script"
+_ACEOF
+
+
 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
 test "${enable_error_checking_extents:=$beta}"    = yes && cat >>confdefs.h <<\_ACEOF
 #define ERROR_CHECK_EXTENTS 1
@@ -5351,7 +5365,7 @@
   if test "$enable_vdb" = "auto"; then
     case "$opsys" in
       darwin )  case "$machine" in
-		  i686 ) check_vdb_posix=yes ;;
+		  i[3-9]86 ) check_vdb_posix=yes ;;
 		  * ) cat >>confdefs.h <<\_ACEOF
 #define VDB_MACH 1
 _ACEOF
@@ -25697,9 +25711,9 @@
 echo "${ECHO_T}$ac_res" >&6; }
 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
-                as_ac_Lib=`echo "ac_cv_lib_$athena_variant''_threeDClassRec" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for threeDClassRec in -l$athena_variant" >&5
-echo $ECHO_N "checking for threeDClassRec in -l$athena_variant... $ECHO_C" >&6; }
+                as_ac_Lib=`echo "ac_cv_lib_$athena_variant''_XawSme3dComputeTopShadowRGB" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for XawSme3dComputeTopShadowRGB in -l$athena_variant" >&5
+echo $ECHO_N "checking for XawSme3dComputeTopShadowRGB in -l$athena_variant... $ECHO_C" >&6; }
 if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -25718,11 +25732,11 @@
 #ifdef __cplusplus
 extern "C"
 #endif
-char threeDClassRec ();
-int
-main ()
-{
-return threeDClassRec ();
+char XawSme3dComputeTopShadowRGB ();
+int
+main ()
+{
+return XawSme3dComputeTopShadowRGB ();
   ;
   return 0;
 }
@@ -25774,9 +25788,9 @@
 fi
 
   else
-        as_ac_Lib=`echo "ac_cv_lib_$athena_variant''_threeDClassRec" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for threeDClassRec in -l$athena_variant" >&5
-echo $ECHO_N "checking for threeDClassRec in -l$athena_variant... $ECHO_C" >&6; }
+        as_ac_Lib=`echo "ac_cv_lib_$athena_variant''_XawSme3dComputeTopShadowRGB" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for XawSme3dComputeTopShadowRGB in -l$athena_variant" >&5
+echo $ECHO_N "checking for XawSme3dComputeTopShadowRGB in -l$athena_variant... $ECHO_C" >&6; }
 if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -25795,11 +25809,11 @@
 #ifdef __cplusplus
 extern "C"
 #endif
-char threeDClassRec ();
-int
-main ()
-{
-return threeDClassRec ();
+char XawSme3dComputeTopShadowRGB ();
+int
+main ()
+{
+return XawSme3dComputeTopShadowRGB ();
   ;
   return 0;
 }
@@ -25840,9 +25854,9 @@
 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
   athena_lib=$athena_variant
 else
-              { echo "$as_me:$LINENO: checking for threeDClassRec in -lXaw" >&5
-echo $ECHO_N "checking for threeDClassRec in -lXaw... $ECHO_C" >&6; }
-if test "${ac_cv_lib_Xaw_threeDClassRec+set}" = set; then
+              { echo "$as_me:$LINENO: checking for XawSme3dComputeTopShadowRGB in -lXaw" >&5
+echo $ECHO_N "checking for XawSme3dComputeTopShadowRGB in -lXaw... $ECHO_C" >&6; }
+if test "${ac_cv_lib_Xaw_XawSme3dComputeTopShadowRGB+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -25860,48 +25874,48 @@
 #ifdef __cplusplus
 extern "C"
 #endif
-char threeDClassRec ();
-int
-main ()
-{
-return threeDClassRec ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_Xaw_threeDClassRec=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_Xaw_threeDClassRec=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xaw_threeDClassRec" >&5
-echo "${ECHO_T}$ac_cv_lib_Xaw_threeDClassRec" >&6; }
-if test $ac_cv_lib_Xaw_threeDClassRec = yes; then
+char XawSme3dComputeTopShadowRGB ();
+int
+main ()
+{
+return XawSme3dComputeTopShadowRGB ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_lib_Xaw_XawSme3dComputeTopShadowRGB=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_lib_Xaw_XawSme3dComputeTopShadowRGB=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xaw_XawSme3dComputeTopShadowRGB" >&5
+echo "${ECHO_T}$ac_cv_lib_Xaw_XawSme3dComputeTopShadowRGB" >&6; }
+if test $ac_cv_lib_Xaw_XawSme3dComputeTopShadowRGB = yes; then
 
           athena_lib=Xaw;
           { echo "$as_me:$LINENO: WARNING: Assuming that libXaw is actually $athena_variant." >&5
@@ -37246,12 +37260,81 @@
    enable_database_gdbm=yes enable_database_dbm=no libdbm=-lgdbm
 else
 
+       { echo "$as_me:$LINENO: checking for dbm_open in -lgdbm_compat" >&5
+echo $ECHO_N "checking for dbm_open in -lgdbm_compat... $ECHO_C" >&6; }
+if test "${ac_cv_lib_gdbm_compat_dbm_open+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lgdbm_compat -lgdbm $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dbm_open ();
+int
+main ()
+{
+return dbm_open ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_lib_gdbm_compat_dbm_open=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_lib_gdbm_compat_dbm_open=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_gdbm_compat_dbm_open" >&5
+echo "${ECHO_T}$ac_cv_lib_gdbm_compat_dbm_open" >&6; }
+if test $ac_cv_lib_gdbm_compat_dbm_open = yes; then
+
+       enable_database_gdbm=yes enable_database_dbm=no libdbm="-lgdbm_compat -lgdbm"
+else
+
    if test "$enable_database_gdbm" = "yes"; then
      { echo "Error:" "Required GNU DBM support cannot be provided." >&2; exit 1; }
    fi
    enable_database_gdbm=no
 fi
 
+
+fi
+
 fi
 
 if test "$enable_database_dbm" != "no"; then
@@ -37902,7 +37985,7 @@
 
   fi
 
-    if test "$enable_database_berkdb" != "yes" -a "$dbver" = "4"; then
+    if test "$enable_database_berkdb" = "yes" -a "$dbver" = "4"; then
     rm -f $tempcname
     echo "#include <$db_h_file>" > $tempcname
     echo "configure___ dbfunc=db_create" >> $tempcname
@@ -40379,6 +40462,7 @@
 build_cpu!$build_cpu$ac_delim
 build_vendor!$build_vendor$ac_delim
 build_os!$build_os$ac_delim
+SHEBANG_PROGNAME!$SHEBANG_PROGNAME$ac_delim
 configuration!$configuration$ac_delim
 CC!$CC$ac_delim
 CFLAGS!$CFLAGS$ac_delim
@@ -40430,7 +40514,6 @@
 ldap_libs!$ldap_libs$ac_delim
 postgresql_libs!$postgresql_libs$ac_delim
 lwlib_objs!$lwlib_objs$ac_delim
-canna_libs!$canna_libs$ac_delim
 _ACEOF
 
   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
@@ -40472,6 +40555,7 @@
 ac_delim='%!_!# '
 for ac_last_try in false false false false false :; do
   cat >conf$$subs.sed <<_ACEOF
+canna_libs!$canna_libs$ac_delim
 ALLOCA!$ALLOCA$ac_delim
 have_esd_config!$have_esd_config$ac_delim
 SRC_SUBDIR_DEPS!$SRC_SUBDIR_DEPS$ac_delim
@@ -40548,7 +40632,7 @@
 LTLIBOBJS!$LTLIBOBJS$ac_delim
 _ACEOF
 
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 74; then
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 75; then
     break
   elif $ac_last_try; then
     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
--- a/configure.ac	Sun May 11 11:20:24 2008 +0200
+++ b/configure.ac	Sun May 11 11:24:01 2008 +0200
@@ -866,10 +866,10 @@
 XE_COMPLEX_ARG([database],
 	AS_HELP_STRING([--enable-database=TYPE],[Compile with database support.  Valid types are
                         `no' or a comma-separated list of one or more
-                        of `berkdb' and either `dbm' or `gnudbm'.]),
+                        of `berkdb' and either `dbm' or `gdbm'.]),
 	[
 if test "$enable_database_dbm"  = "yes" -a "$enable_database_gdbm" = "yes"; then
-	USAGE_ERROR("Only one of \`dbm' and \`gnudbm' may be specified
+	USAGE_ERROR("Only one of \`dbm' and \`gdbm' may be specified
 with the \`--with-database' option.")
 fi
 ],
@@ -1176,6 +1176,11 @@
 dnl ----------------------------------------
 dnl Find out which version of XEmacs this is
 dnl ----------------------------------------
+dnl This should be the same code as in Makefile.in.in
+cp "$srcdir/version.sh.in" "$srcdir/version.sh"
+if test -d "$srcdir/.hg"; then
+    (cd "$srcdir"; hg identify | cut -d " " -f 1 >> version.sh)
+fi
 . "$srcdir/version.sh" || exit 1;
 dnl Must do the following first to determine verbosity for AC_DEFINE
 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
@@ -1219,13 +1224,19 @@
   AC_DEFINE_UNQUOTED(INFODOCK_BUILD_VERSION, $infodock_build_version)
   version=${infodock_major_version}.${infodock_minor_version}.${infodock_build_version}
   PROGNAME=infodock
+  SHEBANG_PROGNAME=infodock-script
   CPPFLAGS="$CPPFLAGS -DINFODOCK"
 else
   PROGNAME=xemacs
-fi
+  SHEBANG_PROGNAME=xemacs-script
+fi
+
+AC_SUBST(SHEBANG_PROGNAME)
 
 AC_DEFINE_UNQUOTED(EMACS_PROGNAME, "$PROGNAME")
 
+AC_DEFINE_UNQUOTED(SHEBANG_PROGNAME, "${PROGNAME}-script")
+
 dnl ----------------------------------
 dnl Error checking and debugging flags
 dnl ----------------------------------
@@ -1806,7 +1817,7 @@
   if test "$enable_vdb" = "auto"; then
     case "$opsys" in
       darwin )  case "$machine" in
-		  i686 ) check_vdb_posix=yes ;;
+		  i[[3-9]]86 ) check_vdb_posix=yes ;;
 		  * ) AC_DEFINE(VDB_MACH)  have_vdb_mach=yes ;;
 		esac ;;
       cygwin* ) AC_DEFINE(VDB_WIN32) have_vdb_win32=yes ;;
@@ -4236,17 +4247,17 @@
     AC_CHECK_LIB($athena_variant, XawScrollbarSetThumb,
       [
         dnl Must not be a 3d library...
-        AC_CHECK_LIB($athena_variant, threeDClassRec,
+        AC_CHECK_LIB($athena_variant, XawSme3dComputeTopShadowRGB,
           [AC_MSG_WARN([Could not find a non-3d Athena widget library.])],
           athena_lib=$athena_variant)
       ],
       AC_MSG_WARN([Could not find an Athena widget library.]))
   else
     dnl The real configuration, need 3d library
-    AC_CHECK_LIB($athena_variant, threeDClassRec, athena_lib=$athena_variant,
+    AC_CHECK_LIB($athena_variant, XawSme3dComputeTopShadowRGB, athena_lib=$athena_variant,
       dnl OK, couldn't find it with a proper name, try the standard Athena lib
       dnl If that is 3d, presume the user asked for what they have installed.
-      AC_CHECK_LIB(Xaw, threeDClassRec,
+      AC_CHECK_LIB(Xaw, XawSme3dComputeTopShadowRGB,
         [
           athena_lib=Xaw;
           AC_MSG_WARN([Assuming that libXaw is actually $athena_variant.]);
@@ -5408,10 +5419,13 @@
 if test "$enable_database_gdbm" != "no"; then
   AC_CHECK_LIB(gdbm, dbm_open, [
    enable_database_gdbm=yes enable_database_dbm=no libdbm=-lgdbm], [
+       AC_CHECK_LIB(gdbm_compat, dbm_open, [
+       enable_database_gdbm=yes enable_database_dbm=no libdbm="-lgdbm_compat -lgdbm"], [
    if test "$enable_database_gdbm" = "yes"; then
      XE_DIE("Required GNU DBM support cannot be provided.")
    fi
-   enable_database_gdbm=no])
+   enable_database_gdbm=no], -lgdbm)
+  ])
 fi
 
 dnl Check for DBM support in libc and libdbm.
@@ -5492,7 +5506,7 @@
   fi
 
   dnl Berk db 4.1 decorates public functions with version information
-  if test "$enable_database_berkdb" != "yes" -a "$dbver" = "4"; then
+  if test "$enable_database_berkdb" = "yes" -a "$dbver" = "4"; then
     rm -f $tempcname
     echo "#include <$db_h_file>" > $tempcname
     echo "configure___ dbfunc=db_create" >> $tempcname
--- a/etc/ChangeLog	Sun May 11 11:20:24 2008 +0200
+++ b/etc/ChangeLog	Sun May 11 11:24:01 2008 +0200
@@ -1,3 +1,34 @@
+2008-02-21  Stephen J. Turnbull  <stephen@xemacs.org>
+
+	* README: Add descriptions of Daniel Polansky's icons.
+
+2008-02-21  Daniel Polansky  <danielpolansky@gmail.com>
+
+	Two images for one icon for XEmacs, one 16x16 and 32x32.
+	Also, a Microsoft Windows icon file is attached.
+	Itemized:
+	- 16x16 icon in PNG
+	- 32x32 icon in PNG
+	- Both bundled as a Microsoft Windows icon.
+
+	The images are modeled on XEmacs violet logotype, as found at
+	http://www.xemacs.org/. The images are copyright (c) 2005 by
+	Daniel Polansky, and licensed under GNU General Public Licence V2
+	or later at your option.
+
+	* xemacs-X-16.png:
+	* xemacs-X-32.png:
+	* xemacs-X.ico:
+	New files.
+
+2008-02-20  Stephen J. Turnbull  <stephen@xemacs.org>
+
+	* README: Give more accurate descriptions of image files.
+
+2007-12-26  Stephen J. Turnbull  <stephen@xemacs.org>
+
+	* bundled-packages/README: Document restriction on --with-late-packages.
+
 2007-12-23  Stephen J. Turnbull  <stephen@xemacs.org>
 
 	* bundled-packages/README: Documentation for bundled packages.
--- a/etc/README	Sun May 11 11:20:24 2008 +0200
+++ b/etc/README	Sun May 11 11:24:01 2008 +0200
@@ -17,7 +17,7 @@
 TUTORIAL.*		Tutorials in non-English languages
 VEGETABLES		XEmacs 21.5 code names
 XKeysymDB		X Keysym Database with Motif bindings
-cbx.png			"Created by XEmacs" logo
+cbx.png			"Created by XEmacs" logo (150x54 8bpp)
 ctags.1			Ctags man page
 custom/			Images used in Custom mode
 editclient.sh		Either start up XEmacs or connect to a running one
@@ -30,12 +30,12 @@
 gnudoit.1		Gnudoit man page
 gnuserv.1		Gnuserv man page
 gnuserv.README		Original README file from gnuserv
-gray1.xbm		Gray bitmap
+gray1.xbm		Halftone gray bitmap (16x16)
 idd/			?
 package-index.LATEST.gpg ?
 photos/*		Various pictures of XEmacs developers
-recycle.xpm
-recycle2.xpm		Two versions of oversized Recycle cursor
+recycle.xpm		Chartreuse recycle cursor (51x51)
+recycle2.xpm		Chartreuse recycle cursor (32x32)
 refcard.ps.gz		Postscript version of XEmacs reference card
 refcard.tex		XEmacs reference card
 sample.Xdefaults	(legacy -- to be removed)
@@ -44,15 +44,18 @@
 sparcworks/		Support files for Sparcworks
 tests/			Testcases for external widget
 toolbar/		Image files for the toolbar
-trash.xpm		Garbage can icon
+trash.xpm		B&W garbage can icon (32x46)
 unicode/		Unicode conversion tables
-xemacs-beta.xpm		XEmacs Beta logo
-xemacs-enhanced.png	"XEmacs-enhanced" logo
+xemacs-X-16.png		Violet boxed X icon (16x16)
+xemacs-X-32.png		Violet boxed X icon (32x32)
+xemacs-X.ico		Violet boxed X icon in MS Windows format
+xemacs-beta.xpm		XEmacs Beta logo for splashscreen (388x145)
+xemacs-enhanced.png	"XEmacs-enhanced" logo (90x32)
 xemacs-fe.sh		XEmacs frontend driver
-xemacs-icon.xpm
-xemacs-icon2.xbm
-xemacs-icon2.xpm
-xemacs-icon3.xpm	Various versions of an XEmacs WM icon
+xemacs-icon.xpm		Color XE on page icon (48x48)
+xemacs-icon2.xbm	B&W kitchen sink icon (50x50)
+xemacs-icon2.xpm	Color kitchen sink icon (50x50)
+xemacs-icon3.xpm	Grayscale X icon (48x48)
 xemacs.1		XEmacs man page
-xemacs.xbm
-xemacs.xpm		XEmacs logo used on the splash screen
+xemacs.xbm		Half-tone XEmacs logo (266x61)
+xemacs.xpm		XEmacs logo for splashscreen (388x145)
--- a/etc/bundled-packages/README	Sun May 11 11:20:24 2008 +0200
+++ b/etc/bundled-packages/README	Sun May 11 11:24:01 2008 +0200
@@ -1,10 +1,13 @@
 Package distributions may be placed in this directory.
 If present and a package-path is configured, packages can be installed
-using the top-level makefile.
+using the top-level Makefile.
 
 To configure the package path, use the --with-late-packages option to
-configure, which specifies the path to the directory containing the
-xemacs-packages and mule-packages hierarchies to install.
+configure, which specifies a single directory in which to install the
+xemacs-packages and mule-packages hierarchies provided.  If this is null,
+or contains a Unix-style search path (i.e., a colon is present in the
+argument of the --with-late-packages option), you will have to install
+the packages by hand.
 
 To find out if a distribution includes bundled packages, type
 
Binary file etc/xemacs-X-16.png has changed
Binary file etc/xemacs-X-32.png has changed
Binary file etc/xemacs-X.ico has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/install-sh	Sun May 11 11:24:01 2008 +0200
@@ -0,0 +1,519 @@
+#!/bin/sh
+# install - install a program, script, or datafile
+
+scriptversion=2006-12-25.00
+
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
+#
+# Copyright (C) 1994 X Consortium
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
+#
+#
+# FSF changes to this file are in the public domain.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# `make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch.
+
+nl='
+'
+IFS=" ""	$nl"
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit=${DOITPROG-}
+if test -z "$doit"; then
+  doit_exec=exec
+else
+  doit_exec=$doit
+fi
+
+# Put in absolute file names if you don't have them in your path;
+# or use environment vars.
+
+chgrpprog=${CHGRPPROG-chgrp}
+chmodprog=${CHMODPROG-chmod}
+chownprog=${CHOWNPROG-chown}
+cmpprog=${CMPPROG-cmp}
+cpprog=${CPPROG-cp}
+mkdirprog=${MKDIRPROG-mkdir}
+mvprog=${MVPROG-mv}
+rmprog=${RMPROG-rm}
+stripprog=${STRIPPROG-strip}
+
+posix_glob='?'
+initialize_posix_glob='
+  test "$posix_glob" != "?" || {
+    if (set -f) 2>/dev/null; then
+      posix_glob=
+    else
+      posix_glob=:
+    fi
+  }
+'
+
+posix_mkdir=
+
+# Desired mode of installed file.
+mode=0755
+
+chgrpcmd=
+chmodcmd=$chmodprog
+chowncmd=
+mvcmd=$mvprog
+rmcmd="$rmprog -f"
+stripcmd=
+
+src=
+dst=
+dir_arg=
+dst_arg=
+
+copy_on_change=false
+no_target_directory=
+
+usage="\
+Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+   or: $0 [OPTION]... SRCFILES... DIRECTORY
+   or: $0 [OPTION]... -t DIRECTORY SRCFILES...
+   or: $0 [OPTION]... -d DIRECTORIES...
+
+In the 1st form, copy SRCFILE to DSTFILE.
+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
+In the 4th, create DIRECTORIES.
+
+Options:
+     --help     display this help and exit.
+     --version  display version info and exit.
+
+  -c            (ignored)
+  -C            install only if different (preserve the last data modification time)
+  -d            create directories instead of installing files.
+  -g GROUP      $chgrpprog installed files to GROUP.
+  -m MODE       $chmodprog installed files to MODE.
+  -o USER       $chownprog installed files to USER.
+  -s            $stripprog installed files.
+  -t DIRECTORY  install into DIRECTORY.
+  -T            report an error if DSTFILE is a directory.
+
+Environment variables override the default commands:
+  CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
+  RMPROG STRIPPROG
+"
+
+while test $# -ne 0; do
+  case $1 in
+    -c) ;;
+
+    -C) copy_on_change=true;;
+
+    -d) dir_arg=true;;
+
+    -g) chgrpcmd="$chgrpprog $2"
+	shift;;
+
+    --help) echo "$usage"; exit $?;;
+
+    -m) mode=$2
+	case $mode in
+	  *' '* | *'	'* | *'
+'*	  | *'*'* | *'?'* | *'['*)
+	    echo "$0: invalid mode: $mode" >&2
+	    exit 1;;
+	esac
+	shift;;
+
+    -o) chowncmd="$chownprog $2"
+	shift;;
+
+    -s) stripcmd=$stripprog;;
+
+    -t) dst_arg=$2
+	shift;;
+
+    -T) no_target_directory=true;;
+
+    --version) echo "$0 $scriptversion"; exit $?;;
+
+    --)	shift
+	break;;
+
+    -*)	echo "$0: invalid option: $1" >&2
+	exit 1;;
+
+    *)  break;;
+  esac
+  shift
+done
+
+if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
+  # When -d is used, all remaining arguments are directories to create.
+  # When -t is used, the destination is already specified.
+  # Otherwise, the last argument is the destination.  Remove it from $@.
+  for arg
+  do
+    if test -n "$dst_arg"; then
+      # $@ is not empty: it contains at least $arg.
+      set fnord "$@" "$dst_arg"
+      shift # fnord
+    fi
+    shift # arg
+    dst_arg=$arg
+  done
+fi
+
+if test $# -eq 0; then
+  if test -z "$dir_arg"; then
+    echo "$0: no input file specified." >&2
+    exit 1
+  fi
+  # It's OK to call `install-sh -d' without argument.
+  # This can happen when creating conditional directories.
+  exit 0
+fi
+
+if test -z "$dir_arg"; then
+  trap '(exit $?); exit' 1 2 13 15
+
+  # Set umask so as not to create temps with too-generous modes.
+  # However, 'strip' requires both read and write access to temps.
+  case $mode in
+    # Optimize common cases.
+    *644) cp_umask=133;;
+    *755) cp_umask=22;;
+
+    *[0-7])
+      if test -z "$stripcmd"; then
+	u_plus_rw=
+      else
+	u_plus_rw='% 200'
+      fi
+      cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
+    *)
+      if test -z "$stripcmd"; then
+	u_plus_rw=
+      else
+	u_plus_rw=,u+rw
+      fi
+      cp_umask=$mode$u_plus_rw;;
+  esac
+fi
+
+for src
+do
+  # Protect names starting with `-'.
+  case $src in
+    -*) src=./$src;;
+  esac
+
+  if test -n "$dir_arg"; then
+    dst=$src
+    dstdir=$dst
+    test -d "$dstdir"
+    dstdir_status=$?
+  else
+
+    # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
+    # might cause directories to be created, which would be especially bad
+    # if $src (and thus $dsttmp) contains '*'.
+    if test ! -f "$src" && test ! -d "$src"; then
+      echo "$0: $src does not exist." >&2
+      exit 1
+    fi
+
+    if test -z "$dst_arg"; then
+      echo "$0: no destination specified." >&2
+      exit 1
+    fi
+
+    dst=$dst_arg
+    # Protect names starting with `-'.
+    case $dst in
+      -*) dst=./$dst;;
+    esac
+
+    # If destination is a directory, append the input filename; won't work
+    # if double slashes aren't ignored.
+    if test -d "$dst"; then
+      if test -n "$no_target_directory"; then
+	echo "$0: $dst_arg: Is a directory" >&2
+	exit 1
+      fi
+      dstdir=$dst
+      dst=$dstdir/`basename "$src"`
+      dstdir_status=0
+    else
+      # Prefer dirname, but fall back on a substitute if dirname fails.
+      dstdir=`
+	(dirname "$dst") 2>/dev/null ||
+	expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	     X"$dst" : 'X\(//\)[^/]' \| \
+	     X"$dst" : 'X\(//\)$' \| \
+	     X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
+	echo X"$dst" |
+	    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+		   s//\1/
+		   q
+		 }
+		 /^X\(\/\/\)[^/].*/{
+		   s//\1/
+		   q
+		 }
+		 /^X\(\/\/\)$/{
+		   s//\1/
+		   q
+		 }
+		 /^X\(\/\).*/{
+		   s//\1/
+		   q
+		 }
+		 s/.*/./; q'
+      `
+
+      test -d "$dstdir"
+      dstdir_status=$?
+    fi
+  fi
+
+  obsolete_mkdir_used=false
+
+  if test $dstdir_status != 0; then
+    case $posix_mkdir in
+      '')
+	# Create intermediate dirs using mode 755 as modified by the umask.
+	# This is like FreeBSD 'install' as of 1997-10-28.
+	umask=`umask`
+	case $stripcmd.$umask in
+	  # Optimize common cases.
+	  *[2367][2367]) mkdir_umask=$umask;;
+	  .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
+
+	  *[0-7])
+	    mkdir_umask=`expr $umask + 22 \
+	      - $umask % 100 % 40 + $umask % 20 \
+	      - $umask % 10 % 4 + $umask % 2
+	    `;;
+	  *) mkdir_umask=$umask,go-w;;
+	esac
+
+	# With -d, create the new directory with the user-specified mode.
+	# Otherwise, rely on $mkdir_umask.
+	if test -n "$dir_arg"; then
+	  mkdir_mode=-m$mode
+	else
+	  mkdir_mode=
+	fi
+
+	posix_mkdir=false
+	case $umask in
+	  *[123567][0-7][0-7])
+	    # POSIX mkdir -p sets u+wx bits regardless of umask, which
+	    # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
+	    ;;
+	  *)
+	    tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+	    trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
+
+	    if (umask $mkdir_umask &&
+		exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
+	    then
+	      if test -z "$dir_arg" || {
+		   # Check for POSIX incompatibilities with -m.
+		   # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+		   # other-writeable bit of parent directory when it shouldn't.
+		   # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+		   ls_ld_tmpdir=`ls -ld "$tmpdir"`
+		   case $ls_ld_tmpdir in
+		     d????-?r-*) different_mode=700;;
+		     d????-?--*) different_mode=755;;
+		     *) false;;
+		   esac &&
+		   $mkdirprog -m$different_mode -p -- "$tmpdir" && {
+		     ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
+		     test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+		   }
+		 }
+	      then posix_mkdir=:
+	      fi
+	      rmdir "$tmpdir/d" "$tmpdir"
+	    else
+	      # Remove any dirs left behind by ancient mkdir implementations.
+	      rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
+	    fi
+	    trap '' 0;;
+	esac;;
+    esac
+
+    if
+      $posix_mkdir && (
+	umask $mkdir_umask &&
+	$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+      )
+    then :
+    else
+
+      # The umask is ridiculous, or mkdir does not conform to POSIX,
+      # or it failed possibly due to a race condition.  Create the
+      # directory the slow way, step by step, checking for races as we go.
+
+      case $dstdir in
+	/*) prefix='/';;
+	-*) prefix='./';;
+	*)  prefix='';;
+      esac
+
+      eval "$initialize_posix_glob"
+
+      oIFS=$IFS
+      IFS=/
+      $posix_glob set -f
+      set fnord $dstdir
+      shift
+      $posix_glob set +f
+      IFS=$oIFS
+
+      prefixes=
+
+      for d
+      do
+	test -z "$d" && continue
+
+	prefix=$prefix$d
+	if test -d "$prefix"; then
+	  prefixes=
+	else
+	  if $posix_mkdir; then
+	    (umask=$mkdir_umask &&
+	     $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+	    # Don't fail if two instances are running concurrently.
+	    test -d "$prefix" || exit 1
+	  else
+	    case $prefix in
+	      *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+	      *) qprefix=$prefix;;
+	    esac
+	    prefixes="$prefixes '$qprefix'"
+	  fi
+	fi
+	prefix=$prefix/
+      done
+
+      if test -n "$prefixes"; then
+	# Don't fail if two instances are running concurrently.
+	(umask $mkdir_umask &&
+	 eval "\$doit_exec \$mkdirprog $prefixes") ||
+	  test -d "$dstdir" || exit 1
+	obsolete_mkdir_used=true
+      fi
+    fi
+  fi
+
+  if test -n "$dir_arg"; then
+    { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
+    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
+    { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
+      test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
+  else
+
+    # Make a couple of temp file names in the proper directory.
+    dsttmp=$dstdir/_inst.$$_
+    rmtmp=$dstdir/_rm.$$_
+
+    # Trap to clean up those temp files at exit.
+    trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
+
+    # Copy the file name to the temp name.
+    (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
+
+    # and set any options; do chmod last to preserve setuid bits.
+    #
+    # If any of these fail, we abort the whole thing.  If we want to
+    # ignore errors from any of these, just make sure not to ignore
+    # errors from the above "$doit $cpprog $src $dsttmp" command.
+    #
+    { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
+    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
+    { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
+    { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
+
+    # If -C, don't bother to copy if it wouldn't change the file.
+    if $copy_on_change &&
+       old=`LC_ALL=C ls -dlL "$dst"	2>/dev/null` &&
+       new=`LC_ALL=C ls -dlL "$dsttmp"	2>/dev/null` &&
+
+       eval "$initialize_posix_glob" &&
+       $posix_glob set -f &&
+       set X $old && old=:$2:$4:$5:$6 &&
+       set X $new && new=:$2:$4:$5:$6 &&
+       $posix_glob set +f &&
+
+       test "$old" = "$new" &&
+       $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
+    then
+      rm -f "$dsttmp"
+    else
+      # Rename the file to the real destination.
+      $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
+
+      # The rename failed, perhaps because mv can't rename something else
+      # to itself, or perhaps because mv is so ancient that it does not
+      # support -f.
+      {
+	# Now remove or move aside any old file at destination location.
+	# We try this two ways since rm can't unlink itself on some
+	# systems and the destination file might be busy for other
+	# reasons.  In this case, the final cleanup might fail but the new
+	# file should still install successfully.
+	{
+	  test ! -f "$dst" ||
+	  $doit $rmcmd -f "$dst" 2>/dev/null ||
+	  { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+	    { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+	  } ||
+	  { echo "$0: cannot unlink or rename $dst" >&2
+	    (exit 1); exit 1
+	  }
+	} &&
+
+	# Now rename the file to the real destination.
+	$doit $mvcmd "$dsttmp" "$dst"
+      }
+    fi || exit 1
+
+    trap '' 0
+  fi
+done
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
--- a/install.sh	Sun May 11 11:20:24 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,236 +0,0 @@
-#!/bin/sh
-#
-# install - install a program, script, or datafile
-# This comes from X11R5.
-#
-# $XConsortium: install.sh,v 1.2 89/12/18 14:47:22 jim Exp $
-#
-# This script is compatible with the BSD install script, but was written
-# from scratch.
-#
-
-
-# set DOITPROG to echo to test this script
-
-# Don't use :- since 4.3BSD and earlier shells don't like it.
-doit="${DOITPROG-}"
-
-
-# put in absolute paths if you don't have them in your path; or use env. vars.
-
-mvprog="${MVPROG-mv}"
-cpprog="${CPPROG-cp}"
-chmodprog="${CHMODPROG-chmod}"
-chownprog="${CHOWNPROG-chown}"
-chgrpprog="${CHGRPPROG-chgrp}"
-stripprog="${STRIPPROG-strip}"
-rmprog="${RMPROG-rm}"
-mkdirprog="${MKDIRPROG-mkdir}"
-
-tranformbasename=""
-transform_arg=""
-instcmd="$mvprog"
-chmodcmd="$chmodprog 0755"
-chowncmd=""
-chgrpcmd=""
-stripcmd=""
-rmcmd="$rmprog -f"
-mvcmd="$mvprog"
-src=""
-dst=""
-dir_arg=""
-
-while [ x"$1" != x ]; do
-    case $1 in
-	-c) instcmd="$cpprog"
-	    shift
-	    continue;;
-
-	-d) dir_arg=true
-	    shift
-	    continue;;
-
-	-m) chmodcmd="$chmodprog $2"
-	    shift
-	    shift
-	    continue;;
-
-	-o) chowncmd="$chownprog $2"
-	    shift
-	    shift
-	    continue;;
-
-	-g) chgrpcmd="$chgrpprog $2"
-	    shift
-	    shift
-	    continue;;
-
-	-s) stripcmd="$stripprog"
-	    shift
-	    continue;;
-
-	-t=*) transformarg=`echo $1 | sed 's/-t=//'`
-	    shift
-	    continue;;
-
-	-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
-	    shift
-	    continue;;
-
-	*)  if [ x"$src" = x ]
-	    then
-		src=$1
-	    else
-		# this colon is to work around a 386BSD /bin/sh bug
-		:
-		dst=$1
-	    fi
-	    shift
-	    continue;;
-    esac
-done
-
-if [ x"$src" = x ]
-then
-	echo "install:	no input file specified"
-	exit 1
-else
-	true
-fi
-
-if [ x"$dir_arg" != x ]; then
-	dst=$src
-	src=""
-	
-	if [ -d $dst ]; then
-		instcmd=:
-	else
-		instcmd=mkdir
-	fi
-else
-
-# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
-# might cause directories to be created, which would be especially bad 
-# if $src (and thus $dsttmp) contains '*'.
-
-	if [ -f $src -o -d $src ]
-	then
-		true
-	else
-		echo "install:  $src does not exist"
-		exit 1
-	fi
-	
-	if [ x"$dst" = x ]
-	then
-		echo "install:	no destination specified"
-		exit 1
-	else
-		true
-	fi
-
-# If destination is a directory, append the input filename; if your system
-# does not like double slashes in filenames, you may need to add some logic
-
-	if [ -d $dst ]
-	then
-		dst="$dst"/`basename $src`
-	else
-		true
-	fi
-fi
-
-## this sed command emulates the dirname command
-dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
-
-# Make sure that the destination directory exists.
-#  this part is taken from Noah Friedman's mkinstalldirs script
-
-# Skip lots of stat calls in the usual case.
-if [ ! -d "$dstdir" ]; then
-defaultIFS='	
-'
-IFS="${IFS-${defaultIFS}}"
-
-oIFS="${IFS}"
-# Some sh's can't handle IFS=/ for some reason.
-IFS='%'
-set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
-IFS="${oIFS}"
-
-pathcomp=''
-
-while [ $# -ne 0 ] ; do
-	pathcomp="${pathcomp}${1}"
-	shift
-
-	if [ ! -d "${pathcomp}" ] ;
-        then
-		$mkdirprog "${pathcomp}"
-	else
-		true
-	fi
-
-	pathcomp="${pathcomp}/"
-done
-fi
-
-if [ x"$dir_arg" != x ]
-then
-	$doit $instcmd $dst &&
-
-	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
-	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
-	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
-	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
-else
-
-# If we're going to rename the final executable, determine the name now.
-
-	if [ x"$transformarg" = x ] 
-	then
-		dstfile=`basename $dst`
-	else
-		dstfile=`basename $dst $transformbasename | 
-			sed $transformarg`$transformbasename
-	fi
-
-# don't allow the sed command to completely eliminate the filename
-
-	if [ x"$dstfile" = x ] 
-	then
-		dstfile=`basename $dst`
-	else
-		true
-	fi
-
-# Make a temp file name in the proper directory.
-
-	dsttmp=$dstdir/#inst.$$#
-
-# Move or copy the file name to the temp name
-
-	$doit $instcmd $src $dsttmp &&
-
-	trap "rm -f ${dsttmp}" 0 &&
-
-# and set any options; do chmod last to preserve setuid bits
-
-# If any of these fail, we abort the whole thing.  If we want to
-# ignore errors from any of these, just make sure not to ignore
-# errors from the above "$doit $instcmd $src $dsttmp" command.
-
-	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
-	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
-	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
-	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
-
-# Now rename the file to the real destination.
-
-	$doit $rmcmd -f $dstdir/$dstfile &&
-	$doit $mvcmd $dsttmp $dstdir/$dstfile 
-
-fi &&
-
-
-exit 0
--- a/lisp/ChangeLog	Sun May 11 11:20:24 2008 +0200
+++ b/lisp/ChangeLog	Sun May 11 11:24:01 2008 +0200
@@ -47,6 +47,234 @@
 	* x-init.el (tab):
 	Create the initial display table as a char-table, not a vector. 
 
+2008-01-20  Aidan Kehoe  <kehoea@parhasard.net>
+
+	* startup.el (command-line-do-script): New.
+	(command-switch-alist): Use command-line-do-script.
+	New argument, compatible with GNU; --script or -script says "treat
+	the following argument as a file to load in batch mode".
+
+2008-05-07  Aidan Kehoe  <kehoea@parhasard.net>
+
+	* mule/latin.el (windows-1250): Add the Central European Windows
+	coding system. 
+	* mule/mule-win32-init.el: Don't use the Windows-specific CP1250
+	implementation, rely on that in latin.el instead. 
+
+2008-04-13  Henry S. Thompson <ht@inf.ed.ac.uk>, Mike Sperber  <mike@xemacs.org>
+
+	* window-xemacs.el (save-window-excursion/mapping,
+	set-window-configuration/mapping): Add.  These function return an
+	alist mapping the window objects from the original window
+	configuration to the window objects corresponding to them in the
+	restored configuration.
+	(set-window-configuration): 
+	(saved-window): 
+	(root-window->saved-window): 
+	(really-set-window-configuration): 
+	(restore-saved-window): Record the mapping for above functions.
+
+2008-04-12  Henry S. Thompson <ht@inf.ed.ac.uk>
+
+	* window-xemacs.el (real-split-window, real-delete-window): Define
+	these to the original definitions of `split-window' and
+	`delete-window', and use them in the window-configuration code to
+	make sure it doesn't get affected by advice to these functions.
+	
+2008-04-10  Aidan Kehoe  <kehoea@parhasard.net>
+
+	* help.el (describe-function-1): 
+	Rely on #'symbol-file to tell which file an autoloaded function
+	belongs to, don't special-case them.
+
+2008-03-19  Stephen J. Turnbull  <stephen@xemacs.org>
+
+	* custom.el (custom-theme-reset-internal): Fix call to get (symbol
+	and property were reversed).
+
+2008-03-12  Mike Sperber  <mike@xemacs.org>
+
+	* window-xemacs.el (restore-saved-window): Restore window
+	parameters right after splitting, rather than after traversing the
+	other children.
+
+2008-03-07  Michael Sperber  <mike@xemacs.org>
+
+	* gnuserv.el (gnuserv-temp-file-regexp): Quote the temp-directory
+	part.
+
+2008-03-05  Didier Verna  <didier@xemacs.org>
+
+	Fix auto-formatting of comments in auto-fill-mode.
+
+	* newcomment.el (comment-indent): Don't insert a space at bol.
+	* newcomment.el (comment-indent-new-line): Bind
+	block-comment-start to comment-start in order to preserve the
+	formatting of previous comment lines.
+
+2008-03-05  Didier Verna  <didier@xemacs.org>
+
+	Ease customization of face(s) under point.
+	Suggested by Andreas Rohler.
+
+	* cus-edit.el (custom-face-prompt): New (interactive call). Offer
+	a prefix for choosing a face amongst those at point instead of all
+	of them.
+	* cus-edit.el (customize-face-1): New. Factor out from the
+	functions below.
+	* cus-edit.el (customize-face): Use it.
+	* cus-edit.el (customize-face-other-window): Ditto.
+
+2008-02-16  Michael Sperber  <mike@xemacs.org>
+
+	* autoload.el (autoload-make-autoload-operators,
+	autoload-make-autoload-complex-operators): Move autoload operator
+	definitons to autoload-operators.el in xemacs-base package.
+	Continue to work with older packages.
+
+2008-02-03  Aidan Kehoe  <kehoea@parhasard.net>
+
+	* iso8859-1.el (ascii-case-table):
+	Correct the order of the arguments to #'put-case-table-pair.
+
+2008-01-25  Michael Sperber  <mike@xemacs.org>
+
+	* build-report.el (build-report-version-file-regexp): Adjust to
+	handle Mercurial hash.
+
+2008-01-21  Aidan Kehoe  <kehoea@parhasard.net>
+
+	* info.el (Info-suffix-list):
+	Support LZMA compression, as used--oddly--by Mandriva Linux.
+
+2008-01-17  Mike Sperber  <mike@xemacs.org>
+
+	* files.el (insert-directory): Bind `coding-system-for-read' to
+	the `file-name' coding system.  (Previously, the default ended up
+	being undecided, which doesn't work well for UTF-8-based locales,
+	for example.)
+
+2008-01-16  Aidan Kehoe  <kehoea@parhasard.net>
+
+	* keydefs.el (global-map):
+	Bind '(shift delete) to #'kill-primary-selection, as described by
+	Glynn Clements in
+	16434.49191.47038.991206@cerise.nosuchdomain.co.uk of 2004-02-08.
+
+2008-01-14  Jerry James  <james@xemacs.org>
+
+	* font-lock.el (font-lock-add-keywords): Adapt to differences in
+	Emacs and XEmacs compiled font-lock lists.
+	* font-lock.el (font-lock-remove-keywords): Ditto.
+	* font-lock.el (font-lock-set-defaults-1): Make changes specified
+	by font-lock-keywords-alist and font-lock-removed-keywords-alist.
+
+2008-01-14  Aidan Kehoe  <kehoea@parhasard.net>
+
+	* bytecomp.el (byte-compile-output-file-form):
+	Bind print-gensym-alist to nil, as we do within
+	byte-compile-output-docform.
+
+2008-01-04  Michael Sperber  <mike@xemacs.org>
+
+	* code-files.el (insert-file-contents):
+	(load): Don't call `substitute-in-file-name' on the file name.
+
+2008-01-03  Aidan Kehoe  <kehoea@parhasard.net>
+
+	* cus-edit.el (custom-save-all):
+	If the directory containing the custom file doesn't exist, try to
+	create it. Fixes Nick's Crabtree's bug of
+	5fb265820712140145w512fa3bbh355cf76f7e2cf792@mail.gmail.com ;
+	thank you Nick.
+	* menubar-items.el (default-menubar):
+	In the code to edit the user's init file, try to create the
+	containing directory if it doesn't exist.
+
+2008-01-02  Aidan Kehoe  <kehoea@parhasard.net>
+
+	* gtk-init.el (init-post-gtk-win):
+	Trust the X11 code to give us decent default fonts.
+
+2008-01-02  Aidan Kehoe  <kehoea@parhasard.net>
+
+	* x-iso8859-1.el: Removed.
+	* gtk-iso8859-1.el: Removed.
+	These haven't been used in a year and a half. No need to keep them
+	around.
+
+2008-01-02  Mike Sperber  <mike@xemacs.org>
+
+	* minibuf.el (mouse-read-file-name-1): Use `window-height' instead
+	of `frame-height' to be consistent with `split-window''s
+	calculations.  Bind `window-min-height' for the whole thing to
+	avoid geometry problems with the buttons window.
+
+2008-01-02  Mike Sperber  <mike@xemacs.org>
+
+	* minibuf.el (mouse-read-file-name-1): Make the buttons in the
+	dialog frame occupy `window-min-height' lines to avoid problems
+	when the window configuration changes---as it does with
+	`resize-minibuffer-mode'.
+
+2007-12-31  Aidan Kehoe  <kehoea@parhasard.net>
+
+	* menubar-items.el (default-menubar):
+	Byte compile the specified lambdas. Correct some compile time
+	warnings uncovered by this.
+	* menubar-items.el (tutorials-menu-filter):
+	If a language environment doesn't have an associated POSIX locale
+	specified--which indicates we don't want it used except by those
+	who know what they're doing--don't show its tutorial in the menu.
+	* behavior.el (behavior-menu-filter):
+	Byte compile the lambdas in the generated menu.
+
+2007-12-30  Aidan Kehoe  <kehoea@parhasard.net>
+
+	* iso8859-1.el: (provide 'iso8859-1) again, because one file uses
+	it in the packages.
+
+2007-12-30  Aidan Kehoe  <kehoea@parhasard.net>
+
+	* subr.el (with-case-table): New.
+	Idea and implementation taken from GNU's code of April 2007,
+	before GPL V3 was implied. Thank you GNU.
+	* iso8859-1.el (ascii-case-table): New.
+	Idea taken from GNU.
+	* iso8859-1.el :
+	Change Jamie's implicit compile-time call to a macro literal into
+	something comprehensible to and maintainable by mortals, using to
+	cl.el's #'loop.
+	* iso8859-1.el (ctl-arrow):
+	Initialise it to something more comprehensible.
+
+2007-12-30  Aidan Kehoe  <kehoea@parhasard.net>
+
+	* loadhist.el (symbol-file):
+	Accept a new TYPE argument, compatible with GNU, saying
+	whether function or variable definitions should be searched for.
+	Implement the functionality for autoloads, handling TYPE
+	correctly.
+	Pass the TYPE argument to built-in-symbol-file correctly.
+	Document that TYPE is not implemented for non-autoloaded Lisp
+	definitions. Our load-history doesn't have the relevant metadata.
+
+2007-12-25  Aidan Kehoe  <kehoea@parhasard.net>
+
+	* glyphs.el (init-glyphs):
+	Revert part of Didier's 2007-10-15 commit, which broke
+	#'make-image-specifier with string arguments, and more noticeably
+	truncation-glyph, continuation-glyph, octal-escape-glyph,
+	control-arrow-glyph.
+
+2007-12-23  Mike Sperber  <mike@xemacs.org>
+
+	* font.el (xft-font-create-object): Use
+	`fc-pattern-get-or-compute-size' instead of
+	`fc-pattern-get-size'.
+
+	* fontconfig.el (fc-pattern-get-or-compute-size): Add.
+
 2007-12-22  Stephen J. Turnbull  <stephen@xemacs.org>
 
 	Factor out lists of operators specially treated by `make-autoload'.
@@ -83,19 +311,19 @@
 	* help.el (describe-function-1):
 	Give details of bindings for commands, taking into account
 	global-window-system-map and global-tty-map when bindings differ
-	compared to the global map. 
+	compared to the global map.
 
 2007-12-17  Aidan Kehoe  <kehoea@parhasard.net>
 
 	* subr.el (integer-to-bit-vector): New.
 	* subr.el (bit-vector-to-integer): New.
-	Provide naive implementations using the Lisp reader for these. 
+	Provide naive implementations using the Lisp reader for these.
 
 2007-12-14  Aidan Kehoe  <kehoea@parhasard.net>
 
 	* process.el (substitute-env-vars):
-	Merge an example from GNU's docstring. 
-	* process.el (setenv):	
+	Merge an example from GNU's docstring.
+	* process.el (setenv):
 	Pass nil as the default abbrev table to the #'read-from-minibuffer
 	call, instead of passing the current value of the variable. Bug
 	introduced by an incorrect sync from GNU by Ben; reported by
@@ -104,7 +332,7 @@
 	Document the #'set-time-zone-rule call when TZ is set. Push the
 	old value on to the beginning of setenv-history. (Both merged from
 	GNU.) Document that we don't do the coding-system frobbing at this
-	level that GNU does. 
+	level that GNU does.
 
 	Provide a commented-out, sample implementation of GNU's
 	#'environment; document why I think we shouldn't include it.
@@ -132,10 +360,10 @@
 
 	* unicode.el (load-unicode-mapping-tables):
 	Call #'set-default-unicode-precedence wrapped with
-	#'declare-fboundp, to avoid warnings on non-Mule builds. 
+	#'declare-fboundp, to avoid warnings on non-Mule builds.
 
 	* unicode.el (ccl-encode-to-ucs-2):
-	* unicode.el (unicode-error-sequence-regexp-range):	
+	* unicode.el (unicode-error-sequence-regexp-range):
 	* unicode.el (frob-unicode-errors-region):
 	* unicode.el (unicode-error-translate-region):
 	Unconditionally provide these functions and variables at top
@@ -146,11 +374,11 @@
 
 	Unintern the function and variable symbols if (featurep 'mule) is
 	not true, so their function definitions and so on get garbage
-	collected at dump time in non-Mule builds. 
-
-	* obsolete.el (add-menu-item): 
-	* obsolete.el (add-menu): 
-	* obsolete.el (add-menu): 
+	collected at dump time in non-Mule builds.
+
+	* obsolete.el (add-menu-item):
+	* obsolete.el (add-menu):
+	* obsolete.el (add-menu):
 	* obsolete.el (package-get-download-menu):
 	Provide these functions at top level, in order to make them
 	available to make-docfile.c, which has trouble interpreting byte
@@ -160,17 +388,17 @@
 
 2007-12-09  Aidan Kehoe  <kehoea@parhasard.net>
 
-	* mule/latin.el: 
+	* mule/latin.el:
 	Create clones of the English language environment with UTF-8 and
 	Windows-1252 as the associated coding system, for Joachim Schrod's
-	use case of f8q022$3o3$1@sea.gmane.org. 
+	use case of f8q022$3o3$1@sea.gmane.org.
 
 2007-12-04  Aidan Kehoe  <kehoea@parhasard.net>
 
 	* keydefs.el:
 	Bind mouse wheel movements by default, to a lambda that calls the
-	autoloaded #'mwheel-install and then #'mwheel-scrool with the
-	appropriate event. 
+	autoloaded #'mwheel-install and then #'mwheel-scroll with the
+	appropriate event.
 
 2007-12-07  Vin Shelton  <acs@xemacs.org>
 
@@ -180,20 +408,20 @@
 
 	* code-files.el (write-region):
 	Use a more concise and probably less confusing docstring from
-	Stephen. See 
-	87ve84323s.fsf@uwakimon.sk.tsukuba.ac.jp. 
+	Stephen. See
+	87ve84323s.fsf@uwakimon.sk.tsukuba.ac.jp.
 
 	Not following his suggestion of keeping the CODING-SYSTEM name for
 	the last argument, given that that would make reworking the
 	body of the necessary, and that I introduced a short-lived bug the
-	last time I did that. 
+	last time I did that.
 
 2007-12-03  Aidan Kehoe  <kehoea@parhasard.net>
 
 	* bytecomp.el (byte-compile-file-form-custom-declare-variable):
 	Instead of using a keyword argument that's incompatible with 21.4,
 	modify the byte compiled init code to change the variable's
-	standard-value property itself. 
+	standard-value property itself.
 
 2007-12-04  Aidan Kehoe  <kehoea@parhasard.net>
 
@@ -201,12 +429,12 @@
 	* mule/iso-with-esc.el ('iso-latin-1-with-esc): New.
 	Provide the variable-length rarely-used ISO 2022 compatible coding
 	systems for Latin (that is, iso-8859-[1-16]) again, to address
-	Stephen's veto. 
+	Stephen's veto.
 
 2007-12-04  Aidan Kehoe  <kehoea@parhasard.net>
 
 	* autoload.el (make-autoload):
-	Support auto-autoloads for coding systems. 
+	Support auto-autoloads for coding systems.
 
 2007-12-01  Aidan Kehoe  <kehoea@parhasard.net>
 
@@ -226,7 +454,7 @@
 	unification problems the old implementation had.
 
 	Add aliases for GNU compatibility.
-	  
+
 	Still no warning on the imminent corruption of data, though. I'm
 	working on it.
 	* mule/greek.el (windows-1253):
@@ -239,7 +467,7 @@
 	print-gensym-alist on exit from #'print. This is appropriate
 	because #'byte-compile-output-file-form may be called multiple
 	times for a given output file, and re-using the
-	#1=#:... placeholders in that context is inappropriate. 
+	#1=#:... placeholders in that context is inappropriate.
 
 2007-11-29  Aidan Kehoe  <kehoea@parhasard.net>
 
@@ -250,7 +478,7 @@
 	and run-time code didn't share this value.
 	* mule/mule-coding.el (make-8-bit-coding-system):
 	Mark the coding systems created by this code as such, for the sake
-	of automated testing of their round-trip compatibility. 
+	of automated testing of their round-trip compatibility.
 
 2007-11-28  Aidan Kehoe  <kehoea@parhasard.net>
 
@@ -264,7 +492,7 @@
 
 	* mule/mule-cmds.el (create-variant-language-environment):
 	Set tutorial-coding-system to correspond to the original coding
-	system when creating the variant language environment. 
+	system when creating the variant language environment.
 
 2007-11-27  Aidan Kehoe  <kehoea@parhasard.net>
 
@@ -279,9 +507,9 @@
 	a) the byte compilation warnings and b) since our interpreter is
 	proportionately so much slower than theirs, we are penalised more
 	strongly when we interpret code, especially when
-	#'custom-declare-variable calls cluster, as they tend to do. 
+	#'custom-declare-variable calls cluster, as they tend to do.
 	* cus-edit.el (customize-changed-options):
-	Wrap the #'interactive call to be less than 80 columns. 
+	Wrap the #'interactive call to be less than 80 columns.
 	Wrap the code to less than 80 columns.
 	* cus-edit.el (custom-variable-menu):
 	* cus-edit.el (custom-face-menu):
@@ -291,16 +519,16 @@
 	* custom.el (custom-initialize-changed):
 	Correct the docstring; change the defun to defsubst, since calls
 	to this are only done from one function, and calls to that
-	function cluster. 
+	function cluster.
 	* custom.el (custom-declare-variable):
 	Document the :default argument to #'custom-declare-variable;
-	implement it. 
+	implement it.
 
 2007-11-27  Aidan Kehoe  <kehoea@parhasard.net>
 
 	* byte-optimize.el (byte-optimize-featurep):
 	Remove a useless let binding that was a hangover from an earlier
-	version of the code. Eliminates a byte-compile time warning. 
+	version of the code. Eliminates a byte-compile time warning.
 
 2007-11-22  Vin Shelton  <acs@xemacs.org>
 
@@ -311,19 +539,19 @@
 	* code-files.el (write-region):
 	Call #'find-coding-system on the (possible) coding system argument
 	before checking it with #'coding-system-p; the latter function
-	gives false results when passed coding system names as symbols. 
+	gives false results when passed coding system names as symbols.
 
 	Preserve the old order of determination of the coding system
 	better.
 
 2007-11-14  Aidan Kehoe  <kehoea@parhasard.net>
 
-	* unicode.el (unicode-error-default-translation-table): 
+	* unicode.el (unicode-error-default-translation-table):
 	* unicode.el (unicode-error-sequence-regexp-range):
 	* unicode.el (frob-unicode-errors-region):
 	Make these variables and the single function available to
 	make-docfile, by moving them to the start of the line. This
-	conflicts with normal indentation of Lisp, unfortunately. 
+	conflicts with normal indentation of Lisp, unfortunately.
 
 2007-11-14  Aidan Kehoe  <kehoea@parhasard.net>
 
@@ -332,32 +560,32 @@
 	* subr.el (string-to-vector):
 	(append STRING nil) is faster than (mapcar #'identity STRING),
 	(vconcat STRING) is faster than (mapcar #'identity STRING). Change
-	from GNU. 
+	from GNU.
 
 2007-11-14  Aidan Kehoe  <kehoea@parhasard.net>
 
 	* code-files.el (write-region):
 	Provide a new arg, CODING-SYSTEM-OR-MUSTBENEW, for compatibility
 	both with GNU (where it has the MUSTBENEW meaning) and earlier
-	XEmacs code (where it has the CODING-SYSTEM meaning). 
+	XEmacs code (where it has the CODING-SYSTEM meaning).
 	* files.el:
 	* files.el (normal-backup-enable-predicate):
 	* files.el (auto-save-file-name-transforms):
 	Correct the docstrings of #'normal-backup-enable-predicate,
 	#'auto-save-file-name-transforms.
 	* files.el (make-temp-file): New.
-	Merge from GNU. 
+	Merge from GNU.
 	* subr.el:
-	Document that #'make-temp-name is now in files.el. 
+	Document that #'make-temp-name is now in files.el.
 
 2007-11-08  Aidan Kehoe  <kehoea@parhasard.net>
 
 	* cus-edit.el (custom-save-all):
-	Merge Jason Spiro's fix of 
+	Merge Jason Spiro's fix of
 	c241693f0710021645g642f145n5925c7a35e7b2c58@mail.gmail.com , to
 	avoid corruption of the custom-set-variables and custom-set-fonts
 	calls in ~/.emacs if XEmacs doesn't understand any part of the
-	syntax of ~/.emacs . 
+	syntax of ~/.emacs .
 
 2007-10-31  Mike Sperber  <mike@xemacs.org>
 
@@ -370,15 +598,15 @@
 	* mule/general-late.el:
 	Now that all the dumped coding systems are available, decode
 	Installation-string using the value for
-	Installation-file-coding-system at dump time. 
+	Installation-file-coding-system at dump time.
 
 2007-10-26  Aidan Kehoe  <kehoea@parhasard.net>
 
 	* dumped-lisp.el (preloaded-file-list):
-	Allow version.el to be compiled. 
+	Allow version.el to be compiled.
 	* help.el (describe-installation):
 	Use and-boundp instead of (and (boundp ...); don't decode
-	Installation-string. Call #'error with a DATUM arg. 
+	Installation-string. Call #'error with a DATUM arg.
 	* loadup.el:
 	* loadup.el (Installation-string): Removed.
 	Moved to version.el.
@@ -388,13 +616,13 @@
 	* update-elc-2.el (batch-update-elc-2):
 	Remove version.el from the ignored files; if Mule is available,
 	always recompile it, since Installation-file-coding-system depends
-	on relatively complex Mule code. 
+	on relatively complex Mule code.
 	* update-elc.el (unbytecompiled-lisp-files):
 	Remove version.el.
 	* version.el:
 	* version.el (Installation-file-coding-system): New.
 	Variable reflecting the native coding system at build time, to
-	better work out Installation-string. 
+	better work out Installation-string.
 	* version.el (Installation-string): New.
 	Moved from loadup.el; documented in more detail.
 
@@ -415,14 +643,14 @@
 	refuses to run on GNU Emacs. Also optimises away checks for cl,
 	cl-extra, cl-19 and backquote, a conservative list of those
 	features that have been available in every XEmacs build since the
-	last time our opcodes changed. 
+	last time our opcodes changed.
 
 2007-10-14  Aidan Kehoe  <kehoea@parhasard.net>
 
 	* coding.el:
 	Use raw-text, not no-conversion for iso-8859-1 on non-Mule;
 	preserves the line ending autodetection, but doesn't do coding
-	system autodetection. Thank you Stephen. 
+	system autodetection. Thank you Stephen.
 
 2007-10-15  Didier Verna  <didier@xemacs.org>
 
--- a/lisp/autoload.el	Sun May 11 11:20:24 2008 +0200
+++ b/lisp/autoload.el	Sun May 11 11:24:01 2008 +0200
@@ -226,19 +226,40 @@
 ;; Parsing the source file text.
 ;; Autoloads in C source differ from those in Lisp source.
 
-;; #### Eventually operators like defclass and defmethod (defined in an
-;; external package, EIEIO) may be factored out.  Don't add operators here
-;; without discussing whether and how to do that on the developers' channel.
-(defvar autoload-make-autoload-operators
-  '(defun define-skeleton defmacro define-derived-mode define-generic-mode
-    easy-mmode-define-minor-mode easy-mmode-define-global-mode
-    define-minor-mode defun* defmacro* defclass defmethod)
-  "`defun'-like operators that use `autoload' to load the library.")
+; Add operator definitions to autoload-operators.el in the xemacs-base
+; package.
+(ignore-errors (require 'autoload-operators))
 
-(defvar autoload-make-autoload-complex-operators
-  '(easy-mmode-define-minor-mode easy-mmode-define-global-mode
-    define-minor-mode)
-  "`defun'-like operators to macroexpand before using `autoload'.")
+; As autoload-operators is new, provide stopgap measure for a while.
+(if (not (boundp 'autoload-make-autoload-operators))
+    (progn
+      (defvar autoload-make-autoload-operators
+	'(defun define-skeleton defmacro define-derived-mode define-generic-mode
+	  easy-mmode-define-minor-mode easy-mmode-define-global-mode
+	  define-minor-mode defun* defmacro*)
+	"`defun'-like operators that use `autoload' to load the library.")
+      
+      (defvar autoload-make-autoload-complex-operators
+	'(easy-mmode-define-minor-mode easy-mmode-define-global-mode
+	  define-minor-mode)
+	"`defun'-like operators to macroexpand before using `autoload'.")
+      
+      (put 'autoload 'doc-string-elt 3)
+      (put 'defun    'doc-string-elt 3)
+      (put 'defun*   'doc-string-elt 3)
+      (put 'defvar   'doc-string-elt 3)
+      (put 'defcustom 'doc-string-elt 3)
+      (put 'defconst 'doc-string-elt 3)
+      (put 'defmacro 'doc-string-elt 3)
+      (put 'defmacro* 'doc-string-elt 3)
+      (put 'defsubst 'doc-string-elt 3)
+      (put 'define-skeleton 'doc-string-elt 2)
+      (put 'define-derived-mode 'doc-string-elt 4)
+      (put 'easy-mmode-define-minor-mode 'doc-string-elt 2)
+      (put 'define-minor-mode 'doc-string-elt 2)
+      (put 'define-generic-mode 'doc-string-elt 7)
+      ;; defin-global-mode has no explicit docstring.
+      (put 'easy-mmode-define-global-mode 'doc-string-elt 1000)))
 
 (defun make-autoload (form file)
   "Turn FORM into an autoload or defvar for source file FILE.
@@ -780,43 +801,6 @@
 		(insert "\\^L")))
 	    (goto-char p2))))))))
 
-;;; Forms which have doc-strings which should be printed specially.
-;;; A doc-string-elt property of ELT says that (nth ELT FORM) is
-;;; the doc-string in FORM.
-;;;
-;;; There used to be the following note here:
-;;; ;;; Note: defconst and defvar should NOT be marked in this way.
-;;; ;;; We don't want to produce defconsts and defvars that
-;;; ;;; make-docfile can grok, because then it would grok them twice,
-;;; ;;; once in foo.el (where they are given with ;;;###autoload) and
-;;; ;;; once in loaddefs.el.
-;;;
-;;; Counter-note: Yes, they should be marked in this way.
-;;; make-docfile only processes those files that are loaded into the
-;;; dumped Emacs, and those files should never have anything
-;;; autoloaded here.  The above-feared problem only occurs with files
-;;; which have autoloaded entries *and* are processed by make-docfile;
-;;; there should be no such files.
-
-(put 'autoload 'doc-string-elt 3)
-(put 'defun    'doc-string-elt 3)
-(put 'defun*   'doc-string-elt 3)
-(put 'defvar   'doc-string-elt 3)
-(put 'defcustom 'doc-string-elt 3)
-(put 'defconst 'doc-string-elt 3)
-(put 'defmacro 'doc-string-elt 3)
-(put 'defmacro* 'doc-string-elt 3)
-(put 'defsubst 'doc-string-elt 3)
-(put 'define-skeleton 'doc-string-elt 2)
-(put 'define-derived-mode 'doc-string-elt 4)
-(put 'easy-mmode-define-minor-mode 'doc-string-elt 2)
-(put 'define-minor-mode 'doc-string-elt 2)
-(put 'define-generic-mode 'doc-string-elt 7)
-(put 'defclass 'doc-string-elt 4)
-(put 'defmethod 'doc-string-elt 3)
-;; defin-global-mode has no explicit docstring.
-(put 'easy-mmode-define-global-mode 'doc-string-elt 1000)
-
 (defun autoload-trim-file-name (file)
   "Returns relative pathname of FILE including the last directory.
 
--- a/lisp/behavior.el	Sun May 11 11:20:24 2008 +0200
+++ b/lisp/behavior.el	Sun May 11 11:24:01 2008 +0200
@@ -478,23 +478,23 @@
 
 (defun behavior-menu-filter (menu)
   (append
-   '(("%_Package Utilities"
+   `(("%_Package Utilities"
        ("%_Set Download Site"
 	("%_Official Releases"
-	 :filter (lambda (&rest junk)
-		   (menu-split-long-menu
-		    (submenu-generate-accelerator-spec
-		     (package-ui-download-menu)))))
+	 :filter ,#'(lambda (&rest junk)
+                    (menu-split-long-menu
+                     (submenu-generate-accelerator-spec
+                      (package-ui-download-menu)))))
 	("%_Pre-Releases"
-	 :filter (lambda (&rest junk)
-		   (menu-split-long-menu
-		    (submenu-generate-accelerator-spec
-		     (package-ui-pre-release-download-menu)))))
+	 :filter ,#'(lambda (&rest junk)
+                      (menu-split-long-menu
+                       (submenu-generate-accelerator-spec
+                        (package-ui-pre-release-download-menu)))))
 	("%_Site Releases"
-	 :filter (lambda (&rest junk)
-		   (menu-split-long-menu
-		    (submenu-generate-accelerator-spec
-		     (package-ui-site-release-download-menu))))))
+	 :filter ,#'(lambda (&rest junk)
+                      (menu-split-long-menu
+                       (submenu-generate-accelerator-spec
+                        (package-ui-site-release-download-menu))))))
        "--:shadowEtchedIn"
       ["%_Update Package Index" package-get-update-base]
       ["%_List and Install" pui-list-packages]
--- a/lisp/build-report.el	Sun May 11 11:20:24 2008 +0200
+++ b/lisp/build-report.el	Sun May 11 11:24:01 2008 +0200
@@ -69,7 +69,7 @@
 emacs_minor_version\\s-*=\\s-*\\([0-9]+\\)
 emacs_beta_version\\s-*=\\s-*\\([0-9]+\\)?
 xemacs_codename\\s-*=\\s-*\"\\([^\"]+\\)\"\\(
-xemacs_extra_name\\s-*=\\s-*\"\\([^\"]+\\)\"\\)?"
+xemacs_extra_name\\s-*=\\s-*\"?\\([^\"]+\\)\"?\\)?"
   "*REGEXP matching XEmacs Beta Version variable assignments in
 `build-report-version-file' file.  This variable is used by
 `build-report-version-file-data'.")
--- a/lisp/bytecomp.el	Sun May 11 11:20:24 2008 +0200
+++ b/lisp/bytecomp.el	Sun May 11 11:24:01 2008 +0200
@@ -1888,7 +1888,8 @@
 	  (print-readably t)	; print #[] for bytecode, 'x for (quote x)
 	  (print-gensym (if (and byte-compile-print-gensym
 				 (not byte-compile-emacs19-compatibility))
-			    '(t) nil)))
+			    '(t) nil))
+          print-gensym-alist)
       (princ "\n" byte-compile-outbuffer)
       (prin1 form byte-compile-outbuffer)
       nil)))
--- a/lisp/code-files.el	Sun May 11 11:20:24 2008 +0200
+++ b/lisp/code-files.el	Sun May 11 11:24:01 2008 +0200
@@ -235,10 +235,10 @@
 
 ;(defun convert-mbox-coding-system (filename visit start end) ...)
 
-(defun load (file &optional noerror nomessage nosuffix)
-  "Execute a file of Lisp code named FILE, or load a binary module.
-First tries to find a Lisp FILE with .elc appended, then with .el, then with
- FILE unmodified.  If unsuccessful, tries to find a binary module FILE with
+(defun load (filename &optional noerror nomessage nosuffix)
+  "Execute a file of Lisp code named FILENAME, or load a binary module.
+First tries to find a Lisp file FILENAME with .elc appended, then with .el, then with
+ FILENAME unmodified.  If unsuccessful, tries to find a binary module FILE with
  the elements of `module-extensions' appended, one at a time.
 Searches directories in load-path for Lisp files, and in `module-load-path'
  for binary modules.
@@ -250,9 +250,8 @@
  .elc, .el, or elements of `module-extensions' to the specified name FILE.
 Return t if file exists."
   (declare (special load-modules-quietly))
-  (let* ((filename (substitute-in-file-name file))
-	 (handler (find-file-name-handler filename 'load))
-	 (path nil))
+  (let ((handler (find-file-name-handler filename 'load))
+	(path nil))
     (if handler
 	(funcall handler 'load filename noerror nomessage nosuffix)
       ;; First try to load a Lisp file
@@ -262,10 +261,10 @@
 					    '(".elc" ".el" "")))))
 	  ;; now use the internal load to actually load the file.
 	  (load-internal
-	   file noerror nomessage nosuffix
+	   filename noerror nomessage nosuffix
 	   (let ((elc ; use string= instead of string-match to keep match-data.
-		(equalp ".elc" (substring path -4))))
-	     (or (and (not elc) coding-system-for-read) ;prefer for source file
+		  (equalp ".elc" (substring path -4))))
+	     (or (and (not elc) coding-system-for-read)	;prefer for source file
 		 ;; find magic-cookie
 		 (let ((codesys
 			(find-coding-system-magic-cookie-in-file path)))
@@ -401,8 +400,7 @@
 See also `insert-file-contents-access-hook',
 `insert-file-contents-pre-hook', `insert-file-contents-error-hook',
 and `insert-file-contents-post-hook'."
-  (let* ((expanded (substitute-in-file-name filename))
-	 (handler (find-file-name-handler expanded 'insert-file-contents)))
+  (let ((handler (find-file-name-handler filename 'insert-file-contents)))
     (if handler
 	(funcall handler 'insert-file-contents filename visit start end replace)
       (let (return-val coding-system used-codesys)
--- a/lisp/cus-edit.el	Sun May 11 11:20:24 2008 +0200
+++ b/lisp/cus-edit.el	Sun May 11 11:24:01 2008 +0200
@@ -1,6 +1,6 @@
 ;;; cus-edit.el --- Tools for customizating Emacs and Lisp packages.
 ;;
-;; Copyright (C) 2007 Didier Verna
+;; Copyright (C) 2007, 2008 Didier Verna
 ;; Copyright (C) 2003 Ben Wing
 ;; Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc.
 ;;
@@ -836,7 +836,7 @@
 		       (and version
 			    (or (null since-version)
 				(customize-version-lessp since-version
-                                                         version))))
+							 version))))
 		     (push (list symbol 'custom-variable) found))))
     (unless found
       (error "No user options have changed defaults %s"
@@ -870,39 +870,86 @@
    (list (list symbol 'custom-variable))
    (format "*Customize Option: %s*" (custom-unlispify-tag-name symbol))))
 
-;;;###autoload
-(defun customize-face (&optional symbol)
-  "Customize SYMBOL, which should be a face name or nil.
-If SYMBOL is nil, customize all faces."
-  (interactive (list (completing-read "Customize face: (default all) "
-				      obarray 'find-face)))
-  (if (or (null symbol) (and (stringp symbol) (zerop (length symbol))))
-      (custom-buffer-create (custom-sort-items
-			     (mapcar (lambda (symbol)
-				       (list symbol 'custom-face))
-				     (face-list))
-			     t nil)
-			    "*Customize Faces*")
-    (when (stringp symbol)
-      (setq symbol (intern symbol)))
-    (check-argument-type 'symbolp symbol)
-    (custom-buffer-create (list (list symbol 'custom-face))
-			  (format "*Customize Face: %s*"
-				  (custom-unlispify-tag-name symbol)))))
+
+(defun custom-face-prompt ()
+  ;; Interactive call for `customize-face' and `customize-face-other-window'.
+  ;; See their docstrings for more information. Note that this call returns a
+  ;; list of only one element. This is because the callers'second arg AT-POINT
+  ;; is only used in interactive calls.
+  (let ((faces (get-char-property (point) 'face)))
+    (if (or (null faces) (not current-prefix-arg))
+	;; The default behavior, which is to prompt for all faces, is also
+	;; used as a fall back when a prefix is given but there's no face
+	;; under point:
+	(let ((choice (completing-read "Customize face: (default all) "
+				       obarray 'find-face)))
+	  (if (zerop (length choice))
+	      nil
+	    (list (intern choice))))
+      (cond ((symbolp faces)
+	     ;; Customize only this one:
+	     (list (list faces)))
+	    ((listp faces)
+	     ;; Make a choice only amongst the faces under point:
+	     (let ((choice (completing-read
+			    "Customize face: (default all faces at point) "
+			    (mapcar (lambda (face)
+				      (list (symbol-name face) face))
+				    faces)
+			    nil t)))
+	       (if (zerop (length choice))
+		   (list faces)
+		 (list (intern choice)))))))))
+
+(defun customize-face-1 (face custom-buffer-create-fn)
+  ;; Customize FACE in a buffer created with BUFFER-CREATE-FN.
+  ;; See the docstring of `customize-face' and `customize-face-other-window'
+  ;; for more information.
+  (cond ((null face)
+	 (funcall custom-buffer-create-fn
+		  (custom-sort-items
+		   (mapcar (lambda (symbol)
+			     (list symbol 'custom-face))
+			   (face-list))
+		   t nil)
+		  "*Customize All Faces*"))
+	((listp face)
+	 (funcall custom-buffer-create-fn
+		  (custom-sort-items
+		   (mapcar (lambda (symbol)
+			     (list symbol 'custom-face))
+			   face)
+		   t nil)
+		  "*Customize Some Faces*"))
+	((symbolp face)
+	 (funcall custom-buffer-create-fn
+		  (list (list face 'custom-face))
+		  (format "*Customize Face: %s*"
+			  (custom-unlispify-tag-name face))))
+	(t
+	 (signal-error 'wrong-type-argument
+		       '((or null listp symbolp) face)))))
+
 
 ;;;###autoload
-(defun customize-face-other-window (&optional symbol)
-  "Show customization buffer for FACE in other window."
-  (interactive (list (completing-read "Customize face: "
-				      obarray 'find-face)))
-  (if (or (null symbol) (and (stringp symbol) (zerop (length symbol))))
-      ()
-    (if (stringp symbol)
-	(setq symbol (intern symbol)))
-    (check-argument-type 'symbolp symbol)
-    (custom-buffer-create-other-window
-     (list (list symbol 'custom-face))
-     (format "*Customize Face: %s*" (custom-unlispify-tag-name symbol)))))
+(defun customize-face (&optional face at-point)
+  "Open a customization buffer for FACE.
+FACE should be either:
+- nil, meaning to customize all faces,
+- a list of symbols naming faces, meaning to customize only those,
+- a symbol naming a face, meaning to customize this face only.
+
+When called interactively, use a prefix (the AT-POINT argument) to
+make a choice among the faces found at current position."
+  (interactive (custom-face-prompt))
+  (customize-face-1 face #'custom-buffer-create))
+
+;;;###autoload
+(defun customize-face-other-window (&optional face at-point)
+  "Like `customize-face', but use another window."
+  (interactive (custom-face-prompt))
+  (customize-face-1 face #'custom-buffer-create-other-window))
+
 
 ;;;###autoload
 (defun customize-customized ()
@@ -2207,35 +2254,35 @@
 (defvar custom-variable-menu
   `(("Set for Current Session" custom-variable-set
      ,#'(lambda (widget)
-          (eq (widget-get widget :custom-state) 'modified)))
+	  (eq (widget-get widget :custom-state) 'modified)))
     ("Save for Future Sessions" custom-variable-save
      ,#'(lambda (widget)
-          (memq (widget-get widget :custom-state)
-                '(modified set changed rogue))))
+	  (memq (widget-get widget :custom-state)
+		'(modified set changed rogue))))
     ("Reset to Current" custom-redraw
      ,#'(lambda (widget)
-          (and (default-boundp (widget-value widget))
-               (memq (widget-get widget :custom-state) '(modified changed)))))
+	  (and (default-boundp (widget-value widget))
+	       (memq (widget-get widget :custom-state) '(modified changed)))))
     ("Reset to Saved" custom-variable-reset-saved
      ,#'(lambda (widget)
-          (and (or (get (widget-value widget) 'saved-value)
-                   (get (widget-value widget) 'saved-variable-comment))
-               (memq (widget-get widget :custom-state)
-                     '(modified set changed rogue)))))
+	  (and (or (get (widget-value widget) 'saved-value)
+		   (get (widget-value widget) 'saved-variable-comment))
+	       (memq (widget-get widget :custom-state)
+		     '(modified set changed rogue)))))
     ("Reset to Standard Settings" custom-variable-reset-standard
      ,#'(lambda (widget)
-          (and (get (widget-value widget) 'standard-value)
-               (memq (widget-get widget :custom-state)
-                     '(modified set changed saved rogue)))))
+	  (and (get (widget-value widget) 'standard-value)
+	       (memq (widget-get widget :custom-state)
+		     '(modified set changed saved rogue)))))
     ("---" ignore ignore)
     ("Add Comment" custom-comment-show custom-comment-invisible-p)
     ("---" ignore ignore)
     ("Don't show as Lisp expression" custom-variable-edit
      ,#'(lambda (widget)
-          (eq (widget-get widget :custom-form) 'lisp)))
+	  (eq (widget-get widget :custom-form) 'lisp)))
     ("Show as Lisp expression" custom-variable-edit-lisp
      ,#'(lambda (widget)
-          (eq (widget-get widget :custom-form) 'edit))))
+	  (eq (widget-get widget :custom-form) 'edit))))
   "Alist of actions for the `custom-variable' widget.
 Each entry has the form (NAME ACTION FILTER) where NAME is the name of
 the menu entry, ACTION is the function to call on the widget when the
@@ -2701,23 +2748,23 @@
     ("Save for Future Sessions" custom-face-save)
     ("Reset to Saved" custom-face-reset-saved
      ,#'(lambda (widget)
-          (or (get (widget-value widget) 'saved-face)
-              (get (widget-value widget) 'saved-face-comment))))
+	  (or (get (widget-value widget) 'saved-face)
+	      (get (widget-value widget) 'saved-face-comment))))
     ("Reset to Standard Setting" custom-face-reset-standard
      ,#'(lambda (widget)
-          (get (widget-value widget) 'face-defface-spec)))
+	  (get (widget-value widget) 'face-defface-spec)))
     ("---" ignore ignore)
     ("Add Comment" custom-comment-show custom-comment-invisible-p)
     ("---" ignore ignore)
     ("Show all display specs" custom-face-edit-all
      ,#'(lambda (widget)
-          (not (eq (widget-get widget :custom-form) 'all))))
+	  (not (eq (widget-get widget :custom-form) 'all))))
     ("Just current attributes" custom-face-edit-selected
      ,#'(lambda (widget)
-          (not (eq (widget-get widget :custom-form) 'selected))))
+	  (not (eq (widget-get widget :custom-form) 'selected))))
     ("Show as Lisp expression" custom-face-edit-lisp
      ,#'(lambda (widget)
-          (not (eq (widget-get widget :custom-form) 'lisp)))))
+	  (not (eq (widget-get widget :custom-form) 'lisp)))))
   "Alist of actions for the `custom-face' widget.
 Each entry has the form (NAME ACTION FILTER) where NAME is the name of
 the menu entry, ACTION is the function to call on the widget when the
@@ -3341,19 +3388,19 @@
 (defvar custom-group-menu
   `(("Set for Current Session" custom-group-set
      ,#'(lambda (widget)
-          (eq (widget-get widget :custom-state) 'modified)))
+	  (eq (widget-get widget :custom-state) 'modified)))
     ("Save for Future Sessions" custom-group-save
      ,#'(lambda (widget)
-          (memq (widget-get widget :custom-state) '(modified set))))
+	  (memq (widget-get widget :custom-state) '(modified set))))
     ("Reset to Current" custom-group-reset-current
      ,#'(lambda (widget)
-          (memq (widget-get widget :custom-state) '(modified))))
+	  (memq (widget-get widget :custom-state) '(modified))))
     ("Reset to Saved" custom-group-reset-saved
      ,#'(lambda (widget)
-          (memq (widget-get widget :custom-state) '(modified set))))
+	  (memq (widget-get widget :custom-state) '(modified set))))
     ("Reset to standard setting" custom-group-reset-standard
      ,#'(lambda (widget)
-          (memq (widget-get widget :custom-state) '(modified set saved)))))
+	  (memq (widget-get widget :custom-state) '(modified set saved)))))
   "Alist of actions for the `custom-group' widget.
 Each entry has the form (NAME ACTION FILTER) where NAME is the name of
 the menu entry, ACTION is the function to call on the widget when the
@@ -3766,7 +3813,13 @@
     (custom-save-variables)
     (custom-save-faces)
     (let ((find-file-hooks nil)
-	  (auto-mode-alist))
+	  (auto-mode-alist)
+	  custom-file-directory)
+      (unless (file-directory-p (setq custom-file-directory
+				      (file-name-directory custom-file)))
+	(message "Creating %s... " custom-file-directory)
+	(make-directory custom-file-directory t)
+	(message "Creating %s... done." custom-file-directory))
       (with-current-buffer (find-file-noselect custom-file)
 	(save-buffer)))))
 
--- a/lisp/custom.el	Sun May 11 11:20:24 2008 +0200
+++ b/lisp/custom.el	Sun May 11 11:24:01 2008 +0200
@@ -1039,7 +1039,7 @@
     (setq value (or value (get symbol 'standard-value)))
     (when value
       (put symbol 'saved-value was-in-theme)
-      (if (or (get 'force-value symbol) (default-boundp symbol))
+      (if (or (get symbol 'force-value) (default-boundp symbol))
           (funcall (or (get symbol 'custom-set) 'set-default) symbol
                    (eval (car value)))))
     value))
--- a/lisp/dumped-lisp.el	Sun May 11 11:20:24 2008 +0200
+++ b/lisp/dumped-lisp.el	Sun May 11 11:24:01 2008 +0200
@@ -104,7 +104,7 @@
        "isearch-mode"
        "buffer"
        "buff-menu"
-       "paths.el"		; don't get confused if paths compiled.
+       "paths"
        "lisp"
        "page"
        "register"
--- a/lisp/files.el	Sun May 11 11:20:24 2008 +0200
+++ b/lisp/files.el	Sun May 11 11:24:01 2008 +0200
@@ -4177,6 +4177,9 @@
 			file switches wildcard full-directory-p)))
      (t
       (let* ((beg (point))
+	     ;; on Unix, assume that ls will output in what the
+	     ;; file-name coding system specifies
+	     (coding-system-for-read (get-coding-system 'file-name))
 	     (result
 	      (if wildcard
 		  ;; Run ls in the directory of the file pattern we asked for.
--- a/lisp/font-lock.el	Sun May 11 11:20:24 2008 +0200
+++ b/lisp/font-lock.el	Sun May 11 11:24:01 2008 +0200
@@ -959,7 +959,7 @@
 	 (let ((was-compiled (eq (car font-lock-keywords) t)))
 	   ;; Bring back the user-level (uncompiled) keywords.
 	   (if was-compiled
-	       (setq font-lock-keywords (cadr font-lock-keywords)))
+	       (setq font-lock-keywords (cdr font-lock-keywords)))
 	   ;; Now modify or replace them.
 	   (if (eq how 'set)
 	       (setq font-lock-keywords keywords)
@@ -1069,7 +1069,7 @@
 	 (let ((was-compiled (eq (car font-lock-keywords) t)))
 	   ;; Bring back the user-level (uncompiled) keywords.
 	   (if was-compiled
-	       (setq font-lock-keywords (cadr font-lock-keywords)))
+	       (setq font-lock-keywords (cdr font-lock-keywords)))
 
 	   ;; Edit them.
 	   (setq font-lock-keywords (copy-sequence font-lock-keywords))
@@ -2031,7 +2031,10 @@
 			     font-lock-defaults
 			     (font-lock-find-font-lock-defaults major-mode)))
 	       (keywords (font-lock-choose-keywords
-			  (nth 0 defaults) font-lock-maximum-decoration)))
+			  (nth 0 defaults) font-lock-maximum-decoration))
+	       (local (cdr (assq major-mode font-lock-keywords-alist)))
+	       (removed-keywords
+		(cdr-safe (assq major-mode font-lock-removed-keywords-alist))))
 
 	  ;; Keywords?
 	  (setq font-lock-keywords (if (fboundp keywords)
@@ -2096,7 +2099,14 @@
 		 ;; older way:
 		 ;; defaults not specified at all, so use `beginning-of-defun'.
 		 (setq font-lock-beginning-of-syntax-function
-		       'beginning-of-defun)))))
+		       'beginning-of-defun)))
+
+	  ;; Local fontification?
+	  (while local
+	    (font-lock-add-keywords nil (car (car local)) (cdr (car local)))
+	    (setq local (cdr local)))
+	  (when removed-keywords
+	    (font-lock-remove-keywords nil removed-keywords))))
 
     (setq font-lock-cache-position (make-marker))
     (setq font-lock-defaults-computed t)))
--- a/lisp/font.el	Sun May 11 11:20:24 2008 +0200
+++ b/lisp/font.el	Sun May 11 11:24:01 2008 +0200
@@ -813,7 +813,7 @@
 	 (pattern (fc-font-match device (fc-name-parse name)))
 	 (font-obj (make-font))
 	 (family (fc-pattern-get-family pattern 0))
-	 (size (fc-pattern-get-size pattern 0))
+	 (size (fc-pattern-get-or-compute-size pattern 0))
 	 (weight (fc-pattern-get-weight pattern 0)))
     (set-font-family font-obj 
 		     (and (not (equal family 'fc-result-no-match)) 
--- a/lisp/fontconfig.el	Sun May 11 11:20:24 2008 +0200
+++ b/lisp/fontconfig.el	Sun May 11 11:24:01 2008 +0200
@@ -350,6 +350,21 @@
   (let ((pair (assoc str fc-font-name-weight-mapping-string-reverse)))
     (if pair (cdr pair))))
 
+(defun fc-pattern-get-or-compute-size (pattern id)
+  "Get the size from `pattern' associated with `id' or try to compute it.
+Returns 'fc-result-no-match if unsucessful."
+  ;;  Many font patterns don't have a "size" property, but do have a
+  ;;  "dpi" and a "pixelsize" property".
+  (let ((maybe (fc-pattern-get-size pattern id)))
+    (if (not (eq maybe 'fc-result-no-match))
+	maybe
+      (let ((dpi (fc-pattern-get-dpi pattern id))
+	    (pixelsize (fc-pattern-get-pixelsize pattern id)))
+	(if (and (numberp dpi)
+		 (numberp pixelsize))
+	    (* pixelsize (/ 72 dpi))
+	  'fc-result-no-match)))))
+
 (defun fc-copy-pattern-partial (pattern attribute-list)
   "Return a copy of PATTERN restricted to ATTRIBUTE-LIST.
 
--- a/lisp/glyphs.el	Sun May 11 11:20:24 2008 +0200
+++ b/lisp/glyphs.el	Sun May 11 11:24:01 2008 +0200
@@ -1185,8 +1185,7 @@
 				 [jpeg :data nil] 2)))
        ,@(if (featurep 'png) '(("\\.png\\'" [png :file nil] 2)))
        ,@(if (featurep 'png) '(("\\`\211PNG" [png :data nil] 2)))
-       ;; No, I don't think we want to inline images... -- dvl
-       ;; ("" [string :data nil] 2)
+       ("" [string :data nil] 2)
        ("" [nothing]))))
   ;; #### this should really be formatted-string, not string but we
   ;; don't have it implemented yet
@@ -1210,8 +1209,7 @@
            ("\\`\377\330\377\340\000\020JFIF" [string :data "[jpeg]"])
            ("\\.png\\'" [string :data nil] 2)
            ("\\`\211PNG" [string :data "[png]"])
-           ;; No, I don't think we want to inline images... -- dvl
-           ;;("" [string :data nil] 2)
+           ("" [string :data nil] 2)
 	   ;; this last one is here for pointers and icons and such --
 	   ;; strings are not allowed so they will be ignored.
 	   ("" [nothing])))
--- a/lisp/gnuserv.el	Sun May 11 11:20:24 2008 +0200
+++ b/lisp/gnuserv.el	Sun May 11 11:24:01 2008 +0200
@@ -214,7 +214,7 @@
   :group 'gnuserv)
 
 (defcustom gnuserv-temp-file-regexp
-  (concat "^" (temp-directory) "/Re\\|/draft$")
+  (concat "^" (regexp-quote (temp-directory)) "/Re\\|/draft$")
   "*Regexp which should match filenames of temporary files deleted
 and reused by the programs that invoke the Emacs server."
   :type 'regexp
--- a/lisp/gtk-init.el	Sun May 11 11:20:24 2008 +0200
+++ b/lisp/gtk-init.el	Sun May 11 11:24:01 2008 +0200
@@ -133,62 +133,6 @@
 
 (defun init-post-gtk-win ()
   (unless gtk-post-win-initted
-    (when (featurep 'mule)
-      (define-specifier-tag 'mule-fonts
-	(lambda (device) (eq 'gtk (device-type device))))
-      (set-face-font
-       'default
-       '("-*-fixed-medium-r-*--16-*-iso8859-1"
-	 "-*-fixed-medium-r-*--*-iso8859-1"
-	 "-*-fixed-medium-r-*--*-iso8859-2"
-	 "-*-fixed-medium-r-*--*-iso8859-3"
-	 "-*-fixed-medium-r-*--*-iso8859-4"
-	 "-*-fixed-medium-r-*--*-iso8859-7"
-	 "-*-fixed-medium-r-*--*-iso8859-8"
-	 "-*-fixed-medium-r-*--*-iso8859-5"
-	 "-*-fixed-medium-r-*--*-iso8859-9"
-
-	 ;; Following 3 fonts proposed by Teruhiko.Kurosaka@Japan.eng.sun
-	 "-sun-gothic-medium-r-normal--14-120-75-75-c-60-jisx0201.1976-0"
-	 "-sun-gothic-medium-r-normal--14-120-75-75-c-120-jisx0208.1983-0"
-	 "-wadalab-gothic-medium-r-normal--14-120-75-75-c-120-jisx0212.1990-0"
-	 ;; Other Japanese fonts
-	 "-*-fixed-medium-r-*--*-jisx0201.1976-*"
-	 "-*-fixed-medium-r-*--*-jisx0208.1983-*"
-	 "-*-fixed-medium-r-*--*-jisx0212*-*"
-
-	 ;; Chinese fonts
-	 "-*-*-medium-r-*--*-gb2312.1980-*"
-       
-	 ;; Use One font specification for CNS chinese
-	 ;; Too many variations in font naming
-	 "-*-fixed-medium-r-*--*-cns11643*-*"
-	 ;; "-*-fixed-medium-r-*--*-cns11643*2"
-	 ;; "-*-fixed-medium-r-*--*-cns11643*3"
-	 ;; "-*-fixed-medium-r-*--*-cns11643*4"
-	 ;; "-*-fixed-medium-r-*--*-cns11643.5-0"
-	 ;; "-*-fixed-medium-r-*--*-cns11643.6-0"
-	 ;; "-*-fixed-medium-r-*--*-cns11643.7-0"
-       
-	 "-*-fixed-medium-r-*--*-big5*-*"
-	 "-*-fixed-medium-r-*--*-sisheng_cwnn-0"
-
-	 ;; Other fonts
-       
-	 ;; "-*-fixed-medium-r-*--*-viscii1.1-1"
-       
-	 ;; "-*-fixed-medium-r-*--*-mulearabic-0"
-	 ;; "-*-fixed-medium-r-*--*-mulearabic-1"
-	 ;; "-*-fixed-medium-r-*--*-mulearabic-2"
-
-	 ;; "-*-fixed-medium-r-*--*-muleipa-1"
-	 ;; "-*-fixed-medium-r-*--*-ethio-*"
-
-	 "-*-mincho-medium-r-*--*-ksc5601.1987-*" ; Korean
-	 "-*-fixed-medium-r-*--*-tis620.2529-1" ; Thai
-	 )
-       'global '(mule-fonts) 'append))
-    
     (setq gtk-post-win-initted t)))
     
 (push '("-geometry" . gtk-init-handle-geometry) command-switch-alist)
--- a/lisp/gtk-iso8859-1.el	Sun May 11 11:20:24 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-;; We can just cheat and use the same code that X does.
-
-(require 'x-iso8859-1)
-(provide 'gtk-iso8859-1)
--- a/lisp/help.el	Sun May 11 11:20:24 2008 +0200
+++ b/lisp/help.el	Sun May 11 11:24:01 2008 +0200
@@ -1424,8 +1424,6 @@
             (t
              nil)))
     (princ "\n")
-    (if autoload-file
-	(princ (format "  -- autoloads from \"%s\"\n" autoload-file)))
     (or file-name
 	(setq file-name (symbol-file function)))
     (when file-name
--- a/lisp/info.el	Sun May 11 11:20:24 2008 +0200
+++ b/lisp/info.el	Sun May 11 11:24:01 2008 +0200
@@ -479,6 +479,9 @@
 			      (".info.zip" . "unzip -c %s")
 			      (".y" . "cat %s | unyabba")
 			      ("info.y" . "cat %s | unyabba")
+                              ;; Mandriva Linux uses lzma.
+                              (".lzma" . "unlzma --stdout %s")
+                              (".info.lzma" . "unlzma --stdout %s")
 			      ;; These ones are for MS-DOS filenames.
 			      (".inf" . nil)
 			      (".igz" . "gzip -dc %s")
--- a/lisp/iso8859-1.el	Sun May 11 11:20:24 2008 +0200
+++ b/lisp/iso8859-1.el	Sun May 11 11:24:01 2008 +0200
@@ -28,71 +28,63 @@
 
 ;;; Commentary:
 
-;; created by jwz, 19-aug-92.
 ;; Sets the case table for the ISO-8859/1 character set.
-;; Used to set the syntax table. 
+;; Provides ascii-case-table, for use in environments where multilingual
+;; case-insensitive processing is inappropriate.
 
 ;;; Code:
 
-(defconst iso8859/1-case-table nil
-  "The case table for ISO-8859/1 characters.")
-
-;;; This macro expands into
-;;;  (setq iso8859/1-case-table (purecopy '("..." nil nil nil)))
-;;; doing the computation of the case table at compile-time.
+(defvar ascii-case-table
+  (loop
+    for lower from (char-int ?a) to (char-int ?z)
+    and upper from (char-int ?A) to (char-int ?Z)
+    with table = (make-case-table)
+    do (put-case-table-pair (coerce upper 'character)
+                            (coerce lower 'character)
+                            table)
+    finally return table)
+  "Case table for the ASCII character set.")
 
-((macro
-  . (lambda (&rest pairs)
-      (let ((downcase (make-string 256 0))
-	    (i 0))
-	(while (< i 256)
-	  (aset downcase i (if (and (>= i ?A) (<= i ?Z)) (+ i 32) i))
-	  (setq i (1+ i)))
-	(while pairs
-	  (aset downcase (car (car pairs)) (car (cdr (car pairs))))
-	  (setq pairs (cdr pairs)))
-	(cons 'setq
-	      (cons 'iso8859/1-case-table
-		    (list
-		     (list 'quote
-			   (list downcase nil nil nil))))))))
- 
- (?\300  ?\340)		; Agrave
- (?\301  ?\341)		; Aacute
- (?\302  ?\342)		; Acircumflex
- (?\303  ?\343)		; Atilde
- (?\304  ?\344)		; Adiaeresis
- (?\305  ?\345)		; Aring
- (?\306  ?\346)		; AE
- (?\307  ?\347)		; Ccedilla
- (?\310  ?\350)		; Egrave
- (?\311  ?\351)		; Eacute
- (?\312  ?\352)		; Ecircumflex
- (?\313  ?\353)		; Ediaeresis
- (?\314  ?\354)		; Igrave
- (?\315  ?\355)		; Iacute
- (?\316  ?\356)		; Icircumflex
- (?\317  ?\357)		; Idiaeresis
- (?\320  ?\360)		; ETH
- (?\321  ?\361)		; Ntilde
- (?\322  ?\362)		; Ograve
- (?\323  ?\363)		; Oacute
- (?\324  ?\364)		; Ocircumflex
- (?\325  ?\365)		; Otilde
- (?\326  ?\366)		; Odiaeresis
- (?\330  ?\370)		; Ooblique
- (?\331  ?\371)		; Ugrave
- (?\332  ?\372)		; Uacute
- (?\333  ?\373)		; Ucircumflex
- (?\334  ?\374)		; Udiaeresis
- (?\335  ?\375)		; Yacute
- (?\336  ?\376)		; THORN
- )
+(loop
+  for (upper lower)
+  in '((?\xC0 ?\xE0) ;; A WITH GRAVE
+       (?\xC1 ?\xE1) ;; A WITH ACUTE
+       (?\xC2 ?\xE2) ;; A WITH CIRCUMFLEX
+       (?\xC3 ?\xE3) ;; A WITH TILDE
+       (?\xC4 ?\xE4) ;; A WITH DIAERESIS
+       (?\xC5 ?\xE5) ;; A WITH RING ABOVE
+       (?\xC6 ?\xE6) ;; AE
+       (?\xC7 ?\xE7) ;; C WITH CEDILLA
+       (?\xC8 ?\xE8) ;; E WITH GRAVE
+       (?\xC9 ?\xE9) ;; E WITH ACUTE
+       (?\xCA ?\xEA) ;; E WITH CIRCUMFLEX
+       (?\xCB ?\xEB) ;; E WITH DIAERESIS
+       (?\xCC ?\xEC) ;; I WITH GRAVE
+       (?\xCD ?\xED) ;; I WITH ACUTE
+       (?\xCE ?\xEE) ;; I WITH CIRCUMFLEX
+       (?\xCF ?\xEF) ;; I WITH DIAERESIS
+       (?\xD0 ?\xF0) ;; ETH
+       (?\xD1 ?\xF1) ;; N WITH TILDE
+       (?\xD2 ?\xF2) ;; O WITH GRAVE
+       (?\xD3 ?\xF3) ;; O WITH ACUTE
+       (?\xD4 ?\xF4) ;; O WITH CIRCUMFLEX
+       (?\xD5 ?\xF5) ;; O WITH TILDE
+       (?\xD6 ?\xF6) ;; O WITH DIAERESIS
+       (?\xD8 ?\xF8) ;; O WITH STROKE
+       (?\xD9 ?\xF9) ;; U WITH GRAVE
+       (?\xDA ?\xFA) ;; U WITH ACUTE
+       (?\xDB ?\xFB) ;; U WITH CIRCUMFLEX
+       (?\xDC ?\xFC) ;; U WITH DIAERESIS
+       (?\xDD ?\xFD) ;; Y WITH ACUTE
+       (?\xDE ?\xFE)) ;; THORN
+  with case-table = (standard-case-table)
+  do (put-case-table-pair upper lower case-table))
 
-(set-standard-case-table (mapcar 'copy-sequence iso8859/1-case-table))
+;; Everything Latin-1 and above should be displayed as its character value
+;; by default.
+(setq-default ctl-arrow #xA0)
 
-(setq-default ctl-arrow 'iso-8859/1)
-
-(provide 'iso8859-1)
+;; Shouldn't be necessary, but one file in the packages uses it:
+(provide 'iso8859-1) 
 
 ;;; iso8859-1.el ends here
--- a/lisp/keydefs.el	Sun May 11 11:20:24 2008 +0200
+++ b/lisp/keydefs.el	Sun May 11 11:24:01 2008 +0200
@@ -620,12 +620,16 @@
 (define-key global-map '(meta delete)	'backward-or-forward-kill-word)
 (define-key global-map [(control x) (delete)]
 				        'backward-or-forward-kill-sentence)
+(define-key global-map '(shift delete) 'kill-primary-selection)
+
 (define-key global-map 'kp-delete	'backward-or-forward-delete-char)
 (define-key global-map '(control kp-delete) 'backward-or-forward-kill-word)
 (define-key global-map '(meta kp-delete) 'backward-or-forward-kill-word)
 (define-key global-map [(control x) (kp-delete)]
 					'backward-or-forward-kill-sentence)
 
+(define-key global-map '(shift kp-delete) 'kill-primary-selection)
+
 ;; don't try this one at home, kids.
 (define-key global-map '(control meta delete) 'backward-or-forward-kill-sexp)
 (define-key global-map '(control meta kp-delete) 'backward-or-forward-kill-sexp)
--- a/lisp/loadhist.el	Sun May 11 11:20:24 2008 +0200
+++ b/lisp/loadhist.el	Sun May 11 11:24:01 2008 +0200
@@ -25,6 +25,8 @@
 
 ;;; Synched up with: FSF 20.2.
 
+;; #### Sync this file! 
+
 ;;; Commentary:
 
 ;; This file is dumped with XEmacs.
@@ -37,19 +39,36 @@
 ;; load-history is a list of entries that look like this:
 ;; ("outline" outline-regexp ... (require . wid-edit) ... (provide . outline) ...)
 
-(defun symbol-file (sym)
+(defun symbol-file (sym &optional type)
   "Return the input source from which SYM was loaded.
-This is a file name, or nil if the source was a buffer with no associated file."
+This is a file name, or nil if the source was a buffer with no associated file.
+
+If TYPE is nil or omitted, any kind of definition is acceptable.
+If TYPE is `defun', then function, subr, special form or macro definitions
+are acceptable.
+If TYPE is `defvar', then variable definitions are acceptable.
+
+#### For the moment the difference is not implemented for non-autoloaded
+Lisp symbols."
   (interactive "SFind source file for symbol: ") ; XEmacs
   (block look-up-symbol-file
-    (dolist (entry load-history)
-      (when (memq sym (cdr entry))
-	(return-from look-up-symbol-file (car entry))))
-    (when (or (and (boundp sym) (built-in-variable-type sym))
-	      (and (fboundp sym) (subrp (symbol-function sym))))
-      (let ((built-in-file (built-in-symbol-file sym)))
-	(if built-in-file
-	    (concat source-directory "/src/" built-in-file))))))
+    (let (built-in-file autoload-cons)
+      (when (and 
+             (eq 'autoload
+                 (car-safe (setq autoload-cons
+                                 (and (fboundp sym)
+                                      (symbol-function sym)))))
+             (or (and (or (null type) (eq 'defvar type))
+                      (eq (fifth autoload-cons) 'keymap))
+                 (and (or (null type) (eq 'defvar type))
+                    (memq (fifth autoload-cons) '(nil macro)))))
+        (return-from look-up-symbol-file
+          (locate-library (second autoload-cons))))
+      (dolist (entry load-history)
+        (when (memq sym (cdr entry))
+          (return-from look-up-symbol-file (car entry))))
+      (setq built-in-file (built-in-symbol-file sym type))
+      (if built-in-file (concat source-directory "/src/" built-in-file)))))
 
 (defun feature-symbols (feature)
   "Return the file and list of symbols associated with a given FEATURE."
--- a/lisp/menubar-items.el	Sun May 11 11:20:24 2008 +0200
+++ b/lisp/menubar-items.el	Sun May 11 11:24:01 2008 +0200
@@ -99,23 +99,20 @@
      (coding-system-list)))))
 
 (defconst default-menubar
-; (purecopy-menubar ;purespace is dead
-   ;; note backquote.
-   `(
-     ("%_File"
+  ;; This is backquoted; a lambda with a preceding , will be byte-compiled.
+   `(("%_File"
       ["%_Open..." find-file]
       ["Open in Other %_Window..." find-file-other-window]
       ["Open in New %_Frame..." find-file-other-frame]
       ("Open with Specified %_Encoding"
        :filter
-       (lambda (menu)
-	 (coding-system-menu-filter
-	  (lambda (entry)
-	    (let ((coding-system-for-read entry))
-	      (call-interactively 'find-file)))
-	  (lambda (entry) t)
-	  t))
-       )
+       ,#'(lambda (menu)
+            (coding-system-menu-filter
+             (lambda (entry)
+               (let ((coding-system-for-read entry))
+                 (call-interactively 'find-file)))
+             (lambda (entry) t)
+             t)))
       ["%_Hex Edit File..." hexl-find-file
        :active (fboundp 'hexl-find-file)]
       ["%_Insert File..." insert-file]
@@ -135,7 +132,7 @@
       ["Save So%_me Buffers" save-some-buffers]
       "-----"
       ,@(if (valid-specifier-tag-p 'msprinter)
-	  '(["Page Set%_up..." generic-page-setup]))
+	    '(["Page Set%_up..." generic-page-setup]))
       ["%_Print" generic-print-buffer
        :active (or (valid-specifier-tag-p 'msprinter)
 		   (and (not (eq system-type 'windows-nt))
@@ -152,384 +149,386 @@
        :active (or buffer-file-name revert-buffer-function)
        :suffix (if put-buffer-names-in-file-menu (buffer-name) "")]
       ("Rever%_t/Recover"
-      ("Revert Buffer with Specified %_Encoding"
-       :filter
-       (lambda (menu)
-	 (coding-system-menu-filter
-	  (lambda (entry)
-	    (let ((coding-system-for-read entry))
-	      (revert-buffer)))
-	  (lambda (entry) (or buffer-file-name revert-buffer-function))
-	  t))
+       ("Revert Buffer with Specified %_Encoding"
+	:filter
+	,#'(lambda (menu)
+	     (coding-system-menu-filter
+	      (lambda (entry)
+		(let ((coding-system-for-read entry))
+		  (revert-buffer)))
+	      (lambda (entry) (or buffer-file-name revert-buffer-function))
+	      t)))
+       ["Re%_cover Buffer from Autosave" (recover-file buffer-file-name)
+	:active buffer-file-name
+	:suffix (if put-buffer-names-in-file-menu (buffer-name) "")]
+       ["Recover %_Session..." recover-session]
        )
-      ["Re%_cover Buffer from Autosave" (recover-file buffer-file-name)
-       :active buffer-file-name
-       :suffix (if put-buffer-names-in-file-menu (buffer-name) "")]
-      ["Recover %_Session..." recover-session]
-      )
       "-----"
       ["E%_xit XEmacs" save-buffers-kill-emacs]
       )
 
      ("%_Edit"
-      ["%_Undo" undo
-       :active (and (not (eq buffer-undo-list t))
-		    (or buffer-undo-list pending-undo-list))
-       :suffix (if (eq last-command 'undo) "More" "")]
-      ["%_Redo" redo
-       :included (fboundp 'redo)
-       :active (not (or (eq buffer-undo-list t)
-			(eq last-buffer-undo-list nil)
-			(not (or (eq last-buffer-undo-list buffer-undo-list)
-				 (and (null (car-safe buffer-undo-list))
-				      (eq last-buffer-undo-list
-					  (cdr-safe buffer-undo-list)))))
-			(or (eq buffer-undo-list pending-undo-list)
-			    (eq (cdr buffer-undo-list) pending-undo-list))))
-       :suffix (if (eq last-command 'redo) "More" "")]
-      "----"
-      ["Cu%_t" kill-primary-selection
-       :active (selection-owner-p)]
-      ["%_Copy" copy-primary-selection
-       :active (selection-owner-p)]
-      ["%_Paste" yank-clipboard-selection
-       :active (selection-exists-p 'CLIPBOARD)]
-      ["%_Delete" delete-primary-selection
-       :active (selection-owner-p)]
-      "----"
-      ["Select %_All" mark-whole-buffer]
-      ["Select Pa%_ge" mark-page]
-      ["Select Paragrap%_h" mark-paragraph]
-      ["Re%_select Region" activate-region :active (mark t)]
-      "----"
-      ["%_Find..." make-search-dialog]
-      ["R%_eplace..." query-replace]
-      ["Replace (Rege%_xp)..." query-replace-regexp]
-      ["List %_Matching Lines..." list-matching-lines]
-      )
+     ["%_Undo" undo
+      :active (and (not (eq buffer-undo-list t))
+		   (or buffer-undo-list pending-undo-list))
+      :suffix (if (eq last-command 'undo) "More" "")]
+     ["%_Redo" redo
+      :included (fboundp 'redo)
+      :active (not (or (eq buffer-undo-list t)
+		       (eq last-buffer-undo-list nil)
+		       (not (or (eq last-buffer-undo-list buffer-undo-list)
+				(and (null (car-safe buffer-undo-list))
+				     (eq last-buffer-undo-list
+					 (cdr-safe buffer-undo-list)))))
+		       (or (eq buffer-undo-list pending-undo-list)
+			   (eq (cdr buffer-undo-list) pending-undo-list))))
+      :suffix (if (eq last-command 'redo) "More" "")]
+     "----"
+     ["Cu%_t" kill-primary-selection
+      :active (selection-owner-p)]
+     ["%_Copy" copy-primary-selection
+      :active (selection-owner-p)]
+     ["%_Paste" yank-clipboard-selection
+      :active (selection-exists-p 'CLIPBOARD)]
+     ["%_Delete" delete-primary-selection
+      :active (selection-owner-p)]
+     "----"
+     ["Select %_All" mark-whole-buffer]
+     ["Select Pa%_ge" mark-page]
+     ["Select Paragrap%_h" mark-paragraph]
+     ["Re%_select Region" activate-region :active (mark t)]
+     "----"
+     ["%_Find..." make-search-dialog]
+     ["R%_eplace..." query-replace]
+     ["Replace (Rege%_xp)..." query-replace-regexp]
+     ["List %_Matching Lines..." list-matching-lines]
+     )
 
      ("%_View"
-      ["%_Split Window" split-window-vertically]
-      ["S%_plit Window (Side by Side)" split-window-horizontally]
-      ["%_Un-Split (Keep This)" delete-other-windows
-       :active (not (one-window-p t))]
-      ["Un-Split (Keep %_Others)" delete-window
-       :active (not (one-window-p t))]
-      ["Balance %_Windows" balance-windows
-       :active (not (one-window-p t))]
-      ["Shrink Window to %_Fit" shrink-window-if-larger-than-buffer]
-      "----"
-      ("N%_arrow"
-       ["%_Narrow to Region" narrow-to-region :active (region-exists-p)]
-       ["Narrow to %_Page" narrow-to-page]
-       ["Narrow to %_Defun" narrow-to-defun]
-      "----"
-       ["%_Widen" widen :active (or (/= (point-min) 1)
-				    (/= (point-max) (1+ (buffer-size))))]
-       )
+     ["%_Split Window" split-window-vertically]
+     ["S%_plit Window (Side by Side)" split-window-horizontally]
+     ["%_Un-Split (Keep This)" delete-other-windows
+      :active (not (one-window-p t))]
+     ["Un-Split (Keep %_Others)" delete-window
+      :active (not (one-window-p t))]
+     ["Balance %_Windows" balance-windows
+      :active (not (one-window-p t))]
+     ["Shrink Window to %_Fit" shrink-window-if-larger-than-buffer]
+     "----"
+     ("N%_arrow"
+      ["%_Narrow to Region" narrow-to-region :active (region-exists-p)]
+      ["Narrow to %_Page" narrow-to-page]
+      ["Narrow to %_Defun" narrow-to-defun]
       "----"
-      ["%_Goto Line..." goto-line]
-      ["Beginning of %_Defun" beginning-of-defun]
-      ["%_End of Defun" end-of-defun]
-      ["%_Count Lines in Buffer" count-lines-buffer
-       :included (not (region-active-p))]
-      ["%_Count Lines in Region" count-lines-region
-       :included (region-active-p)]
-      "----"
-      ["%_Jump to Previous Mark" (set-mark-command t)
-       :active (mark t)]
-      ["Se%_t Bookmark" bookmark-set
-       :active (fboundp 'bookmark-set)]
-      ("%_Bookmarks"
-       :filter
-       (lambda (menu)
-	 (let ((alist (and-boundp 'bookmark-alist
-			bookmark-alist)))
-	   (if (not alist)
-	       menu
-	     (let ((items
+      ["%_Widen" widen :active (or (/= (point-min) 1)
+				   (/= (point-max) (1+ (buffer-size))))]
+      )
+     "----"
+     ["%_Goto Line..." goto-line]
+     ["Beginning of %_Defun" beginning-of-defun]
+     ["%_End of Defun" end-of-defun]
+     ["%_Count Lines in Buffer" count-lines-buffer
+      :included (not (region-active-p))]
+     ["%_Count Lines in Region" count-lines-region
+      :included (region-active-p)]
+     "----"
+     ["%_Jump to Previous Mark" (set-mark-command t)
+      :active (mark t)]
+     ["Se%_t Bookmark" bookmark-set
+      :active (fboundp 'bookmark-set)]
+     ("%_Bookmarks"
+      :filter
+      ,#'(lambda (menu)
+	   (let ((alist (and-boundp 'bookmark-alist
+			  bookmark-alist)))
+	     (if (not alist)
+		 menu
+	       (let ((items
+		      (submenu-generate-accelerator-spec
+		       (mapcar #'(lambda (bmk)
+				   `[,bmk (bookmark-jump ',bmk)])
+			       (bookmark-all-names)))))
+		 (append menu '("---") items)))))
+      "---"
+      ["Insert %_Contents" bookmark-menu-insert
+       :active (fboundp 'bookmark-menu-insert)]
+      ["Insert L%_ocation" bookmark-menu-locate
+       :active (fboundp 'bookmark-menu-locate)]
+      "---"
+      ["%_Rename Bookmark" bookmark-menu-rename
+       :active (fboundp 'bookmark-menu-rename)]
+      ("%_Delete Bookmark"
+       :filter ,#'(lambda (menu)
 		    (submenu-generate-accelerator-spec
 		     (mapcar #'(lambda (bmk)
-				 `[,bmk (bookmark-jump ',bmk)])
+				 `[,bmk (bookmark-delete ',bmk)])
 			     (bookmark-all-names)))))
-	       (append menu '("---") items)))))
-       "---"
-       ["Insert %_Contents" bookmark-menu-insert
-	:active (fboundp 'bookmark-menu-insert)]
-       ["Insert L%_ocation" bookmark-menu-locate
-	:active (fboundp 'bookmark-menu-locate)]
-       "---"
-       ["%_Rename Bookmark" bookmark-menu-rename
-	:active (fboundp 'bookmark-menu-rename)]
-       ("%_Delete Bookmark"
-	 :filter (lambda (menu)
-		   (submenu-generate-accelerator-spec
-		    (mapcar #'(lambda (bmk)
-				`[,bmk (bookmark-delete ',bmk)])
-			    (bookmark-all-names)))))
-       ["%_Edit Bookmark List" bookmark-bmenu-list
-	:active (and-boundp 'bookmark-alist bookmark-alist)]
-       "---"
-       ["%_Save Bookmarks"        bookmark-save
-	:active (and-boundp 'bookmark-alist bookmark-alist)]
-       ["Save Bookmarks %_As..."  bookmark-write
-	:active (and-boundp 'bookmark-alist bookmark-alist)]
-       ["%_Load a Bookmark File" bookmark-load
-	:active (fboundp 'bookmark-load)]
-       )
+      ["%_Edit Bookmark List" bookmark-bmenu-list
+       :active (and-boundp 'bookmark-alist bookmark-alist)]
+      "---"
+      ["%_Save Bookmarks"        bookmark-save
+       :active (and-boundp 'bookmark-alist bookmark-alist)]
+      ["Save Bookmarks %_As..."  bookmark-write
+       :active (and-boundp 'bookmark-alist bookmark-alist)]
+      ["%_Load a Bookmark File" bookmark-load
+       :active (fboundp 'bookmark-load)]
       )
+     )
 
      ("C%_mds"
-      ["Repeat Last Comple%_x Command..." repeat-complex-command]
-      ["E%_valuate Lisp Expression..." eval-expression]
-      ["Execute %_Named Command..." execute-extended-command]
-      "----"
-      ["Start %_Defining Macro" start-kbd-macro
-       :included (not defining-kbd-macro)]
-      ["Stop %_Defining Macro" end-kbd-macro
-       :included defining-kbd-macro]
-      ["%_Execute Last Macro" call-last-kbd-macro
+     ["Repeat Last Comple%_x Command..." repeat-complex-command]
+     ["E%_valuate Lisp Expression..." eval-expression]
+     ["Execute %_Named Command..." execute-extended-command]
+     "----"
+     ["Start %_Defining Macro" start-kbd-macro
+      :included (not defining-kbd-macro)]
+     ["Stop %_Defining Macro" end-kbd-macro
+      :included defining-kbd-macro]
+     ["%_Execute Last Macro" call-last-kbd-macro
+      :active last-kbd-macro]
+     ("Other %_Macro"
+      ["Edit %_Last Macro" edit-last-kbd-macro
+       :active last-kbd-macro]
+      ["%_Edit Macro..." edit-kbd-macro]
+      ["%_Append to Last Macro" (start-kbd-macro t)
+       :active (and (not defining-kbd-macro) last-kbd-macro)]
+      "---"
+      ["%_Name Last Macro..." name-last-kbd-macro
        :active last-kbd-macro]
-      ("Other %_Macro"
-       ["Edit %_Last Macro" edit-last-kbd-macro
-	:active last-kbd-macro]
-       ["%_Edit Macro..." edit-kbd-macro]
-       ["%_Append to Last Macro" (start-kbd-macro t)
-	:active (and (not defining-kbd-macro) last-kbd-macro)]
-       "---"
-       ["%_Name Last Macro..." name-last-kbd-macro
-	:active last-kbd-macro]
-       ["Assign Last Macro to %_Key..." assign-last-kbd-macro-to-key
-	:active (and last-kbd-macro
-		     (fboundp 'assign-last-kbd-macro-to-key))]
-       "---"
-       ["E%_xecute Last Macro on Region Lines"
-	:active (and last-kbd-macro (region-exists-p))]
-       "---"
-       ["%_Query User During Macro" kbd-macro-query
-	:active defining-kbd-macro]
-       ["Enter %_Recursive Edit During Macro" (kbd-macro-query t)
-	:active defining-kbd-macro]
-       "---"
-       ["%_Insert Named Macro into Buffer..." insert-kbd-macro]
-       ["Read Macro from Re%_gion" read-kbd-macro
-	:active (region-exists-p)]
-       )
+      ["Assign Last Macro to %_Key..." assign-last-kbd-macro-to-key
+       :active (and last-kbd-macro
+		    (fboundp 'assign-last-kbd-macro-to-key))]
+      "---"
+      ["E%_xecute Last Macro on Region Lines"
+       :active (and last-kbd-macro (region-exists-p))]
+      "---"
+      ["%_Query User During Macro" kbd-macro-query
+       :active defining-kbd-macro]
+      ["Enter %_Recursive Edit During Macro" (kbd-macro-query t)
+       :active defining-kbd-macro]
+      "---"
+      ["%_Insert Named Macro into Buffer..." insert-kbd-macro]
+      ["Read Macro from Re%_gion" read-kbd-macro
+       :active (region-exists-p)]
+      )
+     "----"
+     ["D%_ynamic Abbrev Expand" dabbrev-expand]
+     ["Define %_Global Abbrev for " add-global-abbrev
+      :suffix	(truncate-string-to-width (abbrev-string-to-be-defined nil)
+					  40 nil nil t)]
+     ("Other %_Abbrev"
+      ["Dynamic Abbrev %_Complete" dabbrev-completion]
+      ["Dynamic Abbrev Complete in %_All Buffers" (dabbrev-completion 16)]
       "----"
-       ["D%_ynamic Abbrev Expand" dabbrev-expand]
-       ["Define %_Global Abbrev for " add-global-abbrev
-	:suffix	(truncate-string-to-width (abbrev-string-to-be-defined nil)
+      "----"
+      ["%_Define Global Abbrev for " add-global-abbrev
+       :suffix	(truncate-string-to-width (abbrev-string-to-be-defined nil)
 					  40 nil nil t)]
-      ("Other %_Abbrev"
-       ["Dynamic Abbrev %_Complete" dabbrev-completion]
-       ["Dynamic Abbrev Complete in %_All Buffers" (dabbrev-completion 16)]
-       "----"
-       "----"
-       ["%_Define Global Abbrev for " add-global-abbrev
-	:suffix	(truncate-string-to-width (abbrev-string-to-be-defined nil)
+      ["Define %_Mode-Specific Abbrev for " add-mode-abbrev
+       :suffix	(truncate-string-to-width (abbrev-string-to-be-defined nil)
 					  40 nil nil t)]
-       ["Define %_Mode-Specific Abbrev for " add-mode-abbrev
-	:suffix	(truncate-string-to-width (abbrev-string-to-be-defined nil)
-					  40 nil nil t)]
-       ["Define Global Ex%_pansion for " inverse-add-global-abbrev
-	:suffix	(truncate-string-to-width
+      ["Define Global Ex%_pansion for " inverse-add-global-abbrev
+       :suffix	(truncate-string-to-width
 		 (inverse-abbrev-string-to-be-defined 1)
 		 40 nil nil t)]
-       ["Define Mode-Specific Expa%_nsion for " inverse-add-mode-abbrev
-	:suffix	(truncate-string-to-width
+      ["Define Mode-Specific Expa%_nsion for " inverse-add-mode-abbrev
+       :suffix	(truncate-string-to-width
 		 (inverse-abbrev-string-to-be-defined 1)
 		 40 nil nil t)]
-       "---"
-       ["E%_xpand Abbrev" expand-abbrev]
-       ["Expand Abbrevs in Re%_gion" expand-region-abbrevs
-	:active (region-exists-p)]
-       ["%_Unexpand Last Abbrev" unexpand-abbrev
-	:active (and (stringp last-abbrev-text)
-		     (> last-abbrev-location 0))]
-       "---"
-       ["%_Kill All Abbrevs" kill-all-abbrevs]
-       ["%_Insert All Abbrevs into Buffer" insert-abbrevs]
-       ["%_List Abbrevs" list-abbrevs]
-       "---"
-       ["%_Edit Abbrevs" edit-abbrevs]
-       ["%_Redefine Abbrevs from Buffer" edit-abbrevs-redefine
-	:active (eq major-mode 'edit-abbrevs-mode)]
-       "---"
-       ["%_Save Abbrevs As..." write-abbrev-file]
-       ["L%_oad Abbrevs..." read-abbrev-file]
-       )
-	"---"
-      ["%_Cut Rectangle" kill-rectangle]
-      ["%_Prefix Rectangle..." string-rectangle]
-      ("Other %_Rectangles/Register"
-       ["%_Yank Rectangle" yank-rectangle]
-       ["Rectangle %_to Register" copy-rectangle-to-register]
-       ["Rectangle %_from Register" insert-register]
-       ["%_Delete Rectangle" clear-rectangle]
-       ["%_Open Rectangle" open-rectangle]
-       ["Rectangle %_Mousing"
-	(customize-set-variable	'mouse-track-rectangle-p
+      "---"
+      ["E%_xpand Abbrev" expand-abbrev]
+      ["Expand Abbrevs in Re%_gion" expand-region-abbrevs
+       :active (region-exists-p)]
+      ["%_Unexpand Last Abbrev" unexpand-abbrev
+       :active (and (stringp last-abbrev-text)
+		    (> last-abbrev-location 0))]
+      "---"
+      ["%_Kill All Abbrevs" kill-all-abbrevs]
+      ["%_Insert All Abbrevs into Buffer" insert-abbrevs]
+      ["%_List Abbrevs" list-abbrevs]
+      "---"
+      ["%_Edit Abbrevs" edit-abbrevs]
+      ["%_Redefine Abbrevs from Buffer" edit-abbrevs-redefine
+       :active (eq major-mode 'edit-abbrevs-mode)]
+      "---"
+      ["%_Save Abbrevs As..." write-abbrev-file]
+      ["L%_oad Abbrevs..." read-abbrev-file]
+      )
+     "---"
+     ["%_Cut Rectangle" kill-rectangle]
+     ["%_Prefix Rectangle..." string-rectangle]
+     ("Other %_Rectangles/Register"
+      ["%_Yank Rectangle" yank-rectangle]
+      ["Rectangle %_to Register" copy-rectangle-to-register]
+      ["Rectangle %_from Register" insert-register]
+      ["%_Delete Rectangle" clear-rectangle]
+      ["%_Open Rectangle" open-rectangle]
+      ["Rectangle %_Mousing"
+       (customize-set-variable	'mouse-track-rectangle-p
 				(not mouse-track-rectangle-p))
-	:style toggle :selected mouse-track-rectangle-p]
-       "---"
-       ["%_Copy to Register..." copy-to-register :active (region-exists-p)]
-       ["%_Append to Register..." append-register :active (region-exists-p)]
-       ["%_Insert Register..." insert-register]
-       "---"
-       ["%_Save Point to Register" point-to-register]
-       ["%_Jump to Register"  register-to-point]
-       )
-	"---"
-       ["%_Sort Lines in Region" sort-lines :active (region-exists-p)]
-       ["%_Uppercase Region or Word" upcase-region-or-word]
-       ["%_Lowercase Region or Word" downcase-region-or-word]
-       ["%_Indent Region or Balanced Expression"
-	indent-region-or-balanced-expression]
-       ["%_Fill Paragraph or Region" fill-paragraph-or-region]
-       ("Other %_Text Commands"
-	["Sort %_Paragraphs in Region" sort-paragraphs :active (region-exists-p)]
-	["Sort Pa%_ges in Region" sort-pages :active (region-exists-p)]
-	["Sort C%_olumns in Region" sort-columns :active (region-exists-p)]
-	["Sort %_Regexp..." sort-regexp-fields :active (region-exists-p)]
-	"---"
-	["%_Capitalize Region" capitalize-region :active (region-exists-p)]
-	["Title-C%_ase Region" capitalize-region-as-title
-	 :active (region-exists-p)]
-	"----"
-	["C%_enter Region or Paragraph"
-	 (if (region-active-p) (center-region) (center-line))]
-	["Center %_Line" center-line]
-	"---"
-	["%_Indent Region Rigidly" indent-rigidly :active (region-exists-p)]
-	["In%_dent To Column..." indent-to-column]
-	"---"
-	["%_Untabify (Tabs to Spaces)" untabify :active (and (region-exists-p)
-							  (fboundp 'untabify))]
-	["%_Tabify (Spaces to Tabs)" tabify :active (and (region-exists-p)
-							(fboundp 'tabify))]
-	["Tab to Tab %_Stop" tab-to-tab-stop]
-	["Edit Ta%_b Stops" edit-tab-stops]
-	)
-       "---"
-       ("%_Tags"
-	["%_Find Tag..." find-tag]
-	["Find %_Other Window..." find-tag-other-window]
-	["%_Next Tag..." (find-tag nil)]
-	["N%_ext Other Window..." (find-tag-other-window nil)]
-	["Next %_File" next-file]
-	"-----"
-	["Tags %_Search..." tags-search]
-	["Tags %_Replace..." tags-query-replace]
-	["%_Continue Search/Replace" tags-loop-continue]
-	"-----"
-	["%_Pop stack" pop-tag-mark]
-	["%_Apropos..." tags-apropos]
-	"-----"
-	["%_Set Tags Table File..." visit-tags-table]
-	)
-       )
+       :style toggle :selected mouse-track-rectangle-p]
+      "---"
+      ["%_Copy to Register..." copy-to-register :active (region-exists-p)]
+      ["%_Append to Register..." append-register :active (region-exists-p)]
+      ["%_Insert Register..." insert-register]
+      "---"
+      ["%_Save Point to Register" point-to-register]
+      ["%_Jump to Register"  register-to-point]
+      )
+     "---"
+     ["%_Sort Lines in Region" sort-lines :active (region-exists-p)]
+     ["%_Uppercase Region or Word" upcase-region-or-word]
+     ["%_Lowercase Region or Word" downcase-region-or-word]
+     ["%_Indent Region or Balanced Expression"
+      indent-region-or-balanced-expression]
+     ["%_Fill Paragraph or Region" fill-paragraph-or-region]
+     ("Other %_Text Commands"
+      ["Sort %_Paragraphs in Region" sort-paragraphs :active (region-exists-p)]
+      ["Sort Pa%_ges in Region" sort-pages :active (region-exists-p)]
+      ["Sort C%_olumns in Region" sort-columns :active (region-exists-p)]
+      ["Sort %_Regexp..." sort-regexp-fields :active (region-exists-p)]
+      "---"
+      ["%_Capitalize Region" capitalize-region :active (region-exists-p)]
+      ["Title-C%_ase Region" capitalize-region-as-title
+       :active (region-exists-p)]
+      "----"
+      ["C%_enter Region or Paragraph"
+       (if (region-active-p) (center-region) (center-line))]
+      ["Center %_Line" center-line]
+      "---"
+      ["%_Indent Region Rigidly" indent-rigidly :active (region-exists-p)]
+      ["In%_dent To Column..." indent-to-column]
+      "---"
+      ["%_Untabify (Tabs to Spaces)" untabify :active (and (region-exists-p)
+							   (fboundp 'untabify))]
+      ["%_Tabify (Spaces to Tabs)" tabify :active (and (region-exists-p)
+						       (fboundp 'tabify))]
+      ["Tab to Tab %_Stop" tab-to-tab-stop]
+      ["Edit Ta%_b Stops" edit-tab-stops]
+      )
+     "---"
+     ("%_Tags"
+      ["%_Find Tag..." find-tag]
+      ["Find %_Other Window..." find-tag-other-window]
+      ["%_Next Tag..." (find-tag nil)]
+      ["N%_ext Other Window..." (find-tag-other-window nil)]
+      ["Next %_File" next-file]
+      "-----"
+      ["Tags %_Search..." tags-search]
+      ["Tags %_Replace..." tags-query-replace]
+      ["%_Continue Search/Replace" tags-loop-continue]
+      "-----"
+      ["%_Pop stack" pop-tag-mark]
+      ["%_Apropos..." tags-apropos]
+      "-----"
+      ["%_Set Tags Table File..." visit-tags-table]
+      )
+     )
 
      ;; #### Delete this entire menu as soon as the new package source is
      ;; committed.
      ("%_Tools"
-      ("%_Packages"
-       ("%_Set Download Site"
-	("%_Official Releases"
-	 :filter (lambda (&rest junk)
-		   (menu-split-long-menu
-		    (submenu-generate-accelerator-spec
-		     (package-ui-download-menu)))))
-	("%_Pre-Releases"
-	 :filter (lambda (&rest junk)
-		   (menu-split-long-menu
-		    (submenu-generate-accelerator-spec
-		     (package-ui-pre-release-download-menu)))))
-	("%_Site Releases"
-	 :filter (lambda (&rest junk)
-		   (menu-split-long-menu
-		    (submenu-generate-accelerator-spec
-		     (package-ui-site-release-download-menu))))))
-       "--:shadowEtchedIn"
-       ["%_Update Package Index" package-get-update-base]
-       ["%_List and Install" pui-list-packages]
-       ["U%_pdate Installed Packages" package-get-update-all]
-       ["%_Help" (Info-goto-node "(xemacs)Packages")])
-      ("%_Internet"
-       ["Read Mail %_1 (VM)..." vm
-	:active (fboundp 'vm)]
-       ["Read Mail %_2 (MH)..." (mh-rmail t)
-	:active (fboundp 'mh-rmail)]
-       ["Send %_Mail..." compose-mail
-	:active (fboundp 'compose-mail)]
-       ["Usenet %_News" gnus
-	:active (fboundp 'gnus)]
-       ["Browse the %_Web" w3
-	:active (fboundp 'w3)])
+     ("%_Packages"
+      ("%_Set Download Site"
+       ("%_Official Releases"
+	:filter ,#'(lambda (&rest junk)
+		     (menu-split-long-menu
+		      (submenu-generate-accelerator-spec
+		       (package-ui-download-menu)))))
+       ("%_Pre-Releases"
+	:filter ,#'(lambda (&rest junk)
+		     (menu-split-long-menu
+		      (submenu-generate-accelerator-spec
+		       (package-ui-pre-release-download-menu)))))
+       ("%_Site Releases"
+	:filter ,#'(lambda (&rest junk)
+		     (menu-split-long-menu
+		      (submenu-generate-accelerator-spec
+		       (package-ui-site-release-download-menu))))))
+      "--:shadowEtchedIn"
+      ["%_Update Package Index" package-get-update-base]
+      ["%_List and Install" pui-list-packages]
+      ["U%_pdate Installed Packages" package-get-update-all]
+      ["%_Help" (Info-goto-node "(xemacs)Packages")])
+     ("%_Internet"
+      ["Read Mail %_1 (VM)..." vm
+       :active (fboundp 'vm)]
+      ["Read Mail %_2 (MH)..." (mh-rmail t)
+       :active (fboundp 'mh-rmail)]
+      ["Send %_Mail..." compose-mail
+       :active (fboundp 'compose-mail)]
+      ["Usenet %_News" gnus
+       :active (fboundp 'gnus)]
+      ["Browse the %_Web" w3
+       :active (fboundp 'w3)])
+     "---"
+     ("%_Grep"
+      :filter
+      ,#'(lambda (menu)
+	   (if-boundp 'grep-history
+	       (if grep-history
+		   (let ((items
+			  (submenu-generate-accelerator-spec
+			   (mapcar #'(lambda (label-value)
+				       (vector (first label-value)
+					       (list 'grep
+						     (second label-value))))
+				   (Menubar-items-truncate-history
+				    grep-history 10 50)))))
+		     (append menu '("---") items))
+		 menu)
+	     menu))
+      ["%_Grep..." grep :active (fboundp 'grep)]
+      ["%_Kill Grep" kill-compilation
+       :active (and (fboundp 'kill-compilation)
+		    (fboundp 'compilation-find-buffer)
+		    (let ((buffer (condition-case nil
+				      (compilation-find-buffer)
+				    (error nil))))
+		      (and buffer (get-buffer-process buffer))))]
       "---"
-      ("%_Grep"
-       :filter
-       (lambda (menu)
-	 (if (or (not (boundp 'grep-history)) (null grep-history))
-	     menu
-	   (let ((items
-		  (submenu-generate-accelerator-spec
-                   (mapcar #'(lambda (label-value)
-			       (vector (first label-value)
-				       (list 'grep (second label-value))))
-			   (Menubar-items-truncate-history
-                            grep-history 10 50)))))
-	     (append menu '("---") items))))
-       ["%_Grep..." grep :active (fboundp 'grep)]
-       ["%_Kill Grep" kill-compilation
-	:active (and (fboundp 'kill-compilation)
-		     (fboundp 'compilation-find-buffer)
-		     (let ((buffer (condition-case nil
-				       (compilation-find-buffer)
-				     (error nil))))
-		       (and buffer (get-buffer-process buffer))))]
-       "---"
-       ["Grep %_All Files in Current Directory..."
-	grep-all-files-in-current-directory
-	:active (fboundp 'grep-all-files-in-current-directory)]
-       ["Grep All Files in Current Directory %_Recursively..."
-	grep-all-files-in-current-directory-and-below
-	:active (fboundp 'grep-all-files-in-current-directory-and-below)]
-       "---"
-       ["Grep %_C and C Header Files in Current Directory..."
-	(progn
-	  (require 'compile)
-	  (let ((grep-command
-		 (cons (concat grep-command " *.[chCH]"
+      ["Grep %_All Files in Current Directory..."
+       grep-all-files-in-current-directory
+       :active (fboundp 'grep-all-files-in-current-directory)]
+      ["Grep All Files in Current Directory %_Recursively..."
+       grep-all-files-in-current-directory-and-below
+       :active (fboundp 'grep-all-files-in-current-directory-and-below)]
+      "---"
+      ["Grep %_C and C Header Files in Current Directory..."
+       (progn
+	 (require 'compile)
+	 (let ((grep-command
+		(cons (concat grep-command " *.[chCH]"
 					; i wanted to also use *.cc and *.hh.
 					; see long comment below under Perl.
-			       )
-		       (length grep-command))))
-	    (call-interactively 'grep)))
-	:active (fboundp 'grep)]
-       ["Grep C Hea%_der Files in Current Directory..."
-	(progn
-	  (require 'compile)
-	  (let ((grep-command
-		 (cons (concat grep-command " *.[hH]"
+			      )
+		      (length grep-command))))
+	   (call-interactively 'grep)))
+       :active (fboundp 'grep)]
+      ["Grep C Hea%_der Files in Current Directory..."
+       (progn
+	 (require 'compile)
+	 (let ((grep-command
+		(cons (concat grep-command " *.[hH]"
 					; i wanted to also use *.hh.
 					; see long comment below under Perl.
-			       )
-		       (length grep-command))))
-	    (call-interactively 'grep)))
-	:active (fboundp 'grep)]
-       ["Grep %_E-Lisp Files in Current Directory..."
-	(progn
-	  (require 'compile)
-	  (let ((grep-command
-		 (cons (concat grep-command " *.el")
-		       (length grep-command))))
-	    (call-interactively 'grep)))
-	:active (fboundp 'grep)]
-       ["Grep %_Perl Files in Current Directory..."
-	(progn
-	  (require 'compile)
-	  (let ((grep-command
-		 (cons (concat grep-command " *.pl"
+			      )
+		      (length grep-command))))
+	   (call-interactively 'grep)))
+       :active (fboundp 'grep)]
+      ["Grep %_E-Lisp Files in Current Directory..."
+       (progn
+	 (require 'compile)
+	 (let ((grep-command
+		(cons (concat grep-command " *.el")
+		      (length grep-command))))
+	   (call-interactively 'grep)))
+       :active (fboundp 'grep)]
+      ["Grep %_Perl Files in Current Directory..."
+       (progn
+	 (require 'compile)
+	 (let ((grep-command
+		(cons (concat grep-command " *.pl"
 					; i wanted to use this:
 					; " *.pl *.pm *.am"
 					; but grep complains if it can't
@@ -539,601 +538,596 @@
 					; each separate glob in the directory
 					; to see if there are any files in
 					; that glob, and if not, omit it.
-			       )
-		       (length grep-command))))
-	    (call-interactively 'grep)))
-	:active (fboundp 'grep)]
-       ["Grep %_HTML Files in Current Directory..."
-	(progn
-	  (require 'compile)
-	  (let ((grep-command
-		 (cons (concat grep-command " *.*htm*")
-		       (length grep-command))))
-	    (call-interactively 'grep)))
-	:active (fboundp 'grep)]
-       "---"
-       ["%_Next Match" next-error
-	:active (and (fboundp 'compilation-errors-exist-p)
-		     (compilation-errors-exist-p))]
-       ["Pre%_vious Match" previous-error
-	:active (and (fboundp 'compilation-errors-exist-p)
-		     (compilation-errors-exist-p))]
-       ["%_First Match" first-error
-	:active (and (fboundp 'compilation-errors-exist-p)
-		     (compilation-errors-exist-p))]
-       ["G%_oto Match" compile-goto-error
-	:active (and (fboundp 'compilation-errors-exist-p)
-		     (compilation-errors-exist-p))]
-       "---"
-       ["%_Set Grep Command..."
-	(progn
-	  (require 'compile)
-	  (customize-set-variable
-	   'grep-command
-	   (read-shell-command "Default Grep Command: " grep-command)))
-	:active (fboundp 'grep)
-	]
-       )
-      ("%_Compile"
-       :filter
-       (lambda (menu)
-	 (if (or (not (boundp 'compile-history)) (null compile-history))
-	     menu
-	   (let ((items
-		  (submenu-generate-accelerator-spec
-		   (mapcar #'(lambda (label-value)
-			       (vector (first label-value)
-				       (list 'compile (second label-value))))
-			   (Menubar-items-truncate-history
-                            compile-history 10 50)))))
-	     (append menu '("---") items))))
-       ["%_Compile..." compile :active (fboundp 'compile)]
-       ["%_Repeat Compilation" recompile :active (fboundp 'recompile)]
-       ["%_Kill Compilation" kill-compilation
-	:active (and (fboundp 'kill-compilation)
-		     (fboundp 'compilation-find-buffer)
-		     (let ((buffer (condition-case nil
-				       (compilation-find-buffer)
-				     (error nil))))
-		       (and buffer (get-buffer-process buffer))))]
-       "---"
-       ["%_Next Error" next-error
-	:active (and (fboundp 'compilation-errors-exist-p)
-		     (compilation-errors-exist-p))]
-       ["Pre%_vious Error" previous-error
-	:active (and (fboundp 'compilation-errors-exist-p)
-		     (compilation-errors-exist-p))]
-       ["%_First Error" first-error
-	:active (and (fboundp 'compilation-errors-exist-p)
-		     (compilation-errors-exist-p))]
-       ["G%_oto Error" compile-goto-error
-	:active (and (fboundp 'compilation-errors-exist-p)
-		     (compilation-errors-exist-p))]
-       )
-      ("%_Debug"
-       ["%_GDB..." gdb
-	:active (fboundp 'gdb)]
-       ["%_DBX..." dbx
-	:active (fboundp 'dbx)])
-      ("%_Shell"
-       ["%_Shell" shell
-	:active (fboundp 'shell)]
-       ["S%_hell Command..." shell-command
-	:active (fboundp 'shell-command)]
-       ["Shell Command on %_Region..." shell-command-on-region
+			      )
+		      (length grep-command))))
+	   (call-interactively 'grep)))
+       :active (fboundp 'grep)]
+      ["Grep %_HTML Files in Current Directory..."
+       (progn
+	 (require 'compile)
+	 (let ((grep-command
+		(cons (concat grep-command " *.*htm*")
+		      (length grep-command))))
+	   (call-interactively 'grep)))
+       :active (fboundp 'grep)]
+      "---"
+      ["%_Next Match" next-error
+       :active (and (fboundp 'compilation-errors-exist-p)
+		    (compilation-errors-exist-p))]
+      ["Pre%_vious Match" previous-error
+       :active (and (fboundp 'compilation-errors-exist-p)
+		    (compilation-errors-exist-p))]
+      ["%_First Match" first-error
+       :active (and (fboundp 'compilation-errors-exist-p)
+		    (compilation-errors-exist-p))]
+      ["G%_oto Match" compile-goto-error
+       :active (and (fboundp 'compilation-errors-exist-p)
+		    (compilation-errors-exist-p))]
+      "---"
+      ["%_Set Grep Command..."
+       (progn
+	 (require 'compile)
+	 (customize-set-variable
+	  'grep-command
+	  (read-shell-command "Default Grep Command: " grep-command)))
+       :active (fboundp 'grep)
+       ]
+      )
+     ("%_Compile"
+      :filter
+      ,#'(lambda (menu)
+	   (if-boundp 'compile-history
+	       (if compile-history
+		   (let ((items
+			  (submenu-generate-accelerator-spec
+			   (mapcar #'(lambda (label-value)
+				       (vector (first label-value)
+					       (list 'compile
+						     (second label-value))))
+				   (Menubar-items-truncate-history
+				    compile-history 10 50)))))
+		     (append menu '("---") items))
+		 menu)
+	     menu))
+      ["%_Compile..." compile :active (fboundp 'compile)]
+      ["%_Repeat Compilation" recompile :active (fboundp 'recompile)]
+      ["%_Kill Compilation" kill-compilation
+       :active (and (fboundp 'kill-compilation)
+		    (fboundp 'compilation-find-buffer)
+		    (let ((buffer (condition-case nil
+				      (compilation-find-buffer)
+				    (error nil))))
+		      (and buffer (get-buffer-process buffer))))]
+      "---"
+      ["%_Next Error" next-error
+       :active (and (fboundp 'compilation-errors-exist-p)
+		    (compilation-errors-exist-p))]
+      ["Pre%_vious Error" previous-error
+       :active (and (fboundp 'compilation-errors-exist-p)
+		    (compilation-errors-exist-p))]
+      ["%_First Error" first-error
+       :active (and (fboundp 'compilation-errors-exist-p)
+		    (compilation-errors-exist-p))]
+      ["G%_oto Error" compile-goto-error
+       :active (and (fboundp 'compilation-errors-exist-p)
+		    (compilation-errors-exist-p))]
+      )
+     ("%_Debug"
+      ["%_GDB..." gdb
+       :active (fboundp 'gdb)]
+      ["%_DBX..." dbx
+       :active (fboundp 'dbx)])
+     ("%_Shell"
+      ["%_Shell" shell
+       :active (fboundp 'shell)]
+      ["S%_hell Command..." shell-command
+       :active (fboundp 'shell-command)]
+      ["Shell Command on %_Region..." shell-command-on-region
        :active (and (fboundp 'shell-command-on-region) (region-exists-p))])
 
-      ("%_Tags"
-       ["%_Find Tag..." find-tag]
-       ["Find %_Other Window..." find-tag-other-window]
-       ["%_Next Tag..." (find-tag nil)]
-       ["N%_ext Other Window..." (find-tag-other-window nil)]
-       ["Next %_File" next-file]
-       "-----"
-       ["Tags %_Search..." tags-search]
-       ["Tags %_Replace..." tags-query-replace]
-       ["%_Continue Search/Replace" tags-loop-continue]
-       "-----"
-       ["%_Pop stack" pop-tag-mark]
-       ["%_Apropos..." tags-apropos]
-       "-----"
-       ["%_Set Tags Table File..." visit-tags-table]
-       )
+     ("%_Tags"
+      ["%_Find Tag..." find-tag]
+      ["Find %_Other Window..." find-tag-other-window]
+      ["%_Next Tag..." (find-tag nil)]
+      ["N%_ext Other Window..." (find-tag-other-window nil)]
+      ["Next %_File" next-file]
+      "-----"
+      ["Tags %_Search..." tags-search]
+      ["Tags %_Replace..." tags-query-replace]
+      ["%_Continue Search/Replace" tags-loop-continue]
+      "-----"
+      ["%_Pop stack" pop-tag-mark]
+      ["%_Apropos..." tags-apropos]
+      "-----"
+      ["%_Set Tags Table File..." visit-tags-table]
+      )
 
-      "----"
+     "----"
 
-      ("Ca%_lendar"
-       ["%_3-Month Calendar" calendar
-	:active (fboundp 'calendar)]
-       ["%_Diary" diary
-	:active (fboundp 'diary)]
-       ["%_Holidays" holidays
-	:active (fboundp 'holidays)]
-       ;; we're all pagans at heart ...
-       ["%_Phases of the Moon" phases-of-moon
-	:active (fboundp 'phases-of-moon)]
-       ["%_Sunrise/Sunset" sunrise-sunset
-	:active (fboundp 'sunrise-sunset)])
+     ("Ca%_lendar"
+      ["%_3-Month Calendar" calendar
+       :active (fboundp 'calendar)]
+      ["%_Diary" diary
+       :active (fboundp 'diary)]
+      ["%_Holidays" holidays
+       :active (fboundp 'holidays)]
+      ;; we're all pagans at heart ...
+      ["%_Phases of the Moon" phases-of-moon
+       :active (fboundp 'phases-of-moon)]
+      ["%_Sunrise/Sunset" sunrise-sunset
+       :active (fboundp 'sunrise-sunset)])
 
-      ("Ga%_mes"
-       ["%_Mine Game" xmine
-	:active (fboundp 'xmine)]
-       ["%_Tetris" tetris
-	:active (fboundp 'tetris)]
-       ["%_Sokoban" sokoban
-	:active (fboundp 'sokoban)]
-       ["Quote from %_Zippy" yow
-	:active (fboundp 'yow)]
-       ["%_Psychoanalyst" doctor
-	:active (fboundp 'doctor)]
-       ["Ps%_ychoanalyze Zippy!" psychoanalyze-pinhead
-	:active (fboundp 'psychoanalyze-pinhead)]
-       ["%_Random Flames" flame
-	:active (fboundp 'flame)]
-       ["%_Dunnet (Adventure)" dunnet
-	:active (fboundp 'dunnet)]
-       ["Towers of %_Hanoi" hanoi
-	:active (fboundp 'hanoi)]
-       ["Game of %_Life" life
-	:active (fboundp 'life)]
-       ["M%_ultiplication Puzzle" mpuz
-	:active (fboundp 'mpuz)])
+     ("Ga%_mes"
+      ["%_Mine Game" xmine
+       :active (fboundp 'xmine)]
+      ["%_Tetris" tetris
+       :active (fboundp 'tetris)]
+      ["%_Sokoban" sokoban
+       :active (fboundp 'sokoban)]
+      ["Quote from %_Zippy" yow
+       :active (fboundp 'yow)]
+      ["%_Psychoanalyst" doctor
+       :active (fboundp 'doctor)]
+      ["Ps%_ychoanalyze Zippy!" psychoanalyze-pinhead
+       :active (fboundp 'psychoanalyze-pinhead)]
+      ["%_Random Flames" flame
+       :active (fboundp 'flame)]
+      ["%_Dunnet (Adventure)" dunnet
+       :active (fboundp 'dunnet)]
+      ["Towers of %_Hanoi" hanoi
+       :active (fboundp 'hanoi)]
+      ["Game of %_Life" life
+       :active (fboundp 'life)]
+      ["M%_ultiplication Puzzle" mpuz
+       :active (fboundp 'mpuz)])
 
-      "----"
-      )
+     "----"
+     )
 
 ;      ("%_Tools"
 ;       :filter behavior-menu-filter)
 
      ("%_Options"
-      ("%_Advanced (Customize)"
-       ("%_Emacs" :filter (lambda (&rest junk)
-			    (cdr (custom-menu-create 'emacs))))
-       ["%_Group..." customize-group]
-       ["%_Variable..." customize-variable]
-       ["%_Face..." customize-face]
-       ["%_Saved..." customize-saved]
-       ["Se%_t..." customize-customized]
-       ["%_Apropos..." customize-apropos]
-       ["%_Browse..." customize-browse])
+     ("%_Advanced (Customize)"
+      ("%_Emacs" :filter ,#'(lambda (&rest junk)
+			      (cdr (custom-menu-create 'emacs))))
+      ["%_Group..." customize-group]
+      ["%_Variable..." customize-variable]
+      ["%_Face..." customize-face]
+      ["%_Saved..." customize-saved]
+      ["Se%_t..." customize-customized]
+      ["%_Apropos..." customize-apropos]
+      ["%_Browse..." customize-browse])
+     "---"
+     ("%_Editing"
+      ["This Buffer %_Read Only" (toggle-read-only)
+       :style toggle :selected buffer-read-only]
+      ["%_Yank/Kill Interact With Clipboard"
+       (if (eq interprogram-cut-function 'own-clipboard)
+	   (progn
+	     (customize-set-variable 'interprogram-cut-function nil)
+	     (customize-set-variable 'interprogram-paste-function nil))
+	 (customize-set-variable 'interprogram-cut-function 'own-clipboard)
+	 (customize-set-variable 'interprogram-paste-function 'get-clipboard))
+       :style toggle
+       :selected (eq interprogram-cut-function 'own-clipboard)]
+      ["%_Overstrike"
+       (progn
+	 (setq overwrite-mode (if overwrite-mode nil 'overwrite-mode-textual))
+	 (customize-set-variable 'overwrite-mode overwrite-mode))
+       :style toggle :selected overwrite-mode]
+      ["%_Abbrev Mode"
+       (customize-set-variable 'abbrev-mode
+			       (not (default-value 'abbrev-mode)))
+       :style toggle
+       :selected (default-value 'abbrev-mode)]
+      ["Active Re%_gions"
+       (customize-set-variable 'zmacs-regions (not zmacs-regions))
+       :style toggle :selected zmacs-regions]
+      "---"
+      ["%_Case Sensitive Search"
+       (customize-set-variable 'case-fold-search
+			       (setq case-fold-search (not case-fold-search)))
+       :style toggle :selected (not case-fold-search)]
+      ["Case %_Matching Replace"
+       (customize-set-variable 'case-replace (not case-replace))
+       :style toggle :selected case-replace]
+      "---"
+      ("%_Newline at End of File..."
+       ["%_Don't Require"
+	(customize-set-variable 'require-final-newline nil)
+	:style radio :selected (not require-final-newline)]
+       ["%_Require"
+	(customize-set-variable 'require-final-newline t)
+	:style radio :selected (eq require-final-newline t)]
+       ["%_Ask"
+	(customize-set-variable 'require-final-newline 'ask)
+	:style radio :selected (and require-final-newline
+				    (not (eq require-final-newline t)))])
+      ["Add Newline When Moving Past %_End"
+       (customize-set-variable 'next-line-add-newlines
+			       (not next-line-add-newlines))
+       :style toggle :selected next-line-add-newlines])
+     ("%_Keyboard and Mouse"
+      ["%_Delete Key Deletes Selection"
+       (customize-set-variable 'pending-delete-mode (not pending-delete-mode))
+       :style toggle
+       :selected (and (boundp 'pending-delete-mode) pending-delete-mode)
+       :active (boundp 'pending-delete-mode)]
+      ["`kill-%_word' Stores in Clipboard"
+       (customize-set-variable 'kill-word-into-kill-ring
+			       (not kill-word-into-kill-ring))
+       :style toggle
+       :selected kill-word-into-kill-ring]
+      ["`kill-%_line' Kills Whole Line at Beg"
+       (customize-set-variable 'kill-whole-line (not kill-whole-line))
+       :style toggle
+       :selected kill-whole-line]
+      ["Size for %_Block-Movement Commands..."
+       (customize-set-variable 'block-movement-size
+			       (read-number "Block Movement Size: "
+					    t block-movement-size))]
+      ["%_VI Emulation"
+       (progn
+	 (toggle-viper-mode)
+	 (customize-set-variable 'viper-mode viper-mode))
+       :style toggle :selected (and (boundp 'viper-mode) viper-mode)
+       :active (fboundp 'toggle-viper-mode)]
+      "----"
+      ["S%_hifted Motion Keys Select Region"
+       (customize-set-variable 'shifted-motion-keys-select-region
+			       (not shifted-motion-keys-select-region))
+       :style toggle
+       :selected shifted-motion-keys-select-region]
+      ["%_After Shifted Motion, Unshifted Motion Keys Deselect"
+       (customize-set-variable 'unshifted-motion-keys-deselect-region
+			       (not unshifted-motion-keys-deselect-region))
+       :style toggle
+       :selected unshifted-motion-keys-deselect-region]
+      "----"
+      ["%_Set Key..." global-set-key]
+      ["%_Unset Key..." global-unset-key]
+      "---"
+      ["%_Mouse Paste at Text Cursor (not Clicked Location)"
+       (customize-set-variable 'mouse-yank-at-point (not mouse-yank-at-point))
+       :style toggle :selected mouse-yank-at-point]
       "---"
-      ("%_Editing"
-       ["This Buffer %_Read Only" (toggle-read-only)
-	:style toggle :selected buffer-read-only]
-       ["%_Yank/Kill Interact With Clipboard"
-	(if (eq interprogram-cut-function 'own-clipboard)
-	    (progn
-	      (customize-set-variable 'interprogram-cut-function nil)
-	      (customize-set-variable 'interprogram-paste-function nil))
-	  (customize-set-variable 'interprogram-cut-function 'own-clipboard)
-	  (customize-set-variable 'interprogram-paste-function 'get-clipboard))
-	:style toggle
-	:selected (eq interprogram-cut-function 'own-clipboard)]
-       ["%_Overstrike"
-	(progn
-	  (setq overwrite-mode (if overwrite-mode nil 'overwrite-mode-textual))
-	  (customize-set-variable 'overwrite-mode overwrite-mode))
-	:style toggle :selected overwrite-mode]
-       ["%_Abbrev Mode"
-	(customize-set-variable 'abbrev-mode
-				(not (default-value 'abbrev-mode)))
-	:style toggle
-	:selected (default-value 'abbrev-mode)]
-       ["Active Re%_gions"
-	(customize-set-variable 'zmacs-regions (not zmacs-regions))
-	:style toggle :selected zmacs-regions]
-       "---"
-       ["%_Case Sensitive Search"
-	(customize-set-variable 'case-fold-search
-				(setq case-fold-search (not case-fold-search)))
-	:style toggle :selected (not case-fold-search)]
-       ["Case %_Matching Replace"
-	(customize-set-variable 'case-replace (not case-replace))
-	:style toggle :selected case-replace]
-       "---"
-       ("%_Newline at End of File..."
-	["%_Don't Require"
-	 (customize-set-variable 'require-final-newline nil)
-	 :style radio :selected (not require-final-newline)]
-	["%_Require"
-	 (customize-set-variable 'require-final-newline t)
-	 :style radio :selected (eq require-final-newline t)]
-	["%_Ask"
-	 (customize-set-variable 'require-final-newline 'ask)
-	 :style radio :selected (and require-final-newline
-				     (not (eq require-final-newline t)))])
-       ["Add Newline When Moving Past %_End"
-	(customize-set-variable 'next-line-add-newlines
-				(not next-line-add-newlines))
-	:style toggle :selected next-line-add-newlines])
-      ("%_Keyboard and Mouse"
-       ["%_Delete Key Deletes Selection"
-	(customize-set-variable 'pending-delete-mode (not pending-delete-mode))
-	:style toggle
-	:selected (and (boundp 'pending-delete-mode) pending-delete-mode)
-	:active (boundp 'pending-delete-mode)]
-       ["`kill-%_word' Stores in Clipboard"
-	(customize-set-variable 'kill-word-into-kill-ring
-				(not kill-word-into-kill-ring))
-	:style toggle
-	:selected kill-word-into-kill-ring]
-       ["`kill-%_line' Kills Whole Line at Beg"
-	 (customize-set-variable 'kill-whole-line (not kill-whole-line))
-	 :style toggle
-	 :selected kill-whole-line]
-       ["Size for %_Block-Movement Commands..."
-	(customize-set-variable 'block-movement-size
-				(read-number "Block Movement Size: "
-					      t block-movement-size))]
-       ["%_VI Emulation"
-	(progn
-	  (toggle-viper-mode)
-	  (customize-set-variable 'viper-mode viper-mode))
-	:style toggle :selected (and (boundp 'viper-mode) viper-mode)
-	:active (fboundp 'toggle-viper-mode)]
-       "----"
-       ["S%_hifted Motion Keys Select Region"
-	 (customize-set-variable 'shifted-motion-keys-select-region
-				 (not shifted-motion-keys-select-region))
-	 :style toggle
-	 :selected shifted-motion-keys-select-region]
-       ["%_After Shifted Motion, Unshifted Motion Keys Deselect"
-	 (customize-set-variable 'unshifted-motion-keys-deselect-region
-				 (not unshifted-motion-keys-deselect-region))
-	 :style toggle
-	 :selected unshifted-motion-keys-deselect-region]
-       "----"
-       ["%_Set Key..." global-set-key]
-       ["%_Unset Key..." global-unset-key]
-       "---"
-       ["%_Mouse Paste at Text Cursor (not Clicked Location)"
-	(customize-set-variable 'mouse-yank-at-point (not mouse-yank-at-point))
-	:style toggle :selected mouse-yank-at-point]
-       "---"
-       ["%_Teach Extended Commands"
-	(customize-set-variable 'teach-extended-commands-p
-				(not teach-extended-commands-p))
-	:style toggle :selected teach-extended-commands-p]
+      ["%_Teach Extended Commands"
+       (customize-set-variable 'teach-extended-commands-p
+			       (not teach-extended-commands-p))
+       :style toggle :selected teach-extended-commands-p]
+      )
+     ("%_Printing"
+      ["Set Printer %_Name for Generic Print Support..."
+       (customize-set-variable
+	'printer-name
+	(read-string "Set printer name: " printer-name))]
+      "---"
+      ["Command-Line %_Switches for `lpr'/`lp'..."
+       ;; better to directly open a customization buffer, since the value
+       ;; must be a list of strings, which is somewhat complex to prompt for.
+       (customize-variable 'lpr-switches)
+       (boundp 'lpr-switches)]
+      ("%_Pretty-Print Paper Size"
+       ["%_Letter"
+	(customize-set-variable 'ps-paper-type 'letter)
+	:style radio
+	:selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'letter))
+	:active (boundp 'ps-paper-type)]
+       ["Lette%_r-Small"
+	(customize-set-variable 'ps-paper-type 'letter-small)
+	:style radio
+	:selected (and (boundp 'ps-paper-type)
+		       (eq ps-paper-type 'letter-small))
+	:active (boundp 'ps-paper-type)]
+       ["Le%_gal"
+	(customize-set-variable 'ps-paper-type 'legal)
+	:style radio
+	:selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'legal))
+	:active (boundp 'ps-paper-type)]
+       ["%_Statement"
+	(customize-set-variable 'ps-paper-type 'statement)
+	:style radio
+	:selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'statement))
+	:active (boundp 'ps-paper-type)]
+       ["%_Executive"
+	(customize-set-variable 'ps-paper-type 'executive)
+	:style radio
+	:selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'executive))
+	:active (boundp 'ps-paper-type)]
+       ["%_Tabloid"
+	(customize-set-variable 'ps-paper-type 'tabloid)
+	:style radio
+	:selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'tabloid))
+	:active (boundp 'ps-paper-type)]
+       ["Le%_dger"
+	(customize-set-variable 'ps-paper-type 'ledger)
+	:style radio
+	:selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'ledger))
+	:active (boundp 'ps-paper-type)]
+       ["A%_3"
+	(customize-set-variable 'ps-paper-type 'a3)
+	:style radio
+	:selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'a3))
+	:active (boundp 'ps-paper-type)]
+       ["%_A4"
+	(customize-set-variable 'ps-paper-type 'a4)
+	:style radio
+	:selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'a4))
+	:active (boundp 'ps-paper-type)]
+       ["A4s%_mall"
+	(customize-set-variable 'ps-paper-type 'a4small)
+	:style radio
+	:selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'a4small))
+	:active (boundp 'ps-paper-type)]
+       ["B%_4"
+	(customize-set-variable 'ps-paper-type 'b4)
+	:style radio
+	:selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'b4))
+	:active (boundp 'ps-paper-type)]
+       ["%_B5"
+	(customize-set-variable 'ps-paper-type 'b5)
+	:style radio
+	:selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'b5))
+	:active (boundp 'ps-paper-type)]
+       )
+      ["%_Color Printing"
+       (cond (ps-print-color-p
+	      (customize-set-variable 'ps-print-color-p nil)
+	      ;; I'm wondering whether all this muck is useful.
+	      (and (boundp 'original-face-background)
+		   original-face-background
+		   (set-face-background 'default original-face-background)))
+	     (t
+	      (customize-set-variable 'ps-print-color-p t)
+	      (setq original-face-background
+		    (face-background-instance 'default))
+	      (set-face-background 'default "white")))
+       :style toggle
+       :selected (and (boundp 'ps-print-color-p) ps-print-color-p)
+       :active (boundp 'ps-print-color-p)])
+     ("%_Internet"
+      ("%_Compose Mail With"
+       ["VM mail package"
+	(customize-set-variable 'mail-user-agent 'vm-user-agent)
+	:style radio
+	:selected (eq mail-user-agent 'vm-user-agent)
+	:active (get 'vm-user-agent 'composefunc)]
+       ["Bare-bones Emacs Mailer"
+	(customize-set-variable 'mail-user-agent 'sendmail-user-agent)
+	:style radio
+	:selected (eq mail-user-agent 'sendmail-user-agent)]
+       ["MH"
+	(customize-set-variable 'mail-user-agent 'mh-e-user-agent)
+	:style radio
+	:selected (eq mail-user-agent 'mh-e-user-agent)
+	:active (get 'mh-e-user-agent 'composefunc)]
+       ["GNUS"
+	(customize-set-variable 'mail-user-agent 'message-user-agent)
+	:style radio
+	:selected (eq mail-user-agent 'message-user-agent)
+	:active (get 'message-user-agent 'composefunc)]
        )
-      ("%_Printing"
-       ["Set Printer %_Name for Generic Print Support..."
-	(customize-set-variable
-	 'printer-name
-	 (read-string "Set printer name: " printer-name))]
-       "---"
-       ["Command-Line %_Switches for `lpr'/`lp'..."
-	;; better to directly open a customization buffer, since the value
-	;; must be a list of strings, which is somewhat complex to prompt for.
-	(customize-variable 'lpr-switches)
-	(boundp 'lpr-switches)]
-       ("%_Pretty-Print Paper Size"
-	["%_Letter"
-	 (customize-set-variable 'ps-paper-type 'letter)
-	 :style radio
-	 :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'letter))
-	 :active (boundp 'ps-paper-type)]
-	["Lette%_r-Small"
-	 (customize-set-variable 'ps-paper-type 'letter-small)
-	 :style radio
-	 :selected (and (boundp 'ps-paper-type)
-			(eq ps-paper-type 'letter-small))
-	 :active (boundp 'ps-paper-type)]
-	["Le%_gal"
-	 (customize-set-variable 'ps-paper-type 'legal)
-	 :style radio
-	 :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'legal))
-	 :active (boundp 'ps-paper-type)]
-	["%_Statement"
-	 (customize-set-variable 'ps-paper-type 'statement)
-	 :style radio
-	 :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'statement))
-	 :active (boundp 'ps-paper-type)]
-	["%_Executive"
-	 (customize-set-variable 'ps-paper-type 'executive)
-	 :style radio
-	 :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'executive))
-	 :active (boundp 'ps-paper-type)]
-	["%_Tabloid"
-	 (customize-set-variable 'ps-paper-type 'tabloid)
-	 :style radio
-	 :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'tabloid))
-	 :active (boundp 'ps-paper-type)]
-	["Le%_dger"
-	 (customize-set-variable 'ps-paper-type 'ledger)
-	 :style radio
-	 :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'ledger))
-	 :active (boundp 'ps-paper-type)]
-	["A%_3"
-	 (customize-set-variable 'ps-paper-type 'a3)
-	 :style radio
-	 :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'a3))
-	 :active (boundp 'ps-paper-type)]
-	["%_A4"
-	 (customize-set-variable 'ps-paper-type 'a4)
-	 :style radio
-	 :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'a4))
-	 :active (boundp 'ps-paper-type)]
-	["A4s%_mall"
-	 (customize-set-variable 'ps-paper-type 'a4small)
-	 :style radio
-	 :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'a4small))
-	 :active (boundp 'ps-paper-type)]
-	["B%_4"
-	 (customize-set-variable 'ps-paper-type 'b4)
-	 :style radio
-	 :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'b4))
-	 :active (boundp 'ps-paper-type)]
-	["%_B5"
-	 (customize-set-variable 'ps-paper-type 'b5)
-	 :style radio
-	 :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'b5))
-	 :active (boundp 'ps-paper-type)]
-	)
-       ["%_Color Printing"
-	(cond (ps-print-color-p
-	       (customize-set-variable 'ps-print-color-p nil)
-	       ;; I'm wondering whether all this muck is useful.
-	       (and (boundp 'original-face-background)
-		    original-face-background
-		    (set-face-background 'default original-face-background)))
-	      (t
-	       (customize-set-variable 'ps-print-color-p t)
-	       (setq original-face-background
-		     (face-background-instance 'default))
-	       (set-face-background 'default "white")))
-	:style toggle
-	:selected (and (boundp 'ps-print-color-p) ps-print-color-p)
-	:active (boundp 'ps-print-color-p)])
-      ("%_Internet"
-       ("%_Compose Mail With"
-	["VM mail package"
-	 (customize-set-variable 'mail-user-agent 'vm-user-agent)
-	 :style radio
-	 :selected (eq mail-user-agent 'vm-user-agent)
-	 :active (get 'vm-user-agent 'composefunc)]
-	["Bare-bones Emacs Mailer"
-	 (customize-set-variable 'mail-user-agent 'sendmail-user-agent)
-	 :style radio
-	 :selected (eq mail-user-agent 'sendmail-user-agent)]
-	["MH"
-	 (customize-set-variable 'mail-user-agent 'mh-e-user-agent)
-	 :style radio
-	 :selected (eq mail-user-agent 'mh-e-user-agent)
-	 :active (get 'mh-e-user-agent 'composefunc)]
-	["GNUS"
-	 (customize-set-variable 'mail-user-agent 'message-user-agent)
-	 :style radio
-	 :selected (eq mail-user-agent 'message-user-agent)
-	 :active (get 'message-user-agent 'composefunc)]
-	)
-       ["Set My %_Email Address..."
-	(customize-set-variable
-	 'user-mail-address
-	 (read-string "Set email address: " user-mail-address))]
-       ["Set %_Machine Email Name..."
-	(customize-set-variable
-	 'mail-host-address
-	 (read-string "Set machine email name: " mail-host-address))]
-       ["Set %_SMTP Server..."
-	(progn
-	  (require 'smtpmail)
-	  (customize-set-variable
-	   'smtpmail-smtp-server
-	   (read-string "Set SMTP server: " smtpmail-smtp-server)))
-	:active (and (boundp 'send-mail-function)
-		     (eq send-mail-function 'smtpmail-send-it))]
-       ["SMTP %_Debug Info"
-	(progn
-	  (require 'smtpmail)
-	  (customize-set-variable 'smtpmail-debug-info
-				  (not smtpmail-debug-info)))
-	:style toggle
-	:selected (and (boundp 'smtpmail-debug-info) smtpmail-debug-info)
-	:active (and (boundp 'send-mail-function)
-		     (eq send-mail-function 'smtpmail-send-it))])
-      ("%_Troubleshooting"
-       ["%_Debug on Error [not saved]"
-	(setq debug-on-error (not debug-on-error))
-	:style toggle :selected debug-on-error]
-       ["Debug on %_Quit [not saved]"
-	(setq debug-on-quit (not debug-on-quit))
-	:style toggle :selected debug-on-quit]
-       ["Debug on S%_ignal [not saved]"
-	(setq debug-on-signal (not debug-on-signal))
-	:style toggle :selected debug-on-signal]
-       ["%_Stack Trace on Error [not saved]"
-	(setq stack-trace-on-error (not stack-trace-on-error))
-	:style toggle :selected stack-trace-on-error]
-       ["Stack Trace on Si%_gnal [not saved]"
-	(setq stack-trace-on-signal (not stack-trace-on-signal))
-	:style toggle :selected stack-trace-on-signal]
+      ["Set My %_Email Address..."
+       (customize-set-variable
+	'user-mail-address
+	(read-string "Set email address: " user-mail-address))]
+      ["Set %_Machine Email Name..."
+       (customize-set-variable
+	'mail-host-address
+	(read-string "Set machine email name: " mail-host-address))]
+      ["Set %_SMTP Server..."
+       (progn
+	 (require 'smtpmail)
+	 (customize-set-variable
+	  'smtpmail-smtp-server
+	  (read-string "Set SMTP server: " smtpmail-smtp-server)))
+       :active (and (boundp 'send-mail-function)
+		    (eq send-mail-function 'smtpmail-send-it))]
+      ["SMTP %_Debug Info"
+       (progn
+	 (require 'smtpmail)
+	 (customize-set-variable 'smtpmail-debug-info
+				 (not smtpmail-debug-info)))
+       :style toggle
+       :selected (and (boundp 'smtpmail-debug-info) smtpmail-debug-info)
+       :active (and (boundp 'send-mail-function)
+		    (eq send-mail-function 'smtpmail-send-it))])
+     ("%_Troubleshooting"
+      ["%_Debug on Error [not saved]"
+       (setq debug-on-error (not debug-on-error))
+       :style toggle :selected debug-on-error]
+      ["Debug on %_Quit [not saved]"
+       (setq debug-on-quit (not debug-on-quit))
+       :style toggle :selected debug-on-quit]
+      ["Debug on S%_ignal [not saved]"
+       (setq debug-on-signal (not debug-on-signal))
+       :style toggle :selected debug-on-signal]
+      ["%_Stack Trace on Error [not saved]"
+       (setq stack-trace-on-error (not stack-trace-on-error))
+       :style toggle :selected stack-trace-on-error]
+      ["Stack Trace on Si%_gnal [not saved]"
+       (setq stack-trace-on-signal (not stack-trace-on-signal))
+       :style toggle :selected stack-trace-on-signal]
+      )
+     ("Encodin%_g"
+      ["Automatic %_EOL Detection"
+       (customize-set-variable 'eol-detection-enabled-p
+			       (not eol-detection-enabled-p))
+       :style toggle
+       :selected eol-detection-enabled-p
+       :included (not (memq system-type '(windows-nt cygwin32)))]
+      ("Set Coding System of %_Buffer File"
+       :filter
+       ,#'(lambda (menu)
+	    (coding-system-menu-filter
+	     (lambda (entry)
+	       (set-buffer-file-coding-system entry))
+	     (lambda (entry) t))))
+      ;; not implemented yet
+      ("Set Coding System of %_Terminal"
+       :filter
+       ,#'(lambda (menu)
+	    (coding-system-menu-filter
+	     (lambda (entry)
+	       (set-terminal-coding-system entry))
+	     (lambda (entry) nil)))
        )
-      ("Encodin%_g"
-       ["Automatic %_EOL Detection"
-	(customize-set-variable 'eol-detection-enabled-p
-				(not eol-detection-enabled-p))
-	:style toggle
-	:selected eol-detection-enabled-p
-	:included (not (memq system-type '(windows-nt cygwin32)))]
-       ("Set Coding System of %_Buffer File"
-	:filter
-	(lambda (menu)
-	  (coding-system-menu-filter
-	   (lambda (entry)
-	     (set-buffer-file-coding-system entry))
-	   (lambda (entry) t)
-	   ))
-	)
-       ;; not implemented yet
-       ("Set Coding System of %_Terminal"
-	:filter
-	(lambda (menu)
-	  (coding-system-menu-filter
-	   (lambda (entry)
-	     (set-terminal-coding-system entry))
-	   (lambda (entry) nil)
-	   ))
-	)
-       ;; not implemented yet
-       ("Set Coding System of %_Keyboard"
-	:filter
-	(lambda (menu)
-	  (coding-system-menu-filter
-	   (lambda (entry)
-	     (set-keyboard-coding-system entry))
-	   (lambda (entry) nil)
-	   ))
-	)
-       ("Set Coding System of %_Process"
-	:filter
-	(lambda (menu)
-	  (coding-system-menu-filter
-	   (lambda (entry)
-	     (set-buffer-process-coding-system entry))
-	   (lambda (entry) (get-buffer-process (current-buffer)))
-	   ))
-	)
+      ;; not implemented yet
+      ("Set Coding System of %_Keyboard"
+       :filter
+       ,#'(lambda (menu)
+	    (coding-system-menu-filter
+	     (lambda (entry)
+	       (set-keyboard-coding-system entry))
+	     (lambda (entry) nil))))
+      ("Set Coding System of %_Process"
+       :filter
+       ,#'(lambda (menu)
+	    (coding-system-menu-filter
+	     (lambda (entry)
+	       (set-buffer-process-coding-system entry entry))
+	     (lambda (entry) (get-buffer-process (current-buffer)))))))
+     ,@(when (featurep 'mule)
+	 `(("Internationa%_l"
+	    ("Set %_Language Environment"
+	     :filter
+	     ,#'(lambda (menu)
+		  (menu-split-long-menu-and-sort
+		   (mapcar #'(lambda (entry)
+			       `[ ,(car entry)
+				  (set-language-environment ',(car entry))
+				  :style radio
+				  :selected
+				  ,(equal (car entry)
+					  current-language-environment)])
+			   language-info-alist)
+		   )))
+	    ["%_Toggle Input Method" toggle-input-method]
+	    ["Select %_Input Method" set-input-method]
+	    )))
+     "-----"
+     ("%_Display"
+      ,@(if (featurep 'scrollbar)
+	    '(["%_Scrollbars"
+	       (customize-set-variable 'scrollbars-visible-p
+				       (not scrollbars-visible-p))
+	       :style toggle
+	       :selected scrollbars-visible-p]))
+      ["%_Wrap Long Lines"
+       (progn ;; becomes buffer-local
+	 (setq truncate-lines (not truncate-lines))
+	 (customize-set-variable 'truncate-lines truncate-lines))
+       :style toggle
+       :selected (not truncate-lines)]
+      "----"
+      ["%_3D Modeline"
+       (customize-set-variable 'modeline-3d-p
+			       (not modeline-3d-p))
+       :style toggle
+       :selected modeline-3d-p]
+      ("Modeline %_Horizontal Scrolling"
+       ["%_None"
+	(customize-set-variable 'modeline-scrolling-method nil)
+	:style radio
+	:selected (not modeline-scrolling-method)]
+       ["As %_Text"
+	(customize-set-variable 'modeline-scrolling-method t)
+	:style radio
+	:selected (eq modeline-scrolling-method t)]
+       ["As %_Scrollbar"
+	(customize-set-variable 'modeline-scrolling-method 'scrollbar)
+	:style radio
+	:selected (eq modeline-scrolling-method 'scrollbar)]
        )
-      ,@(when (featurep 'mule)
-	  '(("Internationa%_l"
-	     ("Set %_Language Environment"
-	      :filter
-	      (lambda (menu)
-		(menu-split-long-menu-and-sort
-		 (mapcar #'(lambda (entry)
-			     `[ ,(car entry)
-				(set-language-environment ',(car entry))
-				:style radio
-				:selected
-				,(equal (car entry)
-					current-language-environment)])
-			 language-info-alist)
-		 )))
-	     ["%_Toggle Input Method" toggle-input-method]
-	     ["Select %_Input Method" set-input-method]
-	     )))
+      ,@(if (featurep 'toolbar)
+	    '("---"
+	      ["%_Toolbars Visible"
+	       (customize-set-variable 'toolbar-visible-p
+				       (not toolbar-visible-p))
+	       :style toggle
+	       :selected toolbar-visible-p]
+	      ["Toolbars Ca%_ptioned"
+	       (customize-set-variable 'toolbar-captioned-p
+				       (not toolbar-captioned-p))
+	       :style toggle
+	       :active toolbar-visible-p
+	       :selected toolbar-captioned-p]
+	      ("Default Toolba%_r Location"
+	       ["%_Top"
+		(customize-set-variable 'default-toolbar-position 'top)
+		:style radio
+		:active toolbar-visible-p
+		:selected (eq default-toolbar-position 'top)]
+	       ["%_Bottom"
+		(customize-set-variable 'default-toolbar-position 'bottom)
+		:style radio
+		:active toolbar-visible-p
+		:selected (eq default-toolbar-position 'bottom)]
+	       ["%_Left"
+		(customize-set-variable 'default-toolbar-position 'left)
+		:style radio
+		:active toolbar-visible-p
+		:selected (eq default-toolbar-position 'left)]
+	       ["%_Right"
+		(customize-set-variable 'default-toolbar-position 'right)
+		:style radio
+		:active toolbar-visible-p
+		:selected (eq default-toolbar-position 'right)]
+	       )
+	      ))
+      ,@(if (featurep 'gutter)
+	    '("---"
+	      ["B%_uffers Tab Visible"
+	       (customize-set-variable 'gutter-buffers-tab-visible-p
+				       (not gutter-buffers-tab-visible-p))
+	       :style toggle
+	       :selected gutter-buffers-tab-visible-p]
+	      ("Default %_Gutter Location"
+	       ["%_Top"
+		(customize-set-variable 'default-gutter-position 'top)
+		:style radio
+		:selected (eq default-gutter-position 'top)]
+	       ["%_Bottom"
+		(customize-set-variable 'default-gutter-position 'bottom)
+		:style radio
+		:selected (eq default-gutter-position 'bottom)]
+	       ["%_Left"
+		(customize-set-variable 'default-gutter-position 'left)
+		:style radio
+		:selected (eq default-gutter-position 'left)]
+	       ["%_Right"
+		(customize-set-variable 'default-gutter-position 'right)
+		:style radio
+		:selected (eq default-gutter-position 'right)]
+	       )
+	      ))
       "-----"
-      ("%_Display"
-       ,@(if (featurep 'scrollbar)
-	     '(["%_Scrollbars"
-		(customize-set-variable 'scrollbars-visible-p
-					(not scrollbars-visible-p))
-		:style toggle
-		:selected scrollbars-visible-p]))
-       ["%_Wrap Long Lines"
-	(progn;; becomes buffer-local
-	  (setq truncate-lines (not truncate-lines))
-	  (customize-set-variable 'truncate-lines truncate-lines))
-	:style toggle
-	:selected (not truncate-lines)]
-       "----"
-       ["%_3D Modeline"
-	(customize-set-variable 'modeline-3d-p
-				(not modeline-3d-p))
-	:style toggle
-	:selected modeline-3d-p]
-       ("Modeline %_Horizontal Scrolling"
-	["%_None"
-	 (customize-set-variable 'modeline-scrolling-method nil)
-	 :style radio
-	 :selected (not modeline-scrolling-method)]
-	["As %_Text"
-	 (customize-set-variable 'modeline-scrolling-method t)
-	 :style radio
-	 :selected (eq modeline-scrolling-method t)]
-	["As %_Scrollbar"
-	 (customize-set-variable 'modeline-scrolling-method 'scrollbar)
-	 :style radio
-	 :selected (eq modeline-scrolling-method 'scrollbar)]
-	)
-       ,@(if (featurep 'toolbar)
-	     '("---"
-	       ["%_Toolbars Visible"
-		(customize-set-variable 'toolbar-visible-p
-					(not toolbar-visible-p))
-		:style toggle
-		:selected toolbar-visible-p]
-	       ["Toolbars Ca%_ptioned"
-		(customize-set-variable 'toolbar-captioned-p
-					(not toolbar-captioned-p))
-		:style toggle
-		:active toolbar-visible-p
-		:selected toolbar-captioned-p]
-	       ("Default Toolba%_r Location"
-		["%_Top"
-		 (customize-set-variable 'default-toolbar-position 'top)
-		 :style radio
-		 :active toolbar-visible-p
-		 :selected (eq default-toolbar-position 'top)]
-		["%_Bottom"
-		 (customize-set-variable 'default-toolbar-position 'bottom)
-		 :style radio
-		 :active toolbar-visible-p
-		 :selected (eq default-toolbar-position 'bottom)]
-		["%_Left"
-		 (customize-set-variable 'default-toolbar-position 'left)
-		 :style radio
-		 :active toolbar-visible-p
-		 :selected (eq default-toolbar-position 'left)]
-		["%_Right"
-		 (customize-set-variable 'default-toolbar-position 'right)
-		 :style radio
-		 :active toolbar-visible-p
-		 :selected (eq default-toolbar-position 'right)]
-		)
-	       ))
-       ,@(if (featurep 'gutter)
-	     '("---"
-	       ["B%_uffers Tab Visible"
-		(customize-set-variable 'gutter-buffers-tab-visible-p
-					(not gutter-buffers-tab-visible-p))
-		:style toggle
-		:selected gutter-buffers-tab-visible-p]
-	       ("Default %_Gutter Location"
-		["%_Top"
-		 (customize-set-variable 'default-gutter-position 'top)
-		 :style radio
-		 :selected (eq default-gutter-position 'top)]
-		["%_Bottom"
-		 (customize-set-variable 'default-gutter-position 'bottom)
-		 :style radio
-		 :selected (eq default-gutter-position 'bottom)]
-		["%_Left"
-		 (customize-set-variable 'default-gutter-position 'left)
-		 :style radio
-		 :selected (eq default-gutter-position 'left)]
-		["%_Right"
-		 (customize-set-variable 'default-gutter-position 'right)
-		 :style radio
-		 :selected (eq default-gutter-position 'right)]
-		)
-	       ))
-       "-----"
-       ["%_Blinking Cursor"
-	(customize-set-variable 'blink-cursor-mode (not blink-cursor-mode))
-	:style toggle
-	:selected (and (boundp 'blink-cursor-mode) blink-cursor-mode)
-	:active (boundp 'blink-cursor-mode)]
-       ["Bl%_ock Cursor"
-	(progn
-	  (customize-set-variable 'bar-cursor nil)
-	  (force-cursor-redisplay))
-	:style radio
-	:selected (null bar-cursor)]
-       ["Bar Cursor (%_1 Pixel)"
-	(progn
-	  (customize-set-variable 'bar-cursor t)
-	  (force-cursor-redisplay))
-	:style radio
-	:selected (eq bar-cursor t)]
-       ["Bar Cursor (%_2 Pixels)"
-	(progn
-	  (customize-set-variable 'bar-cursor 2)
-	  (force-cursor-redisplay))
-	:style radio
-	:selected (and bar-cursor (not (eq bar-cursor t)))]
-       "----"
-       ("Pa%_ren Highlighting"
+      ["%_Blinking Cursor"
+       (customize-set-variable 'blink-cursor-mode (not blink-cursor-mode))
+       :style toggle
+       :selected (and (boundp 'blink-cursor-mode) blink-cursor-mode)
+       :active (boundp 'blink-cursor-mode)]
+      ["Bl%_ock Cursor"
+       (progn
+	 (customize-set-variable 'bar-cursor nil)
+	 (force-cursor-redisplay))
+       :style radio
+       :selected (null bar-cursor)]
+      ["Bar Cursor (%_1 Pixel)"
+       (progn
+	 (customize-set-variable 'bar-cursor t)
+	 (force-cursor-redisplay))
+       :style radio
+       :selected (eq bar-cursor t)]
+      ["Bar Cursor (%_2 Pixels)"
+       (progn
+	 (customize-set-variable 'bar-cursor 2)
+	 (force-cursor-redisplay))
+       :style radio
+       :selected (and bar-cursor (not (eq bar-cursor t)))]
+      "----"
+      ("Pa%_ren Highlighting"
        ["%_None"
 	(customize-set-variable 'paren-mode nil)
 	:style radio
@@ -1160,418 +1154,427 @@
        ;;	  :selected (and (boundp 'paren-mode) (eq paren-mode 'nested))
        ;;	  :active (boundp 'paren-mode)]
        )
-       "------"
-       ["%_Line Numbers"
-	(progn
-	  (customize-set-variable 'line-number-mode (not line-number-mode))
-	  (redraw-modeline))
-	:style toggle :selected line-number-mode]
-       ["%_Column Numbers"
-	(progn
-	  (customize-set-variable 'column-number-mode
-				  (not column-number-mode))
-	  (redraw-modeline))
-	:style toggle :selected column-number-mode]
+      "------"
+      ["%_Line Numbers"
+       (progn
+	 (customize-set-variable 'line-number-mode (not line-number-mode))
+	 (redraw-modeline))
+       :style toggle :selected line-number-mode]
+      ["%_Column Numbers"
+       (progn
+	 (customize-set-variable 'column-number-mode
+				 (not column-number-mode))
+	 (redraw-modeline))
+       :style toggle :selected column-number-mode]
 
-       ("\"Other %_Window\" Location"
-	["%_Always in Same Frame"
-	 (customize-set-variable
-	  'get-frame-for-buffer-default-instance-limit nil)
-	 :style radio
-	 :selected (null get-frame-for-buffer-default-instance-limit)]
-	["Other Frame (%_2 Frames Max)"
-	 (customize-set-variable 'get-frame-for-buffer-default-instance-limit
-				 2)
-	 :style radio
-	 :selected (eq 2 get-frame-for-buffer-default-instance-limit)]
-	["Other Frame (%_3 Frames Max)"
-	 (customize-set-variable 'get-frame-for-buffer-default-instance-limit
-				 3)
-	 :style radio
-	 :selected (eq 3 get-frame-for-buffer-default-instance-limit)]
-	["Other Frame (%_4 Frames Max)"
-	 (customize-set-variable 'get-frame-for-buffer-default-instance-limit
-				 4)
-	 :style radio
-	 :selected (eq 4 get-frame-for-buffer-default-instance-limit)]
-	["Other Frame (%_5 Frames Max)"
-	 (customize-set-variable 'get-frame-for-buffer-default-instance-limit
-				 5)
-	 :style radio
-	 :selected (eq 5 get-frame-for-buffer-default-instance-limit)]
-	["Always Create %_New Frame"
-	 (customize-set-variable 'get-frame-for-buffer-default-instance-limit
-				 0)
-	 :style radio
-	 :selected (eq 0 get-frame-for-buffer-default-instance-limit)]
-	"-----"
-	["%_Temp Buffers Always in Same Frame"
-	 (customize-set-variable 'temp-buffer-show-function
-				 'show-temp-buffer-in-current-frame)
-	 :style radio
-	 :selected (eq temp-buffer-show-function
-		       'show-temp-buffer-in-current-frame)]
-	["Temp Buffers %_Like Other Buffers"
-	 (customize-set-variable 'temp-buffer-show-function nil)
-	 :style radio
-	 :selected (null temp-buffer-show-function)]
-	"-----"
-	["%_Make Current Frame Gnuserv Target"
-	 (customize-set-variable 'gnuserv-frame (if (eq gnuserv-frame t) nil
-						  t))
-	 :style toggle
-	 :selected (and (boundp 'gnuserv-frame) (eq gnuserv-frame t))
-	 :active (boundp 'gnuserv-frame)]
-	)
-       )
-      ("%_Menubars"
-       ["%_Frame-Local Font Menu"
-	(customize-set-variable 'font-menu-this-frame-only-p
-				(not font-menu-this-frame-only-p))
-	:style toggle
-	:selected (and (boundp 'font-menu-this-frame-only-p)
-		       font-menu-this-frame-only-p)]
-       ["%_Alt/Meta Selects Menu Items"
-	(if (eq menu-accelerator-enabled 'menu-force)
-	    (customize-set-variable 'menu-accelerator-enabled nil)
-	  (customize-set-variable 'menu-accelerator-enabled 'menu-force))
-	:style toggle
-	:selected (eq menu-accelerator-enabled 'menu-force)]
-       "----"
-       ["Buffers Menu %_Length..."
+      ("\"Other %_Window\" Location"
+       ["%_Always in Same Frame"
 	(customize-set-variable
-	 'buffers-menu-max-size
-	 ;; would it be better to open a customization buffer ?
-	 (let ((val
-		(read-number
-		 "Enter number of buffers to display (or 0 for unlimited): ")))
-	   (if (eq val 0) nil val)))]
-       ["%_Multi-Operation Buffers Sub-Menus"
-	(customize-set-variable 'complex-buffers-menu-p
-				(not complex-buffers-menu-p))
-	:style toggle
-	:selected complex-buffers-menu-p]
-       ["S%_ubmenus for Buffer Groups"
-	(customize-set-variable 'buffers-menu-submenus-for-groups-p
-				(not buffers-menu-submenus-for-groups-p))
-	:style toggle
-	:selected buffers-menu-submenus-for-groups-p]
-       ["%_Verbose Buffer Menu Entries"
-	(if (eq buffers-menu-format-buffer-line-function
-		'slow-format-buffers-menu-line)
-	    (customize-set-variable 'buffers-menu-format-buffer-line-function
-				    'format-buffers-menu-line)
-	  (customize-set-variable 'buffers-menu-format-buffer-line-function
-				  'slow-format-buffers-menu-line))
-	:style toggle
-	:selected (eq buffers-menu-format-buffer-line-function
-		      'slow-format-buffers-menu-line)]
-       ("Buffers Menu %_Sorting"
-	["%_Most Recently Used"
-	 (progn
-	   (customize-set-variable 'buffers-menu-sort-function nil)
-	   (customize-set-variable 'buffers-menu-grouping-function nil))
-	 :style radio
-	 :selected (null buffers-menu-sort-function)]
-	["%_Alphabetically"
-	 (progn
-	   (customize-set-variable 'buffers-menu-sort-function
-				   'sort-buffers-menu-alphabetically)
-	   (customize-set-variable 'buffers-menu-grouping-function nil))
-	 :style radio
-	 :selected (eq 'sort-buffers-menu-alphabetically
-		       buffers-menu-sort-function)]
-	["%_By Major Mode, Then Alphabetically"
-	 (progn
-	   (customize-set-variable
-	    'buffers-menu-sort-function
-	    'sort-buffers-menu-by-mode-then-alphabetically)
-	   (customize-set-variable
-	    'buffers-menu-grouping-function
-	    'group-buffers-menu-by-mode-then-alphabetically))
-	 :style radio
-	 :selected (eq 'sort-buffers-menu-by-mode-then-alphabetically
-		       buffers-menu-sort-function)])
-       "---"
-       ["%_Ignore Scaled Fonts"
-	(customize-set-variable 'font-menu-ignore-scaled-fonts
-				(not font-menu-ignore-scaled-fonts))
-	:style toggle
-	:selected (and (boundp 'font-menu-ignore-scaled-fonts)
-		       font-menu-ignore-scaled-fonts)]
-       )
-      ("S%_yntax Highlighting"
-       ["%_In This Buffer"
-	(progn;; becomes buffer local
-	  (font-lock-mode)
-	  (customize-set-variable 'font-lock-mode font-lock-mode))
+	 'get-frame-for-buffer-default-instance-limit nil)
+	:style radio
+	:selected (null get-frame-for-buffer-default-instance-limit)]
+       ["Other Frame (%_2 Frames Max)"
+	(customize-set-variable 'get-frame-for-buffer-default-instance-limit
+				2)
+	:style radio
+	:selected (eq 2 get-frame-for-buffer-default-instance-limit)]
+       ["Other Frame (%_3 Frames Max)"
+	(customize-set-variable 'get-frame-for-buffer-default-instance-limit
+				3)
+	:style radio
+	:selected (eq 3 get-frame-for-buffer-default-instance-limit)]
+       ["Other Frame (%_4 Frames Max)"
+	(customize-set-variable 'get-frame-for-buffer-default-instance-limit
+				4)
+	:style radio
+	:selected (eq 4 get-frame-for-buffer-default-instance-limit)]
+       ["Other Frame (%_5 Frames Max)"
+	(customize-set-variable 'get-frame-for-buffer-default-instance-limit
+				5)
+	:style radio
+	:selected (eq 5 get-frame-for-buffer-default-instance-limit)]
+       ["Always Create %_New Frame"
+	(customize-set-variable 'get-frame-for-buffer-default-instance-limit
+				0)
+	:style radio
+	:selected (eq 0 get-frame-for-buffer-default-instance-limit)]
+       "-----"
+       ["%_Temp Buffers Always in Same Frame"
+	(customize-set-variable 'temp-buffer-show-function
+				'show-temp-buffer-in-current-frame)
+	:style radio
+	:selected (eq temp-buffer-show-function
+		      'show-temp-buffer-in-current-frame)]
+       ["Temp Buffers %_Like Other Buffers"
+	(customize-set-variable 'temp-buffer-show-function nil)
+	:style radio
+	:selected (null temp-buffer-show-function)]
+       "-----"
+       ["%_Make Current Frame Gnuserv Target"
+	(customize-set-variable 'gnuserv-frame (if (eq gnuserv-frame t) nil
+						 t))
 	:style toggle
-	:selected (and (boundp 'font-lock-mode) font-lock-mode)
-	:active (boundp 'font-lock-mode)]
-       ["%_Automatic"
-	(customize-set-variable 'font-lock-auto-fontify
-				(not font-lock-auto-fontify))
-	:style toggle
-	:selected (and (boundp 'font-lock-auto-fontify) font-lock-auto-fontify)
-	:active (fboundp 'font-lock-mode)]
-       "-----"
-       ["Force %_Rehighlight in this Buffer"
-	(customize-set-variable 'font-lock-auto-fontify
-				(not font-lock-auto-fontify))
-	:style toggle
-	:selected (and (boundp 'font-lock-auto-fontify) font-lock-auto-fontify)
-	:active (fboundp 'font-lock-mode)]
-       "-----"
-       ["%_Fonts"
+	:selected (and (boundp 'gnuserv-frame) (eq gnuserv-frame t))
+	:active (boundp 'gnuserv-frame)]
+       )
+      )
+     ("%_Menubars"
+      ["%_Frame-Local Font Menu"
+       (customize-set-variable 'font-menu-this-frame-only-p
+			       (not font-menu-this-frame-only-p))
+       :style toggle
+       :selected (and (boundp 'font-menu-this-frame-only-p)
+		      font-menu-this-frame-only-p)]
+      ["%_Alt/Meta Selects Menu Items"
+       (if (eq menu-accelerator-enabled 'menu-force)
+	   (customize-set-variable 'menu-accelerator-enabled nil)
+	 (customize-set-variable 'menu-accelerator-enabled 'menu-force))
+       :style toggle
+       :selected (eq menu-accelerator-enabled 'menu-force)]
+      "----"
+      ["Buffers Menu %_Length..."
+       (customize-set-variable
+	'buffers-menu-max-size
+	;; would it be better to open a customization buffer ?
+	(let ((val
+	       (read-number
+		"Enter number of buffers to display (or 0 for unlimited): ")))
+	  (if (eq val 0) nil val)))]
+      ["%_Multi-Operation Buffers Sub-Menus"
+       (customize-set-variable 'complex-buffers-menu-p
+			       (not complex-buffers-menu-p))
+       :style toggle
+       :selected complex-buffers-menu-p]
+      ["S%_ubmenus for Buffer Groups"
+       (customize-set-variable 'buffers-menu-submenus-for-groups-p
+			       (not buffers-menu-submenus-for-groups-p))
+       :style toggle
+       :selected buffers-menu-submenus-for-groups-p]
+      ["%_Verbose Buffer Menu Entries"
+       (if (eq buffers-menu-format-buffer-line-function
+	       'slow-format-buffers-menu-line)
+	   (customize-set-variable 'buffers-menu-format-buffer-line-function
+				   'format-buffers-menu-line)
+	 (customize-set-variable 'buffers-menu-format-buffer-line-function
+				 'slow-format-buffers-menu-line))
+       :style toggle
+       :selected (eq buffers-menu-format-buffer-line-function
+		     'slow-format-buffers-menu-line)]
+      ("Buffers Menu %_Sorting"
+       ["%_Most Recently Used"
 	(progn
-	  (require 'font-lock)
-	  (font-lock-use-default-fonts)
-	  (customize-set-variable 'font-lock-use-fonts t)
-	  (customize-set-variable 'font-lock-use-colors nil)
-	  (font-lock-mode 1))
-	:style radio
-	:selected (and (boundp 'font-lock-use-fonts) font-lock-use-fonts)
-	:active (fboundp 'font-lock-mode)]
-       ["%_Colors"
-	(progn
-	  (require 'font-lock)
-	  (font-lock-use-default-colors)
-	  (customize-set-variable 'font-lock-use-colors t)
-	  (customize-set-variable 'font-lock-use-fonts nil)
-	  (font-lock-mode 1))
+	  (customize-set-variable 'buffers-menu-sort-function nil)
+	  (customize-set-variable 'buffers-menu-grouping-function nil))
 	:style radio
-	:selected (and (boundp 'font-lock-use-colors) font-lock-use-colors)
-	:active (boundp 'font-lock-mode)]
-       "-----"
-       ["%_1 Least"
+	:selected (null buffers-menu-sort-function)]
+       ["%_Alphabetically"
 	(progn
-	  (require 'font-lock)
-	  (if (or (and (not (integerp font-lock-maximum-decoration))
-		       (not (eq t font-lock-maximum-decoration)))
-		  (and (integerp font-lock-maximum-decoration)
-		       (<= font-lock-maximum-decoration 0)))
-	      nil
-	    (customize-set-variable 'font-lock-maximum-decoration nil)
-	    (font-lock-recompute-variables)))
+	  (customize-set-variable 'buffers-menu-sort-function
+				  'sort-buffers-menu-alphabetically)
+	  (customize-set-variable 'buffers-menu-grouping-function nil))
 	:style radio
-	:active (fboundp 'font-lock-mode)
-	:selected (and (boundp 'font-lock-maximum-decoration)
-		       (or (and (not (integerp font-lock-maximum-decoration))
-				(not (eq t font-lock-maximum-decoration)))
-			   (and (integerp font-lock-maximum-decoration)
-				(<= font-lock-maximum-decoration 0))))]
-       ["%_2 More"
-	(progn
-	  (require 'font-lock)
-	  (if (and (integerp font-lock-maximum-decoration)
-		   (= 1 font-lock-maximum-decoration))
-	      nil
-	    (customize-set-variable 'font-lock-maximum-decoration 1)
-	    (font-lock-recompute-variables)))
-	:style radio
-	:active (fboundp 'font-lock-mode)
-	:selected (and (boundp 'font-lock-maximum-decoration)
-		       (integerp font-lock-maximum-decoration)
-		       (= 1 font-lock-maximum-decoration))]
-       ["%_3 Even More"
+	:selected (eq 'sort-buffers-menu-alphabetically
+		      buffers-menu-sort-function)]
+       ["%_By Major Mode, Then Alphabetically"
 	(progn
-	  (require 'font-lock)
-	  (if (and (integerp font-lock-maximum-decoration)
-		   (= 2 font-lock-maximum-decoration))
-	      nil
-	    (customize-set-variable 'font-lock-maximum-decoration 2)
-	    (font-lock-recompute-variables)))
-	:style radio
-	:active (fboundp 'font-lock-mode)
-	:selected (and (boundp 'font-lock-maximum-decoration)
-		       (integerp font-lock-maximum-decoration)
-		       (= 2 font-lock-maximum-decoration))]
-       ["%_4 Most"
-	(progn
-	  (require 'font-lock)
-	  (if (or (eq font-lock-maximum-decoration t)
-		  (and (integerp font-lock-maximum-decoration)
-		       (>= font-lock-maximum-decoration 3)))
-	      nil
-	    (customize-set-variable 'font-lock-maximum-decoration t)
-	    (font-lock-recompute-variables)))
+	  (customize-set-variable
+	   'buffers-menu-sort-function
+	   'sort-buffers-menu-by-mode-then-alphabetically)
+	  (customize-set-variable
+	   'buffers-menu-grouping-function
+	   'group-buffers-menu-by-mode-then-alphabetically))
 	:style radio
-	:active (fboundp 'font-lock-mode)
-	:selected (and (boundp 'font-lock-maximum-decoration)
-		       (or (eq font-lock-maximum-decoration t)
-			   (and (integerp font-lock-maximum-decoration)
-				(>= font-lock-maximum-decoration 3))))]
-       "-----"
-       ["Lazy %_Lock"
-	(progn;; becomes buffer local
-	  (lazy-lock-mode)
-	  (customize-set-variable 'lazy-lock-mode lazy-lock-mode)
-	  ;; this shouldn't be necessary so there has to
-	  ;; be a redisplay bug lurking somewhere (or
-	  ;; possibly another event handler bug)
-	  (redraw-modeline))
-	:active (and (boundp 'font-lock-mode) (boundp 'lazy-lock-mode)
-		     font-lock-mode)
-	:style toggle
-	:selected (and (boundp 'lazy-lock-mode) lazy-lock-mode)]
-       ["Lazy %_Shot"
-	(progn;; becomes buffer local
-	  (lazy-shot-mode)
-	  (customize-set-variable 'lazy-shot-mode lazy-shot-mode)
-	  ;; this shouldn't be necessary so there has to
-	  ;; be a redisplay bug lurking somewhere (or
-	  ;; possibly another event handler bug)
-	  (redraw-modeline))
-	:active (and (boundp 'font-lock-mode) (boundp 'lazy-shot-mode)
-		     font-lock-mode)
-	:style toggle
-	:selected (and (boundp 'lazy-shot-mode) lazy-shot-mode)]
-       ["Cac%_hing"
-	(progn;; becomes buffer local
-	  (fast-lock-mode)
-	  (customize-set-variable 'fast-lock-mode fast-lock-mode)
-	  ;; this shouldn't be necessary so there has to
-	  ;; be a redisplay bug lurking somewhere (or
-	  ;; possibly another event handler bug)
-	  (redraw-modeline))
-	:active (and (boundp 'font-lock-mode) (boundp 'fast-lock-mode)
-		     font-lock-mode)
-	:style toggle
-	:selected (and (boundp 'fast-lock-mode) fast-lock-mode)]
-       )
-      ("%_Font" :filter font-menu-family-constructor)
-      ("Font Si%_ze" :filter font-menu-size-constructor)
-      ;;      ("Font Weig%_ht" :filter font-menu-weight-constructor)
-      ["Edit Fa%_ces..." (customize-face nil)]
+	:selected (eq 'sort-buffers-menu-by-mode-then-alphabetically
+		      buffers-menu-sort-function)])
+      "---"
+      ["%_Ignore Scaled Fonts"
+       (customize-set-variable 'font-menu-ignore-scaled-fonts
+			       (not font-menu-ignore-scaled-fonts))
+       :style toggle
+       :selected (and (boundp 'font-menu-ignore-scaled-fonts)
+		      font-menu-ignore-scaled-fonts)]
+      )
+     ("S%_yntax Highlighting"
+      ["%_In This Buffer"
+       (progn ;; becomes buffer local
+	 (font-lock-mode)
+	 (customize-set-variable 'font-lock-mode font-lock-mode))
+       :style toggle
+       :selected (and (boundp 'font-lock-mode) font-lock-mode)
+       :active (boundp 'font-lock-mode)]
+      ["%_Automatic"
+       (customize-set-variable 'font-lock-auto-fontify
+			       (not font-lock-auto-fontify))
+       :style toggle
+       :selected (and (boundp 'font-lock-auto-fontify) font-lock-auto-fontify)
+       :active (fboundp 'font-lock-mode)]
+      "-----"
+      ["Force %_Rehighlight in this Buffer"
+       (customize-set-variable 'font-lock-auto-fontify
+			       (not font-lock-auto-fontify))
+       :style toggle
+       :selected (and (boundp 'font-lock-auto-fontify) font-lock-auto-fontify)
+       :active (fboundp 'font-lock-mode)]
+      "-----"
+      ["%_Fonts"
+       (progn
+	 (require 'font-lock)
+	 (font-lock-use-default-fonts)
+	 (customize-set-variable 'font-lock-use-fonts t)
+	 (customize-set-variable 'font-lock-use-colors nil)
+	 (font-lock-mode 1))
+       :style radio
+       :selected (and (boundp 'font-lock-use-fonts) font-lock-use-fonts)
+       :active (fboundp 'font-lock-mode)]
+      ["%_Colors"
+       (progn
+	 (require 'font-lock)
+	 (font-lock-use-default-colors)
+	 (customize-set-variable 'font-lock-use-colors t)
+	 (customize-set-variable 'font-lock-use-fonts nil)
+	 (font-lock-mode 1))
+       :style radio
+       :selected (and (boundp 'font-lock-use-colors) font-lock-use-colors)
+       :active (boundp 'font-lock-mode)]
       "-----"
-      ["Edit I%_nit File"
-       ;; #### there should be something that holds the name that the init
-       ;; file should be created as, when it's not present.
-       (let ((el-file (or user-init-file "~/.xemacs/init.el")))
-	 (if (string-match "\\.elc$" el-file)
-	     (setq el-file
-		   (substring user-init-file 0 (1- (length el-file)))))
-	 (find-file el-file)
-	 (or (eq major-mode 'emacs-lisp-mode)
-	     (emacs-lisp-mode)))]
-      ["%_Save Options to Custom File" customize-save-customized]
+      ["%_1 Least"
+       (progn
+	 (require 'font-lock)
+	 (if (or (and (not (integerp font-lock-maximum-decoration))
+		      (not (eq t font-lock-maximum-decoration)))
+		 (and (integerp font-lock-maximum-decoration)
+		      (<= font-lock-maximum-decoration 0)))
+	     nil
+	   (customize-set-variable 'font-lock-maximum-decoration nil)
+	   (font-lock-recompute-variables)))
+       :style radio
+       :active (fboundp 'font-lock-mode)
+       :selected (and (boundp 'font-lock-maximum-decoration)
+		      (or (and (not (integerp font-lock-maximum-decoration))
+			       (not (eq t font-lock-maximum-decoration)))
+			  (and (integerp font-lock-maximum-decoration)
+			       (<= font-lock-maximum-decoration 0))))]
+      ["%_2 More"
+       (progn
+	 (require 'font-lock)
+	 (if (and (integerp font-lock-maximum-decoration)
+		  (= 1 font-lock-maximum-decoration))
+	     nil
+	   (customize-set-variable 'font-lock-maximum-decoration 1)
+	   (font-lock-recompute-variables)))
+       :style radio
+       :active (fboundp 'font-lock-mode)
+       :selected (and (boundp 'font-lock-maximum-decoration)
+		      (integerp font-lock-maximum-decoration)
+		      (= 1 font-lock-maximum-decoration))]
+      ["%_3 Even More"
+       (progn
+	 (require 'font-lock)
+	 (if (and (integerp font-lock-maximum-decoration)
+		  (= 2 font-lock-maximum-decoration))
+	     nil
+	   (customize-set-variable 'font-lock-maximum-decoration 2)
+	   (font-lock-recompute-variables)))
+       :style radio
+       :active (fboundp 'font-lock-mode)
+       :selected (and (boundp 'font-lock-maximum-decoration)
+		      (integerp font-lock-maximum-decoration)
+		      (= 2 font-lock-maximum-decoration))]
+      ["%_4 Most"
+       (progn
+	 (require 'font-lock)
+	 (if (or (eq font-lock-maximum-decoration t)
+		 (and (integerp font-lock-maximum-decoration)
+		      (>= font-lock-maximum-decoration 3)))
+	     nil
+	   (customize-set-variable 'font-lock-maximum-decoration t)
+	   (font-lock-recompute-variables)))
+       :style radio
+       :active (fboundp 'font-lock-mode)
+       :selected (and (boundp 'font-lock-maximum-decoration)
+		      (or (eq font-lock-maximum-decoration t)
+			  (and (integerp font-lock-maximum-decoration)
+			       (>= font-lock-maximum-decoration 3))))]
+      "-----"
+      ["Lazy %_Lock"
+       (progn ;; becomes buffer local
+	 (lazy-lock-mode)
+	 (customize-set-variable 'lazy-lock-mode lazy-lock-mode)
+	 ;; this shouldn't be necessary so there has to
+	 ;; be a redisplay bug lurking somewhere (or
+	 ;; possibly another event handler bug)
+	 (redraw-modeline))
+       :active (and (boundp 'font-lock-mode) (boundp 'lazy-lock-mode)
+		    font-lock-mode)
+       :style toggle
+       :selected (and (boundp 'lazy-lock-mode) lazy-lock-mode)]
+      ["Lazy %_Shot"
+       (progn ;; becomes buffer local
+	 (lazy-shot-mode)
+	 (customize-set-variable 'lazy-shot-mode lazy-shot-mode)
+	 ;; this shouldn't be necessary so there has to
+	 ;; be a redisplay bug lurking somewhere (or
+	 ;; possibly another event handler bug)
+	 (redraw-modeline))
+       :active (and (boundp 'font-lock-mode) (boundp 'lazy-shot-mode)
+		    font-lock-mode)
+       :style toggle
+       :selected (and (boundp 'lazy-shot-mode) lazy-shot-mode)]
+      ["Cac%_hing"
+       (progn ;; becomes buffer local
+	 (fast-lock-mode)
+	 (customize-set-variable 'fast-lock-mode fast-lock-mode)
+	 ;; this shouldn't be necessary so there has to
+	 ;; be a redisplay bug lurking somewhere (or
+	 ;; possibly another event handler bug)
+	 (redraw-modeline))
+       :active (and (boundp 'font-lock-mode) (boundp 'fast-lock-mode)
+		    font-lock-mode)
+       :style toggle
+       :selected (and (boundp 'fast-lock-mode) fast-lock-mode)]
       )
+     ("%_Font" :filter font-menu-family-constructor)
+     ("Font Si%_ze" :filter font-menu-size-constructor)
+     ;;      ("Font Weig%_ht" :filter font-menu-weight-constructor)
+     ["Edit Fa%_ces..." (customize-face nil)]
+     "-----"
+     ["Edit I%_nit File"
+      ;; #### there should be something that holds the name that the init
+      ;; file should be created as, when it's not present.
+      (let ((el-file (or user-init-file "~/.xemacs/init.el"))
+            el-file-directory)
+	(if (string-match "\\.elc$" el-file)
+	    (setq el-file
+		  (substring user-init-file 0 (1- (length el-file)))))
+        (unless (file-directory-p
+                 (setq el-file-directory (file-name-directory el-file)))
+          (message "Creating %s... " el-file-directory)
+          (make-directory el-file-directory t)
+          (message "Creating %s... done." el-file-directory))
+	(find-file el-file)
+	(or (eq major-mode 'emacs-lisp-mode)
+	    (emacs-lisp-mode)))]
+     ["%_Save Options to Custom File" customize-save-customized]
+     )
 
      ("%_Buffers"
-      :filter buffers-menu-filter
-      ["Go To %_Previous Buffer" switch-to-other-buffer]
-      ["Go To %_Buffer..." switch-to-buffer]
-      "----"
-      ["%_List All Buffers" list-all-buffers]
-      ["%_Delete Buffer" kill-this-buffer
-       :suffix (if put-buffer-names-in-file-menu (buffer-name) "")]
-      "----"
-      )
+     :filter buffers-menu-filter
+     ["Go To %_Previous Buffer" switch-to-other-buffer]
+     ["Go To %_Buffer..." switch-to-buffer]
+     "----"
+     ["%_List All Buffers" list-all-buffers]
+     ["%_Delete Buffer" kill-this-buffer
+      :suffix (if put-buffer-names-in-file-menu (buffer-name) "")]
+     "----"
+     )
 
-     nil	; the partition: menus after this are flushright
+     nil	      ; the partition: menus after this are flushright
 
      ("%_Help"
-      ["%_About XEmacs..." about-xemacs]
-      ["%_Home Page (www.xemacs.org)" xemacs-www-page
-       :active (fboundp 'browse-url)]
-      ["What's %_New in XEmacs" view-emacs-news]
-      ["B%_eta Info" describe-beta
-	:included (string-match "beta" emacs-version)]
+     ["%_About XEmacs..." about-xemacs]
+     ["%_Home Page (www.xemacs.org)" xemacs-www-page
+      :active (fboundp 'browse-url)]
+     ["What's %_New in XEmacs" view-emacs-news]
+     ["B%_eta Info" describe-beta
+      :included (string-match "beta" emacs-version)]
+     "-----"
+     ("%_Info (Online Docs)"
+      ["%_Info Contents" (Info-goto-node "(dir)")]
+      "-----"
+      ["XEmacs %_User's Manual" (Info-goto-node "(XEmacs)")]
+      ["XEmacs %_Lisp Reference Manual" (Info-goto-node "(Lispref)")]
+      ["All About %_Packages" (Info-goto-node "(xemacs)Packages")]
+      ["%_Getting Started with XEmacs" (Info-goto-node "(New-Users-Guide)")]
+      ["%_XEmacs Internals Manual" (Info-goto-node "(Internals)")]
+      ["%_How to Use Info" (Info-goto-node "(Info)")]
+      "-----"
+      ["Lookup %_Key Sequence in User's Manual..."
+       Info-goto-emacs-key-command-node]
+      ["Lookup %_Command in User's Manual..." Info-goto-emacs-command-node]
+      ["Lookup %_Function in Lisp Reference..." Info-elisp-ref]
       "-----"
-      ("%_Info (Online Docs)"
-       ["%_Info Contents" (Info-goto-node "(dir)")]
-       "-----"
-       ["XEmacs %_User's Manual" (Info-goto-node "(XEmacs)")]
-       ["XEmacs %_Lisp Reference Manual" (Info-goto-node "(Lispref)")]
-       ["All About %_Packages" (Info-goto-node "(xemacs)Packages")]
-       ["%_Getting Started with XEmacs" (Info-goto-node "(New-Users-Guide)")]
-       ["%_XEmacs Internals Manual" (Info-goto-node "(Internals)")]
-       ["%_How to Use Info" (Info-goto-node "(Info)")]
-       "-----"
-       ["Lookup %_Key Sequence in User's Manual..."
-	Info-goto-emacs-key-command-node]
-       ["Lookup %_Command in User's Manual..." Info-goto-emacs-command-node]
-       ["Lookup %_Function in Lisp Reference..." Info-elisp-ref]
-       "-----"
-       ["Find %_Topic in User's Manual/Lispref..."
-	Info-search-index-in-xemacs-and-lispref]
-       ["%_Search Text in User's Manual..." Info-search-text-in-xemacs]
-       ["S%_earch Text in Lisp Reference..."
-	Info-search-text-in-lispref]
-       )
-      ("XEmacs %_FAQ"
-       ["%_FAQ (local)" xemacs-local-faq]
-       ["FAQ via %_WWW" xemacs-www-faq
-	:active (fboundp 'browse-url)])
-      ("%_Tutorials"
-       :filter tutorials-menu-filter)
-      ("%_Samples"
-       ["View Sample %_init.el" view-sample-init-el
-	:active (locate-data-file "sample.init.el")]
-       ["View Sample .%_gtkrc"
-	(Help-find-file (locate-data-file "sample.gtkrc"))
-	:included (featurep 'gtk)
-	:active (locate-data-file "sample.gtkrc")]
-       ["View Sample .%_Xresources"
-	(Help-find-file (locate-data-file "sample.Xresources"))
-	:included (featurep 'x)
-	:active (locate-data-file "sample.Xresources")]
-       ["View Sample %_enriched.doc"
-	(Help-find-file (locate-data-file "enriched.doc"))
-	:active (locate-data-file "enriched.doc")])
-      ("%_Commands, Variables, Keys"
-       ["Describe %_Mode" describe-mode]
-       ["%_Apropos..." hyper-apropos]
-       ["%_Command-Only Apropos..." command-hyper-apropos]
-       ["Apropos %_Docs..." apropos-documentation]
-       "-----"
-       ["Describe %_Key..." describe-key]
-       ["Show %_Bindings" describe-bindings]
-       ["Show M%_ouse Bindings" describe-pointer]
-       "-----"
-       ["Describe %_Function..." describe-function]
-       ["Describe %_Variable..." describe-variable]
-       ["%_Locate Command in Keymap..." where-is])
-      ,@(when (featurep 'mule)
-	  '(("Internationa%_l"
-	     ("Describe %_Language Support"
-	      :filter
-	      (lambda (menu)
-		(menu-split-long-menu-and-sort
-		 (mapcar #'(lambda (entry)
-			     `[ ,(car entry)
-				(describe-language-environment
-				 ',(car entry))
-				:style radio
-				:selected
-				,(equal (car entry)
-					current-language-environment)])
-			 language-info-alist)
-		 )))
-	     ["Describe %_Input Method" describe-input-method]
-	     ["Describe Current %_Coding Systems"
-	      describe-current-coding-system]
-	     ["Show Character %_Table" view-charset-by-menu]
-	     ;; not implemented yet
-	     ["Show %_Diagnosis for MULE" mule-diag :active nil]
-	     ["Show \"%_hello\" in Many Languages" view-hello-file]
-	     )))
-      ("%_Other"
-       ["%_Current Installation Info" describe-installation
-	:active (boundp 'Installation-string)]
-       ["%_Known Problems" view-xemacs-problems ]
-       ["%_Obtaining the Latest Version" describe-distribution]
-       ["%_No Warranty" describe-no-warranty]
-       ["XEmacs %_License" describe-copying]
-       ["Find %_Packages" finder-by-keyword]
-       ["View %_Splash Screen" xemacs-splash-buffer]
-       ["%_Unix Manual..." manual-entry])
+      ["Find %_Topic in User's Manual/Lispref..."
+       Info-search-index-in-xemacs-and-lispref]
+      ["%_Search Text in User's Manual..." Info-search-text-in-xemacs]
+      ["S%_earch Text in Lisp Reference..."
+       Info-search-text-in-lispref]
+      )
+     ("XEmacs %_FAQ"
+      ["%_FAQ (local)" xemacs-local-faq]
+      ["FAQ via %_WWW" xemacs-www-faq
+       :active (fboundp 'browse-url)])
+     ("%_Tutorials"
+      :filter tutorials-menu-filter)
+     ("%_Samples"
+      ["View Sample %_init.el" view-sample-init-el
+       :active (locate-data-file "sample.init.el")]
+      ["View Sample .%_gtkrc"
+       (Help-find-file (locate-data-file "sample.gtkrc"))
+       :included (featurep 'gtk)
+       :active (locate-data-file "sample.gtkrc")]
+      ["View Sample .%_Xresources"
+       (Help-find-file (locate-data-file "sample.Xresources"))
+       :included (featurep 'x)
+       :active (locate-data-file "sample.Xresources")]
+      ["View Sample %_enriched.doc"
+       (Help-find-file (locate-data-file "enriched.doc"))
+       :active (locate-data-file "enriched.doc")])
+     ("%_Commands, Variables, Keys"
+      ["Describe %_Mode" describe-mode]
+      ["%_Apropos..." hyper-apropos]
+      ["%_Command-Only Apropos..." command-hyper-apropos]
+      ["Apropos %_Docs..." apropos-documentation]
+      "-----"
+      ["Describe %_Key..." describe-key]
+      ["Show %_Bindings" describe-bindings]
+      ["Show M%_ouse Bindings" describe-pointer]
       "-----"
-      ["Recent %_Messages" (view-lossage t)]
-      ["Recent %_Keystrokes" view-lossage]
-      ["Recent %_Warnings" view-warnings]
-      ["Send %_Bug Report..." report-xemacs-bug
-       :active (fboundp 'report-xemacs-bug)])))
+      ["Describe %_Function..." describe-function]
+      ["Describe %_Variable..." describe-variable]
+      ["%_Locate Command in Keymap..." where-is])
+     ,@(when (featurep 'mule)
+	 `(("Internationa%_l"
+	    ("Describe %_Language Support"
+	     :filter
+	     ,#'(lambda (menu)
+		  (menu-split-long-menu-and-sort
+		   (mapcar #'(lambda (entry)
+			       `[ ,(car entry)
+				  (describe-language-environment
+				   ',(car entry))
+				  :style radio
+				  :selected
+				  ,(equal (car entry)
+					  current-language-environment)])
+			   language-info-alist)
+		   )))
+	    ["Describe %_Input Method" describe-input-method]
+	    ["Describe Current %_Coding Systems"
+	     describe-current-coding-system]
+	    ["Show Character %_Table" view-charset-by-menu]
+	    ;; not implemented yet
+	    ["Show %_Diagnosis for MULE" mule-diag :active nil]
+	    ["Show \"%_hello\" in Many Languages" view-hello-file]
+	    )))
+     ("%_Other"
+      ["%_Current Installation Info" describe-installation
+       :active (boundp 'Installation-string)]
+      ["%_Known Problems" view-xemacs-problems ]
+      ["%_Obtaining the Latest Version" describe-distribution]
+      ["%_No Warranty" describe-no-warranty]
+      ["XEmacs %_License" describe-copying]
+      ["Find %_Packages" finder-by-keyword]
+      ["View %_Splash Screen" xemacs-splash-buffer]
+      ["%_Unix Manual..." manual-entry])
+     "-----"
+     ["Recent %_Messages" (view-lossage t)]
+     ["Recent %_Keystrokes" view-lossage]
+     ["Recent %_Warnings" view-warnings]
+     ["Send %_Bug Report..." report-xemacs-bug
+      :active (fboundp 'report-xemacs-bug)]))
+   "The default XEmacs menubar.
+See the documentation for `current-menubar' for details of the syntax
+used here.")
 
 
 (defun init-menubar-at-startup ()
@@ -1929,6 +1932,11 @@
 			   ;; included it first
 			   (not (string= (car lang)
 					 current-language-environment))
+                           ;; Hackish approach; if a language environment
+                           ;; doesn't have associated locale information,
+                           ;; it's not the preferred implementation for that
+                           ;; language. Don't use it.
+                           (assq 'locale lang)
 			   `([,(car lang)
 			      (help-with-tutorial nil ,(car lang))]))))
 		language-info-alist)
--- a/lisp/minibuf.el	Sun May 11 11:20:24 2008 +0200
+++ b/lisp/minibuf.el	Sun May 11 11:24:01 2008 +0200
@@ -2057,22 +2057,18 @@
   (let* ((file-p (eq 'read-file-name-internal completer))
 	 (filebuf (get-buffer-create "*Completions*"))
 	 (dirbuf (and file-p (generate-new-buffer " *mouse-read-file*")))
-	 (butbuf (generate-new-buffer " *mouse-read-file*"))
+	 (butbuf (generate-new-buffer " *mouse-read-file-buttons*"))
 	 (frame (make-dialog-frame))
 	 filewin dirwin
-	 user-data)
+	 user-data
+	 (window-min-height 1)) ; allow button window to be height 2
     (unwind-protect
 	(progn
 	  (reset-buffer filebuf)
 
 	  ;; set up the frame.
 	  (focus-frame frame)
-	  (let ((window-min-height 1))
-	    ;; #### should be 2 not 3, but that causes
-	    ;; "window too small to split" errors for some
-	    ;; people (but not for me ...) There's a more
-	    ;; fundamental bug somewhere.
-	    (split-window nil (- (frame-height frame) 3)))
+	  (split-window nil (- (window-height) 2))
 	  (if file-p
 	      (progn
 		(split-window-horizontally 16)
--- a/lisp/mule/latin.el	Sun May 11 11:20:24 2008 +0200
+++ b/lisp/mule/latin.el	Sun May 11 11:24:01 2008 +0200
@@ -188,6 +188,137 @@
 when used to write German (or English, of course).  "
  '(mnemonic "Latin 2"
    aliases (iso-latin-2 latin-2)))
+
+(make-8-bit-coding-system
+ 'windows-1250
+ '((#x80 ?\u20AC) ;; EURO SIGN
+   (#x82 ?\u201A) ;; SINGLE LOW-9 QUOTATION MARK
+   (#x84 ?\u201E) ;; DOUBLE LOW-9 QUOTATION MARK
+   (#x85 ?\u2026) ;; HORIZONTAL ELLIPSIS
+   (#x86 ?\u2020) ;; DAGGER
+   (#x87 ?\u2021) ;; DOUBLE DAGGER
+   (#x89 ?\u2030) ;; PER MILLE SIGN
+   (#x8A ?\u0160) ;; LATIN CAPITAL LETTER S WITH CARON
+   (#x8B ?\u2039) ;; SINGLE LEFT-POINTING ANGLE QUOTATION MARK
+   (#x8C ?\u015A) ;; LATIN CAPITAL LETTER S WITH ACUTE
+   (#x8D ?\u0164) ;; LATIN CAPITAL LETTER T WITH CARON
+   (#x8E ?\u017D) ;; LATIN CAPITAL LETTER Z WITH CARON
+   (#x8F ?\u0179) ;; LATIN CAPITAL LETTER Z WITH ACUTE
+   (#x91 ?\u2018) ;; LEFT SINGLE QUOTATION MARK
+   (#x92 ?\u2019) ;; RIGHT SINGLE QUOTATION MARK
+   (#x93 ?\u201C) ;; LEFT DOUBLE QUOTATION MARK
+   (#x94 ?\u201D) ;; RIGHT DOUBLE QUOTATION MARK
+   (#x95 ?\u2022) ;; BULLET
+   (#x96 ?\u2013) ;; EN DASH
+   (#x97 ?\u2014) ;; EM DASH
+   (#x99 ?\u2122) ;; TRADE MARK SIGN
+   (#x9A ?\u0161) ;; LATIN SMALL LETTER S WITH CARON
+   (#x9B ?\u203A) ;; SINGLE RIGHT-POINTING ANGLE QUOTATION MARK
+   (#x9C ?\u015B) ;; LATIN SMALL LETTER S WITH ACUTE
+   (#x9D ?\u0165) ;; LATIN SMALL LETTER T WITH CARON
+   (#x9E ?\u017E) ;; LATIN SMALL LETTER Z WITH CARON
+   (#x9F ?\u017A) ;; LATIN SMALL LETTER Z WITH ACUTE
+   (#xA0 ?\u00A0) ;; NO-BREAK SPACE
+   (#xA1 ?\u02C7) ;; CARON
+   (#xA2 ?\u02D8) ;; BREVE
+   (#xA3 ?\u0141) ;; LATIN CAPITAL LETTER L WITH STROKE
+   (#xA4 ?\u00A4) ;; CURRENCY SIGN
+   (#xA5 ?\u0104) ;; LATIN CAPITAL LETTER A WITH OGONEK
+   (#xA6 ?\u00A6) ;; BROKEN BAR
+   (#xA7 ?\u00A7) ;; SECTION SIGN
+   (#xA8 ?\u00A8) ;; DIAERESIS
+   (#xA9 ?\u00A9) ;; COPYRIGHT SIGN
+   (#xAA ?\u015E) ;; LATIN CAPITAL LETTER S WITH CEDILLA
+   (#xAB ?\u00AB) ;; LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
+   (#xAC ?\u00AC) ;; NOT SIGN
+   (#xAD ?\u00AD) ;; SOFT HYPHEN
+   (#xAE ?\u00AE) ;; REGISTERED SIGN
+   (#xAF ?\u017B) ;; LATIN CAPITAL LETTER Z WITH DOT ABOVE
+   (#xB0 ?\u00B0) ;; DEGREE SIGN
+   (#xB1 ?\u00B1) ;; PLUS-MINUS SIGN
+   (#xB2 ?\u02DB) ;; OGONEK
+   (#xB3 ?\u0142) ;; LATIN SMALL LETTER L WITH STROKE
+   (#xB4 ?\u00B4) ;; ACUTE ACCENT
+   (#xB5 ?\u00B5) ;; MICRO SIGN
+   (#xB6 ?\u00B6) ;; PILCROW SIGN
+   (#xB7 ?\u00B7) ;; MIDDLE DOT
+   (#xB8 ?\u00B8) ;; CEDILLA
+   (#xB9 ?\u0105) ;; LATIN SMALL LETTER A WITH OGONEK
+   (#xBA ?\u015F) ;; LATIN SMALL LETTER S WITH CEDILLA
+   (#xBB ?\u00BB) ;; RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
+   (#xBC ?\u013D) ;; LATIN CAPITAL LETTER L WITH CARON
+   (#xBD ?\u02DD) ;; DOUBLE ACUTE ACCENT
+   (#xBE ?\u013E) ;; LATIN SMALL LETTER L WITH CARON
+   (#xBF ?\u017C) ;; LATIN SMALL LETTER Z WITH DOT ABOVE
+   (#xC0 ?\u0154) ;; LATIN CAPITAL LETTER R WITH ACUTE
+   (#xC1 ?\u00C1) ;; LATIN CAPITAL LETTER A WITH ACUTE
+   (#xC2 ?\u00C2) ;; LATIN CAPITAL LETTER A WITH CIRCUMFLEX
+   (#xC3 ?\u0102) ;; LATIN CAPITAL LETTER A WITH BREVE
+   (#xC4 ?\u00C4) ;; LATIN CAPITAL LETTER A WITH DIAERESIS
+   (#xC5 ?\u0139) ;; LATIN CAPITAL LETTER L WITH ACUTE
+   (#xC6 ?\u0106) ;; LATIN CAPITAL LETTER C WITH ACUTE
+   (#xC7 ?\u00C7) ;; LATIN CAPITAL LETTER C WITH CEDILLA
+   (#xC8 ?\u010C) ;; LATIN CAPITAL LETTER C WITH CARON
+   (#xC9 ?\u00C9) ;; LATIN CAPITAL LETTER E WITH ACUTE
+   (#xCA ?\u0118) ;; LATIN CAPITAL LETTER E WITH OGONEK
+   (#xCB ?\u00CB) ;; LATIN CAPITAL LETTER E WITH DIAERESIS
+   (#xCC ?\u011A) ;; LATIN CAPITAL LETTER E WITH CARON
+   (#xCD ?\u00CD) ;; LATIN CAPITAL LETTER I WITH ACUTE
+   (#xCE ?\u00CE) ;; LATIN CAPITAL LETTER I WITH CIRCUMFLEX
+   (#xCF ?\u010E) ;; LATIN CAPITAL LETTER D WITH CARON
+   (#xD0 ?\u0110) ;; LATIN CAPITAL LETTER D WITH STROKE
+   (#xD1 ?\u0143) ;; LATIN CAPITAL LETTER N WITH ACUTE
+   (#xD2 ?\u0147) ;; LATIN CAPITAL LETTER N WITH CARON
+   (#xD3 ?\u00D3) ;; LATIN CAPITAL LETTER O WITH ACUTE
+   (#xD4 ?\u00D4) ;; LATIN CAPITAL LETTER O WITH CIRCUMFLEX
+   (#xD5 ?\u0150) ;; LATIN CAPITAL LETTER O WITH DOUBLE ACUTE
+   (#xD6 ?\u00D6) ;; LATIN CAPITAL LETTER O WITH DIAERESIS
+   (#xD7 ?\u00D7) ;; MULTIPLICATION SIGN
+   (#xD8 ?\u0158) ;; LATIN CAPITAL LETTER R WITH CARON
+   (#xD9 ?\u016E) ;; LATIN CAPITAL LETTER U WITH RING ABOVE
+   (#xDA ?\u00DA) ;; LATIN CAPITAL LETTER U WITH ACUTE
+   (#xDB ?\u0170) ;; LATIN CAPITAL LETTER U WITH DOUBLE ACUTE
+   (#xDC ?\u00DC) ;; LATIN CAPITAL LETTER U WITH DIAERESIS
+   (#xDD ?\u00DD) ;; LATIN CAPITAL LETTER Y WITH ACUTE
+   (#xDE ?\u0162) ;; LATIN CAPITAL LETTER T WITH CEDILLA
+   (#xDF ?\u00DF) ;; LATIN SMALL LETTER SHARP S
+   (#xE0 ?\u0155) ;; LATIN SMALL LETTER R WITH ACUTE
+   (#xE1 ?\u00E1) ;; LATIN SMALL LETTER A WITH ACUTE
+   (#xE2 ?\u00E2) ;; LATIN SMALL LETTER A WITH CIRCUMFLEX
+   (#xE3 ?\u0103) ;; LATIN SMALL LETTER A WITH BREVE
+   (#xE4 ?\u00E4) ;; LATIN SMALL LETTER A WITH DIAERESIS
+   (#xE5 ?\u013A) ;; LATIN SMALL LETTER L WITH ACUTE
+   (#xE6 ?\u0107) ;; LATIN SMALL LETTER C WITH ACUTE
+   (#xE7 ?\u00E7) ;; LATIN SMALL LETTER C WITH CEDILLA
+   (#xE8 ?\u010D) ;; LATIN SMALL LETTER C WITH CARON
+   (#xE9 ?\u00E9) ;; LATIN SMALL LETTER E WITH ACUTE
+   (#xEA ?\u0119) ;; LATIN SMALL LETTER E WITH OGONEK
+   (#xEB ?\u00EB) ;; LATIN SMALL LETTER E WITH DIAERESIS
+   (#xEC ?\u011B) ;; LATIN SMALL LETTER E WITH CARON
+   (#xED ?\u00ED) ;; LATIN SMALL LETTER I WITH ACUTE
+   (#xEE ?\u00EE) ;; LATIN SMALL LETTER I WITH CIRCUMFLEX
+   (#xEF ?\u010F) ;; LATIN SMALL LETTER D WITH CARON
+   (#xF0 ?\u0111) ;; LATIN SMALL LETTER D WITH STROKE
+   (#xF1 ?\u0144) ;; LATIN SMALL LETTER N WITH ACUTE
+   (#xF2 ?\u0148) ;; LATIN SMALL LETTER N WITH CARON
+   (#xF3 ?\u00F3) ;; LATIN SMALL LETTER O WITH ACUTE
+   (#xF4 ?\u00F4) ;; LATIN SMALL LETTER O WITH CIRCUMFLEX
+   (#xF5 ?\u0151) ;; LATIN SMALL LETTER O WITH DOUBLE ACUTE
+   (#xF6 ?\u00F6) ;; LATIN SMALL LETTER O WITH DIAERESIS
+   (#xF7 ?\u00F7) ;; DIVISION SIGN
+   (#xF8 ?\u0159) ;; LATIN SMALL LETTER R WITH CARON
+   (#xF9 ?\u016F) ;; LATIN SMALL LETTER U WITH RING ABOVE
+   (#xFA ?\u00FA) ;; LATIN SMALL LETTER U WITH ACUTE
+   (#xFB ?\u0171) ;; LATIN SMALL LETTER U WITH DOUBLE ACUTE
+   (#xFC ?\u00FC) ;; LATIN SMALL LETTER U WITH DIAERESIS
+   (#xFD ?\u00FD) ;; LATIN SMALL LETTER Y WITH ACUTE
+   (#xFE ?\u0163) ;; LATIN SMALL LETTER T WITH CEDILLA
+   (#xFF ?\u02D9)) ;; DOT ABOVE
+ "CP 1250, Microsoft's encoding for Central Europe. 
+See also `iso-8859-2' and `window-1252' for Western Europe.  "
+ '(mnemonic "CP1250"
+   aliases (cp1250)))
+
 
 ;; 
 ;; Latin-3 (ISO-8859-3). Esperanto, Maltese and Turkish. Obsolescent.
--- a/lisp/mule/mule-win32-init.el	Sun May 11 11:20:24 2008 +0200
+++ b/lisp/mule/mule-win32-init.el	Sun May 11 11:24:01 2008 +0200
@@ -153,10 +153,9 @@
        ;; http://blogs.msdn.com/michkap/archive/2005/08/01/446475.aspx
        ; ("ANSI"        1200 utf-16-little-endian "Unicode (BMP of ISO 10646)")
 
-       ("ANSI"        1250 no-conversion "Windows 3.1 Eastern European")
-
        ;; We implement this ourselves, and keeping the same implementation
        ;; across platforms means behaviour is a bit more consistent.
+       ; ("ANSI"        1250 no-conversion "Windows 3.1 Eastern European")
        ; ("ANSI"        1251 no-conversion "Windows 3.1 Cyrillic")
        ; ("ANSI"        1252 no-conversion "Windows 3.1 US (ANSI)")
 
--- a/lisp/newcomment.el	Sun May 11 11:20:24 2008 +0200
+++ b/lisp/newcomment.el	Sun May 11 11:24:01 2008 +0200
@@ -240,7 +240,7 @@
 		   (substring comment-start 1)))
       ;; Hasn't been necessary yet.
       ;; (unless (string-match comment-start-skip comment-continue)
-      ;; 	(kill-local-variable 'comment-continue))
+      ;;	(kill-local-variable 'comment-continue))
       )
     ;; comment-skip regexps
     (unless (and comment-start-skip
@@ -443,12 +443,12 @@
 ;     (save-excursion
 ;       (beginning-of-line)
 ;       (let ((eol (save-excursion (end-of-line) (point))))
-; 	(and comment-start-skip
-; 	     (re-search-forward comment-start-skip eol t)
-; 	     (setq eol (match-beginning 0)))
-; 	(goto-char eol)
-; 	(skip-chars-backward " \t")
-; 	(max comment-column (1+ (current-column))))))
+;	(and comment-start-skip
+;	     (re-search-forward comment-start-skip eol t)
+;	     (setq eol (match-beginning 0)))
+;	(goto-char eol)
+;	(skip-chars-backward " \t")
+;	(max comment-column (1+ (current-column))))))
 ;   "Function to compute desired indentation for a comment.
 ; This function is called with no args with point at the beginning of
 ; the comment's starting delimiter.")
@@ -498,7 +498,8 @@
 	    (setq begpos (point))
 	    ;; Ensure there's a space before the comment for things
 	    ;; like sh where it matters (as well as being neater).
-	    (unless (eq ?\  (char-syntax (char-before)))
+	    ;; ... but unless we're at the beginning of a line -- dvl
+	    (unless (or (bolp) (eq ?\  (char-syntax (char-before))))
 	      (insert ?\ ))
 	    (insert starter)
 	    (setq cpos (point-marker))
@@ -516,8 +517,8 @@
 		     (+ (current-column)
 			(- (or comment-fill-column fill-column)
 			   (save-excursion (end-of-line) (current-column)))))))
-        ;; XEmacs change: Preserve indentation of comments starting in
-        ;; column 0, as documented.
+	;; XEmacs change: Preserve indentation of comments starting in
+	;; column 0, as documented.
 	(unless (or (= (current-column) 0) (= (current-column) indent))
 	  ;; If that's different from current, change it.
 	  (delete-region (point) (progn (skip-chars-backward " \t") (point)))
@@ -653,21 +654,21 @@
     (setq end (copy-marker end))
 
     (let* ((numarg (prefix-numeric-value arg))
-           (ccs comment-continue)
-           (srei (comment-padright ccs 're))
-           (sre (and srei (concat "^\\s-*?\\(" srei "\\)")))
-           spt)
+	   (ccs comment-continue)
+	   (srei (comment-padright ccs 're))
+	   (sre (and srei (concat "^\\s-*?\\(" srei "\\)")))
+	   spt)
       (while (and (< (point) end)
 		  (setq spt (comment-search-forward end t)))
 	(let ((ipt (point))
-              ;; Find the end of the comment.
-              (ept (progn
-                     (goto-char spt)
-                     (unless (comment-forward)
-                       (error "Can't find the comment end"))
-                     (point)))
-              (box nil)
-              (box-equal nil))     ;Whether we might be using `=' for boxes.
+	      ;; Find the end of the comment.
+	      (ept (progn
+		     (goto-char spt)
+		     (unless (comment-forward)
+		       (error "Can't find the comment end"))
+		     (point)))
+	      (box nil)
+	      (box-equal nil))     ;Whether we might be using `=' for boxes.
 	  (save-restriction
 	    (narrow-to-region spt ept)
 
@@ -1097,6 +1098,7 @@
 			  (point))
 			 nil t)))))
 		 (comment-start comstart)
+		 (block-comment-start comment-start)
 		 (continuep (or comment-multi-line
 				(cadr (assoc comment-style comment-styles))))
 		 ;; Force comment-continue to be recreated from comment-start.
--- a/lisp/startup.el	Sun May 11 11:20:24 2008 +0200
+++ b/lisp/startup.el	Sun May 11 11:24:01 2008 +0200
@@ -234,6 +234,8 @@
     ("-eval"	. command-line-do-eval)
     ("-load"	. command-line-do-load)
     ("-l"	. command-line-do-load)
+    ("--script"	. command-line-do-script)
+    ("-script"	. command-line-do-script)
     ("-insert"	. command-line-do-insert)
     ("-i"	. command-line-do-insert)
     ("-kill"	. command-line-do-kill)
@@ -437,6 +439,12 @@
 	(setq file (expand-file-name file)))
     (load file nil t)))
 
+(defun command-line-do-script (arg)
+  "Load the named file of Lisp code into XEmacs.
+<file>"
+  (let ((file (pop command-line-args-left)))
+    (load file nil t t)))
+
 (defun command-line-do-insert (arg)
   "Insert file into the current buffer.
 <file>"
--- a/lisp/subr.el	Sun May 11 11:20:24 2008 +0200
+++ b/lisp/subr.el	Sun May 11 11:24:01 2008 +0200
@@ -579,6 +579,19 @@
 ; 	 . ,body)
 ;      (combine-after-change-execute)))
 
+(defmacro with-case-table (table &rest body)
+  "Execute the forms in BODY with TABLE as the current case table.
+The value returned is the value of the last form in BODY."
+  (declare (indent 1) (debug t))
+  (let ((old-case-table (make-symbol "table"))
+	(old-buffer (make-symbol "buffer")))
+    `(let ((,old-case-table (current-case-table))
+	   (,old-buffer (current-buffer)))
+       (unwind-protect
+	   (progn (set-case-table ,table)
+		  ,@body)
+	 (with-current-buffer ,old-buffer
+	   (set-case-table ,old-case-table))))))
 
 (defvar delay-mode-hooks nil
   "If non-nil, `run-mode-hooks' should delay running the hooks.")
--- a/lisp/window-xemacs.el	Sun May 11 11:20:24 2008 +0200
+++ b/lisp/window-xemacs.el	Sun May 11 11:24:01 2008 +0200
@@ -124,7 +124,8 @@
   pixel-left pixel-top pixel-right pixel-bottom
   hscroll modeline-hscroll
   dedicatedp
-  first-hchild first-vchild next-child)
+  first-hchild first-vchild next-child
+  window)
 
 (defstruct window-configuration
   frame
@@ -135,6 +136,10 @@
   min-width min-height
   saved-root-window)
 
+; make sure we don't get affected by harmful advice
+(fset 'real-split-window (symbol-function 'split-window))
+(fset 'real-delete-window (symbol-function 'delete-window))
+
 (defun window-configuration-equal (conf-1 conf-2)
   "Returns a boolean indicating whether the two given configurations
 are identical.
@@ -256,6 +261,7 @@
 	  (bottom (nth 3 edges)))
       (let ((saved-window
 	     (make-saved-window
+	      :window window
 	      :currentp (eq window (selected-window (window-frame window)))
 	      :minibufferp (eq window (minibuffer-window (window-frame window)))
 	      :minibuffer-scrollp (eq window minibuffer-scroll-window)
@@ -286,10 +292,39 @@
 		    (copy-marker (mark-marker t buffer)))))
 	saved-window))))
 
+(defmacro save-window-excursion/mapping (&rest body)
+  "Execute body, preserving window sizes and contents.
+Restores which buffer appears in which window, where display starts,
+as well as the current buffer.
+Return alist mapping old windows to new windows.
+This alist maps the originally captured windows to the windows that correspond
+to them in the restored configuration.  It does not include entries for
+windows that have not changed identity.
+Does not restore the value of point in current buffer."
+  (let ((window-config (gensym 'window-config))
+	(mapping (gensym 'mapping)))
+    `(let ((,window-config (current-window-configuration))
+	   (,mapping))
+      (unwind-protect
+	  (progn ,@body)
+	(setq ,mapping (set-window-configuration/mapping ,window-config)))
+      ,mapping)))
+
 (defun set-window-configuration (configuration)
   "Set the configuration of windows and buffers as specified by CONFIGURATION.
 CONFIGURATION must be a value previously returned
 by `current-window-configuration'."
+  (set-window-configuration/mapping configuration)
+  nil) ; make sure nobody relies on mapping return value
+
+(defun set-window-configuration/mapping (configuration)
+  "Set the configuration of windows and buffers as specified by CONFIGURATION.
+CONFIGURATION must be a value previously returned
+by `current-window-configuration'.
+Return alist mapping old windows to new windows.
+This alist maps the originally captured windows to the windows that correspond
+to them in the restored configuration.  It does not include entries for
+windows that have not changed identity."
   (let ((frame (window-configuration-frame configuration)))
     (if (and (frame-live-p frame)
 	     (not (window-configuration-equal configuration
@@ -297,7 +332,8 @@
 	(really-set-window-configuration frame configuration))))
 
 (defun really-set-window-configuration (frame configuration)
-  "Set the window configuration CONFIGURATION on live frame FRAME."
+  "Set the window configuration CONFIGURATION on live frame FRAME.
+Return alist mapping old windows to new windows."
   ;; avoid potential temporary problems
   (setq window-min-width 0)
   (setq window-min-height 0)
@@ -328,22 +364,26 @@
     ;; the selected window
     (select-window (minibuffer-window frame))
 
-    (let ((window-configuration-current-window nil))
+    (let ((window-configuration-current-window nil)
+	  (mapping (list nil))) ; poor man's box
+      
       (declare (special window-configuration-current-window))
       (restore-saved-window configuration
 			    root-window
 			    (window-configuration-saved-root-window configuration)
-			    'vertical) 
+			    'vertical
+			    mapping) 
       (if window-configuration-current-window
-	  (select-window window-configuration-current-window))))
-
-  (setq window-min-width (window-configuration-min-width configuration))
-  (setq window-min-height (window-configuration-min-height configuration))
-
-  (let ((buffer (window-configuration-current-buffer configuration)))
-    (if (buffer-live-p buffer)
-	(set-buffer buffer)
-	(set-buffer (car (buffer-list))))))
+	  (select-window window-configuration-current-window))
+    
+      (setq window-min-width (window-configuration-min-width configuration))
+      (setq window-min-height (window-configuration-min-height configuration))
+      
+      (let ((buffer (window-configuration-current-buffer configuration)))
+	(if (buffer-live-p buffer)
+	    (set-buffer buffer)
+	  (set-buffer (car (buffer-list)))))
+      (car mapping))))
 
 (defun set-window-configuration-frame-size (configuration)
   "Restore the frame size of a window configuration."
@@ -369,7 +409,7 @@
     (while window
       (if (window-live-p window)
 	  (let ((next (window-next-child window)))
-	    (delete-window window)
+	    (real-delete-window window)
 	    (setq window next)))))
   (cond
    ((window-first-hchild window)
@@ -377,33 +417,43 @@
    ((window-first-vchild window)
     (window-reduce-to-one (window-first-vchild window)))))
 
-(defun restore-saved-window (configuration window saved-window direction)
-  "Within CONFIGURATION, restore WINDOW to the state of SAVED-WINDOW."
-  (and (saved-window-next-child saved-window)
-       (not (saved-window-minibufferp (saved-window-next-child saved-window)))
-       (progn
-	 (cond ((eq direction 'vertical)
-		(split-window window nil nil))
-	       ((eq direction 'horizontal)
-		(split-window window nil t)))
-	 (restore-saved-window configuration
-			       (window-next-child window)
-			       (saved-window-next-child saved-window)
-			       direction)))
+(defun restore-saved-window (configuration window saved-window direction mapping)
+  "Within CONFIGURATION, restore WINDOW to the state of SAVED-WINDOW.
+MAPPING is a one-element list whose element is an old-window-to-new-window
+mapping, which this function will extend."
+  (if (not (eq (saved-window-window saved-window) window))
+      (rplaca mapping
+	      (cons (cons (saved-window-window saved-window) window)
+		    (car mapping))))
+  (cond
+   ((and (saved-window-next-child saved-window)
+	 (not (saved-window-minibufferp (saved-window-next-child saved-window))))
+    (cond ((eq direction 'vertical)
+	   (real-split-window window nil nil))
+	  ((eq direction 'horizontal)
+	   (real-split-window window nil t)))
+    (if (not (saved-window-minibufferp saved-window))
+	(restore-saved-window-parameters configuration window saved-window))
+    (restore-saved-window configuration
+			  (window-next-child window)
+			  (saved-window-next-child saved-window)
+			  direction
+			  mapping))
+  ((not (saved-window-minibufferp saved-window))
+   (restore-saved-window-parameters configuration window saved-window)))
 
   (if (saved-window-first-hchild saved-window)
       (restore-saved-window configuration
 			    window
 			    (saved-window-first-hchild saved-window)
-			    'horizontal))
+			    'horizontal
+			    mapping))
   (if (saved-window-first-vchild saved-window)
       (restore-saved-window configuration
 			    window
 			    (saved-window-first-vchild saved-window)
-			    'vertical))
-
-  (if (not (saved-window-minibufferp saved-window))
-      (restore-saved-window-parameters configuration window saved-window)))
+			    'vertical
+			    mapping)))
 
 (defun restore-saved-window-parameters (configuration window saved-window)
   "Restore the window parameters stored in SAVED-WINDOW on WINDOW."
--- a/lisp/x-iso8859-1.el	Sun May 11 11:20:24 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,273 +0,0 @@
-;;; x-iso8859-1 --- Mapping between X keysym names and ISO 8859-1
-
-;; Copyright (C) 1992, 1993, 1997 Free Software Foundation, Inc.
-
-;; Author: Jamie Zawinski <jwz@jwz.org>
-;; Created: 15-jun-92
-;; Maintainer: XEmacs Development Team
-;; Keywords: extensions, internal, dumped
-
-;; This file is part of XEmacs.
-
-;; XEmacs is free software; you can redistribute it and/or modify it
-;; under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
-;; any later version.
-
-;; XEmacs is distributed in the hope that it will be useful, but
-;; WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-;; General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with XEmacs; see the file COPYING.  If not, write to the 
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
-
-;;; Synched up with: Not synched.
-
-;;; Commentary:
-
-;; created by jwz, 13-jun-92.
-;; changed by Heiko Muenkel, 12-jun-1997: Added a grave keysym.
-
-;; Under X, when the user types a character that is ISO-8859/1 but not ASCII,
-;; it comes in as a symbol instead of as a character code.  This keeps things
-;; nice and character-set independent.  This file takes all of those symbols
-;; (the symbols that are the X names for the 8859/1 characters) and puts a
-;; property on them which holds the character code that should be inserted in
-;; the buffer when they are typed.  The self-insert-command function will look
-;; at this.  It also binds them all to self-insert-command.
-
-;; It puts the same property on the keypad keys, so that (read-char) will
-;; think that they are the same as the digit characters.  However, those
-;; keys are bound to one-character keyboard macros, so that `kp-9' will, by
-;; default, do the same thing that `9' does, in whatever the current mode is.
-
-;; The standard case and syntax tables are set in iso8859-1.el, since
-;; that is not X-specific.
-
-;;; Code:
-
-(require 'iso8859-1)
-
-(defconst iso8859/1-code-to-x-keysym-table nil
-  "Maps iso8859/1 to an X keysym name which corresponds to it.
-There may be more than one X name for this keycode; this returns the first one.
-Note that this is X specific; one should avoid using this table whenever 
-possible, in the interest of portability.")
-
-;; (This esoteric little construct is how you do MACROLET in elisp.  It
-;; generates the most efficient code for the .elc file by unwinding the
-;; loop at compile-time.)
-
-((macro
-  . (lambda (&rest syms-and-iso8859/1-codes)
-      (cons
-       'progn
-       (nconc
-	;;
-	;; First emit code that puts the `x-iso8859/1' property on all of
-	;; the keysym symbols.
-	;; 
-	(mapcar '(lambda (sym-and-code)
-		  (list 'put (list 'quote (car sym-and-code))
-			''x-iso8859/1 (car (cdr sym-and-code))))
-		syms-and-iso8859/1-codes)
-	;;
-	;; Then emit code that binds all of those keysym symbols to
-	;; `self-insert-command'.
-	;; 
-	(mapcar '(lambda (sym-and-code)
-		  (list 'global-set-key (list 'quote (car sym-and-code))
-			''self-insert-command))
-		syms-and-iso8859/1-codes)
-	;;
-	;; Then emit the value of iso8859/1-code-to-x-keysym-table.
-	;;
-	(let ((v (make-vector 256 nil)))
-	  ;; the printing ASCII chars have 1-char names.
-	  (let ((i 33))
-	    (while (< i 127)
-	      (aset v i (intern (make-string 1 i)))
-	      (setq i (1+ i))))
-	  ;; these are from the keyboard character set.
-	  (mapcar '(lambda (x) (aset v (car x) (car (cdr x))))
-		  '((8 backspace) (9 tab) (10 linefeed) (13 return)
-		    (27 escape) (32 space) (127 delete)))
-	  (mapcar '(lambda (sym-and-code)
-		    (or (aref v (car (cdr sym-and-code)))
-			(aset v (car (cdr sym-and-code)) (car sym-and-code))))
-		  syms-and-iso8859/1-codes)
-	  (list (list 'setq 'iso8859/1-code-to-x-keysym-table v)))
-	))))
-
- ;; The names and capitalization here are as per the MIT X11R4 and X11R5
- ;; distributions.  If a vendor varies from this, adjustments will need
- ;; to be made...
-
- (grave			?\140)
- (nobreakspace		?\240)
- (exclamdown		?\241)
- (cent			?\242)
- (sterling		?\243)
- (currency		?\244)
- (yen			?\245)
- (brokenbar		?\246)
- (section 		?\247)
- (diaeresis		?\250)
- (copyright		?\251)
- (ordfeminine		?\252)
- (guillemotleft		?\253)
- (notsign		?\254)
- (hyphen		?\255)
- (registered		?\256)
- (macron		?\257)
- (degree		?\260)
- (plusminus		?\261)
- (twosuperior		?\262)
- (threesuperior		?\263)
- (acute			?\264)	; Why is there an acute keysym that is 
- (mu			?\265)	; distinct from apostrophe/quote, but 
- (paragraph		?\266)	; no grave keysym that is distinct from
- (periodcentered	?\267)	; backquote? 
- (cedilla		?\270)  ; I've added the grave keysym, because it's
- (onesuperior		?\271)  ; used in x-compose (Heiko Muenkel).
- (masculine		?\272)
- (guillemotright	?\273)
- (onequarter		?\274)
- (onehalf		?\275)
- (threequarters		?\276)
- (questiondown		?\277)
-
- (Agrave		?\300)
- (Aacute		?\301)
- (Acircumflex		?\302)
- (Atilde		?\303)
- (Adiaeresis		?\304)
- (Aring			?\305)
- (AE			?\306)
- (Ccedilla		?\307)
- (Egrave		?\310)
- (Eacute		?\311)
- (Ecircumflex		?\312)
- (Ediaeresis		?\313)
- (Igrave		?\314)
- (Iacute		?\315)
- (Icircumflex		?\316)
- (Idiaeresis		?\317)
- (ETH			?\320)
- (Ntilde		?\321)
- (Ograve		?\322)
- (Oacute		?\323)
- (Ocircumflex		?\324)
- (Otilde		?\325)
- (Odiaeresis		?\326)
- (multiply		?\327)
- (Ooblique		?\330)
- (Ugrave		?\331)
- (Uacute		?\332)
- (Ucircumflex		?\333)
- (Udiaeresis		?\334)
- (Yacute		?\335)
- (THORN			?\336)
- (ssharp		?\337)
-
- (agrave		?\340)
- (aacute		?\341)
- (acircumflex		?\342)
- (atilde		?\343)
- (adiaeresis		?\344)
- (aring			?\345)
- (ae			?\346)
- (ccedilla		?\347)
- (egrave		?\350)
- (eacute		?\351)
- (ecircumflex		?\352)
- (ediaeresis		?\353)
- (igrave		?\354)
- (iacute		?\355)
- (icircumflex		?\356)
- (idiaeresis		?\357)
- (eth			?\360)
- (ntilde		?\361)
- (ograve		?\362)
- (oacute		?\363)
- (ocircumflex		?\364)
- (otilde		?\365)
- (odiaeresis		?\366)
- (division		?\367)
- (oslash		?\370)
- (ugrave		?\371)
- (uacute		?\372)
- (ucircumflex		?\373)
- (udiaeresis		?\374)
- (yacute		?\375)
- (thorn			?\376)
- (ydiaeresis		?\377)
-
- )
-
-((macro . (lambda (&rest syms-and-iso8859/1-codes)
-	    (cons 'progn
-		  (mapcar '(lambda (sym-and-code)
-			    (list 'put (list 'quote (car sym-and-code))
-				  ''x-iso8859/1 (car (cdr sym-and-code))))
-			  syms-and-iso8859/1-codes))))
- ;;
- ;; Let's do the appropriate thing for some vendor-specific keysyms too...
- ;; Apparently nobody agrees on what the names of these keysyms are.
- ;;
- (SunFA_Acute		?\264)
- (SunXK_FA_Acute	?\264)
- (Dacute_accent		?\264)
- (DXK_acute_accent	?\264)
- (hpmute_acute		?\264)
- (hpXK_mute_acute	?\264)
- (XK_mute_acute		?\264)
-
- (SunFA_Grave		 ?`)
- (Dead_Grave		 ?`)
- (SunXK_FA_Grave	 ?`)
- (Dgrave_accent		 ?`)
- (DXK_grave_accent	 ?`)
- (hpmute_grave		 ?`)
- (hpXK_mute_grave	 ?`)
- (XK_mute_grave		 ?`)
-
- (SunFA_Cedilla		?\270)
- (SunXK_FA_Cedilla	?\270)
- (Dcedilla_accent	?\270)
- (DXK_cedilla_accent	?\270)
-
- (SunFA_Diaeresis	?\250)
- (SunXK_FA_Diaeresis	?\250)
- (hpmute_diaeresis	?\250)
- (hpXK_mute_diaeresis	?\250)
- (XK_mute_diaeresis	?\250)
-
- (SunFA_Circum		 ?^)
- (Dead_Circum		 ?^)
- (SunXK_FA_Circum	 ?^)
- (Dcircumflex_accent	 ?^)
- (DXK_circumflex_accent	 ?^)
- (hpmute_asciicircum	 ?^)
- (hpXK_mute_asciicircum	 ?^)
- (XK_mute_asciicircum	 ?^)
-
- (SunFA_Tilde		 ?~)
- (Dead_Tilde		 ?~)
- (SunXK_FA_Tilde	 ?~)
- (Dtilde		 ?~)
- (DXK_tilde		 ?~)
- (hpmute_asciitilde	 ?~)
- (hpXK_mute_asciitilde	 ?~)
- (XK_mute_asciitilde	 ?~)
-
- (Dring_accent		?\260)
- (DXK_ring_accent	?\260)
- )
-
-(provide 'x-iso8859-1)
-
-;;; x-iso8859-1.el ends here
--- a/man/ChangeLog	Sun May 11 11:20:24 2008 +0200
+++ b/man/ChangeLog	Sun May 11 11:24:01 2008 +0200
@@ -1,3 +1,20 @@
+2008-01-20  Aidan Kehoe  <kehoea@parhasard.net>
+
+	* xemacs/cmdargs.texi (Command Switches): 
+	Describe --script, -script. 
+
+2008-02-27  Stephen J. Turnbull  <stephen@xemacs.org>
+
+	* internals/internals.texi (Discussion -- KKCC):
+	(Discussion -- Incremental Collector):
+	New nodes.
+	(Top):
+	(Discussion -- Garbage Collection):
+	(Discussion -- Pure Space):
+	Adjust pointers and menus for new nodes.
+
+	(lrecords): Remark that lcrecords are obsolete.
+
 2007-12-17  Aidan Kehoe  <kehoea@parhasard.net>
 
 	* lispref/strings.texi (Formatting Strings):
--- a/man/internals/internals.texi	Sun May 11 11:20:24 2008 +0200
+++ b/man/internals/internals.texi	Sun May 11 11:24:01 2008 +0200
@@ -740,6 +740,8 @@
 
 Discussion -- Garbage Collection
 
+* Discussion -- KKCC::
+* Discussion -- Incremental Collector::
 * Discussion -- Pure Space::    
 * Discussion -- Hashtable-Based Marking and Cleanup::  
 * Discussion -- The Anti-Cons::  
@@ -8551,6 +8553,9 @@
 
   [see @file{lrecord.h}]
 
+@strong{This node needs updating for the ``new garbage collection
+algorithms'' (KKCC) and the ``incremental'' collector.}
+
   All lrecords have at the beginning of their structure a @code{struct
 lrecord_header}.  This just contains a type number and some flags,
 including the mark bit.  All builtin type numbers are defined as
@@ -8571,6 +8576,9 @@
 only for debugging and could be removed, but the space gain is not
 significant.)
 
+@strong{lcrecords are now obsolete when using the write-barrier-based
+collector.}
+
   Simple lrecords are created using @code{ALLOCATE_FIXED_TYPE()}, just
 like for other frob blocks.  The only change is that the implementation
 pointer must be initialized correctly. (The implementation structure for
@@ -28419,12 +28427,82 @@
 @cindex garbage collection, discussion
 
 @menu
+* Discussion -- KKCC::
+* Discussion -- Incremental Collector::
 * Discussion -- Pure Space::    
 * Discussion -- Hashtable-Based Marking and Cleanup::  
 * Discussion -- The Anti-Cons::  
 @end menu
 
-@node Discussion -- Pure Space, Discussion -- Hashtable-Based Marking and Cleanup, Discussion -- Garbage Collection, Discussion -- Garbage Collection
+@node Discussion -- KKCC, Discussion -- Incremental Collector, Discussion -- Garbage Collection, Discussion -- Garbage Collection
+@subsection Discussion -- KKCC
+@cindex discussion, KKCC
+@cindex KKCC, discussion
+
+KKCC is the tag used for the ``new garbage collector algorithms,'' which
+are a refactoring of the garbage collector to make trying new collectors
+simpler.
+
+@node Discussion -- Incremental Collector, Discussion -- Pure Space, Discussion -- KKCC, Discussion -- Garbage Collection
+@subsection Discussion -- Incremental Collector
+@cindex discussion, Incremental Collector
+@cindex Incremental Collector, discussion
+
+The incremental collector is designed to allow better ``realtime''
+performance by not requiring a full mark and sweep pass.  This also
+allows removal of most finalizers, as described in
+@samp{<vpd8x1fomdx.fsf@@informatik.uni-tuebingen.de>} by Marcus Crestani
+on xemacs-beta:
+
+I was able to nuke many finalizers by transforming
+separately allocated data structures to Lisp objects.  Some of the
+remaining finalizers are also likely to go away, as soon as I (or
+someone else) find the time to ``lift'' the remaining, separately allocated
+objects to Lisp objects.
+
+Unfortunately, the current Lisp object layout leads to holes in the
+write barrier: Not all data structures that contain pointers to Lisp
+objects are allocated on the Lisp heap.  Some Lisp objects do not carry
+all their information in the object itself.  External parts are kept in
+separately allocated memory blocks that are not managed by the new Lisp
+allocator.  Examples for these objects are hash tables and dynamic
+arrays, two objects that can dynamically grow and shrink.  The separate
+memory blocks are not guaranteed to reside on page boundaries, and thus
+cannot be watched by the write barrier.
+
+Moreover, the separate parts can contain live pointers to other Lisp
+objects.  These pointers are not covered by the write barrier and
+modifications by the client during garbage collection do escape.  In
+this case, the client changes the connectivity of the reachability
+graph behind the collector's back, which eventually leads to erroneous
+collection of live objects.  To solve this problem, I transformed the
+separately allocated parts to fully qualified Lisp objects that are
+managed by the allocator and thus are covered by the write barrier.
+This also removes a lot of special allocation and removal code for the
+out-sourced parts.  Generally, allocating all data structures that
+contain pointers to Lisp objects on one heap makes the whole memory
+layout more consistent.
+
+A large part of the patch converts these data structures to Lisp
+objects.  The conversion of an additionally allocated data structure to
+an Lisp objects includes:
+@itemize
+@item Add new object type to @samp{enum lrecord_type} in @file{lrecord.h}.
+@item Add @samp{lrecord_header} to the object's struct.
+@item Add @samp{DECLARE_RECORD()}/@samp{XFOO}/etc. below the struct definition.
+@item Add lrecord definition.
+@item Change allocation with malloc to allocation with new allocator.
+@item Add object to @samp{syms_of_*()}.
+@item Change memory description of parent object.
+@item Modify finalizer, free, or delete functions.
+@end itemize
+
+The initial motivation for this is the write barrier and the consistent
+format for all objects that may contain Lisp pointers.  That we can get
+rid of finalizers this way follows naturally.
+
+
+@node Discussion -- Pure Space, Discussion -- Hashtable-Based Marking and Cleanup, Discussion -- Incremental Collector, Discussion -- Garbage Collection
 @subsection Discussion -- Pure Space
 @cindex discussion, pure space
 @cindex pure space, discussion
--- a/man/xemacs/cmdargs.texi	Sun May 11 11:20:24 2008 +0200
+++ b/man/xemacs/cmdargs.texi	Sun May 11 11:24:01 2008 +0200
@@ -171,6 +171,27 @@
 Do not process early packages.  (For more information on startup issues
 concerning the package system, @xref{Startup Paths}.)
 
+@item -script @var{file}
+@item --script @var{file}
+Load @var{file} as a (compiled or interpreted) Lisp file; do not load
+any window-system or TTY code, do not load the user init file, the site
+file, or the early packages.  This is comparable to running
+@samp{xemacs} @samp{-batch} @samp{-l} @var{file}.
+
+You can also specify this flag implicitly by calling the XEmacs binary
+with a value for @samp{argv[0]} of @samp{xemacs-script}, normally by
+means of a symbolic link.  On a POSIX system, this means that adding the
+line:
+
+@example
+#!/usr/bin/env xemacs-script
+@end example
+
+at the start of an XEmacs Lisp file, and changing that file's
+permissions to executable, creates a script that can be invoked by
+typing the path to the file.  XEmacs has logic to ignore the #! line at
+the start of the script, so that won't cause an error.
+
 @item -vanilla
 This is equivalent to @samp{-q -no-site-file -no-early-packages}.
 
--- a/modules/ChangeLog	Sun May 11 11:20:24 2008 +0200
+++ b/modules/ChangeLog	Sun May 11 11:24:01 2008 +0200
@@ -1,3 +1,11 @@
+2008-02-12  Jerry James  <james@xemacs.org>
+
+	* canna/install-sh: Update to latest FSF version.
+	* ldap/install-sh: Ditto.
+	* postgresql/install-sh: Ditto.
+	* sample/external/install-sh: Ditto.
+	* sample/internal/install-sh: Ditto.
+
 2007-06-23  Stephen J. Turnbull  <stephen@xemacs.org>
 
 	* canna/canna_api.c (Fcanna_set_bunsetsu):
--- a/modules/canna/install-sh	Sun May 11 11:20:24 2008 +0200
+++ b/modules/canna/install-sh	Sun May 11 11:24:01 2008 +0200
@@ -1,251 +1,519 @@
 #!/bin/sh
-#
 # install - install a program, script, or datafile
-# This comes from X11R5 (mit/util/scripts/install.sh).
+
+scriptversion=2006-12-25.00
+
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
 #
-# Copyright 1991 by the Massachusetts Institute of Technology
+# Copyright (C) 1994 X Consortium
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
 #
-# Permission to use, copy, modify, distribute, and sell this software and its
-# documentation for any purpose is hereby granted without fee, provided that
-# the above copyright notice appear in all copies and that both that
-# copyright notice and this permission notice appear in supporting
-# documentation, and that the name of M.I.T. not be used in advertising or
-# publicity pertaining to distribution of the software without specific,
-# written prior permission.  M.I.T. makes no representations about the
-# suitability of this software for any purpose.  It is provided "as is"
-# without express or implied warranty.
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
+#
+#
+# FSF changes to this file are in the public domain.
 #
 # Calling this script install-sh is preferred over install.sh, to prevent
 # `make' implicit rules from creating a file called install from it
 # when there is no Makefile.
 #
 # This script is compatible with the BSD install script, but was written
-# from scratch.  It can only install one file at a time, a restriction
-# shared with many OS's install programs.
+# from scratch.
 
+nl='
+'
+IFS=" ""	$nl"
 
 # set DOITPROG to echo to test this script
 
 # Don't use :- since 4.3BSD and earlier shells don't like it.
-doit="${DOITPROG-}"
+doit=${DOITPROG-}
+if test -z "$doit"; then
+  doit_exec=exec
+else
+  doit_exec=$doit
+fi
 
-
-# put in absolute paths if you don't have them in your path; or use env. vars.
+# Put in absolute file names if you don't have them in your path;
+# or use environment vars.
 
-mvprog="${MVPROG-mv}"
-cpprog="${CPPROG-cp}"
-chmodprog="${CHMODPROG-chmod}"
-chownprog="${CHOWNPROG-chown}"
-chgrpprog="${CHGRPPROG-chgrp}"
-stripprog="${STRIPPROG-strip}"
-rmprog="${RMPROG-rm}"
-mkdirprog="${MKDIRPROG-mkdir}"
+chgrpprog=${CHGRPPROG-chgrp}
+chmodprog=${CHMODPROG-chmod}
+chownprog=${CHOWNPROG-chown}
+cmpprog=${CMPPROG-cmp}
+cpprog=${CPPROG-cp}
+mkdirprog=${MKDIRPROG-mkdir}
+mvprog=${MVPROG-mv}
+rmprog=${RMPROG-rm}
+stripprog=${STRIPPROG-strip}
 
-transformbasename=""
-transform_arg=""
-instcmd="$mvprog"
-chmodcmd="$chmodprog 0755"
-chowncmd=""
-chgrpcmd=""
-stripcmd=""
+posix_glob='?'
+initialize_posix_glob='
+  test "$posix_glob" != "?" || {
+    if (set -f) 2>/dev/null; then
+      posix_glob=
+    else
+      posix_glob=:
+    fi
+  }
+'
+
+posix_mkdir=
+
+# Desired mode of installed file.
+mode=0755
+
+chgrpcmd=
+chmodcmd=$chmodprog
+chowncmd=
+mvcmd=$mvprog
 rmcmd="$rmprog -f"
-mvcmd="$mvprog"
-src=""
-dst=""
-dir_arg=""
+stripcmd=
+
+src=
+dst=
+dir_arg=
+dst_arg=
+
+copy_on_change=false
+no_target_directory=
 
-while [ x"$1" != x ]; do
-    case $1 in
-	-c) instcmd="$cpprog"
-	    shift
-	    continue;;
+usage="\
+Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+   or: $0 [OPTION]... SRCFILES... DIRECTORY
+   or: $0 [OPTION]... -t DIRECTORY SRCFILES...
+   or: $0 [OPTION]... -d DIRECTORIES...
 
-	-d) dir_arg=true
-	    shift
-	    continue;;
+In the 1st form, copy SRCFILE to DSTFILE.
+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
+In the 4th, create DIRECTORIES.
 
-	-m) chmodcmd="$chmodprog $2"
-	    shift
-	    shift
-	    continue;;
+Options:
+     --help     display this help and exit.
+     --version  display version info and exit.
+
+  -c            (ignored)
+  -C            install only if different (preserve the last data modification time)
+  -d            create directories instead of installing files.
+  -g GROUP      $chgrpprog installed files to GROUP.
+  -m MODE       $chmodprog installed files to MODE.
+  -o USER       $chownprog installed files to USER.
+  -s            $stripprog installed files.
+  -t DIRECTORY  install into DIRECTORY.
+  -T            report an error if DSTFILE is a directory.
 
-	-o) chowncmd="$chownprog $2"
-	    shift
-	    shift
-	    continue;;
+Environment variables override the default commands:
+  CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
+  RMPROG STRIPPROG
+"
 
-	-g) chgrpcmd="$chgrpprog $2"
-	    shift
-	    shift
-	    continue;;
+while test $# -ne 0; do
+  case $1 in
+    -c) ;;
 
-	-s) stripcmd="$stripprog"
-	    shift
-	    continue;;
+    -C) copy_on_change=true;;
+
+    -d) dir_arg=true;;
+
+    -g) chgrpcmd="$chgrpprog $2"
+	shift;;
 
-	-t=*) transformarg=`echo $1 | sed 's/-t=//'`
-	    shift
-	    continue;;
+    --help) echo "$usage"; exit $?;;
 
-	-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
-	    shift
-	    continue;;
+    -m) mode=$2
+	case $mode in
+	  *' '* | *'	'* | *'
+'*	  | *'*'* | *'?'* | *'['*)
+	    echo "$0: invalid mode: $mode" >&2
+	    exit 1;;
+	esac
+	shift;;
+
+    -o) chowncmd="$chownprog $2"
+	shift;;
+
+    -s) stripcmd=$stripprog;;
 
-	*)  if [ x"$src" = x ]
-	    then
-		src=$1
-	    else
-		# this colon is to work around a 386BSD /bin/sh bug
-		:
-		dst=$1
-	    fi
-	    shift
-	    continue;;
-    esac
+    -t) dst_arg=$2
+	shift;;
+
+    -T) no_target_directory=true;;
+
+    --version) echo "$0 $scriptversion"; exit $?;;
+
+    --)	shift
+	break;;
+
+    -*)	echo "$0: invalid option: $1" >&2
+	exit 1;;
+
+    *)  break;;
+  esac
+  shift
 done
 
-if [ x"$src" = x ]
-then
-	echo "install:	no input file specified"
-	exit 1
-else
-	:
+if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
+  # When -d is used, all remaining arguments are directories to create.
+  # When -t is used, the destination is already specified.
+  # Otherwise, the last argument is the destination.  Remove it from $@.
+  for arg
+  do
+    if test -n "$dst_arg"; then
+      # $@ is not empty: it contains at least $arg.
+      set fnord "$@" "$dst_arg"
+      shift # fnord
+    fi
+    shift # arg
+    dst_arg=$arg
+  done
+fi
+
+if test $# -eq 0; then
+  if test -z "$dir_arg"; then
+    echo "$0: no input file specified." >&2
+    exit 1
+  fi
+  # It's OK to call `install-sh -d' without argument.
+  # This can happen when creating conditional directories.
+  exit 0
+fi
+
+if test -z "$dir_arg"; then
+  trap '(exit $?); exit' 1 2 13 15
+
+  # Set umask so as not to create temps with too-generous modes.
+  # However, 'strip' requires both read and write access to temps.
+  case $mode in
+    # Optimize common cases.
+    *644) cp_umask=133;;
+    *755) cp_umask=22;;
+
+    *[0-7])
+      if test -z "$stripcmd"; then
+	u_plus_rw=
+      else
+	u_plus_rw='% 200'
+      fi
+      cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
+    *)
+      if test -z "$stripcmd"; then
+	u_plus_rw=
+      else
+	u_plus_rw=,u+rw
+      fi
+      cp_umask=$mode$u_plus_rw;;
+  esac
 fi
 
-if [ x"$dir_arg" != x ]; then
-	dst=$src
-	src=""
-	
-	if [ -d $dst ]; then
-		instcmd=:
-		chmodcmd=""
-	else
-		instcmd=$mkdirprog
-	fi
-else
+for src
+do
+  # Protect names starting with `-'.
+  case $src in
+    -*) src=./$src;;
+  esac
+
+  if test -n "$dir_arg"; then
+    dst=$src
+    dstdir=$dst
+    test -d "$dstdir"
+    dstdir_status=$?
+  else
+
+    # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
+    # might cause directories to be created, which would be especially bad
+    # if $src (and thus $dsttmp) contains '*'.
+    if test ! -f "$src" && test ! -d "$src"; then
+      echo "$0: $src does not exist." >&2
+      exit 1
+    fi
+
+    if test -z "$dst_arg"; then
+      echo "$0: no destination specified." >&2
+      exit 1
+    fi
+
+    dst=$dst_arg
+    # Protect names starting with `-'.
+    case $dst in
+      -*) dst=./$dst;;
+    esac
 
-# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
-# might cause directories to be created, which would be especially bad 
-# if $src (and thus $dsttmp) contains '*'.
+    # If destination is a directory, append the input filename; won't work
+    # if double slashes aren't ignored.
+    if test -d "$dst"; then
+      if test -n "$no_target_directory"; then
+	echo "$0: $dst_arg: Is a directory" >&2
+	exit 1
+      fi
+      dstdir=$dst
+      dst=$dstdir/`basename "$src"`
+      dstdir_status=0
+    else
+      # Prefer dirname, but fall back on a substitute if dirname fails.
+      dstdir=`
+	(dirname "$dst") 2>/dev/null ||
+	expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	     X"$dst" : 'X\(//\)[^/]' \| \
+	     X"$dst" : 'X\(//\)$' \| \
+	     X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
+	echo X"$dst" |
+	    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+		   s//\1/
+		   q
+		 }
+		 /^X\(\/\/\)[^/].*/{
+		   s//\1/
+		   q
+		 }
+		 /^X\(\/\/\)$/{
+		   s//\1/
+		   q
+		 }
+		 /^X\(\/\).*/{
+		   s//\1/
+		   q
+		 }
+		 s/.*/./; q'
+      `
 
-	if [ -f "$src" ] || [ -d "$src" ]
-	then
-		:
+      test -d "$dstdir"
+      dstdir_status=$?
+    fi
+  fi
+
+  obsolete_mkdir_used=false
+
+  if test $dstdir_status != 0; then
+    case $posix_mkdir in
+      '')
+	# Create intermediate dirs using mode 755 as modified by the umask.
+	# This is like FreeBSD 'install' as of 1997-10-28.
+	umask=`umask`
+	case $stripcmd.$umask in
+	  # Optimize common cases.
+	  *[2367][2367]) mkdir_umask=$umask;;
+	  .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
+
+	  *[0-7])
+	    mkdir_umask=`expr $umask + 22 \
+	      - $umask % 100 % 40 + $umask % 20 \
+	      - $umask % 10 % 4 + $umask % 2
+	    `;;
+	  *) mkdir_umask=$umask,go-w;;
+	esac
+
+	# With -d, create the new directory with the user-specified mode.
+	# Otherwise, rely on $mkdir_umask.
+	if test -n "$dir_arg"; then
+	  mkdir_mode=-m$mode
 	else
-		echo "install:  $src does not exist"
-		exit 1
-	fi
-	
-	if [ x"$dst" = x ]
-	then
-		echo "install:	no destination specified"
-		exit 1
-	else
-		:
+	  mkdir_mode=
 	fi
 
-# If destination is a directory, append the input filename; if your system
-# does not like double slashes in filenames, you may need to add some logic
-
-	if [ -d $dst ]
-	then
-		dst="$dst"/`basename $src`
-	else
-		:
-	fi
-fi
-
-## this sed command emulates the dirname command
-dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
-
-# Make sure that the destination directory exists.
-#  this part is taken from Noah Friedman's mkinstalldirs script
-
-# Skip lots of stat calls in the usual case.
-if [ ! -d "$dstdir" ]; then
-defaultIFS='
-	'
-IFS="${IFS-${defaultIFS}}"
+	posix_mkdir=false
+	case $umask in
+	  *[123567][0-7][0-7])
+	    # POSIX mkdir -p sets u+wx bits regardless of umask, which
+	    # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
+	    ;;
+	  *)
+	    tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+	    trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
 
-oIFS="${IFS}"
-# Some sh's can't handle IFS=/ for some reason.
-IFS='%'
-set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
-IFS="${oIFS}"
-
-pathcomp=''
-
-while [ $# -ne 0 ] ; do
-	pathcomp="${pathcomp}${1}"
-	shift
+	    if (umask $mkdir_umask &&
+		exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
+	    then
+	      if test -z "$dir_arg" || {
+		   # Check for POSIX incompatibilities with -m.
+		   # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+		   # other-writeable bit of parent directory when it shouldn't.
+		   # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+		   ls_ld_tmpdir=`ls -ld "$tmpdir"`
+		   case $ls_ld_tmpdir in
+		     d????-?r-*) different_mode=700;;
+		     d????-?--*) different_mode=755;;
+		     *) false;;
+		   esac &&
+		   $mkdirprog -m$different_mode -p -- "$tmpdir" && {
+		     ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
+		     test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+		   }
+		 }
+	      then posix_mkdir=:
+	      fi
+	      rmdir "$tmpdir/d" "$tmpdir"
+	    else
+	      # Remove any dirs left behind by ancient mkdir implementations.
+	      rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
+	    fi
+	    trap '' 0;;
+	esac;;
+    esac
 
-	if [ ! -d "${pathcomp}" ] ;
-        then
-		$mkdirprog "${pathcomp}"
-	else
-		:
-	fi
+    if
+      $posix_mkdir && (
+	umask $mkdir_umask &&
+	$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+      )
+    then :
+    else
+
+      # The umask is ridiculous, or mkdir does not conform to POSIX,
+      # or it failed possibly due to a race condition.  Create the
+      # directory the slow way, step by step, checking for races as we go.
 
-	pathcomp="${pathcomp}/"
-done
-fi
+      case $dstdir in
+	/*) prefix='/';;
+	-*) prefix='./';;
+	*)  prefix='';;
+      esac
+
+      eval "$initialize_posix_glob"
 
-if [ x"$dir_arg" != x ]
-then
-	$doit $instcmd $dst &&
+      oIFS=$IFS
+      IFS=/
+      $posix_glob set -f
+      set fnord $dstdir
+      shift
+      $posix_glob set +f
+      IFS=$oIFS
+
+      prefixes=
+
+      for d
+      do
+	test -z "$d" && continue
 
-	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else : ; fi &&
-	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else : ; fi &&
-	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else : ; fi &&
-	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else : ; fi
-else
-
-# If we're going to rename the final executable, determine the name now.
-
-	if [ x"$transformarg" = x ] 
-	then
-		dstfile=`basename $dst`
+	prefix=$prefix$d
+	if test -d "$prefix"; then
+	  prefixes=
 	else
-		dstfile=`basename $dst $transformbasename | 
-			sed $transformarg`$transformbasename
+	  if $posix_mkdir; then
+	    (umask=$mkdir_umask &&
+	     $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+	    # Don't fail if two instances are running concurrently.
+	    test -d "$prefix" || exit 1
+	  else
+	    case $prefix in
+	      *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+	      *) qprefix=$prefix;;
+	    esac
+	    prefixes="$prefixes '$qprefix'"
+	  fi
 	fi
-
-# don't allow the sed command to completely eliminate the filename
+	prefix=$prefix/
+      done
 
-	if [ x"$dstfile" = x ] 
-	then
-		dstfile=`basename $dst`
-	else
-		:
-	fi
+      if test -n "$prefixes"; then
+	# Don't fail if two instances are running concurrently.
+	(umask $mkdir_umask &&
+	 eval "\$doit_exec \$mkdirprog $prefixes") ||
+	  test -d "$dstdir" || exit 1
+	obsolete_mkdir_used=true
+      fi
+    fi
+  fi
 
-# Make a temp file name in the proper directory.
+  if test -n "$dir_arg"; then
+    { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
+    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
+    { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
+      test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
+  else
+
+    # Make a couple of temp file names in the proper directory.
+    dsttmp=$dstdir/_inst.$$_
+    rmtmp=$dstdir/_rm.$$_
+
+    # Trap to clean up those temp files at exit.
+    trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
+
+    # Copy the file name to the temp name.
+    (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
 
-	dsttmp=$dstdir/#inst.$$#
-
-# Move or copy the file name to the temp name
-
-	$doit $instcmd $src $dsttmp &&
+    # and set any options; do chmod last to preserve setuid bits.
+    #
+    # If any of these fail, we abort the whole thing.  If we want to
+    # ignore errors from any of these, just make sure not to ignore
+    # errors from the above "$doit $cpprog $src $dsttmp" command.
+    #
+    { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
+    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
+    { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
+    { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
 
-	trap "rm -f ${dsttmp}" 0 &&
-
-# and set any options; do chmod last to preserve setuid bits
+    # If -C, don't bother to copy if it wouldn't change the file.
+    if $copy_on_change &&
+       old=`LC_ALL=C ls -dlL "$dst"	2>/dev/null` &&
+       new=`LC_ALL=C ls -dlL "$dsttmp"	2>/dev/null` &&
 
-# If any of these fail, we abort the whole thing.  If we want to
-# ignore errors from any of these, just make sure not to ignore
-# errors from the above "$doit $instcmd $src $dsttmp" command.
+       eval "$initialize_posix_glob" &&
+       $posix_glob set -f &&
+       set X $old && old=:$2:$4:$5:$6 &&
+       set X $new && new=:$2:$4:$5:$6 &&
+       $posix_glob set +f &&
+
+       test "$old" = "$new" &&
+       $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
+    then
+      rm -f "$dsttmp"
+    else
+      # Rename the file to the real destination.
+      $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
 
-	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else :;fi &&
-	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else :;fi &&
-	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else :;fi &&
-	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else :;fi &&
-
-# Now rename the file to the real destination.
+      # The rename failed, perhaps because mv can't rename something else
+      # to itself, or perhaps because mv is so ancient that it does not
+      # support -f.
+      {
+	# Now remove or move aside any old file at destination location.
+	# We try this two ways since rm can't unlink itself on some
+	# systems and the destination file might be busy for other
+	# reasons.  In this case, the final cleanup might fail but the new
+	# file should still install successfully.
+	{
+	  test ! -f "$dst" ||
+	  $doit $rmcmd -f "$dst" 2>/dev/null ||
+	  { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+	    { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+	  } ||
+	  { echo "$0: cannot unlink or rename $dst" >&2
+	    (exit 1); exit 1
+	  }
+	} &&
 
-	$doit $rmcmd -f $dstdir/$dstfile &&
-	$doit $mvcmd $dsttmp $dstdir/$dstfile 
+	# Now rename the file to the real destination.
+	$doit $mvcmd "$dsttmp" "$dst"
+      }
+    fi || exit 1
 
-fi &&
+    trap '' 0
+  fi
+done
 
-
-exit 0
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
--- a/modules/ldap/install-sh	Sun May 11 11:20:24 2008 +0200
+++ b/modules/ldap/install-sh	Sun May 11 11:24:01 2008 +0200
@@ -1,251 +1,519 @@
 #!/bin/sh
-#
 # install - install a program, script, or datafile
-# This comes from X11R5 (mit/util/scripts/install.sh).
+
+scriptversion=2006-12-25.00
+
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
 #
-# Copyright 1991 by the Massachusetts Institute of Technology
+# Copyright (C) 1994 X Consortium
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
 #
-# Permission to use, copy, modify, distribute, and sell this software and its
-# documentation for any purpose is hereby granted without fee, provided that
-# the above copyright notice appear in all copies and that both that
-# copyright notice and this permission notice appear in supporting
-# documentation, and that the name of M.I.T. not be used in advertising or
-# publicity pertaining to distribution of the software without specific,
-# written prior permission.  M.I.T. makes no representations about the
-# suitability of this software for any purpose.  It is provided "as is"
-# without express or implied warranty.
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
+#
+#
+# FSF changes to this file are in the public domain.
 #
 # Calling this script install-sh is preferred over install.sh, to prevent
 # `make' implicit rules from creating a file called install from it
 # when there is no Makefile.
 #
 # This script is compatible with the BSD install script, but was written
-# from scratch.  It can only install one file at a time, a restriction
-# shared with many OS's install programs.
+# from scratch.
 
+nl='
+'
+IFS=" ""	$nl"
 
 # set DOITPROG to echo to test this script
 
 # Don't use :- since 4.3BSD and earlier shells don't like it.
-doit="${DOITPROG-}"
+doit=${DOITPROG-}
+if test -z "$doit"; then
+  doit_exec=exec
+else
+  doit_exec=$doit
+fi
 
-
-# put in absolute paths if you don't have them in your path; or use env. vars.
+# Put in absolute file names if you don't have them in your path;
+# or use environment vars.
 
-mvprog="${MVPROG-mv}"
-cpprog="${CPPROG-cp}"
-chmodprog="${CHMODPROG-chmod}"
-chownprog="${CHOWNPROG-chown}"
-chgrpprog="${CHGRPPROG-chgrp}"
-stripprog="${STRIPPROG-strip}"
-rmprog="${RMPROG-rm}"
-mkdirprog="${MKDIRPROG-mkdir}"
+chgrpprog=${CHGRPPROG-chgrp}
+chmodprog=${CHMODPROG-chmod}
+chownprog=${CHOWNPROG-chown}
+cmpprog=${CMPPROG-cmp}
+cpprog=${CPPROG-cp}
+mkdirprog=${MKDIRPROG-mkdir}
+mvprog=${MVPROG-mv}
+rmprog=${RMPROG-rm}
+stripprog=${STRIPPROG-strip}
 
-transformbasename=""
-transform_arg=""
-instcmd="$mvprog"
-chmodcmd="$chmodprog 0755"
-chowncmd=""
-chgrpcmd=""
-stripcmd=""
+posix_glob='?'
+initialize_posix_glob='
+  test "$posix_glob" != "?" || {
+    if (set -f) 2>/dev/null; then
+      posix_glob=
+    else
+      posix_glob=:
+    fi
+  }
+'
+
+posix_mkdir=
+
+# Desired mode of installed file.
+mode=0755
+
+chgrpcmd=
+chmodcmd=$chmodprog
+chowncmd=
+mvcmd=$mvprog
 rmcmd="$rmprog -f"
-mvcmd="$mvprog"
-src=""
-dst=""
-dir_arg=""
+stripcmd=
+
+src=
+dst=
+dir_arg=
+dst_arg=
+
+copy_on_change=false
+no_target_directory=
 
-while [ x"$1" != x ]; do
-    case $1 in
-	-c) instcmd="$cpprog"
-	    shift
-	    continue;;
+usage="\
+Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+   or: $0 [OPTION]... SRCFILES... DIRECTORY
+   or: $0 [OPTION]... -t DIRECTORY SRCFILES...
+   or: $0 [OPTION]... -d DIRECTORIES...
 
-	-d) dir_arg=true
-	    shift
-	    continue;;
+In the 1st form, copy SRCFILE to DSTFILE.
+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
+In the 4th, create DIRECTORIES.
 
-	-m) chmodcmd="$chmodprog $2"
-	    shift
-	    shift
-	    continue;;
+Options:
+     --help     display this help and exit.
+     --version  display version info and exit.
+
+  -c            (ignored)
+  -C            install only if different (preserve the last data modification time)
+  -d            create directories instead of installing files.
+  -g GROUP      $chgrpprog installed files to GROUP.
+  -m MODE       $chmodprog installed files to MODE.
+  -o USER       $chownprog installed files to USER.
+  -s            $stripprog installed files.
+  -t DIRECTORY  install into DIRECTORY.
+  -T            report an error if DSTFILE is a directory.
 
-	-o) chowncmd="$chownprog $2"
-	    shift
-	    shift
-	    continue;;
+Environment variables override the default commands:
+  CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
+  RMPROG STRIPPROG
+"
 
-	-g) chgrpcmd="$chgrpprog $2"
-	    shift
-	    shift
-	    continue;;
+while test $# -ne 0; do
+  case $1 in
+    -c) ;;
 
-	-s) stripcmd="$stripprog"
-	    shift
-	    continue;;
+    -C) copy_on_change=true;;
+
+    -d) dir_arg=true;;
+
+    -g) chgrpcmd="$chgrpprog $2"
+	shift;;
 
-	-t=*) transformarg=`echo $1 | sed 's/-t=//'`
-	    shift
-	    continue;;
+    --help) echo "$usage"; exit $?;;
 
-	-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
-	    shift
-	    continue;;
+    -m) mode=$2
+	case $mode in
+	  *' '* | *'	'* | *'
+'*	  | *'*'* | *'?'* | *'['*)
+	    echo "$0: invalid mode: $mode" >&2
+	    exit 1;;
+	esac
+	shift;;
+
+    -o) chowncmd="$chownprog $2"
+	shift;;
+
+    -s) stripcmd=$stripprog;;
 
-	*)  if [ x"$src" = x ]
-	    then
-		src=$1
-	    else
-		# this colon is to work around a 386BSD /bin/sh bug
-		:
-		dst=$1
-	    fi
-	    shift
-	    continue;;
-    esac
+    -t) dst_arg=$2
+	shift;;
+
+    -T) no_target_directory=true;;
+
+    --version) echo "$0 $scriptversion"; exit $?;;
+
+    --)	shift
+	break;;
+
+    -*)	echo "$0: invalid option: $1" >&2
+	exit 1;;
+
+    *)  break;;
+  esac
+  shift
 done
 
-if [ x"$src" = x ]
-then
-	echo "install:	no input file specified"
-	exit 1
-else
-	:
+if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
+  # When -d is used, all remaining arguments are directories to create.
+  # When -t is used, the destination is already specified.
+  # Otherwise, the last argument is the destination.  Remove it from $@.
+  for arg
+  do
+    if test -n "$dst_arg"; then
+      # $@ is not empty: it contains at least $arg.
+      set fnord "$@" "$dst_arg"
+      shift # fnord
+    fi
+    shift # arg
+    dst_arg=$arg
+  done
+fi
+
+if test $# -eq 0; then
+  if test -z "$dir_arg"; then
+    echo "$0: no input file specified." >&2
+    exit 1
+  fi
+  # It's OK to call `install-sh -d' without argument.
+  # This can happen when creating conditional directories.
+  exit 0
+fi
+
+if test -z "$dir_arg"; then
+  trap '(exit $?); exit' 1 2 13 15
+
+  # Set umask so as not to create temps with too-generous modes.
+  # However, 'strip' requires both read and write access to temps.
+  case $mode in
+    # Optimize common cases.
+    *644) cp_umask=133;;
+    *755) cp_umask=22;;
+
+    *[0-7])
+      if test -z "$stripcmd"; then
+	u_plus_rw=
+      else
+	u_plus_rw='% 200'
+      fi
+      cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
+    *)
+      if test -z "$stripcmd"; then
+	u_plus_rw=
+      else
+	u_plus_rw=,u+rw
+      fi
+      cp_umask=$mode$u_plus_rw;;
+  esac
 fi
 
-if [ x"$dir_arg" != x ]; then
-	dst=$src
-	src=""
-	
-	if [ -d $dst ]; then
-		instcmd=:
-		chmodcmd=""
-	else
-		instcmd=$mkdirprog
-	fi
-else
+for src
+do
+  # Protect names starting with `-'.
+  case $src in
+    -*) src=./$src;;
+  esac
+
+  if test -n "$dir_arg"; then
+    dst=$src
+    dstdir=$dst
+    test -d "$dstdir"
+    dstdir_status=$?
+  else
+
+    # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
+    # might cause directories to be created, which would be especially bad
+    # if $src (and thus $dsttmp) contains '*'.
+    if test ! -f "$src" && test ! -d "$src"; then
+      echo "$0: $src does not exist." >&2
+      exit 1
+    fi
+
+    if test -z "$dst_arg"; then
+      echo "$0: no destination specified." >&2
+      exit 1
+    fi
+
+    dst=$dst_arg
+    # Protect names starting with `-'.
+    case $dst in
+      -*) dst=./$dst;;
+    esac
 
-# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
-# might cause directories to be created, which would be especially bad 
-# if $src (and thus $dsttmp) contains '*'.
+    # If destination is a directory, append the input filename; won't work
+    # if double slashes aren't ignored.
+    if test -d "$dst"; then
+      if test -n "$no_target_directory"; then
+	echo "$0: $dst_arg: Is a directory" >&2
+	exit 1
+      fi
+      dstdir=$dst
+      dst=$dstdir/`basename "$src"`
+      dstdir_status=0
+    else
+      # Prefer dirname, but fall back on a substitute if dirname fails.
+      dstdir=`
+	(dirname "$dst") 2>/dev/null ||
+	expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	     X"$dst" : 'X\(//\)[^/]' \| \
+	     X"$dst" : 'X\(//\)$' \| \
+	     X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
+	echo X"$dst" |
+	    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+		   s//\1/
+		   q
+		 }
+		 /^X\(\/\/\)[^/].*/{
+		   s//\1/
+		   q
+		 }
+		 /^X\(\/\/\)$/{
+		   s//\1/
+		   q
+		 }
+		 /^X\(\/\).*/{
+		   s//\1/
+		   q
+		 }
+		 s/.*/./; q'
+      `
 
-	if [ -f "$src" ] || [ -d "$src" ]
-	then
-		:
+      test -d "$dstdir"
+      dstdir_status=$?
+    fi
+  fi
+
+  obsolete_mkdir_used=false
+
+  if test $dstdir_status != 0; then
+    case $posix_mkdir in
+      '')
+	# Create intermediate dirs using mode 755 as modified by the umask.
+	# This is like FreeBSD 'install' as of 1997-10-28.
+	umask=`umask`
+	case $stripcmd.$umask in
+	  # Optimize common cases.
+	  *[2367][2367]) mkdir_umask=$umask;;
+	  .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
+
+	  *[0-7])
+	    mkdir_umask=`expr $umask + 22 \
+	      - $umask % 100 % 40 + $umask % 20 \
+	      - $umask % 10 % 4 + $umask % 2
+	    `;;
+	  *) mkdir_umask=$umask,go-w;;
+	esac
+
+	# With -d, create the new directory with the user-specified mode.
+	# Otherwise, rely on $mkdir_umask.
+	if test -n "$dir_arg"; then
+	  mkdir_mode=-m$mode
 	else
-		echo "install:  $src does not exist"
-		exit 1
-	fi
-	
-	if [ x"$dst" = x ]
-	then
-		echo "install:	no destination specified"
-		exit 1
-	else
-		:
+	  mkdir_mode=
 	fi
 
-# If destination is a directory, append the input filename; if your system
-# does not like double slashes in filenames, you may need to add some logic
-
-	if [ -d $dst ]
-	then
-		dst="$dst"/`basename $src`
-	else
-		:
-	fi
-fi
-
-## this sed command emulates the dirname command
-dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
-
-# Make sure that the destination directory exists.
-#  this part is taken from Noah Friedman's mkinstalldirs script
-
-# Skip lots of stat calls in the usual case.
-if [ ! -d "$dstdir" ]; then
-defaultIFS='
-	'
-IFS="${IFS-${defaultIFS}}"
+	posix_mkdir=false
+	case $umask in
+	  *[123567][0-7][0-7])
+	    # POSIX mkdir -p sets u+wx bits regardless of umask, which
+	    # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
+	    ;;
+	  *)
+	    tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+	    trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
 
-oIFS="${IFS}"
-# Some sh's can't handle IFS=/ for some reason.
-IFS='%'
-set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
-IFS="${oIFS}"
-
-pathcomp=''
-
-while [ $# -ne 0 ] ; do
-	pathcomp="${pathcomp}${1}"
-	shift
+	    if (umask $mkdir_umask &&
+		exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
+	    then
+	      if test -z "$dir_arg" || {
+		   # Check for POSIX incompatibilities with -m.
+		   # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+		   # other-writeable bit of parent directory when it shouldn't.
+		   # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+		   ls_ld_tmpdir=`ls -ld "$tmpdir"`
+		   case $ls_ld_tmpdir in
+		     d????-?r-*) different_mode=700;;
+		     d????-?--*) different_mode=755;;
+		     *) false;;
+		   esac &&
+		   $mkdirprog -m$different_mode -p -- "$tmpdir" && {
+		     ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
+		     test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+		   }
+		 }
+	      then posix_mkdir=:
+	      fi
+	      rmdir "$tmpdir/d" "$tmpdir"
+	    else
+	      # Remove any dirs left behind by ancient mkdir implementations.
+	      rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
+	    fi
+	    trap '' 0;;
+	esac;;
+    esac
 
-	if [ ! -d "${pathcomp}" ] ;
-        then
-		$mkdirprog "${pathcomp}"
-	else
-		:
-	fi
+    if
+      $posix_mkdir && (
+	umask $mkdir_umask &&
+	$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+      )
+    then :
+    else
+
+      # The umask is ridiculous, or mkdir does not conform to POSIX,
+      # or it failed possibly due to a race condition.  Create the
+      # directory the slow way, step by step, checking for races as we go.
 
-	pathcomp="${pathcomp}/"
-done
-fi
+      case $dstdir in
+	/*) prefix='/';;
+	-*) prefix='./';;
+	*)  prefix='';;
+      esac
+
+      eval "$initialize_posix_glob"
 
-if [ x"$dir_arg" != x ]
-then
-	$doit $instcmd $dst &&
+      oIFS=$IFS
+      IFS=/
+      $posix_glob set -f
+      set fnord $dstdir
+      shift
+      $posix_glob set +f
+      IFS=$oIFS
+
+      prefixes=
+
+      for d
+      do
+	test -z "$d" && continue
 
-	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else : ; fi &&
-	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else : ; fi &&
-	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else : ; fi &&
-	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else : ; fi
-else
-
-# If we're going to rename the final executable, determine the name now.
-
-	if [ x"$transformarg" = x ] 
-	then
-		dstfile=`basename $dst`
+	prefix=$prefix$d
+	if test -d "$prefix"; then
+	  prefixes=
 	else
-		dstfile=`basename $dst $transformbasename | 
-			sed $transformarg`$transformbasename
+	  if $posix_mkdir; then
+	    (umask=$mkdir_umask &&
+	     $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+	    # Don't fail if two instances are running concurrently.
+	    test -d "$prefix" || exit 1
+	  else
+	    case $prefix in
+	      *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+	      *) qprefix=$prefix;;
+	    esac
+	    prefixes="$prefixes '$qprefix'"
+	  fi
 	fi
-
-# don't allow the sed command to completely eliminate the filename
+	prefix=$prefix/
+      done
 
-	if [ x"$dstfile" = x ] 
-	then
-		dstfile=`basename $dst`
-	else
-		:
-	fi
+      if test -n "$prefixes"; then
+	# Don't fail if two instances are running concurrently.
+	(umask $mkdir_umask &&
+	 eval "\$doit_exec \$mkdirprog $prefixes") ||
+	  test -d "$dstdir" || exit 1
+	obsolete_mkdir_used=true
+      fi
+    fi
+  fi
 
-# Make a temp file name in the proper directory.
+  if test -n "$dir_arg"; then
+    { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
+    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
+    { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
+      test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
+  else
+
+    # Make a couple of temp file names in the proper directory.
+    dsttmp=$dstdir/_inst.$$_
+    rmtmp=$dstdir/_rm.$$_
+
+    # Trap to clean up those temp files at exit.
+    trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
+
+    # Copy the file name to the temp name.
+    (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
 
-	dsttmp=$dstdir/#inst.$$#
-
-# Move or copy the file name to the temp name
-
-	$doit $instcmd $src $dsttmp &&
+    # and set any options; do chmod last to preserve setuid bits.
+    #
+    # If any of these fail, we abort the whole thing.  If we want to
+    # ignore errors from any of these, just make sure not to ignore
+    # errors from the above "$doit $cpprog $src $dsttmp" command.
+    #
+    { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
+    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
+    { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
+    { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
 
-	trap "rm -f ${dsttmp}" 0 &&
-
-# and set any options; do chmod last to preserve setuid bits
+    # If -C, don't bother to copy if it wouldn't change the file.
+    if $copy_on_change &&
+       old=`LC_ALL=C ls -dlL "$dst"	2>/dev/null` &&
+       new=`LC_ALL=C ls -dlL "$dsttmp"	2>/dev/null` &&
 
-# If any of these fail, we abort the whole thing.  If we want to
-# ignore errors from any of these, just make sure not to ignore
-# errors from the above "$doit $instcmd $src $dsttmp" command.
+       eval "$initialize_posix_glob" &&
+       $posix_glob set -f &&
+       set X $old && old=:$2:$4:$5:$6 &&
+       set X $new && new=:$2:$4:$5:$6 &&
+       $posix_glob set +f &&
+
+       test "$old" = "$new" &&
+       $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
+    then
+      rm -f "$dsttmp"
+    else
+      # Rename the file to the real destination.
+      $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
 
-	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else :;fi &&
-	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else :;fi &&
-	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else :;fi &&
-	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else :;fi &&
-
-# Now rename the file to the real destination.
+      # The rename failed, perhaps because mv can't rename something else
+      # to itself, or perhaps because mv is so ancient that it does not
+      # support -f.
+      {
+	# Now remove or move aside any old file at destination location.
+	# We try this two ways since rm can't unlink itself on some
+	# systems and the destination file might be busy for other
+	# reasons.  In this case, the final cleanup might fail but the new
+	# file should still install successfully.
+	{
+	  test ! -f "$dst" ||
+	  $doit $rmcmd -f "$dst" 2>/dev/null ||
+	  { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+	    { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+	  } ||
+	  { echo "$0: cannot unlink or rename $dst" >&2
+	    (exit 1); exit 1
+	  }
+	} &&
 
-	$doit $rmcmd -f $dstdir/$dstfile &&
-	$doit $mvcmd $dsttmp $dstdir/$dstfile 
+	# Now rename the file to the real destination.
+	$doit $mvcmd "$dsttmp" "$dst"
+      }
+    fi || exit 1
 
-fi &&
+    trap '' 0
+  fi
+done
 
-
-exit 0
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
--- a/modules/postgresql/install-sh	Sun May 11 11:20:24 2008 +0200
+++ b/modules/postgresql/install-sh	Sun May 11 11:24:01 2008 +0200
@@ -1,251 +1,519 @@
 #!/bin/sh
-#
 # install - install a program, script, or datafile
-# This comes from X11R5 (mit/util/scripts/install.sh).
+
+scriptversion=2006-12-25.00
+
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
 #
-# Copyright 1991 by the Massachusetts Institute of Technology
+# Copyright (C) 1994 X Consortium
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
 #
-# Permission to use, copy, modify, distribute, and sell this software and its
-# documentation for any purpose is hereby granted without fee, provided that
-# the above copyright notice appear in all copies and that both that
-# copyright notice and this permission notice appear in supporting
-# documentation, and that the name of M.I.T. not be used in advertising or
-# publicity pertaining to distribution of the software without specific,
-# written prior permission.  M.I.T. makes no representations about the
-# suitability of this software for any purpose.  It is provided "as is"
-# without express or implied warranty.
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
+#
+#
+# FSF changes to this file are in the public domain.
 #
 # Calling this script install-sh is preferred over install.sh, to prevent
 # `make' implicit rules from creating a file called install from it
 # when there is no Makefile.
 #
 # This script is compatible with the BSD install script, but was written
-# from scratch.  It can only install one file at a time, a restriction
-# shared with many OS's install programs.
+# from scratch.
 
+nl='
+'
+IFS=" ""	$nl"
 
 # set DOITPROG to echo to test this script
 
 # Don't use :- since 4.3BSD and earlier shells don't like it.
-doit="${DOITPROG-}"
+doit=${DOITPROG-}
+if test -z "$doit"; then
+  doit_exec=exec
+else
+  doit_exec=$doit
+fi
 
-
-# put in absolute paths if you don't have them in your path; or use env. vars.
+# Put in absolute file names if you don't have them in your path;
+# or use environment vars.
 
-mvprog="${MVPROG-mv}"
-cpprog="${CPPROG-cp}"
-chmodprog="${CHMODPROG-chmod}"
-chownprog="${CHOWNPROG-chown}"
-chgrpprog="${CHGRPPROG-chgrp}"
-stripprog="${STRIPPROG-strip}"
-rmprog="${RMPROG-rm}"
-mkdirprog="${MKDIRPROG-mkdir}"
+chgrpprog=${CHGRPPROG-chgrp}
+chmodprog=${CHMODPROG-chmod}
+chownprog=${CHOWNPROG-chown}
+cmpprog=${CMPPROG-cmp}
+cpprog=${CPPROG-cp}
+mkdirprog=${MKDIRPROG-mkdir}
+mvprog=${MVPROG-mv}
+rmprog=${RMPROG-rm}
+stripprog=${STRIPPROG-strip}
 
-transformbasename=""
-transform_arg=""
-instcmd="$mvprog"
-chmodcmd="$chmodprog 0755"
-chowncmd=""
-chgrpcmd=""
-stripcmd=""
+posix_glob='?'
+initialize_posix_glob='
+  test "$posix_glob" != "?" || {
+    if (set -f) 2>/dev/null; then
+      posix_glob=
+    else
+      posix_glob=:
+    fi
+  }
+'
+
+posix_mkdir=
+
+# Desired mode of installed file.
+mode=0755
+
+chgrpcmd=
+chmodcmd=$chmodprog
+chowncmd=
+mvcmd=$mvprog
 rmcmd="$rmprog -f"
-mvcmd="$mvprog"
-src=""
-dst=""
-dir_arg=""
+stripcmd=
+
+src=
+dst=
+dir_arg=
+dst_arg=
+
+copy_on_change=false
+no_target_directory=
 
-while [ x"$1" != x ]; do
-    case $1 in
-	-c) instcmd="$cpprog"
-	    shift
-	    continue;;
+usage="\
+Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+   or: $0 [OPTION]... SRCFILES... DIRECTORY
+   or: $0 [OPTION]... -t DIRECTORY SRCFILES...
+   or: $0 [OPTION]... -d DIRECTORIES...
 
-	-d) dir_arg=true
-	    shift
-	    continue;;
+In the 1st form, copy SRCFILE to DSTFILE.
+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
+In the 4th, create DIRECTORIES.
 
-	-m) chmodcmd="$chmodprog $2"
-	    shift
-	    shift
-	    continue;;
+Options:
+     --help     display this help and exit.
+     --version  display version info and exit.
+
+  -c            (ignored)
+  -C            install only if different (preserve the last data modification time)
+  -d            create directories instead of installing files.
+  -g GROUP      $chgrpprog installed files to GROUP.
+  -m MODE       $chmodprog installed files to MODE.
+  -o USER       $chownprog installed files to USER.
+  -s            $stripprog installed files.
+  -t DIRECTORY  install into DIRECTORY.
+  -T            report an error if DSTFILE is a directory.
 
-	-o) chowncmd="$chownprog $2"
-	    shift
-	    shift
-	    continue;;
+Environment variables override the default commands:
+  CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
+  RMPROG STRIPPROG
+"
 
-	-g) chgrpcmd="$chgrpprog $2"
-	    shift
-	    shift
-	    continue;;
+while test $# -ne 0; do
+  case $1 in
+    -c) ;;
 
-	-s) stripcmd="$stripprog"
-	    shift
-	    continue;;
+    -C) copy_on_change=true;;
+
+    -d) dir_arg=true;;
+
+    -g) chgrpcmd="$chgrpprog $2"
+	shift;;
 
-	-t=*) transformarg=`echo $1 | sed 's/-t=//'`
-	    shift
-	    continue;;
+    --help) echo "$usage"; exit $?;;
 
-	-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
-	    shift
-	    continue;;
+    -m) mode=$2
+	case $mode in
+	  *' '* | *'	'* | *'
+'*	  | *'*'* | *'?'* | *'['*)
+	    echo "$0: invalid mode: $mode" >&2
+	    exit 1;;
+	esac
+	shift;;
+
+    -o) chowncmd="$chownprog $2"
+	shift;;
+
+    -s) stripcmd=$stripprog;;
 
-	*)  if [ x"$src" = x ]
-	    then
-		src=$1
-	    else
-		# this colon is to work around a 386BSD /bin/sh bug
-		:
-		dst=$1
-	    fi
-	    shift
-	    continue;;
-    esac
+    -t) dst_arg=$2
+	shift;;
+
+    -T) no_target_directory=true;;
+
+    --version) echo "$0 $scriptversion"; exit $?;;
+
+    --)	shift
+	break;;
+
+    -*)	echo "$0: invalid option: $1" >&2
+	exit 1;;
+
+    *)  break;;
+  esac
+  shift
 done
 
-if [ x"$src" = x ]
-then
-	echo "install:	no input file specified"
-	exit 1
-else
-	:
+if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
+  # When -d is used, all remaining arguments are directories to create.
+  # When -t is used, the destination is already specified.
+  # Otherwise, the last argument is the destination.  Remove it from $@.
+  for arg
+  do
+    if test -n "$dst_arg"; then
+      # $@ is not empty: it contains at least $arg.
+      set fnord "$@" "$dst_arg"
+      shift # fnord
+    fi
+    shift # arg
+    dst_arg=$arg
+  done
+fi
+
+if test $# -eq 0; then
+  if test -z "$dir_arg"; then
+    echo "$0: no input file specified." >&2
+    exit 1
+  fi
+  # It's OK to call `install-sh -d' without argument.
+  # This can happen when creating conditional directories.
+  exit 0
+fi
+
+if test -z "$dir_arg"; then
+  trap '(exit $?); exit' 1 2 13 15
+
+  # Set umask so as not to create temps with too-generous modes.
+  # However, 'strip' requires both read and write access to temps.
+  case $mode in
+    # Optimize common cases.
+    *644) cp_umask=133;;
+    *755) cp_umask=22;;
+
+    *[0-7])
+      if test -z "$stripcmd"; then
+	u_plus_rw=
+      else
+	u_plus_rw='% 200'
+      fi
+      cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
+    *)
+      if test -z "$stripcmd"; then
+	u_plus_rw=
+      else
+	u_plus_rw=,u+rw
+      fi
+      cp_umask=$mode$u_plus_rw;;
+  esac
 fi
 
-if [ x"$dir_arg" != x ]; then
-	dst=$src
-	src=""
-	
-	if [ -d $dst ]; then
-		instcmd=:
-		chmodcmd=""
-	else
-		instcmd=$mkdirprog
-	fi
-else
+for src
+do
+  # Protect names starting with `-'.
+  case $src in
+    -*) src=./$src;;
+  esac
+
+  if test -n "$dir_arg"; then
+    dst=$src
+    dstdir=$dst
+    test -d "$dstdir"
+    dstdir_status=$?
+  else
+
+    # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
+    # might cause directories to be created, which would be especially bad
+    # if $src (and thus $dsttmp) contains '*'.
+    if test ! -f "$src" && test ! -d "$src"; then
+      echo "$0: $src does not exist." >&2
+      exit 1
+    fi
+
+    if test -z "$dst_arg"; then
+      echo "$0: no destination specified." >&2
+      exit 1
+    fi
+
+    dst=$dst_arg
+    # Protect names starting with `-'.
+    case $dst in
+      -*) dst=./$dst;;
+    esac
 
-# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
-# might cause directories to be created, which would be especially bad 
-# if $src (and thus $dsttmp) contains '*'.
+    # If destination is a directory, append the input filename; won't work
+    # if double slashes aren't ignored.
+    if test -d "$dst"; then
+      if test -n "$no_target_directory"; then
+	echo "$0: $dst_arg: Is a directory" >&2
+	exit 1
+      fi
+      dstdir=$dst
+      dst=$dstdir/`basename "$src"`
+      dstdir_status=0
+    else
+      # Prefer dirname, but fall back on a substitute if dirname fails.
+      dstdir=`
+	(dirname "$dst") 2>/dev/null ||
+	expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	     X"$dst" : 'X\(//\)[^/]' \| \
+	     X"$dst" : 'X\(//\)$' \| \
+	     X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
+	echo X"$dst" |
+	    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+		   s//\1/
+		   q
+		 }
+		 /^X\(\/\/\)[^/].*/{
+		   s//\1/
+		   q
+		 }
+		 /^X\(\/\/\)$/{
+		   s//\1/
+		   q
+		 }
+		 /^X\(\/\).*/{
+		   s//\1/
+		   q
+		 }
+		 s/.*/./; q'
+      `
 
-	if [ -f "$src" ] || [ -d "$src" ]
-	then
-		:
+      test -d "$dstdir"
+      dstdir_status=$?
+    fi
+  fi
+
+  obsolete_mkdir_used=false
+
+  if test $dstdir_status != 0; then
+    case $posix_mkdir in
+      '')
+	# Create intermediate dirs using mode 755 as modified by the umask.
+	# This is like FreeBSD 'install' as of 1997-10-28.
+	umask=`umask`
+	case $stripcmd.$umask in
+	  # Optimize common cases.
+	  *[2367][2367]) mkdir_umask=$umask;;
+	  .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
+
+	  *[0-7])
+	    mkdir_umask=`expr $umask + 22 \
+	      - $umask % 100 % 40 + $umask % 20 \
+	      - $umask % 10 % 4 + $umask % 2
+	    `;;
+	  *) mkdir_umask=$umask,go-w;;
+	esac
+
+	# With -d, create the new directory with the user-specified mode.
+	# Otherwise, rely on $mkdir_umask.
+	if test -n "$dir_arg"; then
+	  mkdir_mode=-m$mode
 	else
-		echo "install:  $src does not exist"
-		exit 1
-	fi
-	
-	if [ x"$dst" = x ]
-	then
-		echo "install:	no destination specified"
-		exit 1
-	else
-		:
+	  mkdir_mode=
 	fi
 
-# If destination is a directory, append the input filename; if your system
-# does not like double slashes in filenames, you may need to add some logic
-
-	if [ -d $dst ]
-	then
-		dst="$dst"/`basename $src`
-	else
-		:
-	fi
-fi
-
-## this sed command emulates the dirname command
-dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
-
-# Make sure that the destination directory exists.
-#  this part is taken from Noah Friedman's mkinstalldirs script
-
-# Skip lots of stat calls in the usual case.
-if [ ! -d "$dstdir" ]; then
-defaultIFS='
-	'
-IFS="${IFS-${defaultIFS}}"
+	posix_mkdir=false
+	case $umask in
+	  *[123567][0-7][0-7])
+	    # POSIX mkdir -p sets u+wx bits regardless of umask, which
+	    # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
+	    ;;
+	  *)
+	    tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+	    trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
 
-oIFS="${IFS}"
-# Some sh's can't handle IFS=/ for some reason.
-IFS='%'
-set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
-IFS="${oIFS}"
-
-pathcomp=''
-
-while [ $# -ne 0 ] ; do
-	pathcomp="${pathcomp}${1}"
-	shift
+	    if (umask $mkdir_umask &&
+		exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
+	    then
+	      if test -z "$dir_arg" || {
+		   # Check for POSIX incompatibilities with -m.
+		   # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+		   # other-writeable bit of parent directory when it shouldn't.
+		   # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+		   ls_ld_tmpdir=`ls -ld "$tmpdir"`
+		   case $ls_ld_tmpdir in
+		     d????-?r-*) different_mode=700;;
+		     d????-?--*) different_mode=755;;
+		     *) false;;
+		   esac &&
+		   $mkdirprog -m$different_mode -p -- "$tmpdir" && {
+		     ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
+		     test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+		   }
+		 }
+	      then posix_mkdir=:
+	      fi
+	      rmdir "$tmpdir/d" "$tmpdir"
+	    else
+	      # Remove any dirs left behind by ancient mkdir implementations.
+	      rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
+	    fi
+	    trap '' 0;;
+	esac;;
+    esac
 
-	if [ ! -d "${pathcomp}" ] ;
-        then
-		$mkdirprog "${pathcomp}"
-	else
-		:
-	fi
+    if
+      $posix_mkdir && (
+	umask $mkdir_umask &&
+	$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+      )
+    then :
+    else
+
+      # The umask is ridiculous, or mkdir does not conform to POSIX,
+      # or it failed possibly due to a race condition.  Create the
+      # directory the slow way, step by step, checking for races as we go.
 
-	pathcomp="${pathcomp}/"
-done
-fi
+      case $dstdir in
+	/*) prefix='/';;
+	-*) prefix='./';;
+	*)  prefix='';;
+      esac
+
+      eval "$initialize_posix_glob"
 
-if [ x"$dir_arg" != x ]
-then
-	$doit $instcmd $dst &&
+      oIFS=$IFS
+      IFS=/
+      $posix_glob set -f
+      set fnord $dstdir
+      shift
+      $posix_glob set +f
+      IFS=$oIFS
+
+      prefixes=
+
+      for d
+      do
+	test -z "$d" && continue
 
-	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else : ; fi &&
-	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else : ; fi &&
-	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else : ; fi &&
-	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else : ; fi
-else
-
-# If we're going to rename the final executable, determine the name now.
-
-	if [ x"$transformarg" = x ] 
-	then
-		dstfile=`basename $dst`
+	prefix=$prefix$d
+	if test -d "$prefix"; then
+	  prefixes=
 	else
-		dstfile=`basename $dst $transformbasename | 
-			sed $transformarg`$transformbasename
+	  if $posix_mkdir; then
+	    (umask=$mkdir_umask &&
+	     $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+	    # Don't fail if two instances are running concurrently.
+	    test -d "$prefix" || exit 1
+	  else
+	    case $prefix in
+	      *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+	      *) qprefix=$prefix;;
+	    esac
+	    prefixes="$prefixes '$qprefix'"
+	  fi
 	fi
-
-# don't allow the sed command to completely eliminate the filename
+	prefix=$prefix/
+      done
 
-	if [ x"$dstfile" = x ] 
-	then
-		dstfile=`basename $dst`
-	else
-		:
-	fi
+      if test -n "$prefixes"; then
+	# Don't fail if two instances are running concurrently.
+	(umask $mkdir_umask &&
+	 eval "\$doit_exec \$mkdirprog $prefixes") ||
+	  test -d "$dstdir" || exit 1
+	obsolete_mkdir_used=true
+      fi
+    fi
+  fi
 
-# Make a temp file name in the proper directory.
+  if test -n "$dir_arg"; then
+    { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
+    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
+    { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
+      test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
+  else
+
+    # Make a couple of temp file names in the proper directory.
+    dsttmp=$dstdir/_inst.$$_
+    rmtmp=$dstdir/_rm.$$_
+
+    # Trap to clean up those temp files at exit.
+    trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
+
+    # Copy the file name to the temp name.
+    (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
 
-	dsttmp=$dstdir/#inst.$$#
-
-# Move or copy the file name to the temp name
-
-	$doit $instcmd $src $dsttmp &&
+    # and set any options; do chmod last to preserve setuid bits.
+    #
+    # If any of these fail, we abort the whole thing.  If we want to
+    # ignore errors from any of these, just make sure not to ignore
+    # errors from the above "$doit $cpprog $src $dsttmp" command.
+    #
+    { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
+    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
+    { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
+    { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
 
-	trap "rm -f ${dsttmp}" 0 &&
-
-# and set any options; do chmod last to preserve setuid bits
+    # If -C, don't bother to copy if it wouldn't change the file.
+    if $copy_on_change &&
+       old=`LC_ALL=C ls -dlL "$dst"	2>/dev/null` &&
+       new=`LC_ALL=C ls -dlL "$dsttmp"	2>/dev/null` &&
 
-# If any of these fail, we abort the whole thing.  If we want to
-# ignore errors from any of these, just make sure not to ignore
-# errors from the above "$doit $instcmd $src $dsttmp" command.
+       eval "$initialize_posix_glob" &&
+       $posix_glob set -f &&
+       set X $old && old=:$2:$4:$5:$6 &&
+       set X $new && new=:$2:$4:$5:$6 &&
+       $posix_glob set +f &&
+
+       test "$old" = "$new" &&
+       $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
+    then
+      rm -f "$dsttmp"
+    else
+      # Rename the file to the real destination.
+      $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
 
-	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else :;fi &&
-	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else :;fi &&
-	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else :;fi &&
-	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else :;fi &&
-
-# Now rename the file to the real destination.
+      # The rename failed, perhaps because mv can't rename something else
+      # to itself, or perhaps because mv is so ancient that it does not
+      # support -f.
+      {
+	# Now remove or move aside any old file at destination location.
+	# We try this two ways since rm can't unlink itself on some
+	# systems and the destination file might be busy for other
+	# reasons.  In this case, the final cleanup might fail but the new
+	# file should still install successfully.
+	{
+	  test ! -f "$dst" ||
+	  $doit $rmcmd -f "$dst" 2>/dev/null ||
+	  { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+	    { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+	  } ||
+	  { echo "$0: cannot unlink or rename $dst" >&2
+	    (exit 1); exit 1
+	  }
+	} &&
 
-	$doit $rmcmd -f $dstdir/$dstfile &&
-	$doit $mvcmd $dsttmp $dstdir/$dstfile 
+	# Now rename the file to the real destination.
+	$doit $mvcmd "$dsttmp" "$dst"
+      }
+    fi || exit 1
 
-fi &&
+    trap '' 0
+  fi
+done
 
-
-exit 0
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
--- a/modules/sample/external/install-sh	Sun May 11 11:20:24 2008 +0200
+++ b/modules/sample/external/install-sh	Sun May 11 11:24:01 2008 +0200
@@ -1,251 +1,519 @@
 #!/bin/sh
-#
 # install - install a program, script, or datafile
-# This comes from X11R5 (mit/util/scripts/install.sh).
+
+scriptversion=2006-12-25.00
+
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
 #
-# Copyright 1991 by the Massachusetts Institute of Technology
+# Copyright (C) 1994 X Consortium
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
 #
-# Permission to use, copy, modify, distribute, and sell this software and its
-# documentation for any purpose is hereby granted without fee, provided that
-# the above copyright notice appear in all copies and that both that
-# copyright notice and this permission notice appear in supporting
-# documentation, and that the name of M.I.T. not be used in advertising or
-# publicity pertaining to distribution of the software without specific,
-# written prior permission.  M.I.T. makes no representations about the
-# suitability of this software for any purpose.  It is provided "as is"
-# without express or implied warranty.
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
+#
+#
+# FSF changes to this file are in the public domain.
 #
 # Calling this script install-sh is preferred over install.sh, to prevent
 # `make' implicit rules from creating a file called install from it
 # when there is no Makefile.
 #
 # This script is compatible with the BSD install script, but was written
-# from scratch.  It can only install one file at a time, a restriction
-# shared with many OS's install programs.
+# from scratch.
 
+nl='
+'
+IFS=" ""	$nl"
 
 # set DOITPROG to echo to test this script
 
 # Don't use :- since 4.3BSD and earlier shells don't like it.
-doit="${DOITPROG-}"
+doit=${DOITPROG-}
+if test -z "$doit"; then
+  doit_exec=exec
+else
+  doit_exec=$doit
+fi
 
-
-# put in absolute paths if you don't have them in your path; or use env. vars.
+# Put in absolute file names if you don't have them in your path;
+# or use environment vars.
 
-mvprog="${MVPROG-mv}"
-cpprog="${CPPROG-cp}"
-chmodprog="${CHMODPROG-chmod}"
-chownprog="${CHOWNPROG-chown}"
-chgrpprog="${CHGRPPROG-chgrp}"
-stripprog="${STRIPPROG-strip}"
-rmprog="${RMPROG-rm}"
-mkdirprog="${MKDIRPROG-mkdir}"
+chgrpprog=${CHGRPPROG-chgrp}
+chmodprog=${CHMODPROG-chmod}
+chownprog=${CHOWNPROG-chown}
+cmpprog=${CMPPROG-cmp}
+cpprog=${CPPROG-cp}
+mkdirprog=${MKDIRPROG-mkdir}
+mvprog=${MVPROG-mv}
+rmprog=${RMPROG-rm}
+stripprog=${STRIPPROG-strip}
 
-transformbasename=""
-transform_arg=""
-instcmd="$mvprog"
-chmodcmd="$chmodprog 0755"
-chowncmd=""
-chgrpcmd=""
-stripcmd=""
+posix_glob='?'
+initialize_posix_glob='
+  test "$posix_glob" != "?" || {
+    if (set -f) 2>/dev/null; then
+      posix_glob=
+    else
+      posix_glob=:
+    fi
+  }
+'
+
+posix_mkdir=
+
+# Desired mode of installed file.
+mode=0755
+
+chgrpcmd=
+chmodcmd=$chmodprog
+chowncmd=
+mvcmd=$mvprog
 rmcmd="$rmprog -f"
-mvcmd="$mvprog"
-src=""
-dst=""
-dir_arg=""
+stripcmd=
+
+src=
+dst=
+dir_arg=
+dst_arg=
+
+copy_on_change=false
+no_target_directory=
 
-while [ x"$1" != x ]; do
-    case $1 in
-	-c) instcmd="$cpprog"
-	    shift
-	    continue;;
+usage="\
+Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+   or: $0 [OPTION]... SRCFILES... DIRECTORY
+   or: $0 [OPTION]... -t DIRECTORY SRCFILES...
+   or: $0 [OPTION]... -d DIRECTORIES...
 
-	-d) dir_arg=true
-	    shift
-	    continue;;
+In the 1st form, copy SRCFILE to DSTFILE.
+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
+In the 4th, create DIRECTORIES.
 
-	-m) chmodcmd="$chmodprog $2"
-	    shift
-	    shift
-	    continue;;
+Options:
+     --help     display this help and exit.
+     --version  display version info and exit.
+
+  -c            (ignored)
+  -C            install only if different (preserve the last data modification time)
+  -d            create directories instead of installing files.
+  -g GROUP      $chgrpprog installed files to GROUP.
+  -m MODE       $chmodprog installed files to MODE.
+  -o USER       $chownprog installed files to USER.
+  -s            $stripprog installed files.
+  -t DIRECTORY  install into DIRECTORY.
+  -T            report an error if DSTFILE is a directory.
 
-	-o) chowncmd="$chownprog $2"
-	    shift
-	    shift
-	    continue;;
+Environment variables override the default commands:
+  CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
+  RMPROG STRIPPROG
+"
 
-	-g) chgrpcmd="$chgrpprog $2"
-	    shift
-	    shift
-	    continue;;
+while test $# -ne 0; do
+  case $1 in
+    -c) ;;
 
-	-s) stripcmd="$stripprog"
-	    shift
-	    continue;;
+    -C) copy_on_change=true;;
+
+    -d) dir_arg=true;;
+
+    -g) chgrpcmd="$chgrpprog $2"
+	shift;;
 
-	-t=*) transformarg=`echo $1 | sed 's/-t=//'`
-	    shift
-	    continue;;
+    --help) echo "$usage"; exit $?;;
 
-	-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
-	    shift
-	    continue;;
+    -m) mode=$2
+	case $mode in
+	  *' '* | *'	'* | *'
+'*	  | *'*'* | *'?'* | *'['*)
+	    echo "$0: invalid mode: $mode" >&2
+	    exit 1;;
+	esac
+	shift;;
+
+    -o) chowncmd="$chownprog $2"
+	shift;;
+
+    -s) stripcmd=$stripprog;;
 
-	*)  if [ x"$src" = x ]
-	    then
-		src=$1
-	    else
-		# this colon is to work around a 386BSD /bin/sh bug
-		:
-		dst=$1
-	    fi
-	    shift
-	    continue;;
-    esac
+    -t) dst_arg=$2
+	shift;;
+
+    -T) no_target_directory=true;;
+
+    --version) echo "$0 $scriptversion"; exit $?;;
+
+    --)	shift
+	break;;
+
+    -*)	echo "$0: invalid option: $1" >&2
+	exit 1;;
+
+    *)  break;;
+  esac
+  shift
 done
 
-if [ x"$src" = x ]
-then
-	echo "install:	no input file specified"
-	exit 1
-else
-	:
+if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
+  # When -d is used, all remaining arguments are directories to create.
+  # When -t is used, the destination is already specified.
+  # Otherwise, the last argument is the destination.  Remove it from $@.
+  for arg
+  do
+    if test -n "$dst_arg"; then
+      # $@ is not empty: it contains at least $arg.
+      set fnord "$@" "$dst_arg"
+      shift # fnord
+    fi
+    shift # arg
+    dst_arg=$arg
+  done
+fi
+
+if test $# -eq 0; then
+  if test -z "$dir_arg"; then
+    echo "$0: no input file specified." >&2
+    exit 1
+  fi
+  # It's OK to call `install-sh -d' without argument.
+  # This can happen when creating conditional directories.
+  exit 0
+fi
+
+if test -z "$dir_arg"; then
+  trap '(exit $?); exit' 1 2 13 15
+
+  # Set umask so as not to create temps with too-generous modes.
+  # However, 'strip' requires both read and write access to temps.
+  case $mode in
+    # Optimize common cases.
+    *644) cp_umask=133;;
+    *755) cp_umask=22;;
+
+    *[0-7])
+      if test -z "$stripcmd"; then
+	u_plus_rw=
+      else
+	u_plus_rw='% 200'
+      fi
+      cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
+    *)
+      if test -z "$stripcmd"; then
+	u_plus_rw=
+      else
+	u_plus_rw=,u+rw
+      fi
+      cp_umask=$mode$u_plus_rw;;
+  esac
 fi
 
-if [ x"$dir_arg" != x ]; then
-	dst=$src
-	src=""
-	
-	if [ -d $dst ]; then
-		instcmd=:
-		chmodcmd=""
-	else
-		instcmd=$mkdirprog
-	fi
-else
+for src
+do
+  # Protect names starting with `-'.
+  case $src in
+    -*) src=./$src;;
+  esac
+
+  if test -n "$dir_arg"; then
+    dst=$src
+    dstdir=$dst
+    test -d "$dstdir"
+    dstdir_status=$?
+  else
+
+    # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
+    # might cause directories to be created, which would be especially bad
+    # if $src (and thus $dsttmp) contains '*'.
+    if test ! -f "$src" && test ! -d "$src"; then
+      echo "$0: $src does not exist." >&2
+      exit 1
+    fi
+
+    if test -z "$dst_arg"; then
+      echo "$0: no destination specified." >&2
+      exit 1
+    fi
+
+    dst=$dst_arg
+    # Protect names starting with `-'.
+    case $dst in
+      -*) dst=./$dst;;
+    esac
 
-# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
-# might cause directories to be created, which would be especially bad 
-# if $src (and thus $dsttmp) contains '*'.
+    # If destination is a directory, append the input filename; won't work
+    # if double slashes aren't ignored.
+    if test -d "$dst"; then
+      if test -n "$no_target_directory"; then
+	echo "$0: $dst_arg: Is a directory" >&2
+	exit 1
+      fi
+      dstdir=$dst
+      dst=$dstdir/`basename "$src"`
+      dstdir_status=0
+    else
+      # Prefer dirname, but fall back on a substitute if dirname fails.
+      dstdir=`
+	(dirname "$dst") 2>/dev/null ||
+	expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	     X"$dst" : 'X\(//\)[^/]' \| \
+	     X"$dst" : 'X\(//\)$' \| \
+	     X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
+	echo X"$dst" |
+	    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+		   s//\1/
+		   q
+		 }
+		 /^X\(\/\/\)[^/].*/{
+		   s//\1/
+		   q
+		 }
+		 /^X\(\/\/\)$/{
+		   s//\1/
+		   q
+		 }
+		 /^X\(\/\).*/{
+		   s//\1/
+		   q
+		 }
+		 s/.*/./; q'
+      `
 
-	if [ -f "$src" ] || [ -d "$src" ]
-	then
-		:
+      test -d "$dstdir"
+      dstdir_status=$?
+    fi
+  fi
+
+  obsolete_mkdir_used=false
+
+  if test $dstdir_status != 0; then
+    case $posix_mkdir in
+      '')
+	# Create intermediate dirs using mode 755 as modified by the umask.
+	# This is like FreeBSD 'install' as of 1997-10-28.
+	umask=`umask`
+	case $stripcmd.$umask in
+	  # Optimize common cases.
+	  *[2367][2367]) mkdir_umask=$umask;;
+	  .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
+
+	  *[0-7])
+	    mkdir_umask=`expr $umask + 22 \
+	      - $umask % 100 % 40 + $umask % 20 \
+	      - $umask % 10 % 4 + $umask % 2
+	    `;;
+	  *) mkdir_umask=$umask,go-w;;
+	esac
+
+	# With -d, create the new directory with the user-specified mode.
+	# Otherwise, rely on $mkdir_umask.
+	if test -n "$dir_arg"; then
+	  mkdir_mode=-m$mode
 	else
-		echo "install:  $src does not exist"
-		exit 1
-	fi
-	
-	if [ x"$dst" = x ]
-	then
-		echo "install:	no destination specified"
-		exit 1
-	else
-		:
+	  mkdir_mode=
 	fi
 
-# If destination is a directory, append the input filename; if your system
-# does not like double slashes in filenames, you may need to add some logic
-
-	if [ -d $dst ]
-	then
-		dst="$dst"/`basename $src`
-	else
-		:
-	fi
-fi
-
-## this sed command emulates the dirname command
-dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
-
-# Make sure that the destination directory exists.
-#  this part is taken from Noah Friedman's mkinstalldirs script
-
-# Skip lots of stat calls in the usual case.
-if [ ! -d "$dstdir" ]; then
-defaultIFS='
-	'
-IFS="${IFS-${defaultIFS}}"
+	posix_mkdir=false
+	case $umask in
+	  *[123567][0-7][0-7])
+	    # POSIX mkdir -p sets u+wx bits regardless of umask, which
+	    # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
+	    ;;
+	  *)
+	    tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+	    trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
 
-oIFS="${IFS}"
-# Some sh's can't handle IFS=/ for some reason.
-IFS='%'
-set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
-IFS="${oIFS}"
-
-pathcomp=''
-
-while [ $# -ne 0 ] ; do
-	pathcomp="${pathcomp}${1}"
-	shift
+	    if (umask $mkdir_umask &&
+		exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
+	    then
+	      if test -z "$dir_arg" || {
+		   # Check for POSIX incompatibilities with -m.
+		   # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+		   # other-writeable bit of parent directory when it shouldn't.
+		   # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+		   ls_ld_tmpdir=`ls -ld "$tmpdir"`
+		   case $ls_ld_tmpdir in
+		     d????-?r-*) different_mode=700;;
+		     d????-?--*) different_mode=755;;
+		     *) false;;
+		   esac &&
+		   $mkdirprog -m$different_mode -p -- "$tmpdir" && {
+		     ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
+		     test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+		   }
+		 }
+	      then posix_mkdir=:
+	      fi
+	      rmdir "$tmpdir/d" "$tmpdir"
+	    else
+	      # Remove any dirs left behind by ancient mkdir implementations.
+	      rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
+	    fi
+	    trap '' 0;;
+	esac;;
+    esac
 
-	if [ ! -d "${pathcomp}" ] ;
-        then
-		$mkdirprog "${pathcomp}"
-	else
-		:
-	fi
+    if
+      $posix_mkdir && (
+	umask $mkdir_umask &&
+	$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+      )
+    then :
+    else
+
+      # The umask is ridiculous, or mkdir does not conform to POSIX,
+      # or it failed possibly due to a race condition.  Create the
+      # directory the slow way, step by step, checking for races as we go.
 
-	pathcomp="${pathcomp}/"
-done
-fi
+      case $dstdir in
+	/*) prefix='/';;
+	-*) prefix='./';;
+	*)  prefix='';;
+      esac
+
+      eval "$initialize_posix_glob"
 
-if [ x"$dir_arg" != x ]
-then
-	$doit $instcmd $dst &&
+      oIFS=$IFS
+      IFS=/
+      $posix_glob set -f
+      set fnord $dstdir
+      shift
+      $posix_glob set +f
+      IFS=$oIFS
+
+      prefixes=
+
+      for d
+      do
+	test -z "$d" && continue
 
-	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else : ; fi &&
-	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else : ; fi &&
-	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else : ; fi &&
-	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else : ; fi
-else
-
-# If we're going to rename the final executable, determine the name now.
-
-	if [ x"$transformarg" = x ] 
-	then
-		dstfile=`basename $dst`
+	prefix=$prefix$d
+	if test -d "$prefix"; then
+	  prefixes=
 	else
-		dstfile=`basename $dst $transformbasename | 
-			sed $transformarg`$transformbasename
+	  if $posix_mkdir; then
+	    (umask=$mkdir_umask &&
+	     $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+	    # Don't fail if two instances are running concurrently.
+	    test -d "$prefix" || exit 1
+	  else
+	    case $prefix in
+	      *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+	      *) qprefix=$prefix;;
+	    esac
+	    prefixes="$prefixes '$qprefix'"
+	  fi
 	fi
-
-# don't allow the sed command to completely eliminate the filename
+	prefix=$prefix/
+      done
 
-	if [ x"$dstfile" = x ] 
-	then
-		dstfile=`basename $dst`
-	else
-		:
-	fi
+      if test -n "$prefixes"; then
+	# Don't fail if two instances are running concurrently.
+	(umask $mkdir_umask &&
+	 eval "\$doit_exec \$mkdirprog $prefixes") ||
+	  test -d "$dstdir" || exit 1
+	obsolete_mkdir_used=true
+      fi
+    fi
+  fi
 
-# Make a temp file name in the proper directory.
+  if test -n "$dir_arg"; then
+    { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
+    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
+    { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
+      test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
+  else
+
+    # Make a couple of temp file names in the proper directory.
+    dsttmp=$dstdir/_inst.$$_
+    rmtmp=$dstdir/_rm.$$_
+
+    # Trap to clean up those temp files at exit.
+    trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
+
+    # Copy the file name to the temp name.
+    (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
 
-	dsttmp=$dstdir/#inst.$$#
-
-# Move or copy the file name to the temp name
-
-	$doit $instcmd $src $dsttmp &&
+    # and set any options; do chmod last to preserve setuid bits.
+    #
+    # If any of these fail, we abort the whole thing.  If we want to
+    # ignore errors from any of these, just make sure not to ignore
+    # errors from the above "$doit $cpprog $src $dsttmp" command.
+    #
+    { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
+    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
+    { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
+    { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
 
-	trap "rm -f ${dsttmp}" 0 &&
-
-# and set any options; do chmod last to preserve setuid bits
+    # If -C, don't bother to copy if it wouldn't change the file.
+    if $copy_on_change &&
+       old=`LC_ALL=C ls -dlL "$dst"	2>/dev/null` &&
+       new=`LC_ALL=C ls -dlL "$dsttmp"	2>/dev/null` &&
 
-# If any of these fail, we abort the whole thing.  If we want to
-# ignore errors from any of these, just make sure not to ignore
-# errors from the above "$doit $instcmd $src $dsttmp" command.
+       eval "$initialize_posix_glob" &&
+       $posix_glob set -f &&
+       set X $old && old=:$2:$4:$5:$6 &&
+       set X $new && new=:$2:$4:$5:$6 &&
+       $posix_glob set +f &&
+
+       test "$old" = "$new" &&
+       $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
+    then
+      rm -f "$dsttmp"
+    else
+      # Rename the file to the real destination.
+      $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
 
-	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else :;fi &&
-	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else :;fi &&
-	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else :;fi &&
-	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else :;fi &&
-
-# Now rename the file to the real destination.
+      # The rename failed, perhaps because mv can't rename something else
+      # to itself, or perhaps because mv is so ancient that it does not
+      # support -f.
+      {
+	# Now remove or move aside any old file at destination location.
+	# We try this two ways since rm can't unlink itself on some
+	# systems and the destination file might be busy for other
+	# reasons.  In this case, the final cleanup might fail but the new
+	# file should still install successfully.
+	{
+	  test ! -f "$dst" ||
+	  $doit $rmcmd -f "$dst" 2>/dev/null ||
+	  { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+	    { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+	  } ||
+	  { echo "$0: cannot unlink or rename $dst" >&2
+	    (exit 1); exit 1
+	  }
+	} &&
 
-	$doit $rmcmd -f $dstdir/$dstfile &&
-	$doit $mvcmd $dsttmp $dstdir/$dstfile 
+	# Now rename the file to the real destination.
+	$doit $mvcmd "$dsttmp" "$dst"
+      }
+    fi || exit 1
 
-fi &&
+    trap '' 0
+  fi
+done
 
-
-exit 0
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
--- a/modules/sample/internal/install-sh	Sun May 11 11:20:24 2008 +0200
+++ b/modules/sample/internal/install-sh	Sun May 11 11:24:01 2008 +0200
@@ -1,251 +1,519 @@
 #!/bin/sh
-#
 # install - install a program, script, or datafile
-# This comes from X11R5 (mit/util/scripts/install.sh).
+
+scriptversion=2006-12-25.00
+
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
 #
-# Copyright 1991 by the Massachusetts Institute of Technology
+# Copyright (C) 1994 X Consortium
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
 #
-# Permission to use, copy, modify, distribute, and sell this software and its
-# documentation for any purpose is hereby granted without fee, provided that
-# the above copyright notice appear in all copies and that both that
-# copyright notice and this permission notice appear in supporting
-# documentation, and that the name of M.I.T. not be used in advertising or
-# publicity pertaining to distribution of the software without specific,
-# written prior permission.  M.I.T. makes no representations about the
-# suitability of this software for any purpose.  It is provided "as is"
-# without express or implied warranty.
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
+#
+#
+# FSF changes to this file are in the public domain.
 #
 # Calling this script install-sh is preferred over install.sh, to prevent
 # `make' implicit rules from creating a file called install from it
 # when there is no Makefile.
 #
 # This script is compatible with the BSD install script, but was written
-# from scratch.  It can only install one file at a time, a restriction
-# shared with many OS's install programs.
+# from scratch.
 
+nl='
+'
+IFS=" ""	$nl"
 
 # set DOITPROG to echo to test this script
 
 # Don't use :- since 4.3BSD and earlier shells don't like it.
-doit="${DOITPROG-}"
+doit=${DOITPROG-}
+if test -z "$doit"; then
+  doit_exec=exec
+else
+  doit_exec=$doit
+fi
 
-
-# put in absolute paths if you don't have them in your path; or use env. vars.
+# Put in absolute file names if you don't have them in your path;
+# or use environment vars.
 
-mvprog="${MVPROG-mv}"
-cpprog="${CPPROG-cp}"
-chmodprog="${CHMODPROG-chmod}"
-chownprog="${CHOWNPROG-chown}"
-chgrpprog="${CHGRPPROG-chgrp}"
-stripprog="${STRIPPROG-strip}"
-rmprog="${RMPROG-rm}"
-mkdirprog="${MKDIRPROG-mkdir}"
+chgrpprog=${CHGRPPROG-chgrp}
+chmodprog=${CHMODPROG-chmod}
+chownprog=${CHOWNPROG-chown}
+cmpprog=${CMPPROG-cmp}
+cpprog=${CPPROG-cp}
+mkdirprog=${MKDIRPROG-mkdir}
+mvprog=${MVPROG-mv}
+rmprog=${RMPROG-rm}
+stripprog=${STRIPPROG-strip}
 
-transformbasename=""
-transform_arg=""
-instcmd="$mvprog"
-chmodcmd="$chmodprog 0755"
-chowncmd=""
-chgrpcmd=""
-stripcmd=""
+posix_glob='?'
+initialize_posix_glob='
+  test "$posix_glob" != "?" || {
+    if (set -f) 2>/dev/null; then
+      posix_glob=
+    else
+      posix_glob=:
+    fi
+  }
+'
+
+posix_mkdir=
+
+# Desired mode of installed file.
+mode=0755
+
+chgrpcmd=
+chmodcmd=$chmodprog
+chowncmd=
+mvcmd=$mvprog
 rmcmd="$rmprog -f"
-mvcmd="$mvprog"
-src=""
-dst=""
-dir_arg=""
+stripcmd=
+
+src=
+dst=
+dir_arg=
+dst_arg=
+
+copy_on_change=false
+no_target_directory=
 
-while [ x"$1" != x ]; do
-    case $1 in
-	-c) instcmd="$cpprog"
-	    shift
-	    continue;;
+usage="\
+Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+   or: $0 [OPTION]... SRCFILES... DIRECTORY
+   or: $0 [OPTION]... -t DIRECTORY SRCFILES...
+   or: $0 [OPTION]... -d DIRECTORIES...
 
-	-d) dir_arg=true
-	    shift
-	    continue;;
+In the 1st form, copy SRCFILE to DSTFILE.
+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
+In the 4th, create DIRECTORIES.
 
-	-m) chmodcmd="$chmodprog $2"
-	    shift
-	    shift
-	    continue;;
+Options:
+     --help     display this help and exit.
+     --version  display version info and exit.
+
+  -c            (ignored)
+  -C            install only if different (preserve the last data modification time)
+  -d            create directories instead of installing files.
+  -g GROUP      $chgrpprog installed files to GROUP.
+  -m MODE       $chmodprog installed files to MODE.
+  -o USER       $chownprog installed files to USER.
+  -s            $stripprog installed files.
+  -t DIRECTORY  install into DIRECTORY.
+  -T            report an error if DSTFILE is a directory.
 
-	-o) chowncmd="$chownprog $2"
-	    shift
-	    shift
-	    continue;;
+Environment variables override the default commands:
+  CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
+  RMPROG STRIPPROG
+"
 
-	-g) chgrpcmd="$chgrpprog $2"
-	    shift
-	    shift
-	    continue;;
+while test $# -ne 0; do
+  case $1 in
+    -c) ;;
 
-	-s) stripcmd="$stripprog"
-	    shift
-	    continue;;
+    -C) copy_on_change=true;;
+
+    -d) dir_arg=true;;
+
+    -g) chgrpcmd="$chgrpprog $2"
+	shift;;
 
-	-t=*) transformarg=`echo $1 | sed 's/-t=//'`
-	    shift
-	    continue;;
+    --help) echo "$usage"; exit $?;;
 
-	-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
-	    shift
-	    continue;;
+    -m) mode=$2
+	case $mode in
+	  *' '* | *'	'* | *'
+'*	  | *'*'* | *'?'* | *'['*)
+	    echo "$0: invalid mode: $mode" >&2
+	    exit 1;;
+	esac
+	shift;;
+
+    -o) chowncmd="$chownprog $2"
+	shift;;
+
+    -s) stripcmd=$stripprog;;
 
-	*)  if [ x"$src" = x ]
-	    then
-		src=$1
-	    else
-		# this colon is to work around a 386BSD /bin/sh bug
-		:
-		dst=$1
-	    fi
-	    shift
-	    continue;;
-    esac
+    -t) dst_arg=$2
+	shift;;
+
+    -T) no_target_directory=true;;
+
+    --version) echo "$0 $scriptversion"; exit $?;;
+
+    --)	shift
+	break;;
+
+    -*)	echo "$0: invalid option: $1" >&2
+	exit 1;;
+
+    *)  break;;
+  esac
+  shift
 done
 
-if [ x"$src" = x ]
-then
-	echo "install:	no input file specified"
-	exit 1
-else
-	:
+if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
+  # When -d is used, all remaining arguments are directories to create.
+  # When -t is used, the destination is already specified.
+  # Otherwise, the last argument is the destination.  Remove it from $@.
+  for arg
+  do
+    if test -n "$dst_arg"; then
+      # $@ is not empty: it contains at least $arg.
+      set fnord "$@" "$dst_arg"
+      shift # fnord
+    fi
+    shift # arg
+    dst_arg=$arg
+  done
+fi
+
+if test $# -eq 0; then
+  if test -z "$dir_arg"; then
+    echo "$0: no input file specified." >&2
+    exit 1
+  fi
+  # It's OK to call `install-sh -d' without argument.
+  # This can happen when creating conditional directories.
+  exit 0
+fi
+
+if test -z "$dir_arg"; then
+  trap '(exit $?); exit' 1 2 13 15
+
+  # Set umask so as not to create temps with too-generous modes.
+  # However, 'strip' requires both read and write access to temps.
+  case $mode in
+    # Optimize common cases.
+    *644) cp_umask=133;;
+    *755) cp_umask=22;;
+
+    *[0-7])
+      if test -z "$stripcmd"; then
+	u_plus_rw=
+      else
+	u_plus_rw='% 200'
+      fi
+      cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
+    *)
+      if test -z "$stripcmd"; then
+	u_plus_rw=
+      else
+	u_plus_rw=,u+rw
+      fi
+      cp_umask=$mode$u_plus_rw;;
+  esac
 fi
 
-if [ x"$dir_arg" != x ]; then
-	dst=$src
-	src=""
-	
-	if [ -d $dst ]; then
-		instcmd=:
-		chmodcmd=""
-	else
-		instcmd=$mkdirprog
-	fi
-else
+for src
+do
+  # Protect names starting with `-'.
+  case $src in
+    -*) src=./$src;;
+  esac
+
+  if test -n "$dir_arg"; then
+    dst=$src
+    dstdir=$dst
+    test -d "$dstdir"
+    dstdir_status=$?
+  else
+
+    # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
+    # might cause directories to be created, which would be especially bad
+    # if $src (and thus $dsttmp) contains '*'.
+    if test ! -f "$src" && test ! -d "$src"; then
+      echo "$0: $src does not exist." >&2
+      exit 1
+    fi
+
+    if test -z "$dst_arg"; then
+      echo "$0: no destination specified." >&2
+      exit 1
+    fi
+
+    dst=$dst_arg
+    # Protect names starting with `-'.
+    case $dst in
+      -*) dst=./$dst;;
+    esac
 
-# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
-# might cause directories to be created, which would be especially bad 
-# if $src (and thus $dsttmp) contains '*'.
+    # If destination is a directory, append the input filename; won't work
+    # if double slashes aren't ignored.
+    if test -d "$dst"; then
+      if test -n "$no_target_directory"; then
+	echo "$0: $dst_arg: Is a directory" >&2
+	exit 1
+      fi
+      dstdir=$dst
+      dst=$dstdir/`basename "$src"`
+      dstdir_status=0
+    else
+      # Prefer dirname, but fall back on a substitute if dirname fails.
+      dstdir=`
+	(dirname "$dst") 2>/dev/null ||
+	expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	     X"$dst" : 'X\(//\)[^/]' \| \
+	     X"$dst" : 'X\(//\)$' \| \
+	     X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
+	echo X"$dst" |
+	    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+		   s//\1/
+		   q
+		 }
+		 /^X\(\/\/\)[^/].*/{
+		   s//\1/
+		   q
+		 }
+		 /^X\(\/\/\)$/{
+		   s//\1/
+		   q
+		 }
+		 /^X\(\/\).*/{
+		   s//\1/
+		   q
+		 }
+		 s/.*/./; q'
+      `
 
-	if [ -f "$src" ] || [ -d "$src" ]
-	then
-		:
+      test -d "$dstdir"
+      dstdir_status=$?
+    fi
+  fi
+
+  obsolete_mkdir_used=false
+
+  if test $dstdir_status != 0; then
+    case $posix_mkdir in
+      '')
+	# Create intermediate dirs using mode 755 as modified by the umask.
+	# This is like FreeBSD 'install' as of 1997-10-28.
+	umask=`umask`
+	case $stripcmd.$umask in
+	  # Optimize common cases.
+	  *[2367][2367]) mkdir_umask=$umask;;
+	  .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
+
+	  *[0-7])
+	    mkdir_umask=`expr $umask + 22 \
+	      - $umask % 100 % 40 + $umask % 20 \
+	      - $umask % 10 % 4 + $umask % 2
+	    `;;
+	  *) mkdir_umask=$umask,go-w;;
+	esac
+
+	# With -d, create the new directory with the user-specified mode.
+	# Otherwise, rely on $mkdir_umask.
+	if test -n "$dir_arg"; then
+	  mkdir_mode=-m$mode
 	else
-		echo "install:  $src does not exist"
-		exit 1
-	fi
-	
-	if [ x"$dst" = x ]
-	then
-		echo "install:	no destination specified"
-		exit 1
-	else
-		:
+	  mkdir_mode=
 	fi
 
-# If destination is a directory, append the input filename; if your system
-# does not like double slashes in filenames, you may need to add some logic
-
-	if [ -d $dst ]
-	then
-		dst="$dst"/`basename $src`
-	else
-		:
-	fi
-fi
-
-## this sed command emulates the dirname command
-dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
-
-# Make sure that the destination directory exists.
-#  this part is taken from Noah Friedman's mkinstalldirs script
-
-# Skip lots of stat calls in the usual case.
-if [ ! -d "$dstdir" ]; then
-defaultIFS='
-	'
-IFS="${IFS-${defaultIFS}}"
+	posix_mkdir=false
+	case $umask in
+	  *[123567][0-7][0-7])
+	    # POSIX mkdir -p sets u+wx bits regardless of umask, which
+	    # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
+	    ;;
+	  *)
+	    tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+	    trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
 
-oIFS="${IFS}"
-# Some sh's can't handle IFS=/ for some reason.
-IFS='%'
-set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
-IFS="${oIFS}"
-
-pathcomp=''
-
-while [ $# -ne 0 ] ; do
-	pathcomp="${pathcomp}${1}"
-	shift
+	    if (umask $mkdir_umask &&
+		exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
+	    then
+	      if test -z "$dir_arg" || {
+		   # Check for POSIX incompatibilities with -m.
+		   # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+		   # other-writeable bit of parent directory when it shouldn't.
+		   # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+		   ls_ld_tmpdir=`ls -ld "$tmpdir"`
+		   case $ls_ld_tmpdir in
+		     d????-?r-*) different_mode=700;;
+		     d????-?--*) different_mode=755;;
+		     *) false;;
+		   esac &&
+		   $mkdirprog -m$different_mode -p -- "$tmpdir" && {
+		     ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
+		     test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+		   }
+		 }
+	      then posix_mkdir=:
+	      fi
+	      rmdir "$tmpdir/d" "$tmpdir"
+	    else
+	      # Remove any dirs left behind by ancient mkdir implementations.
+	      rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
+	    fi
+	    trap '' 0;;
+	esac;;
+    esac
 
-	if [ ! -d "${pathcomp}" ] ;
-        then
-		$mkdirprog "${pathcomp}"
-	else
-		:
-	fi
+    if
+      $posix_mkdir && (
+	umask $mkdir_umask &&
+	$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+      )
+    then :
+    else
+
+      # The umask is ridiculous, or mkdir does not conform to POSIX,
+      # or it failed possibly due to a race condition.  Create the
+      # directory the slow way, step by step, checking for races as we go.
 
-	pathcomp="${pathcomp}/"
-done
-fi
+      case $dstdir in
+	/*) prefix='/';;
+	-*) prefix='./';;
+	*)  prefix='';;
+      esac
+
+      eval "$initialize_posix_glob"
 
-if [ x"$dir_arg" != x ]
-then
-	$doit $instcmd $dst &&
+      oIFS=$IFS
+      IFS=/
+      $posix_glob set -f
+      set fnord $dstdir
+      shift
+      $posix_glob set +f
+      IFS=$oIFS
+
+      prefixes=
+
+      for d
+      do
+	test -z "$d" && continue
 
-	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else : ; fi &&
-	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else : ; fi &&
-	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else : ; fi &&
-	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else : ; fi
-else
-
-# If we're going to rename the final executable, determine the name now.
-
-	if [ x"$transformarg" = x ] 
-	then
-		dstfile=`basename $dst`
+	prefix=$prefix$d
+	if test -d "$prefix"; then
+	  prefixes=
 	else
-		dstfile=`basename $dst $transformbasename | 
-			sed $transformarg`$transformbasename
+	  if $posix_mkdir; then
+	    (umask=$mkdir_umask &&
+	     $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+	    # Don't fail if two instances are running concurrently.
+	    test -d "$prefix" || exit 1
+	  else
+	    case $prefix in
+	      *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+	      *) qprefix=$prefix;;
+	    esac
+	    prefixes="$prefixes '$qprefix'"
+	  fi
 	fi
-
-# don't allow the sed command to completely eliminate the filename
+	prefix=$prefix/
+      done
 
-	if [ x"$dstfile" = x ] 
-	then
-		dstfile=`basename $dst`
-	else
-		:
-	fi
+      if test -n "$prefixes"; then
+	# Don't fail if two instances are running concurrently.
+	(umask $mkdir_umask &&
+	 eval "\$doit_exec \$mkdirprog $prefixes") ||
+	  test -d "$dstdir" || exit 1
+	obsolete_mkdir_used=true
+      fi
+    fi
+  fi
 
-# Make a temp file name in the proper directory.
+  if test -n "$dir_arg"; then
+    { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
+    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
+    { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
+      test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
+  else
+
+    # Make a couple of temp file names in the proper directory.
+    dsttmp=$dstdir/_inst.$$_
+    rmtmp=$dstdir/_rm.$$_
+
+    # Trap to clean up those temp files at exit.
+    trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
+
+    # Copy the file name to the temp name.
+    (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
 
-	dsttmp=$dstdir/#inst.$$#
-
-# Move or copy the file name to the temp name
-
-	$doit $instcmd $src $dsttmp &&
+    # and set any options; do chmod last to preserve setuid bits.
+    #
+    # If any of these fail, we abort the whole thing.  If we want to
+    # ignore errors from any of these, just make sure not to ignore
+    # errors from the above "$doit $cpprog $src $dsttmp" command.
+    #
+    { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
+    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
+    { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
+    { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
 
-	trap "rm -f ${dsttmp}" 0 &&
-
-# and set any options; do chmod last to preserve setuid bits
+    # If -C, don't bother to copy if it wouldn't change the file.
+    if $copy_on_change &&
+       old=`LC_ALL=C ls -dlL "$dst"	2>/dev/null` &&
+       new=`LC_ALL=C ls -dlL "$dsttmp"	2>/dev/null` &&
 
-# If any of these fail, we abort the whole thing.  If we want to
-# ignore errors from any of these, just make sure not to ignore
-# errors from the above "$doit $instcmd $src $dsttmp" command.
+       eval "$initialize_posix_glob" &&
+       $posix_glob set -f &&
+       set X $old && old=:$2:$4:$5:$6 &&
+       set X $new && new=:$2:$4:$5:$6 &&
+       $posix_glob set +f &&
+
+       test "$old" = "$new" &&
+       $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
+    then
+      rm -f "$dsttmp"
+    else
+      # Rename the file to the real destination.
+      $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
 
-	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else :;fi &&
-	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else :;fi &&
-	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else :;fi &&
-	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else :;fi &&
-
-# Now rename the file to the real destination.
+      # The rename failed, perhaps because mv can't rename something else
+      # to itself, or perhaps because mv is so ancient that it does not
+      # support -f.
+      {
+	# Now remove or move aside any old file at destination location.
+	# We try this two ways since rm can't unlink itself on some
+	# systems and the destination file might be busy for other
+	# reasons.  In this case, the final cleanup might fail but the new
+	# file should still install successfully.
+	{
+	  test ! -f "$dst" ||
+	  $doit $rmcmd -f "$dst" 2>/dev/null ||
+	  { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+	    { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+	  } ||
+	  { echo "$0: cannot unlink or rename $dst" >&2
+	    (exit 1); exit 1
+	  }
+	} &&
 
-	$doit $rmcmd -f $dstdir/$dstfile &&
-	$doit $mvcmd $dsttmp $dstdir/$dstfile 
+	# Now rename the file to the real destination.
+	$doit $mvcmd "$dsttmp" "$dst"
+      }
+    fi || exit 1
 
-fi &&
+    trap '' 0
+  fi
+done
 
-
-exit 0
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
--- a/nt/ChangeLog	Sun May 11 11:20:24 2008 +0200
+++ b/nt/ChangeLog	Sun May 11 11:24:01 2008 +0200
@@ -1,3 +1,27 @@
+2008-01-25  Michael Sperber  <mike@xemacs.org>
+
+	* xemacs.mak (version.sh): Generate version.sh via Mercurial.
+
+2008-01-24 Mike Sperber   <mike@xemacs.org>
+
+	* config.inc.samp: Fix URL for optional libraries.
+	* xemacs.mak (PATH_PREFIX): Set PATH_PREFIX to the value of INSTALL_DIR.
+	* xemacs.mak (PATH_DEFINES): Fix setting of PATH_DEFINES.
+	* xemacs.mak (DEBUG_FLAG_COMPILE_DEBUG): Comment out -RTC1: it
+	even crashes with VC 8.
+	* xemacs.mak: Comment out echo line that leads to
+	command-line-too-long error on some Windowses.
+
+2008-01-18  Vin Shelton  <acs@xemacs.org>
+
+	* xemacs.mak: Use debug version of Intel's libm, if appropriate.
+
+2008-01-17  Vin Shelton  <acs@xemacs.org>
+
+	* config.inc.samp: Added USE_INTEL_COMPILER to support the Intel
+	compiler.
+	* xemacs.mak: Use USE_INTEL_COMPILER.
+
 2007-10-15  Adrian Aichner  <adrian@xemacs.org>
 
 	* xemacs.mak (INFO_FILES): Sync nt/xemacs.mak and man/Makefile
--- a/nt/config.inc.samp	Sun May 11 11:20:24 2008 +0200
+++ b/nt/config.inc.samp	Sun May 11 11:24:01 2008 +0200
@@ -31,7 +31,7 @@
 ############################################################################
 
 # Directory under which the optional libraries are placed.  To make your
-# life easy, just grab http://ftp.xemacs.org/aux/optional-libs.exe
+# life easy, just grab http://www.xemacs.org/Download/win32/optional-libs.exe
 # (a self-installing .ZIP) and unzip them into an appropriate directory
 # (by default, c:\src).  This gets you precompiled versions of all of
 # the libraries below.
@@ -257,3 +257,6 @@
 # *AND CURRENTLY HAPPENS WITH VC++*, at least when using pdump.  Therefore,
 # be warned!
 USE_UNION_TYPE=0
+
+# Set this to build XEmacs with the Intel C Compiler.
+USE_INTEL_COMPILER=0
--- a/nt/xemacs.mak	Sun May 11 11:20:24 2008 +0200
+++ b/nt/xemacs.mak	Sun May 11 11:24:01 2008 +0200
@@ -74,6 +74,13 @@
 !endif
 !endif
 
+!if [copy $(SRCROOT)\version.sh.in $(SRCROOT)\version.sh]
+!endif
+!if exist($(SRCROOT)\.hg)
+!if [hg identify >> $(SRCROOT)\version.sh]
+!endif
+!endif
+
 # Program name and version
 !include "$(SRCROOT)\version.sh"
 
@@ -195,8 +202,11 @@
 !if !defined(SUPPORT_EDIT_AND_CONTINUE)
 SUPPORT_EDIT_AND_CONTINUE=0
 !endif
+!if !defined(BUILD_FOR_SETUP_KIT)
+BUILD_FOR_SETUP_KIT=0
+!endif
 
-!if !defined(BUILD_FOR_SETUP_KIT) || "$(BUILD_FOR_SETUP_KIT)" == "0"
+!if !$(BUILD_FOR_SETUP_KIT)
 OK_TO_USE_MSVCRTD=1
 !else
 OK_TO_USE_MSVCRTD=0
@@ -455,10 +465,10 @@
 !if $(INFODOCK)
 PATH_PREFIX=../..
 !else
-PATH_PREFIX=..
+PATH_PREFIX="$(INSTALL_DIR)"
 !endif
 
-PATH_DEFINES=-DPATH_PREFIX=\"$(PATH_PREFIX)\"
+PATH_DEFINES=-DPATH_PREFIX=\"$(PATH_PREFIX:\=\\)\"
 
 !if $(SEPARATE_BUILD)
 PATH_DEFINES=$(PATH_DEFINES) -DPATH_LOADSEARCH=\"$(LISP:\=\\)\" -DPATH_DATA=\"$(ETC:\=\\)\" -DPATH_INFO=\"$(INFO:\=\\)\"
@@ -658,6 +668,16 @@
 	$(OUTDIR)\ntheap.obj $(OUTDIR)\vm-limit.obj
 !endif
 
+!if $(USE_INTEL_COMPILER)
+CC=icl
+# Use static library if possible
+INTEL_LIBS=libircmt.lib libmmt.lib
+# Debugging requires DLL version of libm
+!if $(DEBUG_XEMACS)
+INTEL_LIBS=libircmt.lib libmmd.lib
+!endif
+!endif
+
 ########################### Process options related to compilation.
 
 #
@@ -678,8 +698,8 @@
 # giving it.
 DEBUG_FLAG_LINK_DEBUG=-debug -opt:noref
 # This turns on additional run-time checking
-# For some reason it causes spawning of make-docfile to crash in VC 7
-DEBUG_FLAG_COMPILE_DEBUG=-RTC1
+# For some reason it causes spawning of make-docfile to crash in VC 7 and VC 8
+# DEBUG_FLAG_COMPILE_DEBUG=-RTC1
 ! else
 DEBUG_FLAG_LINK_DEBUG=-debug:full
 DEBUG_FLAG_COMPILE_DEBUG=
@@ -803,7 +823,7 @@
  $(EMACS_BETA_VERSION) $(EMACS_PATCH_LEVEL) \
  -DXEMACS_CODENAME=\"$(xemacs_codename:&=and)\" \
 !if defined(xemacs_extra_name)
- -DXEMACS_EXTRA_NAME=\"$(xemacs_extra_name:"=)\" \
+ -DXEMACS_EXTRA_NAME=\""$(xemacs_extra_name:"=)"\" \
 !endif
 !if defined(PATH_LATE_PACKAGE_DIRECTORIES)
  -DPATH_LATE_PACKAGE_DIRECTORIES=\"$(PATH_LATE_PACKAGE_DIRECTORIES)\" \
@@ -1290,7 +1310,7 @@
 TEMACS_LIBS=$(LASTFILE) $(OPT_LIBS) \
  oldnames.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib \
  shell32.lib wsock32.lib netapi32.lib winmm.lib winspool.lib ole32.lib \
- mpr.lib uuid.lib imm32.lib $(LIBC_LIB)
+ mpr.lib uuid.lib imm32.lib $(INTEL_LIBS) $(LIBC_LIB)
 TEMACS_COMMON_LFLAGS=-nologo $(LIBRARIES) $(DEBUG_FLAGS_LINK) \
  -base:0x1000000 -stack:0x800000 $(TEMACS_ENTRYPOINT) -subsystem:windows \
  -heap:0x00100000 -nodefaultlib $(PROFILE_FLAGS) setargv.obj
@@ -1353,7 +1373,8 @@
 !endif
 
 $(RAW_EXE): $(TEMACS_OBJS) $(LASTFILE) $(TEMACS_DUMP_DEP)
-	@echo link $(TEMACS_LFLAGS) -out:$@ $(TEMACS_OBJS) $(TEMACS_DUMP_DEP) $(TEMACS_LIBS)
+# Command line too long for some Windows installation:
+#	@echo link $(TEMACS_LFLAGS) -out:$@ $(TEMACS_OBJS) $(TEMACS_DUMP_DEP) $(TEMACS_LIBS)
 	link.exe @<<
   $(TEMACS_LFLAGS) -out:$@ $(TEMACS_OBJS) $(TEMACS_DUMP_DEP) $(TEMACS_LIBS)
 <<
--- a/src/ChangeLog	Sun May 11 11:20:24 2008 +0200
+++ b/src/ChangeLog	Sun May 11 11:24:01 2008 +0200
@@ -1,23 +1,270 @@
+2008-01-20  Aidan Kehoe  <kehoea@parhasard.net>
+
+	* config.h.in: Add SHEBANG_PROGNAME.
+	* emacs.c (main_1): 
+	If we've been called using SHEBANG_PROGNAME, rewrite our arguments
+	to add a --script argument. 
+	Also, handle the --script argument by setting noninteractive and
+	vanilla. 
+	* lread.c (Fload_internal): 
+	If the first two characters of a file are #!, replace them with ;!
+	before they get to the Lisp reader. 
+
+2008-04-26  Mike Sperber  <mike@xemacs.org>
+
+	* window.c (set_window_pixsize): Round up when we're shrinking,
+	down when we're growing * to make sure that pairs of grow / shrink
+	meant to * cancel out actually do cancel out.  This fixes a
+	problem with `resize-minibuffer-mode' where successive grow/shrink
+	actions are meant to cancel out, but previously didn't.
+
+2008-04-05  Aidan Kehoe  <kehoea@parhasard.net>
+
+	* depend: 
+	Regenerate with LF line endings, not CRLF. 
+
+2008-03-15  Michael Sperber  <mike@xemacs.org>
+
+	* lread.c (read1): Signal an error on ?\<newline>, thus preventing
+	an assertion failure higher up.
+
+2008-03-11  Stephen J. Turnbull  <stephen@xemacs.org>
+
+	* specifier.c (CHECK_INSTANCE_ENTRY): Fix typo in comment.
+
+2008-03-05  Dominique Quatravaux  <domq@cpan.org>
+
+	* glyphs-gtk.c (init_image_instance_from_gdk_image):
+	(gtk_colorize_image_instance):
+	Use IMAGE_INSTANCE_PIXMAP_MASK (an lvalue), not
+	IMAGE_INSTANCE_GTK_MASK (an rvalue).
+
+2008-03-05  Dominique Quatravaux  <domq@cpan.org>
+
+	* console-gtk.c (gtk_perhaps_init_unseen_key_defaults): Fix typo.
+
+2008-02-28  Didier Verna  <didier@xemacs.org>
+
+	* specifier.h (struct specifier_methods): Fix instantiate_method
+	prototype to match the changes below.
+
+2008-02-26  Didier Verna  <didier@xemacs.org>
+
+	* specifier.c (CHECK_INSTANCE_ENTRY): See below.
+	* specifier.c (specifier_instance_1): Propagate the no_fallback
+	flag to ...
+	* specifier.c (specifier_instance_from_inst_list): ... here, and
+	in turn propagate it to the <specifier>_instantiate methods.
+	* glyphs.c (image_instantiate): Handle the no_fallback flag.
+	* objects.c (color_instantiate): Ditto.
+	* objects.c (font_instantiate): Ditto.
+	* objects.c (face_boolean_instantiate): Ditto.
+	* specifier.c (specifier_matching_foo_from_inst_list): Update call
+	to specifier_instance_from_inst_list accordingly.
+
+2008-02-11  Aidan Kehoe  <kehoea@parhasard.net>
+
+	* search.c (search_buffer):
+	In the event that a character is not representable in the buffer,
+	fail immediately. Prevents an assertion failure in the code to
+	deal with whether Boyer-Moore search can be used for such
+	characters.
+
+2008-02-03  Jerry James  <james@xemacs.org>
+
+	* redisplay.c (generate_displayable_area): If a line has been
+	generated in place in the dynarray, use Dynarr_increment instead
+	of Dynarr_add.
+	* redisplay.c (regenerate_window): Ditto.
+
+2008-02-01  Jerry James  <james@xemacs.org>
+
+	* event-Xt.c (emacs_Xt_event_handler): Remove unnecessary call to
+	SET_EVENT_MAGIC_X_EVENT.  See xemacs-beta message
+	<870180fe080131201011b191ae5g1d70cbd2136f570c@mail.gmail.com>.
+
+2008-01-30  Aidan Kehoe  <kehoea@parhasard.net>
+
+	* search.c (debug-xemacs-searches):
+	New variable, available on debug builds. Used in
+	tests/automated/case-tests.el.
+	(search_buffer): Only store the charset_base for characters with
+	translations. Correct some comments, correct some checks. If
+	debug_xemacs_searches is non-zero, record which search was used.
+	(boyer_moore): Remove an assertion that was incorrect. Remove its
+	documentation. Correct an assertion dealing with equivalence
+	tables; we may end up looking through the equivalence table if a
+	non-ASCII non-case character was searched for.
+
+2008-01-25  Michael Sperber  <mike@xemacs.org>
+
+	* emacs.c (vars_of_emacs): Zap mention of CVS.
+
+2008-01-24 Mike Sperber   <mike@xemacs.org>
+
+	* make-src-depend (PrintDeps): Fix Perl code that no longer works
+	with Perl 5.10.
+
+2008-01-21  Aidan Kehoe  <kehoea@parhasard.net>
+
+	* elhash.c (Fputhash): Document the return value.
+	(Fclrhash): Ditto.
+
+2007-12-26  Aidan Kehoe  <kehoea@parhasard.net>
+
+	* casetab.c:
+	Extend and correct some case table documentation.
+	* search.c (search_buffer):
+	Correct a bug where only the first entry for a character in the
+	case equivalence table was examined in determining if the
+	Boyer-Moore search algorithm is appropriate.
+
+	If there are case mappings outside of the charset and row of the
+	characters specified in the search string, those case mappings can
+	be safely ignored (and Boyer-Moore search can be used) if we know
+	from the buffer statistics that the corresponding characters cannot
+	occur.
+
+	* search.c (boyer_moore):
+	Assert that we haven't been passed a string with varying
+	characters sets or rows within character sets. That's what
+	simple_search is for.
+
+	In the very rare event that a character in the search string has a
+	canonical case mapping that is not in the same character set and
+	row, don't try to search for the canonical character, search for
+	some other character that is in the the desired character set and
+	row. Assert that the case table isn't corrupt.
+
+	Do not search for any character case mappings that cannot possibly
+	occur in the buffer, given the buffer metadata about its
+	contents.
+
+2008-01-19  Aidan Kehoe  <kehoea@parhasard.net>
+
+	* dired.c (Ffile_attributes): If bignums are available, use them
+	for the file size when necessary. If they are not, be clearer
+	about the check for whether the file size can fit in a Lisp
+	integer.
+
+2008-01-18  Jerry James  <james@xemacs.org>
+
+	* device-x.c (x_init_device): Don't write to path or read from
+	format when neither has been initialized.
+
+2008-01-16  Aidan Kehoe  <kehoea@parhasard.net>
+
+	* elhash.c (internal_hash):
+	Make short lists with the same contents in a different order hash
+	distinctly. Gives better performance for things like three-element
+	lists describing colours. Thank you Sebastian Freundt!
+
+2008-01-15  Aidan Kehoe  <kehoea@parhasard.net>
+
+	* print.c (prin1_to_string): New.
+	The guts of Fprin1_to_string, without resetting
+	Vprint_gensym_alist.
+	(Fprin1_to_string):
+	Call prin1_to_string, wrapped with RESET_PRINT_GENSYM calls.
+	* doprnt.c (emacs_doprnt_1):
+	Call prin1_to_string, not Fprin1_to_string (dos veces). Avoids an
+	inappropriate reset of print-gensym-alist.
+
+2008-01-12  Aidan Kehoe  <kehoea@parhasard.net>
+
+	* rangetab.c (Fmap_range_table):
+	Clarify docstring. (If FUNCTION doesn't touch any range-table
+	entry, things will also be correct.)
+
+2008-01-09  Aidan Kehoe  <kehoea@parhasard.net>
+
+	* config.h.in:
+	Check that __STDC_VERSION__ is defined before examining its
+	value. Eliminates a Cygwin warning.
+
+2008-01-08  Aidan Kehoe  <kehoea@parhasard.net>
+
+	* text.h (MAX_XETCHAR_SIZE): Remove, eliminating a redefinition
+	warning on Win32.
+	* dumper.c (pdump_load):
+	Don't use PATH_MAX_EXTERNAL, instead allocate enough for the path
+	+ DUMP_SLACK (space for .dmp and version information), already
+	used on Win32 and #defined to be 100.
+
+2008-01-08  Jerry James  <james@xemacs.org>
+
+	* config.h.in (INLINE_HEADER): adapt to C99 inline semantics.
+
+2008-01-07  Jerry James  <james@xemacs.org>
+
+	* xemacs.def.in.in: Clarify the copyright and license.
+
+2008-01-03  Aidan Kehoe  <kehoea@parhasard.net>
+
+	* fileio.c (Fmake_temp_name): Correct the comment to cross
+	reference to make-temp-file, and not to this function.
+
+2008-01-03  Stephen J. Turnbull  <stephen@xemacs.org>
+
+	* doc.c (Fbuilt_in_symbol_file): Improve style.
+
+2008-01-02  Aidan Kehoe  <kehoea@parhasard.net>
+
+	* emacs.c (main_1):
+	Call the new vars_of_console_gtk function.
+	* console-gtk.c (vars_of_console_gtk): New.
+	* console-gtk.c (gtk_perhaps_init_unseen_key_defaults):
+	Correct the initialisation of the hash table, on the model of the
+	MSW and TTY builds.
+
+2008-01-02  Aidan Kehoe  <kehoea@parhasard.net>
+
+	* doc.c (Fbuilt_in_symbol_file):
+	Don't check is fun zero in the condition, check that it's not
+	nil. Fixes the union build; thank you Stephen.
+
+2008-01-02  Mike Sperber  <mike@xemacs.org>
+
+	* window.c (set_window_pixsize): Factor in the modeline when
+	looking at window_min_width.  Remove obsolete comment about
+	incorrect use of `default_face_height_and_width'.
+	(change_window_height): Remove obsolete comment about
+	incorrect use of `default_face_height_and_width'.
+
+2007-12-30  Aidan Kehoe  <kehoea@parhasard.net>
+
+	* doc.c (Fbuilt_in_symbol_file):
+	Take a new TYPE argument, specifying whether the function or
+	variable definition of the symbol should be searched for.
+	Handle built-in macros correctly.
+
 2007-12-24  Aidan Kehoe  <kehoea@parhasard.net>
 
-	* symbols.c (Fintern_soft): 
+	* event-xlike-inc.c (x_keysym_to_character):
+	* event-xlike-inc.c (gtk_keysym_to_character):
+	Unify the typed character if possible, following the current value
+	for the unicode precedence list.
+
+2007-12-24  Aidan Kehoe  <kehoea@parhasard.net>
+
+	* symbols.c (Fintern_soft):
 	Provide a new optional third argument, DEFAULT, for those who want
 	to check if "nil" is a symbol or not. (More realistically, general
 	code that may get handed "nil" should probably use this argument.)
 
 2007-12-23  Aidan Kehoe  <kehoea@parhasard.net>
 
-	* objects-tty.c (tty_find_charset_font): 
+	* objects-tty.c (tty_find_charset_font):
 	* objects-msw.c (mswindows_font_spec_matches_charset_stage_2):
 	* objects-msw.c (mswindows_font_spec_matches_charset_stage_1):
-	* objects-xlike-inc.c (x_font_spec_matches_charset): 
+	* objects-xlike-inc.c (x_font_spec_matches_charset):
 	* objects-xlike-inc.c (gtk_font_spec_matches_charset):
 	If the charset is not specified when calling the
 	font_spec_matches_charset device method, its value is Qnil, not
 	Qunbound. See
 	http://mid.gmane.org/E1EfbmW-00029r-5G@iwi191.iwi.uni-sb.de and
 	Ben Wing's patch of
-	http://mid.gmane.org/439FA06B.3090007@xemacs.org. 
+	http://mid.gmane.org/439FA06B.3090007@xemacs.org.
 
 2007-12-22  Aidan Kehoe  <kehoea@parhasard.net>
 
@@ -29,7 +276,7 @@
 	that's a great idea.
 	* database.c (print_database):
 	Give the coding system used for text conversion when printing a
-	database object. 
+	database object.
 
 2007-12-20  Jerry James  <james@xemacs.org>
 
@@ -45,11 +292,11 @@
 
 	* symbols.c (Fspecial_form_p):
 	Following commentary from Jerry James, don't error if not passed a
-	subr. 
+	subr.
 
 	Flesh out the docstring; give details of what a subr is, what a
 	special form is, and why one should probably not write special
-	forms oneself. 
+	forms oneself.
 
 2007-12-18  Aidan Kehoe  <kehoea@parhasard.net>
 
@@ -63,9 +310,9 @@
 	Add support for formatted printing of both longs and bignums as
 	base 2.
 	* editfns.c (Fformat):
-	Document the new %b escape for #'format. 
-	* lisp.h:
-	Make ulong_to_bit_string available beside long_to_string. 
+	Document the new %b escape for #'format.
+	* lisp.h:
+	Make ulong_to_bit_string available beside long_to_string.
 	* lread.c:
 	Fix a bug where the integer base was being ignored in certain
 	contexts; thank you Sebastian Freundt. This is necessary for
@@ -73,18 +320,18 @@
 	#'bit-vector-to-integer, just added to subr.el
 	* print.c (ulong_to_bit_string): New.
 	Analagous to long_to_string, but used all the time when %b is
-	encountered, since we can't pass that to sprintf. 	
+	encountered, since we can't pass that to sprintf.
 
 2007-12-12  Aidan Kehoe  <kehoea@parhasard.net>
 
 	* config.h.in:
-	Make the results of the checks for 
+	Make the results of the checks for
 	FcConfigGetRescanInterval, FcConfigSetRescanInterval
 	available.
 	* font-mgr.h:
 	If FcConfigSetRescanInterval and FcConfigGetRescanInterval are not
 	available as functions, #define them to map to their old
-	misspelled names. 	
+	misspelled names.
 	* font-mgr.c (Ffc_config_get_rescan_interval):
 	* font-mgr.c (Ffc_config_set_rescan_interval):
 	Use the correct spelling in
@@ -92,7 +339,7 @@
 
 2007-12-11  Aidan Kehoe  <kehoea@parhasard.net>
 
-	* glyphs-eimage.c: 
+	* glyphs-eimage.c:
 	Merge Ron Isaacson's patch of
 	3ggprxj7ifh.wl_Ron.Isaacson@morganstanley.com , originally from
 	Gennady Khokhorin. Prevents library incompatibilities on Win32.
@@ -131,7 +378,7 @@
 	coding systems) and make_coding_system_1 (which has to).
 	* file-coding.c (Ffind_coding_system):
 	Move the implementation to find_coding_system; call that function
-	with a do_autoloads argument of 1. 
+	with a do_autoloads argument of 1.
 	* file-coding.c (Fautoload_coding_system):
 	New.
 	* file-coding.c (add_coding_system_to_list_mapper):
@@ -148,21 +395,21 @@
 	system as its argument.
 
 	This is also tied in with the POSIX locale infrastructure by means
-	of posix-charset-to-coding-system-hash. 
+	of posix-charset-to-coding-system-hash.
 
 2007-11-29  Aidan Kehoe  <kehoea@parhasard.net>
 
 	* mule-ccl.c (ccl_driver):
-	Take out a static variable I was using for debugging. 
+	Take out a static variable I was using for debugging.
 
 2007-11-26  Aidan Kehoe  <kehoea@parhasard.net>
 
-	* doprnt.c: 
+	* doprnt.c:
 	Default to a buffer size of 350 for the sprintf call, but increase
 	it if the precision and minwidth indicate that it should be
 	bigger. Issue reported by Hans de Graaff; bug originally fixed by
 	Sebastian Freundt in SXEmacs following the change I merged on
-	2006-11-28. Forks have their disadvantages. 
+	2006-11-28. Forks have their disadvantages.
 
 2007-11-11  Mats Lidell  <matsl@xemacs.org>
 
@@ -184,18 +431,18 @@
 
 	* lread.c (read_unicode_escape):
 	Correct the range check for Unicode characters specified with
-	source-level escapes. 
+	source-level escapes.
 	* unicode.c:
 	* unicode.c (unicode_to_ichar):
 	* unicode.c (coding_system_type_create_unicode):
 	Correct the dump behaviour for just-in-time Unicode code
 	points. Update the docstring for #'unicode-to-char to indicate
-	that code points will run out above around 400,000 in a session. 
+	that code points will run out above around 400,000 in a session.
 
 2007-11-14  Aidan Kehoe  <kehoea@parhasard.net>
 
 	* editfns.c (vars_of_editfns):
-	Correct the docstring of user-full-name. 
+	Correct the docstring of user-full-name.
 	* fileio.c:
 	* fileio.c (Fmake_temp_name):
 	Document that make-temp-file is available and the best approach to
@@ -204,10 +451,10 @@
 	Take a new arg, MUSTBENEW, to error if the file to be written
 	already exists.
 	* fileio.c (auto_save_1):
-	Update a call to Fwrite_region_internal to pass the new argument. 
+	Update a call to Fwrite_region_internal to pass the new argument.
 	* fileio.c (syms_of_fileio):
 	Provide 'excl as a symbol, for the calls to
-	write-region-internal. 
+	write-region-internal.
 
 2007-11-05  Didier Verna  <didier@xemacs.org>
 
--- a/src/casetab.c	Sun May 11 11:20:24 2008 +0200
+++ b/src/casetab.c	Sun May 11 11:24:01 2008 +0200
@@ -48,13 +48,28 @@
    or vice versa, both characters will have the same entry in the canon
    table.
 
-   (4) `equiv' lists the "equivalence classes" defined by `canon'.  Imagine
+   (4) `eqv' lists the "equivalence classes" defined by `canon'.  Imagine
    that all characters are divided into groups having the same `canon'
-   entry; these groups are called "equivalence classes" and `equiv' lists
-   them by linking the characters in each equivalence class together in a
-   circular list.
+   entry; these groups are called "equivalence classes" and `eqv' lists them
+   by linking the characters in each equivalence class together in a
+   circular list. That is, to find out all all the members of a given char's
+   equivalence classe, you need something like the following code:
 
-   `canon' is used when doing case-insensitive comparisons.  `equiv' is
+    (let* ((char ?i)
+           (original-char char)
+           (standard-case-eqv (case-table-eqv (standard-case-table))))
+      (loop
+        with res = (list char)
+        until (eq (setq char (get-char-table char standard-case-eqv))
+                  original-char)
+        do (push char res)
+        finally return res))
+
+   (Where #'case-table-eqv doesn't yet exist, and probably never will, given
+   that the C code needs to keep it in a consistent state so Lisp can't mess
+   around with it.)
+
+   `canon' is used when doing case-insensitive comparisons.  `eqv' is
    used in the Boyer-Moore search code.
    */
 
--- a/src/config.h.in	Sun May 11 11:20:24 2008 +0200
+++ b/src/config.h.in	Sun May 11 11:24:01 2008 +0200
@@ -91,6 +91,9 @@
 /* Program name */
 #undef EMACS_PROGNAME
 
+/* Name of the link to the program to be used with #! scripts */
+#undef SHEBANG_PROGNAME
+
 /* Allow s&m files to differentiate OS versions without having
    multiple files to maintain. */
 #undef OS_RELEASE
@@ -1086,7 +1089,8 @@
    Use `inline static' to define inline functions in .c files.
    See the Internals manual for examples and more information. */
 
-#if defined (__cplusplus) || ! defined (__GNUC__) || ! defined(emacs)
+#if (defined ( __STDC_VERSION__) &&  __STDC_VERSION__ >= 199901L) \
+  || defined (__cplusplus) || ! defined (__GNUC__) || ! defined(emacs)
 # define INLINE_HEADER inline static
 #elif defined (DONT_EXTERN_INLINE_HEADER_FUNCTIONS)
 # define INLINE_HEADER inline
--- a/src/console-gtk.c	Sun May 11 11:20:24 2008 +0200
+++ b/src/console-gtk.c	Sun May 11 11:24:01 2008 +0200
@@ -39,6 +39,8 @@
 
 DEFINE_CONSOLE_TYPE (gtk);
 
+Lisp_Object Vgtk_seen_characters;
+
 static int
 gtk_initially_selected_for_input (struct console *UNUSED (con))
 {
@@ -122,13 +124,11 @@
 				      Lisp_Object key)
 {
   Lisp_Object char_to_associate = Qnil;
-  extern Lisp_Object Vcurrent_global_map, Qgtk_seen_characters,
-    Qcharacter_of_keysym;
+  extern Lisp_Object Vcurrent_global_map, Qcharacter_of_keysym;
 
   if (SYMBOLP(key))
     {
       gchar *symbol_name;
-      guint keyval;
       DECLARE_EISTRING(ei_symname);
       
       eicpy_rawz(ei_symname, XSTRING_DATA(symbol_name(XSYMBOL(key))));
@@ -154,21 +154,22 @@
   else
     {
       CHECK_CHAR(key);
+      char_to_associate = key;
     }
 
-  if (!(HASH_TABLEP(Qgtk_seen_characters)))
+  if (!(HASH_TABLEP(Vgtk_seen_characters)))
     {
-      Qgtk_seen_characters = make_lisp_hash_table (128, HASH_TABLE_NON_WEAK,
+      Vgtk_seen_characters = make_lisp_hash_table (128, HASH_TABLE_NON_WEAK,
 						   HASH_TABLE_EQUAL);
     }
 
   /* Might give the user an opaque error if make_lisp_hash_table fails,
      but it shouldn't crash. */
-  CHECK_HASH_TABLE(Qgtk_seen_characters);
+  CHECK_HASH_TABLE(Vgtk_seen_characters);
 
   if (EQ(char_to_associate, Qnil) /* If there's no char to bind,  */
       || (XCHAR(char_to_associate) < 0x80) /* or it's ASCII */
-      || !NILP(Fgethash(key, Qgtk_seen_characters, Qnil))) /* Or we've seen
+      || !NILP(Fgethash(key, Vgtk_seen_characters, Qnil))) /* Or we've seen
 							      it already, */
     {
       /* then don't bind the key. */
@@ -176,8 +177,8 @@
     }
 
   if (NILP (Flookup_key (Vcurrent_global_map, key, Qnil))) 
-    {
-      Fputhash(key, Qt, Qgtk_seen_characters);
+    { 
+      Fputhash(key, Qt, Vgtk_seen_characters);
       Fdefine_key (Vcurrent_global_map, key, Qself_insert_command); 
       if (SYMBOLP(key))
 	{
@@ -209,3 +210,10 @@
 {
   REINITIALIZE_CONSOLE_TYPE (gtk);
 }
+
+void
+vars_of_console_gtk (void)
+{
+  staticpro (&Vgtk_seen_characters);
+  Vgtk_seen_characters = Qnil;
+}
--- a/src/depend	Sun May 11 11:20:24 2008 +0200
+++ b/src/depend	Sun May 11 11:24:01 2008 +0200
@@ -15,263 +15,263 @@
 #endif
 
 #if defined(HAVE_MS_WINDOWS)
-console-msw.o: $(LISP_H) conslots.h console-impl.h console-msw-impl.h console-msw.h console.h elhash.h events.h intl-auto-encap-win32.h opaque.h specifier.h systime.h syswindows.h
-device-msw.o: $(LISP_H) charset.h conslots.h console-impl.h console-msw-impl.h console-msw.h console-stream.h console.h device-impl.h device.h devslots.h events.h faces.h frame.h intl-auto-encap-win32.h objects-msw.h objects.h redisplay.h specifier.h sysdep.h systime.h syswindows.h
-dialog-msw.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h frame-impl.h frame.h frameslots.h gui.h intl-auto-encap-win32.h opaque.h redisplay.h specifier.h sysfile.h syswindows.h
-dired-msw.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h console-msw.h console.h intl-auto-encap-win32.h ndir.h regex.h syntax.h sysdir.h sysfile.h sysfloat.h sysproc.h syspwd.h syssignal.h systime.h syswindows.h
-event-msw.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-impl.h console-msw-impl.h console-msw.h console-stream-impl.h console-stream.h console.h device-impl.h device.h devslots.h dragdrop.h events.h faces.h frame-impl.h frame.h frameslots.h glyphs.h gui.h intl-auto-encap-win32.h lstream.h menubar.h objects-impl.h objects-msw-impl.h objects-msw.h objects.h process.h redisplay.h scrollbar-msw.h scrollbar.h specifier.h sysdep.h sysfile.h sysproc.h syssignal.h systime.h syswait.h syswindows.h window-impl.h window.h winslots.h
-frame-msw.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h device-impl.h device.h devslots.h elhash.h events.h faces.h frame-impl.h frame.h frameslots.h glyphs-msw.h glyphs.h intl-auto-encap-win32.h redisplay.h scrollbar.h specifier.h systime.h syswindows.h window-impl.h window.h winslots.h
-glyphs-msw.o: $(LISP_H) charset.h coding-system-slots.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h device-impl.h device.h devslots.h elhash.h faces.h file-coding.h frame-impl.h frame.h frameslots.h glyphs-msw.h glyphs.h gui.h imgproc.h insdel.h intl-auto-encap-win32.h lstream.h objects-impl.h objects-msw-impl.h objects-msw.h objects.h opaque.h redisplay.h scrollbar.h specifier.h sysdep.h sysfile.h syswindows.h window-impl.h window.h winslots.h
-gui-msw.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h elhash.h events.h frame-impl.h frame.h frameslots.h glyphs.h gui.h intl-auto-encap-win32.h redisplay.h scrollbar.h specifier.h systime.h syswindows.h window-impl.h window.h winslots.h
-menubar-msw.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h elhash.h events.h frame-impl.h frame.h frameslots.h gui.h intl-auto-encap-win32.h menubar.h opaque.h redisplay.h scrollbar.h specifier.h systime.h syswindows.h window-impl.h window.h winslots.h
-objects-msw.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h device-impl.h device.h devslots.h elhash.h insdel.h intl-auto-encap-win32.h objects-impl.h objects-msw-impl.h objects-msw.h objects.h opaque.h specifier.h syswindows.h
-redisplay-msw.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h debug.h device-impl.h device.h devslots.h events.h faces.h frame-impl.h frame.h frameslots.h glyphs-msw.h glyphs.h gutter.h intl-auto-encap-win32.h objects-impl.h objects-msw-impl.h objects-msw.h objects.h redisplay.h scrollbar.h specifier.h sysdep.h systime.h syswindows.h window-impl.h window.h winslots.h
-scrollbar-msw.o: $(LISP_H) conslots.h console-impl.h console-msw-impl.h console-msw.h console.h device.h elhash.h events.h frame-impl.h frame.h frameslots.h intl-auto-encap-win32.h opaque.h redisplay.h scrollbar-msw.h scrollbar.h specifier.h systime.h syswindows.h window-impl.h window.h winslots.h
-select-msw.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h file-coding.h frame-impl.h frame.h frameslots.h intl-auto-encap-win32.h opaque.h redisplay.h select.h specifier.h syswindows.h
-toolbar-msw.o: $(LISP_H) charset.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h device.h elhash.h faces.h frame-impl.h frame.h frameslots.h glyphs-msw.h glyphs.h gui.h intl-auto-encap-win32.h redisplay.h scrollbar.h specifier.h syswindows.h toolbar.h window-impl.h window.h winslots.h
+console-msw.o: $(CONFIG_H) $(LISP_H) compiler.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h dumper.h elhash.h events.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h specifier.h symeval.h symsinit.h systime.h syswindows.h text.h vdb.h
+device-msw.o: $(CONFIG_H) $(LISP_H) charset.h compiler.h conslots.h console-impl.h console-msw-impl.h console-msw.h console-stream.h console.h device-impl.h device.h devslots.h dumper.h events.h faces.h frame.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-msw.h objects.h redisplay.h specifier.h symeval.h symsinit.h sysdep.h systime.h syswindows.h text.h vdb.h
+dialog-msw.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h dumper.h frame-impl.h frame.h frameslots.h gc.h general-slots.h gui.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h redisplay.h specifier.h symeval.h symsinit.h sysfile.h syswindows.h text.h vdb.h
+dired-msw.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h console-msw.h console.h dumper.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h ndir.h number-gmp.h number-mp.h number.h regex.h symeval.h symsinit.h syntax.h sysdir.h sysfile.h sysfloat.h sysproc.h syspwd.h syssignal.h systime.h syswindows.h text.h vdb.h
+event-msw.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console-msw-impl.h console-msw.h console-stream-impl.h console-stream.h console.h device-impl.h device.h devslots.h dragdrop.h dumper.h events.h faces.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs.h gui.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h menubar.h number-gmp.h number-mp.h number.h objects-impl.h objects-msw-impl.h objects-msw.h objects.h process.h redisplay.h scrollbar-msw.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h sysproc.h syssignal.h systime.h syswait.h syswindows.h text.h vdb.h window-impl.h window.h winslots.h
+frame-msw.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h device-impl.h device.h devslots.h dumper.h elhash.h events.h faces.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs-msw.h glyphs.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h syswindows.h text.h vdb.h window-impl.h window.h winslots.h
+glyphs-msw.o: $(CONFIG_H) $(LISP_H) charset.h coding-system-slots.h compiler.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h device-impl.h device.h devslots.h dumper.h elhash.h faces.h file-coding.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs-msw.h glyphs.h gui.h imgproc.h insdel.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h objects-impl.h objects-msw-impl.h objects-msw.h objects.h opaque.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h syswindows.h text.h vdb.h window-impl.h window.h winslots.h
+gui-msw.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h dumper.h elhash.h events.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs.h gui.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h syswindows.h text.h vdb.h window-impl.h window.h winslots.h
+menubar-msw.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h compiler.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h dumper.h elhash.h events.h frame-impl.h frame.h frameslots.h gc.h general-slots.h gui.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h menubar.h number-gmp.h number-mp.h number.h opaque.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h syswindows.h text.h vdb.h window-impl.h window.h winslots.h
+objects-msw.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h device-impl.h device.h devslots.h dumper.h elhash.h gc.h general-slots.h insdel.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-impl.h objects-msw-impl.h objects-msw.h objects.h opaque.h specifier.h symeval.h symsinit.h syswindows.h text.h vdb.h
+redisplay-msw.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h debug.h device-impl.h device.h devslots.h dumper.h events.h faces.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs-msw.h glyphs.h gutter.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-impl.h objects-msw-impl.h objects-msw.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h systime.h syswindows.h text.h vdb.h window-impl.h window.h winslots.h
+scrollbar-msw.o: $(CONFIG_H) $(LISP_H) compiler.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h device.h dumper.h elhash.h events.h frame-impl.h frame.h frameslots.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h redisplay.h scrollbar-msw.h scrollbar.h specifier.h symeval.h symsinit.h systime.h syswindows.h text.h vdb.h window-impl.h window.h winslots.h
+select-msw.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h dumper.h file-coding.h frame-impl.h frame.h frameslots.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h redisplay.h select.h specifier.h symeval.h symsinit.h syswindows.h text.h vdb.h
+toolbar-msw.o: $(CONFIG_H) $(LISP_H) charset.h compiler.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h device.h dumper.h elhash.h faces.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs-msw.h glyphs.h gui.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h syswindows.h text.h toolbar.h vdb.h window-impl.h window.h winslots.h
 #endif
 #if defined(HAVE_XLIKE)
 event-xlike-inc.o: 
 objects-xlike-inc.o: 
 #endif
 #if defined(HAVE_X_WINDOWS)
-EmacsFrame.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h EmacsFrameP.h EmacsManager.h charset.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h faces.h frame-impl.h frame.h frameslots.h glyphs-x.h glyphs.h objects-x.h objects.h redisplay.h scrollbar.h specifier.h toolbar.h window-impl.h window.h winslots.h xintrinsic.h xintrinsicp.h xmotif.h xmprimitivep.h xmu.h
+EmacsFrame.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h EmacsFrameP.h EmacsManager.h charset.h compiler.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h dumper.h faces.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs-x.h glyphs.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-x.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h text.h toolbar.h vdb.h window-impl.h window.h winslots.h xintrinsic.h xintrinsicp.h xmotif.h xmprimitivep.h xmu.h
 EmacsManager.o: $(CONFIG_H) EmacsManager.h EmacsManagerP.h compiler.h xintrinsicp.h xmmanagerp.h xmotif.h xmprimitivep.h
 EmacsShell-sub.o: $(CONFIG_H) EmacsShell.h EmacsShellP.h xintrinsic.h xintrinsicp.h
 EmacsShell.o: $(CONFIG_H) EmacsShell.h ExternalShell.h xintrinsicp.h
-balloon-x.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h balloon_help.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h specifier.h xintrinsic.h
+balloon-x.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h balloon_help.h compiler.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h specifier.h symeval.h symsinit.h text.h vdb.h xintrinsic.h
 balloon_help.o: $(CONFIG_H) balloon_help.h compiler.h xintrinsic.h
-console-x.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h elhash.h process.h redisplay.h specifier.h xintrinsic.h
-device-x.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h elhash.h events.h faces.h file-coding.h frame-impl.h frame.h frameslots.h glyphs-x.h glyphs.h objects-x.h objects.h offix-types.h offix.h process.h redisplay.h scrollbar.h specifier.h sysdep.h sysdll.h sysfile.h systime.h window-impl.h window.h winslots.h xgccache.h xintrinsic.h xintrinsicp.h xmu.h
-dialog-x.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h buffer.h bufslots.h casetab.h charset.h chartab.h commands.h conslots.h console-impl.h console-x-impl.h console-x.h console.h events.h frame-impl.h frame.h frameslots.h gui.h opaque.h redisplay.h scrollbar.h specifier.h systime.h window.h xintrinsic.h
-frame-x.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h EmacsFrameP.h EmacsManager.h EmacsShell.h ExternalShell.h buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h dragdrop.h events.h extents.h faces.h frame-impl.h frame.h frameslots.h glyphs-x.h glyphs.h gutter.h objects-impl.h objects-x-impl.h objects-x.h objects.h offix-types.h offix.h redisplay.h scrollbar-x.h scrollbar.h specifier.h systime.h window-impl.h window.h winslots.h xintrinsic.h xintrinsicp.h xmotif.h xmprimitivep.h xmu.h
-glyphs-x.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h bitmaps.h buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h faces.h file-coding.h frame-impl.h frame.h frameslots.h glyphs-x.h glyphs.h gui.h imgproc.h insdel.h lstream.h objects-impl.h objects-x-impl.h objects-x.h objects.h opaque.h process.h redisplay.h scrollbar.h specifier.h sysfile.h sysproc.h syssignal.h systime.h window-impl.h window.h winslots.h xintrinsic.h xmotif.h xmu.h
-gui-x.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h events.h frame.h glyphs.h gui.h menubar.h opaque.h redisplay.h scrollbar.h specifier.h systime.h window-impl.h window.h winslots.h xintrinsic.h xmotif.h
-intl-x.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h console-x.h console.h xintrinsic.h
-menubar-x.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h buffer.h bufslots.h casetab.h charset.h chartab.h commands.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h events.h frame-impl.h frame.h frameslots.h gui.h keymap.h menubar.h opaque.h redisplay.h scrollbar.h specifier.h systime.h window-impl.h window.h winslots.h xintrinsic.h
-objects-x.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h charset.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h elhash.h font-mgr.h insdel.h objects-impl.h objects-x-impl.h objects-x.h objects-xlike-inc.c objects.h specifier.h xintrinsic.h
-redisplay-x.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h EmacsFrameP.h buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h conslots.h console-impl.h console-x-impl.h console-x.h console.h debug.h device-impl.h device.h devslots.h faces.h file-coding.h frame-impl.h frame.h frameslots.h glyphs-x.h glyphs.h gutter.h mule-ccl.h objects-impl.h objects-x-impl.h objects-x.h objects.h redisplay.h scrollbar.h specifier.h sysdep.h sysproc.h syssignal.h systime.h window-impl.h window.h winslots.h xgccache.h xintrinsic.h xintrinsicp.h xmotif.h xmprimitivep.h
-scrollbar-x.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h frame-impl.h frame.h frameslots.h glyphs-x.h glyphs.h redisplay.h scrollbar-x.h scrollbar.h specifier.h window-impl.h window.h winslots.h xintrinsic.h
-select-x.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h charset.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h frame-impl.h frame.h frameslots.h objects-x.h objects.h opaque.h redisplay.h select-common.h select.h specifier.h systime.h xintrinsic.h xmotif.h
-toolbar-x.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h EmacsFrameP.h charset.h conslots.h console-impl.h console-x-impl.h console-x.h console.h faces.h frame-impl.h frame.h frameslots.h glyphs-x.h glyphs.h objects-x.h objects.h redisplay.h scrollbar.h specifier.h toolbar-common.h toolbar.h window-impl.h window.h winslots.h xintrinsic.h xintrinsicp.h xmotif.h xmprimitivep.h
-xgccache.o: $(LISP_H) hash.h xgccache.h
+console-x.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h dumper.h elhash.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h process.h redisplay.h specifier.h symeval.h symsinit.h text.h vdb.h xintrinsic.h
+device-x.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h dumper.h elhash.h events.h faces.h file-coding.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs-x.h glyphs.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-x.h objects.h offix-types.h offix.h process.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysdll.h sysfile.h systime.h text.h vdb.h window-impl.h window.h winslots.h xgccache.h xintrinsic.h xintrinsicp.h xmu.h
+dialog-x.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h buffer.h bufslots.h casetab.h charset.h chartab.h commands.h compiler.h conslots.h console-impl.h console-x-impl.h console-x.h console.h dumper.h events.h frame-impl.h frame.h frameslots.h gc.h general-slots.h gui.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h text.h vdb.h window.h xintrinsic.h
+frame-x.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h EmacsFrameP.h EmacsManager.h EmacsShell.h ExternalShell.h buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h dragdrop.h dumper.h events.h extents.h faces.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs-x.h glyphs.h gutter.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-impl.h objects-x-impl.h objects-x.h objects.h offix-types.h offix.h redisplay.h scrollbar-x.h scrollbar.h specifier.h symeval.h symsinit.h systime.h text.h vdb.h window-impl.h window.h winslots.h xintrinsic.h xintrinsicp.h xmotif.h xmprimitivep.h xmu.h
+glyphs-x.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h bitmaps.h buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h dumper.h faces.h file-coding.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs-x.h glyphs.h gui.h imgproc.h insdel.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h objects-impl.h objects-x-impl.h objects-x.h objects.h opaque.h process.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysfile.h sysproc.h syssignal.h systime.h text.h vdb.h window-impl.h window.h winslots.h xintrinsic.h xmotif.h xmu.h
+gui-x.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h dumper.h events.h frame.h gc.h general-slots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h menubar.h number-gmp.h number-mp.h number.h opaque.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h text.h vdb.h window-impl.h window.h winslots.h xintrinsic.h xmotif.h
+intl-x.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h compiler.h console-x.h console.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h xintrinsic.h
+menubar-x.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h buffer.h bufslots.h casetab.h charset.h chartab.h commands.h compiler.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h dumper.h events.h frame-impl.h frame.h frameslots.h gc.h general-slots.h gui.h keymap.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h menubar.h number-gmp.h number-mp.h number.h opaque.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h text.h vdb.h window-impl.h window.h winslots.h xintrinsic.h
+objects-x.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h charset.h compiler.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h dumper.h elhash.h font-mgr.h gc.h general-slots.h insdel.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-impl.h objects-x-impl.h objects-x.h objects-xlike-inc.c objects.h specifier.h symeval.h symsinit.h text.h vdb.h xintrinsic.h
+redisplay-x.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h EmacsFrameP.h buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h conslots.h console-impl.h console-x-impl.h console-x.h console.h debug.h device-impl.h device.h devslots.h dumper.h faces.h file-coding.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs-x.h glyphs.h gutter.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h mule-ccl.h number-gmp.h number-mp.h number.h objects-impl.h objects-x-impl.h objects-x.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysproc.h syssignal.h systime.h text.h vdb.h window-impl.h window.h winslots.h xgccache.h xintrinsic.h xintrinsicp.h xmotif.h xmprimitivep.h
+scrollbar-x.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h compiler.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h dumper.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs-x.h glyphs.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar-x.h scrollbar.h specifier.h symeval.h symsinit.h text.h vdb.h window-impl.h window.h winslots.h xintrinsic.h
+select-x.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h charset.h compiler.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h dumper.h frame-impl.h frame.h frameslots.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-x.h objects.h opaque.h redisplay.h select-common.h select.h specifier.h symeval.h symsinit.h systime.h text.h vdb.h xintrinsic.h xmotif.h
+toolbar-x.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h EmacsFrameP.h charset.h compiler.h conslots.h console-impl.h console-x-impl.h console-x.h console.h dumper.h faces.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs-x.h glyphs.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-x.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h text.h toolbar-common.h toolbar.h vdb.h window-impl.h window.h winslots.h xintrinsic.h xintrinsicp.h xmotif.h xmprimitivep.h
+xgccache.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h hash.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h xgccache.h
 #endif
 #if defined(HAVE_TTY)
-console-tty.o: $(LISP_H) charset.h coding-system-slots.h conslots.h console-impl.h console-stream.h console-tty-impl.h console-tty.h console.h elhash.h faces.h file-coding.h frame.h glyphs.h lstream.h process.h redisplay.h scrollbar.h specifier.h sysdep.h sysfile.h systty.h window-impl.h window.h winslots.h
-device-tty.o: $(LISP_H) charset.h conslots.h console-impl.h console-stream.h console-tty-impl.h console-tty.h console.h device-impl.h device.h devslots.h events.h faces.h frame.h lstream.h redisplay.h specifier.h sysdep.h sysfile.h syssignal.h systime.h systty.h
-event-tty.o: $(LISP_H) conslots.h console-impl.h console-tty-impl.h console-tty.h console.h device.h events.h frame.h process.h redisplay.h specifier.h sysproc.h syssignal.h systime.h systty.h syswait.h
-frame-tty.o: $(LISP_H) conslots.h console-impl.h console-tty-impl.h console-tty.h console.h device-impl.h device.h devslots.h events.h frame-impl.h frame.h frameslots.h redisplay.h specifier.h systime.h systty.h
-objects-tty.o: $(LISP_H) charset.h conslots.h console-impl.h console-tty-impl.h console-tty.h console.h device.h insdel.h objects-impl.h objects-tty-impl.h objects-tty.h objects.h specifier.h systty.h
-redisplay-tty.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-impl.h console-tty-impl.h console-tty.h console.h device-impl.h device.h devslots.h events.h faces.h frame-impl.h frame.h frameslots.h glyphs.h lstream.h objects-impl.h objects-tty-impl.h objects-tty.h objects.h redisplay.h scrollbar.h specifier.h sysdep.h syssignal.h systime.h systty.h window-impl.h window.h winslots.h
+console-tty.o: $(CONFIG_H) $(LISP_H) charset.h coding-system-slots.h compiler.h conslots.h console-impl.h console-stream.h console-tty-impl.h console-tty.h console.h dumper.h elhash.h faces.h file-coding.h frame.h gc.h general-slots.h glyphs.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h process.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h systty.h text.h vdb.h window-impl.h window.h winslots.h
+device-tty.o: $(CONFIG_H) $(LISP_H) charset.h compiler.h conslots.h console-impl.h console-stream.h console-tty-impl.h console-tty.h console.h device-impl.h device.h devslots.h dumper.h events.h faces.h frame.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h syssignal.h systime.h systty.h text.h vdb.h
+event-tty.o: $(CONFIG_H) $(LISP_H) compiler.h conslots.h console-impl.h console-tty-impl.h console-tty.h console.h device.h dumper.h events.h frame.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h process.h redisplay.h specifier.h symeval.h symsinit.h sysproc.h syssignal.h systime.h systty.h syswait.h text.h vdb.h
+frame-tty.o: $(CONFIG_H) $(LISP_H) compiler.h conslots.h console-impl.h console-tty-impl.h console-tty.h console.h device-impl.h device.h devslots.h dumper.h events.h frame-impl.h frame.h frameslots.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h specifier.h symeval.h symsinit.h systime.h systty.h text.h vdb.h
+objects-tty.o: $(CONFIG_H) $(LISP_H) charset.h compiler.h conslots.h console-impl.h console-tty-impl.h console-tty.h console.h device.h dumper.h gc.h general-slots.h insdel.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-impl.h objects-tty-impl.h objects-tty.h objects.h specifier.h symeval.h symsinit.h systty.h text.h vdb.h
+redisplay-tty.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console-tty-impl.h console-tty.h console.h device-impl.h device.h devslots.h dumper.h events.h faces.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h objects-impl.h objects-tty-impl.h objects-tty.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h syssignal.h systime.h systty.h text.h vdb.h window-impl.h window.h winslots.h
 #endif
 #if defined(HAVE_GTK)
-console-gtk.o: $(LISP_H) charset.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h elhash.h process.h redisplay.h specifier.h
-device-gtk.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h device-impl.h device.h devslots.h elhash.h events.h faces.h frame-impl.h frame.h frameslots.h gccache-gtk.h glyphs-gtk.h glyphs.h gtk-xemacs.h objects-gtk.h objects.h redisplay.h scrollbar.h specifier.h sysdep.h sysfile.h systime.h window-impl.h window.h winslots.h
-dialog-gtk.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h events.h frame.h gui.h opaque.h redisplay.h scrollbar.h specifier.h systime.h window.h
+console-gtk.o: $(CONFIG_H) $(LISP_H) charset.h compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h dumper.h elhash.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h process.h redisplay.h specifier.h symeval.h symsinit.h text.h vdb.h
+device-gtk.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h elhash.h events.h faces.h frame-impl.h frame.h frameslots.h gc.h gccache-gtk.h general-slots.h glyphs-gtk.h glyphs.h gtk-xemacs.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-gtk.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h systime.h text.h vdb.h window-impl.h window.h winslots.h
+dialog-gtk.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h dumper.h events.h frame.h gc.h general-slots.h gui.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h text.h vdb.h window.h
 emacs-marshals.o: hash.h
 emacs-widget-accessors.o: 
-event-gtk.o: $(LISP_H) blocktype.h buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h commands.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console-tty.h console.h device-impl.h device.h devslots.h dragdrop.h elhash.h event-gtk.h event-xlike-inc.c events.h file-coding.h frame-impl.h frame.h frameslots.h gtk-xemacs.h gui.h lstream.h menubar.h objects-gtk.h objects.h offix-types.h offix.h process.h redisplay.h scrollbar.h specifier.h sysproc.h syssignal.h systime.h systty.h window.h xintrinsic.h
-frame-gtk.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h device-impl.h device.h devslots.h dragdrop.h elhash.h events.h extents.h faces.h frame-impl.h frame.h frameslots.h glyphs-gtk.h glyphs.h gtk-xemacs.h objects-gtk-impl.h objects-gtk.h objects-impl.h objects.h redisplay.h scrollbar-gtk.h scrollbar.h specifier.h sysdll.h systime.h ui-gtk.h window-impl.h window.h winslots.h
-gccache-gtk.o: $(LISP_H) gccache-gtk.h hash.h
+event-gtk.o: $(CONFIG_H) $(LISP_H) blocktype.h buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h commands.h compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console-tty.h console.h device-impl.h device.h devslots.h dragdrop.h dumper.h elhash.h event-gtk.h event-xlike-inc.c events.h file-coding.h frame-impl.h frame.h frameslots.h gc.h general-slots.h gtk-xemacs.h gui.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h menubar.h number-gmp.h number-mp.h number.h objects-gtk.h objects.h offix-types.h offix.h process.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysproc.h syssignal.h systime.h systty.h text.h vdb.h window.h xintrinsic.h
+frame-gtk.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h device-impl.h device.h devslots.h dragdrop.h dumper.h elhash.h events.h extents.h faces.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs-gtk.h glyphs.h gtk-xemacs.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-gtk-impl.h objects-gtk.h objects-impl.h objects.h redisplay.h scrollbar-gtk.h scrollbar.h specifier.h symeval.h symsinit.h sysdll.h systime.h text.h ui-gtk.h vdb.h window-impl.h window.h winslots.h
+gccache-gtk.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h gccache-gtk.h general-slots.h hash.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h
 glade.o: bytecode.h
-glyphs-gtk.o: $(LISP_H) bitmaps.h buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h device-impl.h device.h devslots.h elhash.h events.h faces.h file-coding.h frame-impl.h frame.h frameslots.h glyphs-gtk.h glyphs.h gui.h imgproc.h insdel.h lstream.h objects-gtk-impl.h objects-gtk.h objects-impl.h objects.h opaque.h redisplay.h scrollbar.h specifier.h sysdll.h sysfile.h systime.h ui-gtk.h window-impl.h window.h winslots.h
+glyphs-gtk.o: $(CONFIG_H) $(LISP_H) bitmaps.h buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h elhash.h events.h faces.h file-coding.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs-gtk.h glyphs.h gui.h imgproc.h insdel.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h objects-gtk-impl.h objects-gtk.h objects-impl.h objects.h opaque.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdll.h sysfile.h systime.h text.h ui-gtk.h vdb.h window-impl.h window.h winslots.h
 gtk-glue.o: objects-gtk-impl.h objects-gtk.h objects-impl.h objects.h specifier.h
-gtk-xemacs.o: $(LISP_H) charset.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h device-impl.h device.h devslots.h event-gtk.h faces.h frame-impl.h frame.h frameslots.h glyphs.h gtk-xemacs.h objects-gtk.h objects.h redisplay.h scrollbar.h specifier.h window-impl.h window.h winslots.h
-gui-gtk.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h device-impl.h device.h devslots.h frame.h gui.h opaque.h redisplay.h specifier.h
-menubar-gtk.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h device-impl.h device.h devslots.h events.h frame-impl.h frame.h frameslots.h gui.h menubar.h opaque.h redisplay.h scrollbar.h specifier.h sysdll.h systime.h ui-gtk.h window-impl.h window.h winslots.h
-native-gtk-toolbar.o: $(LISP_H) charset.h console-gtk.h console.h faces.h frame.h glyphs-gtk.h glyphs.h objects-gtk.h objects.h redisplay.h scrollbar.h specifier.h toolbar.h window-impl.h window.h winslots.h
-objects-gtk.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h device-impl.h device.h devslots.h insdel.h objects-gtk-impl.h objects-gtk.h objects-impl.h objects-xlike-inc.c objects.h specifier.h
-redisplay-gtk.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h debug.h device-impl.h device.h devslots.h faces.h file-coding.h frame-impl.h frame.h frameslots.h gccache-gtk.h glyphs-gtk.h glyphs.h gutter.h mule-ccl.h objects-gtk-impl.h objects-gtk.h objects-impl.h objects.h redisplay.h scrollbar.h specifier.h sysdep.h sysproc.h syssignal.h systime.h window-impl.h window.h winslots.h
-scrollbar-gtk.o: $(LISP_H) conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h frame-impl.h frame.h frameslots.h glyphs-gtk.h glyphs.h redisplay.h scrollbar-gtk.h scrollbar.h specifier.h window-impl.h window.h winslots.h
-select-gtk.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h device-impl.h device.h devslots.h events.h frame.h opaque.h redisplay.h select-common.h select.h specifier.h systime.h
-toolbar-gtk.o: $(LISP_H) conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h frame.h redisplay.h specifier.h toolbar-common.h
+gtk-xemacs.o: $(CONFIG_H) $(LISP_H) charset.h compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h event-gtk.h faces.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs.h gtk-xemacs.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-gtk.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h text.h vdb.h window-impl.h window.h winslots.h
+gui-gtk.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h frame.h gc.h general-slots.h gui.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h redisplay.h specifier.h symeval.h symsinit.h text.h vdb.h
+menubar-gtk.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h events.h frame-impl.h frame.h frameslots.h gc.h general-slots.h gui.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h menubar.h number-gmp.h number-mp.h number.h opaque.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdll.h systime.h text.h ui-gtk.h vdb.h window-impl.h window.h winslots.h
+native-gtk-toolbar.o: $(CONFIG_H) $(LISP_H) charset.h compiler.h console-gtk.h console.h dumper.h faces.h frame.h gc.h general-slots.h glyphs-gtk.h glyphs.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-gtk.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h text.h toolbar.h vdb.h window-impl.h window.h winslots.h
+objects-gtk.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h gc.h general-slots.h insdel.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-gtk-impl.h objects-gtk.h objects-impl.h objects-xlike-inc.c objects.h specifier.h symeval.h symsinit.h text.h vdb.h
+redisplay-gtk.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h debug.h device-impl.h device.h devslots.h dumper.h faces.h file-coding.h frame-impl.h frame.h frameslots.h gc.h gccache-gtk.h general-slots.h glyphs-gtk.h glyphs.h gutter.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h mule-ccl.h number-gmp.h number-mp.h number.h objects-gtk-impl.h objects-gtk.h objects-impl.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysproc.h syssignal.h systime.h text.h vdb.h window-impl.h window.h winslots.h
+scrollbar-gtk.o: $(CONFIG_H) $(LISP_H) compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h dumper.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs-gtk.h glyphs.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar-gtk.h scrollbar.h specifier.h symeval.h symsinit.h text.h vdb.h window-impl.h window.h winslots.h
+select-gtk.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h events.h frame.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h redisplay.h select-common.h select.h specifier.h symeval.h symsinit.h systime.h text.h vdb.h
+toolbar-gtk.o: $(CONFIG_H) $(LISP_H) compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h dumper.h frame.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h specifier.h symeval.h symsinit.h text.h toolbar-common.h vdb.h
 ui-byhand.o: gui.h
-ui-gtk.o: $(LISP_H) buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h device.h elhash.h emacs-marshals.c emacs-widget-accessors.c event-gtk.h events.h faces.h glade.c glyphs-gtk.h glyphs.h gtk-glue.c gui.h hash.h objects-gtk-impl.h objects-gtk.h objects-impl.h objects.h redisplay.h scrollbar.h specifier.h sysdll.h systime.h ui-byhand.c ui-gtk.h window-impl.h window.h winslots.h
+ui-gtk.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h device.h dumper.h elhash.h emacs-marshals.c emacs-widget-accessors.c event-gtk.h events.h faces.h gc.h general-slots.h glade.c glyphs-gtk.h glyphs.h gtk-glue.c gui.h hash.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-gtk-impl.h objects-gtk.h objects-impl.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdll.h systime.h text.h ui-byhand.c ui-gtk.h vdb.h window-impl.h window.h winslots.h
 #endif
 #if defined(HAVE_DATABASE)
-database.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h database.h sysfile.h
+database.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h database.h dumper.h file-coding.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h sysfile.h text.h vdb.h
 #endif
 #if defined(MULE)
-mule-ccl.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h elhash.h file-coding.h mule-ccl.h
-mule-charset.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h console.h device.h elhash.h faces.h lstream.h mule-ccl.h objects.h specifier.h
-mule-coding.o: $(LISP_H) charset.h coding-system-slots.h file-coding.h mule-ccl.h
-mule-wnnfns.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h redisplay.h scrollbar.h sysdep.h window.h
+mule-ccl.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h dumper.h elhash.h file-coding.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h mule-ccl.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h
+mule-charset.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h console.h device.h dumper.h elhash.h faces.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h mule-ccl.h number-gmp.h number-mp.h number.h objects.h specifier.h symeval.h symsinit.h text.h vdb.h
+mule-coding.o: $(CONFIG_H) $(LISP_H) charset.h coding-system-slots.h compiler.h dumper.h file-coding.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h mule-ccl.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h
+mule-wnnfns.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h symeval.h symsinit.h sysdep.h text.h vdb.h window.h
 #endif
 #if defined(EXTERNAL_WIDGET)
 ExternalClient-Xlib.o: extw-Xlib.h
 ExternalClient.o: $(CONFIG_H) ExternalClient.h ExternalClientP.h compiler.h extw-Xlib.h extw-Xt.h xintrinsicp.h
 ExternalShell.o: $(CONFIG_H) ExternalShell.h ExternalShellP.h compiler.h extw-Xlib.h extw-Xt.h xintrinsic.h xintrinsicp.h
 extw-Xlib.o: $(CONFIG_H) extw-Xlib.h
-extw-Xt.o: $(CONFIG_H) extw-Xlib.h extw-Xt.h
+extw-Xt.o: $(CONFIG_H) compiler.h extw-Xlib.h extw-Xt.h
 #endif
-abbrev.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h insdel.h redisplay.h scrollbar.h syntax.h window.h
-alloc.o: $(LISP_H) backtrace.h buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h coding-system-slots.h conslots.h console-impl.h console-stream.h console.h device.h elhash.h events.h extents-impl.h extents.h file-coding.h frame-impl.h frame.h frameslots.h glyphs.h lstream.h opaque.h process.h profile.h redisplay.h scrollbar.h specifier.h sysdep.h sysfile.h systime.h window-impl.h window.h winslots.h
-alloca.o: $(LISP_H)
-alsaplay.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h sound.h sysfile.h
-blocktype.o: $(LISP_H) blocktype.h
-buffer.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h commands.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h elhash.h extents.h faces.h file-coding.h frame-impl.h frame.h frameslots.h insdel.h intl-auto-encap-win32.h lstream.h ndir.h process.h redisplay.h scrollbar.h select.h specifier.h syntax.h sysdir.h sysfile.h syswindows.h window.h
-bytecode.o: $(LISP_H) backtrace.h buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h opaque.h redisplay.h scrollbar.h syntax.h window.h
-callint.o: $(LISP_H) buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h commands.h events.h insdel.h redisplay.h scrollbar.h systime.h window-impl.h window.h winslots.h
-casefiddle.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h insdel.h syntax.h
-casetab.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h opaque.h
-chartab.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h syntax.h
-cm.o: $(LISP_H) conslots.h console-impl.h console-tty-impl.h console-tty.h console.h device.h frame.h lstream.h redisplay.h specifier.h systty.h
-cmdloop.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h conslots.h console-impl.h console-msw.h console.h device.h events.h frame.h intl-auto-encap-win32.h redisplay.h scrollbar.h specifier.h systime.h syswindows.h window.h
-cmds.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h extents.h insdel.h syntax.h
-console-stream.o: $(LISP_H) conslots.h console-impl.h console-stream-impl.h console-stream.h console-tty.h console.h device-impl.h device.h devslots.h events.h frame-impl.h frame.h frameslots.h redisplay.h scrollbar.h specifier.h sysdep.h sysfile.h systime.h systty.h window.h
-console.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-impl.h console-stream-impl.h console-stream.h console-tty-impl.h console-tty.h console.h device-impl.h device.h devslots.h events.h frame-impl.h frame.h frameslots.h redisplay.h scrollbar.h specifier.h sysdep.h systime.h systty.h window.h
-data.o: $(LISP_H) buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h sysfloat.h syssignal.h
-debug.o: $(LISP_H) bytecode.h debug.h
-device.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h elhash.h events.h faces.h frame-impl.h frame.h frameslots.h keymap.h objects.h redisplay.h scrollbar.h specifier.h sysdep.h syssignal.h systime.h toolbar.h window.h
-dgif_lib.o: $(LISP_H) gifrlib.h sysfile.h
-dialog.o: $(LISP_H) conslots.h console-impl.h console.h frame-impl.h frame.h frameslots.h redisplay.h specifier.h
-dired.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h elhash.h intl-auto-encap-win32.h ndir.h opaque.h regex.h syntax.h sysdep.h sysdir.h sysfile.h syspwd.h systime.h syswindows.h
-doc.o: $(LISP_H) buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h coding-system-slots.h file-coding.h insdel.h keymap.h lstream.h sysfile.h
-doprnt.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h lstream.h
-dragdrop.o: $(LISP_H) dragdrop.h
-dump-data.o: $(LISP_H) dump-data.h
-dumper.o: $(LISP_H) coding-system-slots.h console-stream.h console.h dump-data.h elhash.h file-coding.h intl-auto-encap-win32.h lstream.h specifier.h sysfile.h syswindows.h
-dynarr.o: $(LISP_H)
+abbrev.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h compiler.h dumper.h gc.h general-slots.h insdel.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h symeval.h symsinit.h syntax.h text.h vdb.h window.h
+alloc.o: $(CONFIG_H) $(LISP_H) backtrace.h buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h conslots.h console-impl.h console-stream.h console.h device.h dumper.h elhash.h events.h extents-impl.h extents.h file-coding.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h process.h profile.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h systime.h text.h vdb.h window-impl.h window.h winslots.h
+alloca.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h
+alsaplay.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h sound.h symeval.h symsinit.h sysfile.h text.h vdb.h
+blocktype.o: $(CONFIG_H) $(LISP_H) blocktype.h compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h
+buffer.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h commands.h compiler.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h elhash.h extents.h faces.h file-coding.h frame-impl.h frame.h frameslots.h gc.h general-slots.h insdel.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h ndir.h number-gmp.h number-mp.h number.h process.h redisplay.h scrollbar.h select.h specifier.h symeval.h symsinit.h syntax.h sysdir.h sysfile.h syswindows.h text.h vdb.h window.h
+bytecode.o: $(CONFIG_H) $(LISP_H) backtrace.h buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h redisplay.h scrollbar.h symeval.h symsinit.h syntax.h text.h vdb.h window.h
+callint.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h commands.h compiler.h dumper.h events.h gc.h general-slots.h insdel.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h symeval.h symsinit.h systime.h text.h vdb.h window-impl.h window.h winslots.h
+casefiddle.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h insdel.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h syntax.h text.h vdb.h
+casetab.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h symeval.h symsinit.h text.h vdb.h
+chartab.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h syntax.h text.h vdb.h
+cm.o: $(CONFIG_H) $(LISP_H) compiler.h conslots.h console-impl.h console-tty-impl.h console-tty.h console.h device.h dumper.h frame.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h specifier.h symeval.h symsinit.h systty.h text.h vdb.h
+cmdloop.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h compiler.h conslots.h console-impl.h console-msw.h console.h device.h dumper.h events.h frame.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h syswindows.h text.h vdb.h window.h
+cmds.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h compiler.h dumper.h extents.h gc.h general-slots.h insdel.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h syntax.h text.h vdb.h
+console-stream.o: $(CONFIG_H) $(LISP_H) compiler.h conslots.h console-impl.h console-stream-impl.h console-stream.h console-tty.h console.h device-impl.h device.h devslots.h dumper.h events.h frame-impl.h frame.h frameslots.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h systime.h systty.h text.h vdb.h window.h
+console.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console-stream-impl.h console-stream.h console-tty-impl.h console-tty.h console.h device-impl.h device.h devslots.h dumper.h events.h frame-impl.h frame.h frameslots.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h systime.h systty.h text.h vdb.h window.h
+data.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h sysfloat.h syssignal.h text.h vdb.h
+debug.o: $(CONFIG_H) $(LISP_H) bytecode.h compiler.h debug.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h
+device.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h elhash.h events.h faces.h frame-impl.h frame.h frameslots.h gc.h general-slots.h keymap.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h syssignal.h systime.h text.h toolbar.h vdb.h window.h
+dgif_lib.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h gifrlib.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h sysfile.h text.h vdb.h
+dialog.o: $(CONFIG_H) $(LISP_H) compiler.h conslots.h console-impl.h console.h dumper.h frame-impl.h frame.h frameslots.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h specifier.h symeval.h symsinit.h text.h vdb.h
+dired.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h compiler.h dumper.h elhash.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h ndir.h number-gmp.h number-mp.h number.h opaque.h regex.h symeval.h symsinit.h syntax.h sysdep.h sysdir.h sysfile.h syspwd.h systime.h syswindows.h text.h vdb.h
+doc.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h dumper.h file-coding.h gc.h general-slots.h insdel.h keymap.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h sysfile.h text.h vdb.h
+doprnt.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h
+dragdrop.o: $(CONFIG_H) $(LISP_H) compiler.h dragdrop.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h
+dump-data.o: $(CONFIG_H) $(LISP_H) compiler.h dump-data.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h
+dumper.o: $(CONFIG_H) $(LISP_H) coding-system-slots.h compiler.h console-stream.h console.h dump-data.h dumper.h elhash.h file-coding.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h specifier.h symeval.h symsinit.h sysfile.h syswindows.h text.h vdb.h
+dynarr.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h
 ecrt0.o: $(CONFIG_H)
-editfns.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h console.h device.h events.h frame.h insdel.h line-number.h ndir.h process.h redisplay.h scrollbar.h sysdep.h sysdir.h sysfile.h sysproc.h syspwd.h syssignal.h systime.h window.h
-elhash.o: $(LISP_H) bytecode.h elhash.h opaque.h
-emacs.o: $(LISP_H) backtrace.h buffer.h bufslots.h casetab.h charset.h chartab.h commands.h console-msw.h console.h dump-data.h frame.h intl-auto-encap-win32.h paths.h process.h redisplay.h sysdep.h sysdll.h sysfile.h sysproc.h syssignal.h systime.h systty.h syswindows.h
-emodules.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h console.h emodules.h file-coding.h frame.h insdel.h lstream.h redisplay.h scrollbar.h sysdep.h sysdll.h window.h
-esd.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h miscplay.h sound.h sysfile.h
-eval.o: $(LISP_H) backtrace.h buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h commands.h conslots.h console-impl.h console.h device.h frame.h lstream.h opaque.h profile.h redisplay.h scrollbar.h specifier.h window.h
-event-Xt.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h Emacs.ad.h EmacsFrame.h blocktype.h charset.h coding-system-slots.h conslots.h console-impl.h console-tty.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h dragdrop.h elhash.h event-xlike-inc.c events.h file-coding.h frame-impl.h frame.h frameslots.h glyphs.h lstream.h objects-x.h objects.h offix-types.h offix.h process.h redisplay.h scrollbar.h specifier.h sysproc.h syssignal.h systime.h systty.h window-impl.h window.h winslots.h xintrinsic.h xintrinsicp.h xmotif.h
-event-stream.o: $(LISP_H) backtrace.h blocktype.h buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h commands.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h elhash.h events.h file-coding.h frame-impl.h frame.h frameslots.h gui.h insdel.h keymap.h lstream.h macros.h menubar.h process.h profile.h redisplay.h scrollbar.h specifier.h sysdep.h sysfile.h syssignal.h systime.h window-impl.h window.h winslots.h
-event-unixoid.o: $(LISP_H) conslots.h console-impl.h console-stream-impl.h console-stream.h console-tty-impl.h console-tty.h console.h device-impl.h device.h devslots.h events.h lstream.h process.h specifier.h sysdep.h sysfile.h sysproc.h syssignal.h systime.h systty.h
-events.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-impl.h console-tty-impl.h console-tty.h console.h device.h events.h extents.h frame-impl.h frame.h frameslots.h glyphs.h keymap.h lstream.h redisplay.h scrollbar.h specifier.h systime.h systty.h toolbar.h window-impl.h window.h winslots.h
-extents.o: $(LISP_H) backtrace.h buffer.h bufslots.h casetab.h charset.h chartab.h console.h debug.h device.h elhash.h extents-impl.h extents.h faces.h frame.h glyphs.h gutter.h insdel.h keymap.h opaque.h process.h profile.h redisplay.h scrollbar.h specifier.h window-impl.h window.h winslots.h
-faces.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h elhash.h extents-impl.h extents.h faces.h frame-impl.h frame.h frameslots.h glyphs.h objects-impl.h objects.h redisplay.h scrollbar.h specifier.h window-impl.h window.h winslots.h
-file-coding.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h elhash.h file-coding.h insdel.h lstream.h opaque.h
-fileio.o: $(LISP_H) backtrace.h buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h console.h device.h events.h file-coding.h frame.h insdel.h intl-auto-encap-win32.h lstream.h ndir.h process.h profile.h redisplay.h scrollbar.h sysdep.h sysdir.h sysfile.h sysproc.h syspwd.h syssignal.h systime.h syswindows.h window-impl.h window.h winslots.h
-filelock.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h ndir.h paths.h sysdir.h sysfile.h sysproc.h syspwd.h syssignal.h systime.h
-filemode.o: $(LISP_H) sysfile.h
-floatfns.o: $(LISP_H) sysfloat.h syssignal.h
-fns.o: $(LISP_H) buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h console.h device.h events.h extents.h frame.h insdel.h lstream.h opaque.h process.h redisplay.h sysfile.h sysproc.h syssignal.h systime.h
-font-lock.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h insdel.h syntax.h
-font-mgr.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h font-mgr.h hash.h objects-impl.h objects-x-impl.h objects-x.h objects.h specifier.h xintrinsic.h
-frame.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h events.h extents.h faces.h frame-impl.h frame.h frameslots.h glyphs.h gui.h gutter.h menubar.h process.h redisplay.h scrollbar.h specifier.h systime.h toolbar.h window-impl.h window.h winslots.h
-free-hook.o: $(LISP_H) hash.h
-gc.o: $(LISP_H) backtrace.h buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h coding-system-slots.h conslots.h console-impl.h console-stream.h console.h device.h elhash.h events.h extents-impl.h extents.h file-coding.h frame-impl.h frame.h frameslots.h glyphs.h lstream.h opaque.h process.h profile.h redisplay.h scrollbar.h specifier.h sysdep.h sysfile.h systime.h window-impl.h window.h winslots.h
-general.o: $(LISP_H) general-slots.h
-getloadavg.o: $(LISP_H) sysfile.h syssignal.h
-gif_io.o: $(LISP_H) gifrlib.h sysfile.h
-glyphs-eimage.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h faces.h file-coding.h frame.h gifrlib.h glyphs.h lstream.h objects-impl.h objects.h opaque.h redisplay.h scrollbar.h specifier.h sysfile.h window-impl.h window.h winslots.h
-glyphs-shared.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h console.h elhash.h faces.h frame.h glyphs.h imgproc.h insdel.h lstream.h opaque.h redisplay.h scrollbar.h specifier.h sysdep.h sysfile.h window-impl.h window.h winslots.h
-glyphs-widget.o: $(LISP_H) bytecode.h charset.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h faces.h frame.h glyphs.h gui.h insdel.h lstream.h objects.h opaque.h redisplay.h scrollbar.h specifier.h window-impl.h window.h winslots.h
-glyphs.o: $(LISP_H) blocktype.h buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h elhash.h faces.h frame-impl.h frame.h frameslots.h glyphs.h gui.h insdel.h objects-impl.h objects.h opaque.h rangetab.h redisplay.h scrollbar.h specifier.h sysfile.h window-impl.h window.h winslots.h
-gmalloc.o: $(LISP_H) getpagesize.h sysdep.h
-gpmevent.o: $(LISP_H) commands.h conslots.h console-impl.h console-tty-impl.h console-tty.h console.h device-impl.h device.h devslots.h events.h frame.h gpmevent.h lstream.h process.h redisplay.h specifier.h sysdep.h sysproc.h syssignal.h systime.h systty.h
-gui.o: $(LISP_H) buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h elhash.h gui.h menubar.h redisplay.h
-gutter.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h faces.h frame-impl.h frame.h frameslots.h glyphs.h gutter.h redisplay.h scrollbar.h specifier.h window-impl.h window.h winslots.h
-hash.o: $(LISP_H) hash.h
-hftctl.o: $(LISP_H) sysfile.h
-hpplay.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h sound.h
-imgproc.o: $(LISP_H) imgproc.h
-indent.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h console.h device.h extents.h faces.h frame.h glyphs.h insdel.h redisplay.h scrollbar.h specifier.h window-impl.h window.h winslots.h
-inline.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h coding-system-slots.h conslots.h console-gtk.h console-impl.h console-msw.h console.h database.h device-impl.h device.h devslots.h elhash.h events.h extents-impl.h extents.h faces.h file-coding.h font-mgr.h frame-impl.h frame.h frameslots.h glyphs-x.h glyphs.h gui.h intl-auto-encap-win32.h keymap.h lstream.h objects-impl.h objects.h opaque.h process.h rangetab.h redisplay.h scrollbar.h specifier.h syntax.h sysdll.h sysfile.h systime.h syswindows.h toolbar.h tooltalk.h ui-gtk.h window-impl.h window.h winslots.h xintrinsic.h
-input-method-motif.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device.h frame-impl.h frame.h frameslots.h redisplay.h specifier.h xintrinsic.h xmotif.h
-input-method-xlib.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h events.h frame-impl.h frame.h frameslots.h redisplay.h scrollbar.h specifier.h systime.h window-impl.h window.h winslots.h xintrinsic.h
-insdel.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h console.h device.h extents.h frame.h insdel.h line-number.h lstream.h redisplay.h
-intl-auto-encap-win32.o: $(LISP_H) intl-auto-encap-win32.h syswindows.h
-intl-encap-win32.o: $(LISP_H) console-msw.h console.h intl-auto-encap-win32.h syswindows.h
-intl-win32.o: $(LISP_H) charset.h coding-system-slots.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h elhash.h faces.h file-coding.h frame-impl.h frame.h frameslots.h intl-auto-encap-win32.h objects-impl.h objects-msw-impl.h objects-msw.h objects.h redisplay.h scrollbar.h specifier.h syswindows.h window-impl.h window.h winslots.h
-intl.o: $(LISP_H)
-keymap.o: $(LISP_H) buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h conslots.h console-impl.h console.h elhash.h events.h extents.h frame.h insdel.h keymap.h redisplay.h scrollbar.h specifier.h systime.h window.h
+editfns.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h compiler.h console.h device.h dumper.h events.h frame.h gc.h general-slots.h insdel.h line-number.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h ndir.h number-gmp.h number-mp.h number.h process.h redisplay.h scrollbar.h symeval.h symsinit.h sysdep.h sysdir.h sysfile.h sysproc.h syspwd.h syssignal.h systime.h text.h vdb.h window.h
+elhash.o: $(CONFIG_H) $(LISP_H) bytecode.h compiler.h dumper.h elhash.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h symeval.h symsinit.h text.h vdb.h
+emacs.o: $(CONFIG_H) $(LISP_H) backtrace.h buffer.h bufslots.h casetab.h charset.h chartab.h commands.h compiler.h console-msw.h console.h dump-data.h dumper.h frame.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h paths.h process.h redisplay.h symeval.h symsinit.h sysdep.h sysdll.h sysfile.h sysproc.h syssignal.h systime.h systty.h syswindows.h text.h vdb.h
+emodules.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h console.h dumper.h emodules.h file-coding.h frame.h gc.h general-slots.h insdel.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h symeval.h symsinit.h sysdep.h sysdll.h text.h vdb.h window.h
+esd.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h miscplay.h number-gmp.h number-mp.h number.h sound.h symeval.h symsinit.h sysfile.h text.h vdb.h
+eval.o: $(CONFIG_H) $(LISP_H) backtrace.h buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h commands.h compiler.h conslots.h console-impl.h console.h device.h dumper.h frame.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h profile.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h text.h vdb.h window.h
+event-Xt.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h Emacs.ad.h EmacsFrame.h blocktype.h charset.h coding-system-slots.h compiler.h conslots.h console-impl.h console-tty.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h dragdrop.h dumper.h elhash.h event-xlike-inc.c events.h file-coding.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h objects-x.h objects.h offix-types.h offix.h process.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysproc.h syssignal.h systime.h systty.h text.h vdb.h window-impl.h window.h winslots.h xintrinsic.h xintrinsicp.h xmotif.h
+event-stream.o: $(CONFIG_H) $(LISP_H) backtrace.h blocktype.h buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h commands.h compiler.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h elhash.h events.h file-coding.h frame-impl.h frame.h frameslots.h gc.h general-slots.h gui.h insdel.h keymap.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h macros.h mc-alloc.h menubar.h number-gmp.h number-mp.h number.h process.h profile.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h syssignal.h systime.h text.h vdb.h window-impl.h window.h winslots.h
+event-unixoid.o: $(CONFIG_H) $(LISP_H) compiler.h conslots.h console-impl.h console-stream-impl.h console-stream.h console-tty-impl.h console-tty.h console.h device-impl.h device.h devslots.h dumper.h events.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h process.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h sysproc.h syssignal.h systime.h systty.h text.h vdb.h
+events.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console-tty-impl.h console-tty.h console.h device.h dumper.h events.h extents.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs.h keymap.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h systty.h text.h toolbar.h vdb.h window-impl.h window.h winslots.h
+extents.o: $(CONFIG_H) $(LISP_H) backtrace.h buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h console.h debug.h device.h dumper.h elhash.h extents-impl.h extents.h faces.h frame.h gc.h general-slots.h glyphs.h gutter.h insdel.h keymap.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h process.h profile.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h text.h vdb.h window-impl.h window.h winslots.h
+faces.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h elhash.h extents-impl.h extents.h faces.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-impl.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h text.h vdb.h window-impl.h window.h winslots.h
+file-coding.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h dumper.h elhash.h file-coding.h gc.h general-slots.h insdel.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h symeval.h symsinit.h text.h vdb.h
+fileio.o: $(CONFIG_H) $(LISP_H) backtrace.h buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h console.h device.h dumper.h events.h file-coding.h frame.h gc.h general-slots.h insdel.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h ndir.h number-gmp.h number-mp.h number.h process.h profile.h redisplay.h scrollbar.h symeval.h symsinit.h sysdep.h sysdir.h sysfile.h sysproc.h syspwd.h syssignal.h systime.h syswindows.h text.h vdb.h window-impl.h window.h winslots.h
+filelock.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h ndir.h number-gmp.h number-mp.h number.h paths.h symeval.h symsinit.h sysdir.h sysfile.h sysproc.h syspwd.h syssignal.h systime.h text.h vdb.h
+filemode.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h sysfile.h text.h vdb.h
+floatfns.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h sysfloat.h syssignal.h text.h vdb.h
+fns.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h compiler.h console.h device.h dumper.h events.h extents.h frame.h gc.h general-slots.h insdel.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h process.h redisplay.h symeval.h symsinit.h sysfile.h sysproc.h syssignal.h systime.h text.h vdb.h
+font-lock.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h insdel.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h syntax.h text.h vdb.h
+font-mgr.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h compiler.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h dumper.h font-mgr.h gc.h general-slots.h hash.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-impl.h objects-x-impl.h objects-x.h objects.h specifier.h symeval.h symsinit.h text.h vdb.h xintrinsic.h
+frame.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h events.h extents.h faces.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs.h gui.h gutter.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h menubar.h number-gmp.h number-mp.h number.h process.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h text.h toolbar.h vdb.h window-impl.h window.h winslots.h
+free-hook.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h hash.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h
+gc.o: $(CONFIG_H) $(LISP_H) backtrace.h buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h conslots.h console-impl.h console-stream.h console.h device.h dumper.h elhash.h events.h extents-impl.h extents.h file-coding.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h process.h profile.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h systime.h text.h vdb.h window-impl.h window.h winslots.h
+general.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h
+getloadavg.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h sysfile.h syssignal.h text.h vdb.h
+gif_io.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h gifrlib.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h sysfile.h text.h vdb.h
+glyphs-eimage.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h faces.h file-coding.h frame.h gc.h general-slots.h gifrlib.h glyphs.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h objects-impl.h objects.h opaque.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysfile.h text.h vdb.h window-impl.h window.h winslots.h
+glyphs-shared.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h console.h dumper.h elhash.h faces.h frame.h gc.h general-slots.h glyphs.h imgproc.h insdel.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h text.h vdb.h window-impl.h window.h winslots.h
+glyphs-widget.o: $(CONFIG_H) $(LISP_H) bytecode.h charset.h compiler.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h faces.h frame.h gc.h general-slots.h glyphs.h gui.h insdel.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h objects.h opaque.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h text.h vdb.h window-impl.h window.h winslots.h
+glyphs.o: $(CONFIG_H) $(LISP_H) blocktype.h buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h elhash.h faces.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs.h gui.h insdel.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-impl.h objects.h opaque.h rangetab.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysfile.h text.h vdb.h window-impl.h window.h winslots.h
+gmalloc.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h getpagesize.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h sysdep.h text.h vdb.h
+gpmevent.o: $(CONFIG_H) $(LISP_H) commands.h compiler.h conslots.h console-impl.h console-tty-impl.h console-tty.h console.h device-impl.h device.h devslots.h dumper.h events.h frame.h gc.h general-slots.h gpmevent.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h process.h redisplay.h specifier.h symeval.h symsinit.h sysdep.h sysproc.h syssignal.h systime.h systty.h text.h vdb.h
+gui.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h compiler.h dumper.h elhash.h gc.h general-slots.h gui.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h menubar.h number-gmp.h number-mp.h number.h redisplay.h symeval.h symsinit.h text.h vdb.h
+gutter.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h faces.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs.h gutter.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h text.h vdb.h window-impl.h window.h winslots.h
+hash.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h hash.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h
+hftctl.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h sysfile.h text.h vdb.h
+hpplay.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h sound.h symeval.h symsinit.h text.h vdb.h
+imgproc.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h imgproc.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h
+indent.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h console.h device.h dumper.h extents.h faces.h frame.h gc.h general-slots.h glyphs.h insdel.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h text.h vdb.h window-impl.h window.h winslots.h
+inline.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h conslots.h console-gtk.h console-impl.h console-msw.h console.h database.h device-impl.h device.h devslots.h dumper.h elhash.h events.h extents-impl.h extents.h faces.h file-coding.h font-mgr.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs-x.h glyphs.h gui.h intl-auto-encap-win32.h keymap.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h objects-impl.h objects.h opaque.h process.h rangetab.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h syntax.h sysdll.h sysfile.h systime.h syswindows.h text.h toolbar.h tooltalk.h ui-gtk.h vdb.h window-impl.h window.h winslots.h xintrinsic.h
+input-method-motif.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h compiler.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device.h dumper.h frame-impl.h frame.h frameslots.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h specifier.h symeval.h symsinit.h text.h vdb.h xintrinsic.h xmotif.h
+input-method-xlib.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h dumper.h events.h frame-impl.h frame.h frameslots.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h text.h vdb.h window-impl.h window.h winslots.h xintrinsic.h
+insdel.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h console.h device.h dumper.h extents.h frame.h gc.h general-slots.h insdel.h line-number.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h symeval.h symsinit.h text.h vdb.h
+intl-auto-encap-win32.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h syswindows.h text.h vdb.h
+intl-encap-win32.o: $(CONFIG_H) $(LISP_H) compiler.h console-msw.h console.h dumper.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h syswindows.h text.h vdb.h
+intl-win32.o: $(CONFIG_H) $(LISP_H) charset.h coding-system-slots.h compiler.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h dumper.h elhash.h faces.h file-coding.h frame-impl.h frame.h frameslots.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-impl.h objects-msw-impl.h objects-msw.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h syswindows.h text.h vdb.h window-impl.h window.h winslots.h
+intl.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h
+keymap.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console.h dumper.h elhash.h events.h extents.h frame.h gc.h general-slots.h insdel.h keymap.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h text.h vdb.h window.h
 lastfile.o: $(CONFIG_H)
-libinterface.o: $(LISP_H) gifrlib.h libinterface.h
-libsst.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h libsst.h sound.h sysfile.h
-line-number.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h line-number.h
-linuxplay.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h miscplay.h sound.h sysfile.h syssignal.h systty.h
-lread.o: $(LISP_H) backtrace.h buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h coding-system-slots.h elhash.h file-coding.h intl-auto-encap-win32.h lstream.h opaque.h profile.h sysfile.h sysfloat.h syswindows.h
-lstream.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h insdel.h lstream.h sysfile.h
-macros.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h conslots.h console-impl.h console.h device.h events.h frame.h keymap.h macros.h redisplay.h scrollbar.h specifier.h systime.h window.h
+libinterface.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h gifrlib.h libinterface.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h
+libsst.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h libsst.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h sound.h symeval.h symsinit.h sysfile.h text.h vdb.h
+line-number.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h line-number.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h
+linuxplay.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h miscplay.h number-gmp.h number-mp.h number.h sound.h symeval.h symsinit.h sysfile.h syssignal.h systty.h text.h vdb.h
+lread.o: $(CONFIG_H) $(LISP_H) backtrace.h buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h dumper.h elhash.h file-coding.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h profile.h symeval.h symsinit.h sysfile.h sysfloat.h syswindows.h text.h vdb.h
+lstream.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h insdel.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h sysfile.h text.h vdb.h
+macros.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h compiler.h conslots.h console-impl.h console.h device.h dumper.h events.h frame.h gc.h general-slots.h keymap.h lisp-disunion.h lisp-union.h lisp.h lrecord.h macros.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h text.h vdb.h window.h
 malloc.o: $(CONFIG_H) getpagesize.h syssignal.h
-marker.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h
-mc-alloc.o: $(LISP_H) blocktype.h getpagesize.h
-md5.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h file-coding.h lstream.h
-menubar.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h frame-impl.h frame.h frameslots.h gui.h keymap.h menubar.h redisplay.h scrollbar.h specifier.h window-impl.h window.h winslots.h
-minibuf.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h conslots.h console-impl.h console-stream.h console.h events.h frame-impl.h frame.h frameslots.h insdel.h redisplay.h scrollbar.h specifier.h systime.h window-impl.h window.h winslots.h
-miscplay.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h miscplay.h sound.h sysfile.h syssignal.h
-nas.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h sound.h sysdep.h syssignal.h
-nt.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h intl-auto-encap-win32.h ndir.h process.h sysdir.h sysfile.h sysproc.h syspwd.h syssignal.h systime.h syswindows.h
-ntheap.o: $(LISP_H) intl-auto-encap-win32.h sysdep.h syswindows.h
-ntplay.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h intl-auto-encap-win32.h sound.h sysfile.h syswindows.h
-number-gmp.o: $(LISP_H) sysproc.h syssignal.h systime.h
-number-mp.o: $(LISP_H)
-number.o: $(LISP_H)
-objects.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-impl.h console-tty.h console.h device-impl.h device.h devslots.h elhash.h faces.h frame.h glyphs.h objects-impl.h objects.h redisplay.h scrollbar.h specifier.h systty.h window-impl.h window.h winslots.h
+marker.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h
+mc-alloc.o: $(CONFIG_H) $(LISP_H) blocktype.h compiler.h dumper.h gc.h general-slots.h getpagesize.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h
+md5.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h dumper.h file-coding.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h
+menubar.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h frame-impl.h frame.h frameslots.h gc.h general-slots.h gui.h keymap.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h menubar.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h text.h vdb.h window-impl.h window.h winslots.h
+minibuf.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h compiler.h conslots.h console-impl.h console-stream.h console.h dumper.h events.h frame-impl.h frame.h frameslots.h gc.h general-slots.h insdel.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h text.h vdb.h window-impl.h window.h winslots.h
+miscplay.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h miscplay.h number-gmp.h number-mp.h number.h sound.h symeval.h symsinit.h sysfile.h syssignal.h text.h vdb.h
+nas.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h sound.h symeval.h symsinit.h sysdep.h syssignal.h text.h vdb.h
+nt.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h ndir.h number-gmp.h number-mp.h number.h process.h symeval.h symsinit.h sysdir.h sysfile.h sysproc.h syspwd.h syssignal.h systime.h syswindows.h text.h vdb.h
+ntheap.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h sysdep.h syswindows.h text.h vdb.h
+ntplay.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h sound.h symeval.h symsinit.h sysfile.h syswindows.h text.h vdb.h
+number-gmp.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h sysproc.h syssignal.h systime.h text.h vdb.h
+number-mp.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h
+number.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h
+objects.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console-tty.h console.h device-impl.h device.h devslots.h dumper.h elhash.h faces.h frame.h gc.h general-slots.h glyphs.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-impl.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systty.h text.h vdb.h window-impl.h window.h winslots.h
 offix.o: offix-cursors.h offix-types.h offix.h xintrinsic.h
-opaque.o: $(LISP_H) opaque.h
-print.o: $(LISP_H) backtrace.h buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h conslots.h console-impl.h console-msw.h console-stream-impl.h console-stream.h console-tty-impl.h console-tty.h console.h device-impl.h device.h devslots.h extents.h frame.h insdel.h intl-auto-encap-win32.h lstream.h opaque.h redisplay.h specifier.h sysfile.h systty.h syswindows.h
-process-nt.o: $(LISP_H) console-msw.h console.h events.h hash.h intl-auto-encap-win32.h lstream.h process-slots.h process.h procimpl.h sysfile.h sysproc.h syssignal.h systime.h syswindows.h
-process-unix.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h console.h events.h file-coding.h frame.h hash.h lstream.h ndir.h opaque.h process-slots.h process.h procimpl.h redisplay.h scrollbar.h sysdep.h sysdir.h sysfile.h sysproc.h syssignal.h systime.h systty.h syswait.h window.h
-process.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h commands.h console.h device.h events.h file-coding.h frame.h hash.h insdel.h intl-auto-encap-win32.h lstream.h opaque.h process-slots.h process.h procimpl.h redisplay.h scrollbar.h sysdep.h sysfile.h sysproc.h syssignal.h systime.h systty.h syswait.h syswindows.h window.h
-profile.o: $(LISP_H) backtrace.h bytecode.h elhash.h hash.h profile.h syssignal.h systime.h
-ralloc.o: $(LISP_H) getpagesize.h
-rangetab.o: $(LISP_H) rangetab.h
-realpath.o: $(LISP_H) backtrace.h intl-auto-encap-win32.h ndir.h profile.h sysdir.h sysfile.h syswindows.h
-redisplay-output.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h faces.h frame-impl.h frame.h frameslots.h glyphs.h gutter.h redisplay.h scrollbar.h specifier.h window-impl.h window.h winslots.h
-redisplay.o: $(LISP_H) backtrace.h buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h commands.h conslots.h console-impl.h console-tty.h console.h debug.h device-impl.h device.h devslots.h elhash.h events.h extents-impl.h extents.h faces.h file-coding.h frame-impl.h frame.h frameslots.h glyphs.h gui.h gutter.h insdel.h line-number.h menubar.h objects-impl.h objects.h opaque.h process.h profile.h redisplay.h scrollbar.h specifier.h sysfile.h systime.h systty.h toolbar.h window-impl.h window.h winslots.h
-regex.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h regex.h syntax.h
-scrollbar.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h frame-impl.h frame.h frameslots.h glyphs.h gutter.h redisplay.h scrollbar.h specifier.h window-impl.h window.h winslots.h
-search.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h insdel.h opaque.h regex.h syntax.h
-select.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h extents.h frame.h objects.h opaque.h redisplay.h select.h specifier.h
-sgiplay.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h libst.h sound.h sysfile.h sysproc.h syssignal.h systime.h
-sheap.o: $(LISP_H) sheap-adjust.h sysfile.h
-signal.o: $(LISP_H) conslots.h console-impl.h console.h device-impl.h device.h devslots.h events.h frame-impl.h frame.h frameslots.h process.h redisplay.h specifier.h sysdep.h sysfile.h syssignal.h systime.h
-sound.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h intl-auto-encap-win32.h redisplay.h sound.h specifier.h sysdep.h sysfile.h sysproc.h syssignal.h systime.h syswindows.h xintrinsic.h
-specifier.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h frame.h glyphs.h opaque.h rangetab.h redisplay.h scrollbar.h specifier.h window-impl.h window.h winslots.h
+opaque.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h symeval.h symsinit.h text.h vdb.h
+print.o: $(CONFIG_H) $(LISP_H) backtrace.h buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console-msw.h console-stream-impl.h console-stream.h console-tty-impl.h console-tty.h console.h device-impl.h device.h devslots.h dumper.h extents.h frame.h gc.h general-slots.h insdel.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h redisplay.h specifier.h symeval.h symsinit.h sysfile.h systty.h syswindows.h text.h vdb.h
+process-nt.o: $(CONFIG_H) $(LISP_H) compiler.h console-msw.h console.h dumper.h events.h gc.h general-slots.h hash.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h process-slots.h process.h procimpl.h symeval.h symsinit.h sysfile.h sysproc.h syssignal.h systime.h syswindows.h text.h vdb.h
+process-unix.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h console.h dumper.h events.h file-coding.h frame.h gc.h general-slots.h hash.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h ndir.h number-gmp.h number-mp.h number.h opaque.h process-slots.h process.h procimpl.h redisplay.h scrollbar.h symeval.h symsinit.h sysdep.h sysdir.h sysfile.h sysproc.h syssignal.h systime.h systty.h syswait.h text.h vdb.h window.h
+process.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h commands.h compiler.h console.h device.h dumper.h events.h file-coding.h frame.h gc.h general-slots.h hash.h insdel.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h process-slots.h process.h procimpl.h redisplay.h scrollbar.h symeval.h symsinit.h sysdep.h sysfile.h sysproc.h syssignal.h systime.h systty.h syswait.h syswindows.h text.h vdb.h window.h
+profile.o: $(CONFIG_H) $(LISP_H) backtrace.h bytecode.h compiler.h dumper.h elhash.h gc.h general-slots.h hash.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h profile.h symeval.h symsinit.h syssignal.h systime.h text.h vdb.h
+ralloc.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h getpagesize.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h
+rangetab.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h rangetab.h symeval.h symsinit.h text.h vdb.h
+realpath.o: $(CONFIG_H) $(LISP_H) backtrace.h compiler.h dumper.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h ndir.h number-gmp.h number-mp.h number.h profile.h symeval.h symsinit.h sysdir.h sysfile.h syswindows.h text.h vdb.h
+redisplay-output.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h faces.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs.h gutter.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h text.h vdb.h window-impl.h window.h winslots.h
+redisplay.o: $(CONFIG_H) $(LISP_H) backtrace.h buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h commands.h compiler.h conslots.h console-impl.h console-tty.h console.h debug.h device-impl.h device.h devslots.h dumper.h elhash.h events.h extents-impl.h extents.h faces.h file-coding.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs.h gui.h gutter.h insdel.h line-number.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h menubar.h number-gmp.h number-mp.h number.h objects-impl.h objects.h opaque.h process.h profile.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysfile.h systime.h systty.h text.h toolbar.h vdb.h window-impl.h window.h winslots.h
+regex.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h regex.h symeval.h symsinit.h syntax.h text.h vdb.h
+scrollbar.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h compiler.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs.h gutter.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h text.h vdb.h window-impl.h window.h winslots.h
+search.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h insdel.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h regex.h symeval.h symsinit.h syntax.h text.h vdb.h
+select.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h extents.h frame.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects.h opaque.h redisplay.h select.h specifier.h symeval.h symsinit.h text.h vdb.h
+sgiplay.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h libst.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h sound.h symeval.h symsinit.h sysfile.h sysproc.h syssignal.h systime.h text.h vdb.h
+sheap.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h sheap-adjust.h symeval.h symsinit.h sysfile.h text.h vdb.h
+signal.o: $(CONFIG_H) $(LISP_H) compiler.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h events.h frame-impl.h frame.h frameslots.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h process.h redisplay.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h syssignal.h systime.h text.h vdb.h
+sound.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h dumper.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h sound.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h sysproc.h syssignal.h systime.h syswindows.h text.h vdb.h xintrinsic.h
+specifier.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h frame.h gc.h general-slots.h glyphs.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h rangetab.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h text.h vdb.h window-impl.h window.h winslots.h
 strcat.o: $(CONFIG_H)
 strcmp.o: $(CONFIG_H)
 strcpy.o: $(CONFIG_H)
-strftime.o: $(LISP_H)
-sunplay.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h sound.h sysdep.h sysfile.h syssignal.h
-sunpro.o: $(LISP_H)
-symbols.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-impl.h console.h elhash.h specifier.h
-syntax.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h extents.h syntax.h
-sysdep.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-impl.h console-stream-impl.h console-stream.h console-tty-impl.h console-tty.h console.h device-impl.h device.h devslots.h events.h frame.h intl-auto-encap-win32.h ndir.h process.h redisplay.h scrollbar.h specifier.h sysdep.h sysdir.h sysfile.h sysproc.h syspwd.h syssignal.h systime.h systty.h syswait.h syswindows.h window.h
-sysdll.o: $(LISP_H) intl-auto-encap-win32.h sysdll.h sysfile.h syswindows.h
-termcap.o: $(LISP_H) console.h device.h
+strftime.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h
+sunplay.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h sound.h symeval.h symsinit.h sysdep.h sysfile.h syssignal.h text.h vdb.h
+sunpro.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h
+symbols.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console.h dumper.h elhash.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h specifier.h symeval.h symsinit.h text.h vdb.h
+syntax.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h extents.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h syntax.h text.h vdb.h
+sysdep.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console-stream-impl.h console-stream.h console-tty-impl.h console-tty.h console.h device-impl.h device.h devslots.h dumper.h events.h frame.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h ndir.h number-gmp.h number-mp.h number.h process.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysdir.h sysfile.h sysproc.h syspwd.h syssignal.h systime.h systty.h syswait.h syswindows.h text.h vdb.h window.h
+sysdll.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h sysdll.h sysfile.h syswindows.h text.h vdb.h
+termcap.o: $(CONFIG_H) $(LISP_H) compiler.h console.h device.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h
 terminfo.o: $(CONFIG_H)
-tests.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h elhash.h file-coding.h lstream.h opaque.h
-text.o: $(LISP_H) backtrace.h buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h file-coding.h lstream.h profile.h
-toolbar-common.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h charset.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h faces.h frame-impl.h frame.h frameslots.h glyphs.h redisplay.h scrollbar.h specifier.h toolbar-common.h toolbar.h window-impl.h window.h winslots.h xintrinsic.h
-toolbar.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h frame-impl.h frame.h frameslots.h glyphs.h redisplay.h scrollbar.h specifier.h toolbar.h window-impl.h window.h winslots.h
-tooltalk.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h elhash.h process.h syssignal.h tooltalk.h
-tparam.o: $(LISP_H)
-undo.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h extents.h
-unexaix.o: $(LISP_H) getpagesize.h
+tests.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h dumper.h elhash.h file-coding.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h symeval.h symsinit.h text.h vdb.h
+text.o: $(CONFIG_H) $(LISP_H) backtrace.h buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h dumper.h file-coding.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h profile.h symeval.h symsinit.h text.h vdb.h
+toolbar-common.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h charset.h compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h dumper.h faces.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h text.h toolbar-common.h toolbar.h vdb.h window-impl.h window.h winslots.h xintrinsic.h
+toolbar.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h text.h toolbar.h vdb.h window-impl.h window.h winslots.h
+tooltalk.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h elhash.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h process.h symeval.h symsinit.h syssignal.h text.h tooltalk.h vdb.h
+tparam.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h
+undo.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h extents.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h
+unexaix.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h getpagesize.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h
 unexalpha.o: $(CONFIG_H) compiler.h
 unexapollo.o: $(CONFIG_H)
 unexconvex.o: $(CONFIG_H) compiler.h getpagesize.h
-unexcw.o: $(LISP_H) sysfile.h
-unexec.o: $(LISP_H) getpagesize.h
-unexelf.o: $(LISP_H)
+unexcw.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h sysfile.h text.h vdb.h
+unexec.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h getpagesize.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h
+unexelf.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h
 unexelfsgi.o: $(CONFIG_H) compiler.h
 unexencap.o: compiler.h
 unexenix.o: $(CONFIG_H) compiler.h
 unexfreebsd.o: $(CONFIG_H) compiler.h
 unexfx2800.o: compiler.h
 unexhp9k3.o: $(CONFIG_H) compiler.h sysdep.h syssignal.h
-unexhp9k800.o: $(LISP_H)
+unexhp9k800.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h
 unexmips.o: $(CONFIG_H) compiler.h getpagesize.h
-unexnt.o: $(LISP_H) intl-auto-encap-win32.h sysfile.h syswindows.h
+unexnt.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h sysfile.h syswindows.h text.h vdb.h
 unexsni.o: compiler.h
 unexsol2-6.o: compiler.h
 unexsol2.o: compiler.h
 unexsunos4.o: $(CONFIG_H) compiler.h
-unicode.o: $(LISP_H) charset.h coding-system-slots.h file-coding.h opaque.h sysfile.h
-vdb-fake.o: $(LISP_H)
-vdb-mach.o: $(LISP_H)
-vdb-posix.o: $(LISP_H)
-vdb-win32.o: $(LISP_H) intl-auto-encap-win32.h syswindows.h
-vdb.o: $(LISP_H)
-vm-limit.o: $(LISP_H) mem-limits.h
-widget.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h
-win32.o: $(LISP_H) backtrace.h buffer.h bufslots.h casetab.h charset.h chartab.h console-msw.h console.h hash.h intl-auto-encap-win32.h profile.h sysfile.h sysproc.h syssignal.h systime.h syswindows.h
-window.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h elhash.h faces.h frame-impl.h frame.h frameslots.h glyphs.h gutter.h objects.h redisplay.h scrollbar.h specifier.h window-impl.h window.h winslots.h
+unicode.o: $(CONFIG_H) $(LISP_H) charset.h coding-system-slots.h compiler.h dumper.h file-coding.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h symeval.h symsinit.h sysfile.h text.h vdb.h
+vdb-fake.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h
+vdb-mach.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h
+vdb-posix.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h
+vdb-win32.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h syswindows.h text.h vdb.h
+vdb.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h
+vm-limit.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h mem-limits.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h
+widget.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h
+win32.o: $(CONFIG_H) $(LISP_H) backtrace.h buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h console-msw.h console.h dumper.h gc.h general-slots.h hash.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h profile.h symeval.h symsinit.h sysfile.h sysproc.h syssignal.h systime.h syswindows.h text.h vdb.h
+window.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h compiler.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h elhash.h faces.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs.h gutter.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h text.h vdb.h window-impl.h window.h winslots.h
 xmu.o: $(CONFIG_H)
--- a/src/device-x.c	Sun May 11 11:20:24 2008 +0200
+++ b/src/device-x.c	Sun May 11 11:24:01 2008 +0200
@@ -703,6 +703,10 @@
 	path = alloca_extbytes (strlen (data_dir) + 13 + strlen (locale) + 7);
 	format = "%sapp-defaults/%s/Emacs";
       }
+    else
+      {
+	goto no_data_directory;
+      }
 
     /*
      * The general form for $LANG is <language>_<country>.<encoding>.  Try
@@ -730,6 +734,7 @@
 	XrmCombineFileDatabase (path, &db, False);
     }
 
+  no_data_directory:
     xfree (locale, Extbyte*);
  }
 #endif /* MULE */
--- a/src/dired.c	Sun May 11 11:20:24 2008 +0200
+++ b/src/dired.c	Sun May 11 11:24:01 2008 +0200
@@ -824,7 +824,7 @@
   First integer has high-order 16 bits of time, second has low 16 bits.
  5. Last modification time, likewise.
  6. Last status change time, likewise.
- 7. Size in bytes. (-1, if number is out of range).
+ 7. Size in bytes. (-1, if number out of range and no bignum support.)
  8. File modes, as a string of ten letters or dashes as in ls -l.
  9. t iff file's gid would change if file were deleted and recreated.
 10. inode number.
@@ -900,11 +900,14 @@
   values[4] = make_time (s.st_atime);
   values[5] = make_time (s.st_mtime);
   values[6] = make_time (s.st_ctime);
-  values[7] = make_int ((EMACS_INT) s.st_size);
-  /* If the size is out of range, give back -1.  */
-  /* #### Fix when Emacs gets bignums! */
-  if (XINT (values[7]) != s.st_size)
-    values[7] = make_int (-1);
+
+#ifndef HAVE_BIGNUM
+  values[7] = make_integer (NUMBER_FITS_IN_AN_EMACS_INT (s.st_size) ? 
+                            (EMACS_INT)s.st_size : -1);
+#else
+  values[7] = make_integer (s.st_size);
+#endif 
+
   filemodestring (&s, modes);
   values[8] = make_string ((Ibyte *) modes, 10);
 #if defined (BSD4_2) || defined (BSD4_3)	/* file gid will be dir gid */
--- a/src/doc.c	Sun May 11 11:20:24 2008 +0200
+++ b/src/doc.c	Sun May 11 11:24:01 2008 +0200
@@ -37,7 +37,7 @@
 
 Lisp_Object Vinternal_doc_file_name;
 
-Lisp_Object QSsubstitute;
+Lisp_Object QSsubstitute, Qdefvar;
 
 /* Work out what source file a function or variable came from, taking the
    information from the documentation file. */
@@ -499,21 +499,27 @@
            weirdness, type, XSTRING_DATA (XSYMBOL (sym)->name), pos);
 }
 
-DEFUN ("built-in-symbol-file", Fbuilt_in_symbol_file, 1, 1, 0, /*
+DEFUN ("built-in-symbol-file", Fbuilt_in_symbol_file, 1, 2, 0, /*
 Return the C source file built-in symbol SYM comes from. 
 Don't use this.  Use the more general `symbol-file' (q.v.) instead. 
+
+If TYPE is nil or omitted, any kind of definition is acceptable. 
+If TYPE is `defun', then function, subr, special form or macro definitions
+are acceptable.
+If TYPE is `defvar', then variable definitions are acceptable.
 */
-       (symbol))
+       (symbol, type))
 {
   /* This function can GC */
   Lisp_Object fun;
   Lisp_Object filename = Qnil;
 
-  if (EQ(Ffboundp(symbol), Qt))
+  if (EQ(Ffboundp(symbol), Qt) && (EQ(type, Qnil) || EQ(type, Qdefun)))
     {
       fun = Findirect_function (symbol);
 
-      if (SUBRP (fun))
+      if (SUBRP (fun) || (CONSP(fun) && (EQ (Qmacro, Fcar_safe (fun)))
+                          && (fun = Fcdr_safe (fun), SUBRP (fun))))
 	{
 	  if (XSUBR (fun)->doc == 0)
 	    return Qnil;
@@ -529,7 +535,7 @@
 	      (make_int (- (EMACS_INT) XSUBR (fun)->doc));
 	}
     }
-  else if (EQ(Fboundp(symbol), Qt))
+  else if (EQ(Fboundp(symbol), Qt) && (EQ(type, Qnil) || EQ(type, Qdefvar)))
     {
       Lisp_Object doc_offset = Fget (symbol, Qvariable_documentation, Qnil);
 
@@ -1273,6 +1279,8 @@
   DEFSUBR (Fsnarf_documentation);
   DEFSUBR (Fverify_documentation);
   DEFSUBR (Fsubstitute_command_keys);
+
+  DEFSYMBOL (Qdefvar);
 }
 
 void
--- a/src/doprnt.c	Sun May 11 11:20:24 2008 +0200
+++ b/src/doprnt.c	Sun May 11 11:24:01 2008 +0200
@@ -558,7 +558,7 @@
 		{
 		  /* For `S', prin1 the argument and then treat like
 		     a string.  */
-		  ls = Fprin1_to_string (obj, Qnil);
+		  ls = prin1_to_string (obj, 0);
 		}
 	      else if (STRINGP (obj))
 		ls = obj;
@@ -567,7 +567,7 @@
 	      else
 		{
 		  /* convert to string using princ. */
-		  ls = Fprin1_to_string (obj, Qt);
+		  ls = prin1_to_string (obj, 1);
 		}
 	      string = XSTRING_DATA (ls);
 	      string_len = XSTRING_LENGTH (ls);
--- a/src/dumper.c	Sun May 11 11:20:24 2008 +0200
+++ b/src/dumper.c	Sun May 11 11:24:01 2008 +0200
@@ -2630,6 +2630,8 @@
   return 0;
 }
 
+#define DUMP_SLACK 100 /* Enough to include dump ID, version name, .DMP */
+
 int
 pdump_load (const Wexttext *argv0)
 {
@@ -2637,7 +2639,6 @@
   Wexttext *exe_path = NULL;
   int bufsize = 4096;
   int cchpathsize;
-#define DUMP_SLACK 100 /* Enough to include dump ID, version name, .DMP */
 
   /* Copied from mswindows_get_module_file_name ().  Not clear if it's
      kosher to malloc() yet. */
@@ -2659,7 +2660,7 @@
       wext_strcpy (exe_path, wexe);
     }
 #else /* !WIN32_NATIVE */
-  Wexttext exe_path[PATH_MAX_EXTERNAL];
+  Wexttext *exe_path;
   Wexttext *w;
   const Wexttext *dir, *p;
 
@@ -2694,13 +2695,17 @@
     {
       /* invocation-name includes a directory component -- presumably it
 	 is relative to cwd, not $PATH. */
+      exe_path = alloca_array (Wexttext, 1 + wext_strlen (dir) + DUMP_SLACK);
       wext_strcpy (exe_path, dir);
     }
   else
     {
       const Wexttext *path = wext_getenv ("PATH"); /* not egetenv --
-						     not yet init. */
+                                                      not yet init. */
       const Wexttext *name = p;
+      exe_path = alloca_array (Wexttext,
+			       1 + DUMP_SLACK + max (wext_strlen (name),
+                                                     wext_strlen (path)));
       for (;;)
 	{
 	  p = path;
--- a/src/elhash.c	Sun May 11 11:20:24 2008 +0200
+++ b/src/elhash.c	Sun May 11 11:24:01 2008 +0200
@@ -1158,7 +1158,7 @@
 }
 
 DEFUN ("puthash", Fputhash, 3, 3, 0, /*
-Hash KEY to VALUE in HASH-TABLE.
+Hash KEY to VALUE in HASH-TABLE, and return VALUE. 
 */
        (key, value, hash_table))
 {
@@ -1222,6 +1222,7 @@
 
 DEFUN ("clrhash", Fclrhash, 1, 1, 0, /*
 Remove all entries from HASH-TABLE, leaving it empty.
+Return HASH-TABLE.
 */
        (hash_table))
 {
@@ -1719,12 +1720,33 @@
 {
   if (depth > 5)
     return 0;
-  if (CONSP (obj))
+
+  if (CONSP(obj)) 
     {
-      /* no point in worrying about tail recursion, since we're not
-	 going very deep */
-      return HASH2 (internal_hash (XCAR (obj), depth + 1),
-		    internal_hash (XCDR (obj), depth + 1));
+      Hashcode hash, h;
+      int s;
+
+      depth += 1;
+
+      if (!CONSP(XCDR(obj)))
+	{
+	  /* special case for '(a . b) conses */
+	  return HASH2(internal_hash(XCAR(obj), depth),
+		       internal_hash(XCDR(obj), depth));
+	}
+
+      /* Don't simply tail recurse; we want to hash lists with the
+	 same contents in distinct orders differently. */
+      hash = internal_hash(XCAR(obj), depth);
+
+      obj = XCDR(obj);
+      for (s = 1; s < 6 && CONSP(obj); obj = XCDR(obj), s++)
+	{
+	  h = internal_hash(XCAR(obj), depth);
+	  hash = HASH3(hash, h, s);
+	}
+
+      return hash;
     }
   if (STRINGP (obj))
     {
--- a/src/emacs.c	Sun May 11 11:20:24 2008 +0200
+++ b/src/emacs.c	Sun May 11 11:24:01 2008 +0200
@@ -955,6 +955,42 @@
   init_free_hook ();
 #endif
 
+#define SHEBANG_PROGNAME_LENGTH                                         \
+  (int)((sizeof (WEXTSTRING (SHEBANG_PROGNAME)) - sizeof (WEXTSTRING (""))))
+#define SHEBANG_EXE_PROGNAME_LENGTH                                     \
+  (int)(sizeof (WEXTSTRING (SHEBANG_PROGNAME ".exe"))                   \
+        - sizeof (WEXTSTRING ("")))
+
+  {
+    int progname_len = wext_strlen (argv[0]);
+    if (progname_len >= SHEBANG_PROGNAME_LENGTH)
+      {
+	if (!wext_strcmp_ascii (argv[0] +
+				(progname_len - SHEBANG_PROGNAME_LENGTH),
+				SHEBANG_PROGNAME)
+	    /* Allow trailing .exe. Don't check it, it could also be
+	       .com.  */
+	    || (progname_len >= SHEBANG_EXE_PROGNAME_LENGTH && 
+		!wext_strncmp_ascii
+		(argv[0] + (progname_len - SHEBANG_EXE_PROGNAME_LENGTH),
+		 SHEBANG_PROGNAME,
+		 SHEBANG_PROGNAME_LENGTH)))
+	  {
+	    Wexttext **newarr = alloca_array (Wexttext *, argc + 2);
+	    int j;
+
+	    newarr[0] = argv[0];
+	    newarr[1] = WEXTSTRING ("--script");
+	    for (j = 1; j < argc; ++j)
+	      {
+		newarr[j + 1] = argv[j];
+	      }
+	    argv = newarr;
+	    argc++;
+	  }
+      }
+  }
+
   sort_args (argc, argv);
 
 #if 0 /* defined (_SCO_DS)
@@ -1048,6 +1084,20 @@
       noninteractive = 1;
     }
 
+  {
+    int count_before = skip_args;
+    /* Handle the -script switch, which implies batch and vanilla. The -l
+       part of its functionality is implemented in Lisp. */
+    if (argmatch (argv, argc, "-script", "--script", 0, NULL,
+		  &skip_args))
+      {
+	noninteractive = 1;
+	vanilla_inhibiting = 1;
+      }
+
+    /* Don't actually discard this argument. */
+    skip_args = count_before;
+  }
 #ifdef WIN32_NATIVE
   {
     /* Since we aren't a console application, we can't easily be terminated
@@ -2162,6 +2212,7 @@
 
 #ifdef HAVE_GTK
       vars_of_device_gtk ();
+      vars_of_console_gtk ();
 #ifdef HAVE_DIALOGS
       vars_of_dialog_gtk ();
 #endif
@@ -2689,6 +2740,7 @@
   { "-sd", "--show-dump-id", 105, 0 },
   { "-nd", "--no-dump-file", 95, 0 },
   { "-batch", "--batch", 88, 0 },
+  { "-script", "--script", 89, 1 },
 #ifdef WIN32_NATIVE
   { "-mswindows-termination-handle", 0, 84, 1 },
   { "-nuni", "--no-unicode-lib-calls", 83, 0 },
@@ -4245,10 +4297,9 @@
 Appropriate surrounding whitespace will be added, but typically looks best
 if enclosed in parentheses.
 
-A standard use is to indicate the date version.sh was last updated from
-the CVS mainline, where it is automatically given a value similar to
-\"(+CVS-20050221)\".  Developers may also use it to indicate particular
-branches, etc.
+A standard use is to indicate the topmost hash id of the Mercurial
+changeset from which XEmacs was compiled.  Developers may also use it
+to indicate particular branches, etc.
 */ );
 #ifdef XEMACS_EXTRA_NAME
   Vxemacs_extra_name = build_string (XEMACS_EXTRA_NAME);
--- a/src/event-Xt.c	Sun May 11 11:20:24 2008 +0200
+++ b/src/event-Xt.c	Sun May 11 11:24:01 2008 +0200
@@ -1493,7 +1493,6 @@
           return 0;
 
 	SET_EVENT_CHANNEL (emacs_event, wrap_frame (frame));
-	SET_EVENT_MAGIC_X_EVENT (emacs_event, *x_event_copy);
         break;
       }
     }
--- a/src/event-xlike-inc.c	Sun May 11 11:20:24 2008 +0200
+++ b/src/event-xlike-inc.c	Sun May 11 11:24:01 2008 +0200
@@ -708,7 +708,15 @@
     return Qnil;
 
 #ifdef MULE
-  return make_char (make_ichar (charset, code, 0));
+  {
+    Lisp_Object unified = Funicode_to_char
+      (Fchar_to_unicode (make_char (make_ichar (charset, code, 0))), Qnil);
+    if (!NILP (unified))
+      {
+        return unified;
+      }
+    return make_char (make_ichar (charset, code, 0));
+  }
 #else
   return make_char (code + 0x80);
 #endif
--- a/src/fileio.c	Sun May 11 11:20:24 2008 +0200
+++ b/src/fileio.c	Sun May 11 11:24:01 2008 +0200
@@ -628,7 +628,7 @@
 
 This function is analagous to mktemp(3) under POSIX, and as with it, there
 exists a race condition between the test for the existence of the new file
-and its creation.  See `make-temp-name' for a function which avoids this
+and its creation.  See `make-temp-file' for a function which avoids this
 race condition by specifying the appropriate flags to `write-region'. 
 */
        (prefix))
--- a/src/glyphs-gtk.c	Sun May 11 11:20:24 2008 +0200
+++ b/src/glyphs-gtk.c	Sun May 11 11:24:01 2008 +0200
@@ -796,7 +796,7 @@
     find_keyword_in_vector (instantiator, Q_file);
 
   IMAGE_INSTANCE_GTK_PIXMAP (ii) = pixmap;
-  IMAGE_INSTANCE_GTK_MASK (ii) = 0;
+  IMAGE_INSTANCE_PIXMAP_MASK (ii) = 0;
   IMAGE_INSTANCE_PIXMAP_WIDTH (ii) = gdk_image->width;
   IMAGE_INSTANCE_PIXMAP_HEIGHT (ii) = gdk_image->height;
   IMAGE_INSTANCE_PIXMAP_DEPTH (ii) = gdk_image->depth;
@@ -2972,7 +2972,7 @@
       IMAGE_INSTANCE_TYPE (p) = IMAGE_COLOR_PIXMAP;
       /* Make sure there aren't two pointers to the same mask, causing
 	 it to get freed twice. */
-      IMAGE_INSTANCE_GTK_MASK (p) = 0;
+      IMAGE_INSTANCE_PIXMAP_MASK (p) = 0;
       break;
 
     default:
--- a/src/glyphs.c	Sun May 11 11:20:24 2008 +0200
+++ b/src/glyphs.c	Sun May 11 11:24:01 2008 +0200
@@ -3259,7 +3259,7 @@
 static Lisp_Object
 image_instantiate (Lisp_Object specifier, Lisp_Object UNUSED (matchspec),
 		   Lisp_Object domain, Lisp_Object instantiator,
-		   Lisp_Object depth)
+		   Lisp_Object depth, int no_fallback)
 {
   Lisp_Object glyph = IMAGE_SPECIFIER_ATTACHEE (XIMAGE_SPECIFIER (specifier));
   int dest_mask = XIMAGE_SPECIFIER_ALLOWED (specifier);
@@ -3298,7 +3298,7 @@
       assert (XVECTOR_LENGTH (instantiator) == 3);
       return (FACE_PROPERTY_INSTANCE
 	      (Fget_face (XVECTOR_DATA (instantiator)[2]),
-	       Qbackground_pixmap, domain, 1, depth));
+	       Qbackground_pixmap, domain, no_fallback, depth));
     }
   else
     {
--- a/src/lisp.h	Sun May 11 11:20:24 2008 +0200
+++ b/src/lisp.h	Sun May 11 11:24:01 2008 +0200
@@ -4932,6 +4932,7 @@
 EXFUN (Fprinc, 2);
 EXFUN (Fprint, 2);
 
+Lisp_Object prin1_to_string (Lisp_Object, int);
 
 /* Lower-level ways to output data: */
 void default_object_printer (Lisp_Object, Lisp_Object, int);
--- a/src/lread.c	Sun May 11 11:20:24 2008 +0200
+++ b/src/lread.c	Sun May 11 11:24:01 2008 +0200
@@ -744,6 +744,25 @@
     internal_bind_lisp_object (&Vfile_domain, Qnil);
 #endif
 
+    /* Is there a #!? If so, read it, and unread ;!.
+
+       GNU implement this by treating any #! anywhere in the source text as
+       commenting out the whole line. */
+    {
+      char shebangp[2];
+      int num_read;
+
+      num_read = Lstream_read (XLSTREAM (lispstream), shebangp,
+                               sizeof(shebangp));
+      if (sizeof(shebangp) == num_read
+	  && 0 == strncmp("#!", shebangp, sizeof(shebangp)))
+	{
+          shebangp[0] = ';';
+	}
+
+      Lstream_unread (XLSTREAM (lispstream), shebangp, num_read);
+    }
+
     /* Now determine what sort of ELC file we're reading in. */
     internal_bind_int (&load_byte_code_version, load_byte_code_version);
     if (reading_elc)
@@ -2763,6 +2782,8 @@
 
 	if (c == '\\')
 	  c = read_escape (readcharfun);
+	if (c < 0)
+	  return Fsignal (Qinvalid_read_syntax, list1 (READCHARFUN_MAYBE (readcharfun)));
 	return make_char (c);
       }
 
--- a/src/make-src-depend	Sun May 11 11:20:24 2008 +0200
+++ b/src/make-src-depend	Sun May 11 11:24:01 2008 +0200
@@ -115,7 +115,7 @@
   my $file = shift;
   my $ofile = $file; $ofile =~ s/c$/o/; print "$ofile: ";
   if (exists $uses{$file}{'lisp.h'}) {
-    delete @{%{$uses{$file}}}{@LISP_H};
+    delete $uses{$file}{@LISP_H};
     $uses{$file}{'$(LISP_H)'} = 1;
   }
   # Note: If both config.h and lisp.h are dependencies, config.h got deleted
--- a/src/objects.c	Sun May 11 11:20:24 2008 +0200
+++ b/src/objects.c	Sun May 11 11:24:01 2008 +0200
@@ -103,7 +103,7 @@
   Lisp_Color_Instance *c = XCOLOR_INSTANCE (obj);
   if (print_readably)
     printing_unreadable_object ("#<color-instance 0x%x>",
-           c->header.uid);
+	   c->header.uid);
   write_fmt_string_lisp (printcharfun, "#<color-instance %s", 1, c->name);
   write_fmt_string_lisp (printcharfun, " on %s", 1, c->device);
   if (!NILP (c->device)) /* Vthe_null_color_instance */
@@ -153,7 +153,7 @@
 			       0, /*dumpable-flag*/
 			       mark_color_instance, print_color_instance,
 			       finalize_color_instance, color_instance_equal,
-			       color_instance_hash, 
+			       color_instance_hash,
 			       color_instance_description,
 			       Lisp_Color_Instance);
 
@@ -295,7 +295,7 @@
   { XD_LISP_OBJECT, offsetof (Lisp_Font_Instance, truename)},
   { XD_LISP_OBJECT, offsetof (Lisp_Font_Instance, device)},
   { XD_LISP_OBJECT, offsetof (Lisp_Font_Instance, charset)},
-  { XD_UNION, offsetof (Lisp_Font_Instance, data), 
+  { XD_UNION, offsetof (Lisp_Font_Instance, data),
     XD_INDIRECT (0, 0), { &font_instance_data_description } },
   { XD_END }
 };
@@ -596,7 +596,7 @@
 static Lisp_Object
 color_instantiate (Lisp_Object specifier, Lisp_Object UNUSED (matchspec),
 		   Lisp_Object domain, Lisp_Object instantiator,
-		   Lisp_Object depth)
+		   Lisp_Object depth, int no_fallback)
 {
   /* When called, we're inside of call_with_suspended_errors(),
      so we can freely error. */
@@ -606,10 +606,10 @@
   if (COLOR_INSTANCEP (instantiator))
     {
       /* If we are on the same device then we're done.  Otherwise change
-         the instantiator to the name used to generate the pixel and let the
-         STRINGP case deal with it. */
+	 the instantiator to the name used to generate the pixel and let the
+	 STRINGP case deal with it. */
       if (NILP (device) /* Vthe_null_color_instance */
-          || EQ (device, XCOLOR_INSTANCE (instantiator)->device))
+	  || EQ (device, XCOLOR_INSTANCE (instantiator)->device))
 	return instantiator;
       else
 	instantiator = Fcolor_instance_name (instantiator);
@@ -647,13 +647,15 @@
 				 instantiator);
 	  return (FACE_PROPERTY_INSTANCE_1
 		  (Fget_face (XVECTOR_DATA (instantiator)[0]),
-		   COLOR_SPECIFIER_FACE_PROPERTY (XCOLOR_SPECIFIER (specifier)),
-		   domain, ERROR_ME, 0, depth));
+		   COLOR_SPECIFIER_FACE_PROPERTY
+		   (XCOLOR_SPECIFIER (specifier)),
+		   domain, ERROR_ME, no_fallback, depth));
 
 	case 2:
 	  return (FACE_PROPERTY_INSTANCE_1
 		  (Fget_face (XVECTOR_DATA (instantiator)[0]),
-		   XVECTOR_DATA (instantiator)[1], domain, ERROR_ME, 0, depth));
+		   XVECTOR_DATA (instantiator)[1], domain, ERROR_ME,
+		   no_fallback, depth));
 
 	default:
 	  ABORT ();
@@ -830,11 +832,11 @@
       hash_table = Fgethash (charset, d->charset_font_cache_stage_1,
 			     Qunbound);
       if (!UNBOUNDP (hash_table))
-        Fclrhash (hash_table);
+	Fclrhash (hash_table);
       hash_table = Fgethash (charset, d->charset_font_cache_stage_2,
 			     Qunbound);
       if (!UNBOUNDP (hash_table))
-        Fclrhash (hash_table);
+	Fclrhash (hash_table);
     }
 }
 
@@ -845,7 +847,7 @@
 font_instantiate (Lisp_Object UNUSED (specifier),
 		  Lisp_Object USED_IF_MULE (matchspec),
 		  Lisp_Object domain, Lisp_Object instantiator,
-		  Lisp_Object depth)
+		  Lisp_Object depth, int no_fallback)
 {
   /* When called, we're inside of call_with_suspended_errors(),
      so we can freely error. */
@@ -877,7 +879,7 @@
   if (FONT_INSTANCEP (instantiator))
     {
       if (NILP (device)
-          || EQ (device, XFONT_INSTANCE (instantiator)->device))
+	  || EQ (device, XFONT_INSTANCE (instantiator)->device))
 	{
 #ifdef MULE
 	  if (font_spec_matches_charset (d, charset, 0,
@@ -895,7 +897,7 @@
 #ifdef MULE
       /* #### rename these caches. */
       Lisp_Object cache = stage ? d->charset_font_cache_stage_2 :
-        d->charset_font_cache_stage_1;
+	d->charset_font_cache_stage_1;
 #else
       Lisp_Object cache = d->font_instance_cache;
 #endif
@@ -926,9 +928,9 @@
 	    {
 	      /* make sure we cache the failures, too. */
 	      matching_font =
-                DEVMETH_OR_GIVEN (d, find_charset_font,
-                                  (device, instantiator, charset, stage),
-                                  instantiator);
+		DEVMETH_OR_GIVEN (d, find_charset_font,
+				  (device, instantiator, charset, stage),
+				  instantiator);
 	      Fputhash (instantiator, matching_font, hash_table);
 	    }
 	  if (NILP (matching_font))
@@ -956,13 +958,13 @@
 
       match_inst = face_property_matching_instance
 	(Fget_face (XVECTOR_DATA (instantiator)[0]), Qfont,
-	 charset, domain, ERROR_ME, 0, depth, initial);
+	 charset, domain, ERROR_ME, no_fallback, depth, initial);
 
-      if (UNBOUNDP(match_inst)) 
+      if (UNBOUNDP(match_inst))
 	{
 	  match_inst = face_property_matching_instance
 	    (Fget_face (XVECTOR_DATA (instantiator)[0]), Qfont,
-	     charset, domain, ERROR_ME, 0, depth, final);
+	     charset, domain, ERROR_ME, no_fallback, depth, final);
 	}
 
       return match_inst;
@@ -1067,7 +1069,7 @@
 face_boolean_instantiate (Lisp_Object specifier,
 			  Lisp_Object UNUSED (matchspec),
 			  Lisp_Object domain, Lisp_Object instantiator,
-			  Lisp_Object depth)
+			  Lisp_Object depth, int no_fallback)
 {
   /* When called, we're inside of call_with_suspended_errors(),
      so we can freely error. */
@@ -1094,7 +1096,7 @@
 
       retval = (FACE_PROPERTY_INSTANCE_1
 		(Fget_face (XVECTOR_DATA (instantiator)[0]),
-		 prop, domain, ERROR_ME, 0, depth));
+		 prop, domain, ERROR_ME, no_fallback, depth));
 
       if (instantiator_len == 3 && !NILP (XVECTOR_DATA (instantiator)[2]))
 	retval = NILP (retval) ? Qt : Qnil;
--- a/src/print.c	Sun May 11 11:20:24 2008 +0200
+++ b/src/print.c	Sun May 11 11:24:01 2008 +0200
@@ -867,6 +867,26 @@
   return object;
 }
 
+Lisp_Object
+prin1_to_string (Lisp_Object object, int noescape)
+{
+  /* This function can GC */
+  Lisp_Object result = Qnil;
+  Lisp_Object stream = make_resizing_buffer_output_stream ();
+  Lstream *str = XLSTREAM (stream);
+  /* gcpro OBJECT in case a caller forgot to do so */
+  struct gcpro gcpro1, gcpro2, gcpro3;
+  GCPRO3 (object, stream, result);
+
+  print_internal (object, stream, !noescape);
+  Lstream_flush (str);
+  UNGCPRO;
+  result = make_string (resizing_buffer_stream_ptr (str),
+			Lstream_byte_count (str));
+  Lstream_delete (str);
+  return result;
+}
+
 DEFUN ("prin1-to-string", Fprin1_to_string, 1, 2, 0, /*
 Return a string containing the printed representation of OBJECT,
 any Lisp object.  Quoting characters are used when needed to make output
@@ -877,20 +897,11 @@
 {
   /* This function can GC */
   Lisp_Object result = Qnil;
-  Lisp_Object stream = make_resizing_buffer_output_stream ();
-  Lstream *str = XLSTREAM (stream);
-  /* gcpro OBJECT in case a caller forgot to do so */
-  struct gcpro gcpro1, gcpro2, gcpro3;
-  GCPRO3 (object, stream, result);
 
   RESET_PRINT_GENSYM;
-  print_internal (object, stream, NILP (noescape));
+  result = prin1_to_string (object, !(EQ(noescape, Qnil)));
   RESET_PRINT_GENSYM;
-  Lstream_flush (str);
-  UNGCPRO;
-  result = make_string (resizing_buffer_stream_ptr (str),
-			Lstream_byte_count (str));
-  Lstream_delete (str);
+
   return result;
 }
 
--- a/src/rangetab.c	Sun May 11 11:20:24 2008 +0200
+++ b/src/rangetab.c	Sun May 11 11:24:01 2008 +0200
@@ -571,7 +571,8 @@
 Results are guaranteed to be correct (i.e. each entry processed
 exactly once) if FUNCTION modifies or deletes the current entry
 \(i.e. passes the current range to `put-range-table' or
-`remove-range-table'), but not otherwise.
+`remove-range-table').  If FUNCTION modifies or deletes any other entry,
+this guarantee doesn't hold.
 */
        (function, range_table))
 {
--- a/src/redisplay.c	Sun May 11 11:20:24 2008 +0200
+++ b/src/redisplay.c	Sun May 11 11:24:01 2008 +0200
@@ -5395,8 +5395,12 @@
       else
 	dlp->clip = 0;
 
-      assert (pos_of_dlp < 0 || pos_of_dlp == Dynarr_length (dla));
-      Dynarr_add (dla, *dlp);
+      if (pos_of_dlp < 0)
+	Dynarr_add (dla, *dlp);
+      else if (pos_of_dlp == Dynarr_length (dla))
+	Dynarr_increment (dla);
+      else
+	ABORT ();
 
       /* #### This type of check needs to be done down in the
 	 generate_display_line call. */
@@ -5602,8 +5606,12 @@
       if (dlp->num_chars > w->max_line_len)
 	w->max_line_len = dlp->num_chars;
 
-      assert (pos_of_dlp < 0 || pos_of_dlp == Dynarr_length (dla));
-      Dynarr_add (dla, *dlp);
+      if (pos_of_dlp < 0)
+	Dynarr_add (dla, *dlp);
+      else if (pos_of_dlp == Dynarr_length (dla))
+	Dynarr_increment (dla);
+      else
+	ABORT ();
 
       /* #### This isn't right, but it is close enough for now. */
       w->window_end_pos[type] = start_pos;
--- a/src/search.c	Sun May 11 11:20:24 2008 +0200
+++ b/src/search.c	Sun May 11 11:24:01 2008 +0200
@@ -47,6 +47,15 @@
 
 #define REGEXP_CACHE_SIZE 20
 
+#ifdef DEBUG_XEMACS
+
+/* Used in tests/automated/case-tests.el if available. */
+Fixnum debug_xemacs_searches;
+
+Lisp_Object Qsearch_algorithm_used, Qboyer_moore, Qsimple_search;
+
+#endif
+
 /* If the regexp is non-nil, then the buffer contains the compiled form
    of that regexp, suitable for searching.  */
 struct regexp_cache
@@ -1340,11 +1349,14 @@
     {
       int charset_base = -1;
       int boyer_moore_ok = 1;
-      Ibyte *pat = 0;
       Ibyte *patbuf = alloca_ibytes (len * MAX_ICHAR_LEN);
-      pat = patbuf;
+      Ibyte *pat = patbuf;
+
 #ifdef MULE
-      /* &&#### needs some 8-bit work here */
+      int entirely_one_byte_p = buf->text->entirely_one_byte_p;
+      int nothing_greater_than_0xff =
+        buf->text->num_8_bit_fixed_chars == BUF_Z(buf) - BUF_BEG (buf);
+
       while (len > 0)
 	{
 	  Ibyte tmp_str[MAX_ICHAR_LEN];
@@ -1367,28 +1379,105 @@
 	  inv_bytelen = set_itext_ichar (tmp_str, inverse);
 	  new_bytelen = set_itext_ichar (tmp_str, translated);
 
-	  if (new_bytelen != orig_bytelen || inv_bytelen != orig_bytelen)
-	    boyer_moore_ok = 0;
-	  if (translated != c || inverse != c)
-	    {
-	      /* Keep track of which charset and character set row
-		 contains the characters that need translation.
-		 Zero out the bits corresponding to the last byte.
-	      */
-	      int charset_base_code = c & ~ICHAR_FIELD3_MASK;
-	      if (charset_base == -1)
-		charset_base = charset_base_code;
-	      else if (charset_base != charset_base_code)
-		/* If two different rows appear, needing translation, then
-		   we cannot use boyer_moore search.  See the comment at the
-		   head of boyer_moore(). */
-		boyer_moore_ok = 0;
-	    }
+          if (boyer_moore_ok
+              /* Only do the Boyer-Moore check for characters needing
+                 translation. */
+              && (translated != c || inverse != c))
+            {
+	      Ichar starting_c = c;
+	      int charset_base_code, checked = 0;
+
+	      do 
+		{
+		  c = TRANSLATE (inverse_trt, c);
+
+                  /* If a character cannot occur in the buffer, ignore
+                     it. */
+                  if (c > 0x7F && entirely_one_byte_p)
+                    continue;
+
+                  if (c > 0xFF && nothing_greater_than_0xff)
+                    continue;
+
+                  checked = 1;
+
+                  if (-1 == charset_base) /* No charset yet specified. */
+                    {
+                      /* Keep track of which charset and character set row
+                         contains the characters that need translation.
+
+                         Zero out the bits corresponding to the last
+                         byte. */
+                      charset_base = c & ~ICHAR_FIELD3_MASK;
+                    }
+                  else
+                    {
+                      charset_base_code = c & ~ICHAR_FIELD3_MASK;
+
+                      if (charset_base_code != charset_base)
+                        {
+                          /* If two different rows, or two different
+                             charsets, appear, needing non-ASCII
+                             translation, then we cannot use boyer_moore
+                             search.  See the comment at the head of
+                             boyer_moore(). */
+                          boyer_moore_ok = 0;
+                          break;
+                        }
+                    }
+                } while (c != starting_c);
+
+              if (!checked)
+                {
+#ifdef DEBUG_XEMACS
+                  if (debug_xemacs_searches)
+                    {
+                      Lisp_Symbol *sym = XSYMBOL (Qsearch_algorithm_used);
+                      sym->value = Qnil;
+                    }
+#endif
+                  /* The "continue" clauses were used above, for every
+                     translation of the character. As such, this character
+                     is not to be found in the buffer and neither is the
+                     string as a whole. Return immediately; also avoid
+                     triggering the assertion a few lines down. */
+                  return n > 0 ? -n : n;
+                }
+
+              if (boyer_moore_ok && charset_base != -1 && 
+                  charset_base != (translated & ~ICHAR_FIELD3_MASK))
+                {
+                  /* In the rare event that the CANON entry for this
+                     character is not in the desired set, choose one
+                     that is, from the equivalence set. It doesn't much
+                     matter which. */
+                  Ichar starting_ch = translated;
+                  do
+                    {
+                      translated = TRANSLATE (inverse_trt, translated);
+
+                      if (charset_base == (translated & ~ICHAR_FIELD3_MASK))
+                        break;
+
+                    } while (starting_ch != translated);
+
+                  assert (starting_ch != translated);
+
+                  new_bytelen = set_itext_ichar (tmp_str, translated);
+                }
+            }
+
 	  memcpy (pat, tmp_str, new_bytelen);
 	  pat += new_bytelen;
 	  base_pat += orig_bytelen;
 	  len -= orig_bytelen;
 	}
+
+      if (-1 == charset_base)
+        {
+          charset_base = 'a' & ~ICHAR_FIELD3_MASK; /* Default to ASCII. */
+        }
+
 #else /* not MULE */
       while (--len >= 0)
 	{
@@ -1405,6 +1494,15 @@
 #endif /* MULE */
       len = pat - patbuf;
       pat = base_pat = patbuf;
+
+#ifdef DEBUG_XEMACS
+      if (debug_xemacs_searches)
+        {
+          Lisp_Symbol *sym = XSYMBOL (Qsearch_algorithm_used);
+          sym->value = boyer_moore_ok ? Qboyer_moore : Qsimple_search;
+        }
+#endif
+
       if (boyer_moore_ok)
 	return boyer_moore (buf, base_pat, len, pos, lim, n,
 			    trt, inverse_trt, charset_base);
@@ -1547,18 +1645,18 @@
    TRT and INVERSE_TRT are translation tables.
 
    This kind of search works if all the characters in PAT that have
-   nontrivial translation are the same aside from the last byte.  This
-   makes it possible to translate just the last byte of a character,
-   and do so after just a simple test of the context.
-
-   If that criterion is not satisfied, do not call this function.  */
+   (non-ASCII) translation are the same aside from the last byte.  This
+   makes it possible to translate just the last byte of a character, and do
+   so after just a simple test of the context.
+
+   If that criterion is not satisfied, do not call this function.  You will
+   get an assertion failure. */
 	    
 static Charbpos
 boyer_moore (struct buffer *buf, Ibyte *base_pat, Bytecount len,
 	     Bytebpos pos, Bytebpos lim, EMACS_INT n, Lisp_Object trt,
 	     Lisp_Object inverse_trt, int USED_IF_MULE (charset_base))
 {
-  /* &&#### needs some 8-bit work here */
   /* #### Someone really really really needs to comment the workings
      of this junk somewhat better.
 
@@ -1602,6 +1700,13 @@
 #ifdef MULE
   Ibyte translate_prev_byte = 0;
   Ibyte translate_anteprev_byte = 0;
+  /* These need to be rethought in the event that the internal format
+     changes, or in the event that num_8_bit_fixed_chars disappears
+     (entirely_one_byte_p can be trivially worked out by checking is the
+     byte count equal to the char count.)  */
+  int buffer_entirely_one_byte_p = buf->text->entirely_one_byte_p;
+  int buffer_nothing_greater_than_0xff =
+    buf->text->num_8_bit_fixed_chars == BUF_Z(buf) - BUF_BEG (buf);
 #endif
 #ifdef C_ALLOCA
   EMACS_INT BM_tab_space[0400];
@@ -1684,20 +1789,45 @@
 	      while (!ibyte_first_byte_p (*charstart))
 		charstart--;
 	      untranslated = itext_ichar (charstart);
-	      if (charset_base == (untranslated & ~ICHAR_FIELD3_MASK))
-		{
-		  ch = TRANSLATE (trt, untranslated);
-		  if (!ibyte_first_byte_p (*ptr))
-		    {
-		      translate_prev_byte = ptr[-1];
-		      if (!ibyte_first_byte_p (translate_prev_byte))
-			translate_anteprev_byte = ptr[-2];
-		    }
-		}
-	      else
-		{
-		  this_translated = 0;
-		  ch = *ptr;
+
+              ch = TRANSLATE (trt, untranslated);
+              if (!ibyte_first_byte_p (*ptr))
+                {
+                  translate_prev_byte = ptr[-1];
+                  if (!ibyte_first_byte_p (translate_prev_byte))
+                    translate_anteprev_byte = ptr[-2];
+                }
+
+              if (ch != untranslated && /* Was translation done? */
+                  charset_base != (ch & ~ICHAR_FIELD3_MASK))
+                {
+                  /* In the very rare event that the CANON entry for this
+                     character is not in the desired set, choose one that
+                     is, from the equivalence set. It doesn't much matter
+                     which, since we're building our own cheesy equivalence
+                     table instead of using that belonging to the case
+                     table directly.
+
+                     We can get here if search_buffer has worked out that
+                     the buffer is entirely single width. */
+                  Ichar starting_ch = ch;
+                  int count = 0;
+                  do
+                    {
+                      ch = TRANSLATE (inverse_trt, ch);
+                      if (charset_base == (ch & ~ICHAR_FIELD3_MASK))
+                        break;
+                      ++count;
+                    } while (starting_ch != ch);
+
+                  /* If starting_ch is equal to ch (and count is not one,
+                     which means no translation is necessary), the case
+                     table is corrupt. (Any mapping in the canon table
+                     should be reflected in the equivalence table, and we
+                     know from the canon table that untranslated maps to
+                     starting_ch and that untranslated has the correct value
+                     for charset_base.) */
+                  assert (1 == count || starting_ch != ch);
 		}
 	    }
 	  else
@@ -1713,28 +1843,34 @@
 	  if (i == infinity)
 	    stride_for_teases = BM_tab[j];
 	  BM_tab[j] = dirlen - i;
-	  /* A translation table is accompanied by its inverse --
-	     see comment in casetab.c. */
+	  /* A translation table is accompanied by its inverse -- see
+	     comment in casetab.c. */
 	  if (this_translated)
 	    {
 	      Ichar starting_ch = ch;
 	      EMACS_INT starting_j = j;
-	      while (1)
+	      do
 		{
 		  ch = TRANSLATE (inverse_trt, ch);
-		  if (ch > 0400)
-		    j = ((unsigned char) ch | 0200);
-		  else
-		    j = (unsigned char) ch;
-
-		  /* For all the characters that map into CH,
-		     set up simple_translate to map the last byte
-		     into STARTING_J.  */
-		  simple_translate[j] = (Ibyte) starting_j;
-		  if (ch == starting_ch)
-		    break;
-		  BM_tab[j] = dirlen - i;
-		}
+
+                  if (ch > 0x7F && buffer_entirely_one_byte_p)
+                    continue;
+
+                  if (ch > 0xFF && buffer_nothing_greater_than_0xff)
+                    continue;
+
+                  if (ch > 0400)
+                    j = ((unsigned char) ch | 0200);
+                  else
+                    j = (unsigned char) ch;
+
+                  /* For all the characters that map into CH, set up
+                     simple_translate to map the last byte into
+                     STARTING_J.  */
+                  simple_translate[j] = (Ibyte) starting_j;
+                  BM_tab[j] = dirlen - i;
+
+		} while (ch != starting_ch);
 	    }
 #else
 	  EMACS_INT k;
@@ -3232,4 +3368,15 @@
 
   Vskip_chars_range_table = Fmake_range_table (Qstart_closed_end_closed);
   staticpro (&Vskip_chars_range_table);
+#ifdef DEBUG_XEMACS 
+  DEFSYMBOL (Qsearch_algorithm_used);
+  DEFSYMBOL (Qboyer_moore);
+  DEFSYMBOL (Qsimple_search);
+
+  DEFVAR_INT ("debug-xemacs-searches", &debug_xemacs_searches /*
+If non-zero, bind `search-algorithm-used' to `boyer-moore' or `simple-search',
+depending on the algorithm used for each search.  Used for testing.
+*/ );
+  debug_xemacs_searches = 0;
+#endif 
 }
--- a/src/specifier.c	Sun May 11 11:20:24 2008 +0200
+++ b/src/specifier.c	Sun May 11 11:24:01 2008 +0200
@@ -247,7 +247,7 @@
 	{
 	  Lisp_Specifier* sp = XSPECIFIER (rest);
 	  /* A bit of assertion that we're removing both parts of the
-             magic one altogether */
+	     magic one altogether */
 	  assert (!MAGIC_SPECIFIER_P(sp)
 		  || (BODILY_SPECIFIER_P(sp) && marked_p (sp->fallback))
 		  || (GHOST_SPECIFIER_P(sp) && marked_p (sp->magic_parent)));
@@ -386,10 +386,10 @@
 };
 
 #ifdef NEW_GC
-DEFINE_LRECORD_IMPLEMENTATION ("specifier-caching", 
+DEFINE_LRECORD_IMPLEMENTATION ("specifier-caching",
 			       specifier_caching,
 			       1, /*dumpable-flag*/
-                               0, 0, 0, 0, 0, 
+			       0, 0, 0, 0, 0,
 			       specifier_caching_description_1,
 			       struct specifier_caching);
 #else /* not NEW_GC */
@@ -695,7 +695,7 @@
     ? Qt : Qnil;
 }
 
-DEFUN ("valid-specifier-locale-type-p", Fvalid_specifier_locale_type_p, 1, 
+DEFUN ("valid-specifier-locale-type-p", Fvalid_specifier_locale_type_p, 1,
        1, 0, /*
 Given a specifier LOCALE-TYPE, return non-nil if it is valid.
 Valid locale types are `global', `device', `frame', `window', and `buffer'.
@@ -983,8 +983,8 @@
 
 static int
 charset_matches_specifier_tag_set_p (Lisp_Object charset,
-				     Lisp_Object tag_set, 
-				     enum font_specifier_matchspec_stages 
+				     Lisp_Object tag_set,
+				     enum font_specifier_matchspec_stages
 				     stage)
 {
   Lisp_Object rest;
@@ -998,20 +998,20 @@
       Lisp_Object assoc;
 
       /* In the event that, during the creation of a charset, no specifier
-         tags exist for which CHARSET-PREDICATE has been specified, then
-         that charset's entry in Vcharset_tag_lists will be nil, and this
-         charset shouldn't match. */
-
-      if (NILP (XVECTOR_DATA(Vcharset_tag_lists)[XCHARSET_LEADING_BYTE(charset) 
-                                                 - MIN_LEADING_BYTE]))
-        {
-          return 0;
-        }
+	 tags exist for which CHARSET-PREDICATE has been specified, then
+	 that charset's entry in Vcharset_tag_lists will be nil, and this
+	 charset shouldn't match. */
+
+      if (NILP (XVECTOR_DATA(Vcharset_tag_lists)[XCHARSET_LEADING_BYTE(charset)
+						 - MIN_LEADING_BYTE]))
+	{
+	  return 0;
+	}
 
       /* Now, find out what the pre-calculated value is. */
       assoc = assq_no_quit(tag,
 			   XVECTOR_DATA(Vcharset_tag_lists)
-			   [XCHARSET_LEADING_BYTE(charset) 
+			   [XCHARSET_LEADING_BYTE(charset)
 			    - MIN_LEADING_BYTE]);
 
       if (!(NILP(assoc)) && !(NILP(XCDR(assoc))))
@@ -1060,18 +1060,18 @@
 }
 
 Lisp_Object
-define_specifier_tag(Lisp_Object tag, Lisp_Object device_predicate, 
+define_specifier_tag(Lisp_Object tag, Lisp_Object device_predicate,
 		     Lisp_Object charset_predicate)
 {
-  Lisp_Object assoc = assq_no_quit (tag, Vuser_defined_tags), 
+  Lisp_Object assoc = assq_no_quit (tag, Vuser_defined_tags),
     concons, devcons, charpres = Qnil;
   int recompute_devices = 0, recompute_charsets = 0, i, max_args = -1;
 
   if (NILP (assoc))
     {
       recompute_devices = recompute_charsets = 1;
-      Vuser_defined_tags = Fcons (list3 (tag, device_predicate, 
-					 charset_predicate), 
+      Vuser_defined_tags = Fcons (list3 (tag, device_predicate,
+					 charset_predicate),
 				  Vuser_defined_tags);
       DEVICE_LOOP_NO_BREAK (devcons, concons)
 	{
@@ -1105,7 +1105,7 @@
 	  invalid_argument
 	    ("Charset predicate must be able to take an argument", tag);
 	}
-      
+
       /* If there exists a charset_predicate for the tag currently (even if
 	 the new charset_predicate is nil), or if we're adding one, we need
 	 to recompute.  This contrasts with the device predicates, where we
@@ -1139,7 +1139,7 @@
 	}
     }
 
-  if (recompute_charsets) 
+  if (recompute_charsets)
     {
       if (NILP(charset_predicate))
 	{
@@ -1158,8 +1158,8 @@
 
 	  if (!NILP(charset_predicate))
 	    {
-	      struct gcpro gcpro1; 
-	      charpres = make_vector(impossible, Qnil); 
+	      struct gcpro gcpro1;
+	      charpres = make_vector(impossible, Qnil);
 	      GCPRO1 (charpres);
 
 	      /* If you want to extend the number of stages available, here
@@ -1212,8 +1212,8 @@
 	    }
 	  else
 	    {
-	      XVECTOR_DATA(Vcharset_tag_lists)[i] 
-		= Fcons(Fcons(tag, charpres), 
+	      XVECTOR_DATA(Vcharset_tag_lists)[i]
+		= Fcons(Fcons(tag, charpres),
 			XVECTOR_DATA (Vcharset_tag_lists)[i]);
 	    }
 	}
@@ -1310,15 +1310,15 @@
       assert(3 == list_len);
 
       device_predicate = XCADR(XCAR (rest));
-					   
+
       if (NILP (device_predicate))
 	{
-	  XCDR (XCAR (rest2)) = Qt; 
+	  XCDR (XCAR (rest2)) = Qt;
 	}
       else
 	{
-	  device_predicate = !NILP (call_critical_lisp_code 
-				    (d, device_predicate, device)) 
+	  device_predicate = !NILP (call_critical_lisp_code
+				    (d, device_predicate, device))
 	    ? Qt : Qnil;
 	  XCDR (XCAR (rest2)) = device_predicate;
 	}
@@ -1329,7 +1329,7 @@
 setup_charset_initial_specifier_tags (Lisp_Object charset)
 {
   Lisp_Object rest, charset_predicate, tag, new_value;
-  Lisp_Object charset_tag_list = Qnil; 
+  Lisp_Object charset_tag_list = Qnil;
 
   LIST_LOOP (rest, Vuser_defined_tags)
     {
@@ -1362,7 +1362,7 @@
 									\
       } while (0)
 
-      SETUP_CHARSET_TAGS_FROB (initial); 
+      SETUP_CHARSET_TAGS_FROB (initial);
       SETUP_CHARSET_TAGS_FROB (final);
       /* More later?  */
 
@@ -2325,10 +2325,10 @@
 where
   LOCALE := a window, a buffer, a frame, a device, or `global'
   TAG-SET := an unordered list of zero or more TAGS, each of which
-             is a symbol
+	     is a symbol
   TAG := a device class (see `valid-device-class-p'), a device type
-         (see `valid-console-type-p'), or a tag defined with
-         `define-specifier-tag'
+	 (see `valid-console-type-p'), or a tag defined with
+	 `define-specifier-tag'
   INSTANTIATOR := format determined by the type of specifier
 
 The pair (TAG-SET . INSTANTIATOR) is called an `inst-pair'.
@@ -2804,7 +2804,8 @@
 				   Lisp_Object inst_list,
 				   Error_Behavior errb, int no_quit,
 				   Lisp_Object depth,
-				   Lisp_Object *instantiator)
+				   Lisp_Object *instantiator,
+				   int no_fallback)
 {
   /* This function can GC */
   Lisp_Specifier *sp;
@@ -2866,7 +2867,7 @@
 
       if (!device_matches_specifier_tag_set_p (device, tag_set))
 	{
-	  continue; 
+	  continue;
 	}
 
       val = XCDR (tagged_inst);
@@ -2883,7 +2884,7 @@
 	val = call_with_suspended_errors
 	  ((lisp_fn_t) RAW_SPECMETH (sp, instantiate),
 	   Qunbound, Qspecifier, errb, 5, specifier,
-	   matchspec, domain, val, depth);
+	   matchspec, domain, val, depth, no_fallback);
 
       if (!UNBOUNDP (val))
 	{
@@ -2922,7 +2923,7 @@
 
       if (!device_matches_specifier_tag_set_p (device, tag_set))
 	{
-	  continue; 
+	  continue;
 	}
 
       val = XCDR (tagged_inst);
@@ -2932,7 +2933,7 @@
 	val = call_with_suspended_errors
 	  ((lisp_fn_t) RAW_SPECMETH (sp, instantiate),
 	   Qunbound, Qspecifier, errb, 5, specifier,
-	   matchspec, domain, val, depth);
+	   matchspec, domain, val, depth, no_fallback);
 
       if (!UNBOUNDP (val))
 	{
@@ -2951,7 +2952,7 @@
 
 /* Given a SPECIFIER and a DOMAIN, return a specific instance for that
    specifier. Try to find one by checking the specifier types from most
-   specific (buffer) to most general (global).  If we find an instance,
+   specific (window) to most general (global).  If we find an instance,
    return it.  Otherwise return Qunbound. */
 
 #define CHECK_INSTANCE_ENTRY(key, matchspec, type) do {			\
@@ -2963,7 +2964,7 @@
 	  specifier_instance_from_inst_list (specifier, matchspec,	\
 					     domain, *CIE_inst_list,	\
 					     errb, no_quit, depth,	\
-					     instantiator);		\
+					     instantiator, no_fallback); \
 	if (!UNBOUNDP (CIE_val))					\
 	  return CIE_val;						\
       }									\
@@ -3075,7 +3076,8 @@
   assert (CONSP (sp->fallback));
   return specifier_instance_from_inst_list (specifier, matchspec, domain,
 					    sp->fallback, errb, no_quit,
-					    depth, instantiator);
+					    depth, instantiator,
+					    no_fallback);
 }
 #undef CHECK_INSTANCE_ENTRY
 
@@ -3245,7 +3247,7 @@
    display table is not there. (Chartable specifiers are not yet
    implemented.)
 
--- For font specifiers, MATCHSPEC should be a cons (CHARSET . STAGE).  
+-- For font specifiers, MATCHSPEC should be a cons (CHARSET . STAGE).
    The defined stages are currently `initial' and `final'.  On X11, 'initial
    is used when the font matching process is looking for fonts that match
    the desired registries of the charset--see the `charset-registries'
@@ -3308,7 +3310,7 @@
   if (!NILP (built_up_list))
     val = specifier_instance_from_inst_list (specifier, matchspec, domain,
 					     built_up_list, ERROR_ME,
-					     0, Qzero, &instantiator);
+					     0, Qzero, &instantiator, 0);
   UNGCPRO;
   return UNBOUNDP (val) ? default_ : want_instantiator ? instantiator : val;
 
@@ -3329,7 +3331,7 @@
 						0);
 }
 
-DEFUN ("specifier-instantiator-from-inst-list", 
+DEFUN ("specifier-instantiator-from-inst-list",
        Fspecifier_instantiator_from_inst_list, 3, 4, 0, /*
 Attempt to convert an inst-list into an instance; return instantiator.
 This is identical to `specifier-instance-from-inst-list' but returns
@@ -3923,5 +3925,5 @@
   staticpro (&Vunlock_ghost_specifiers);
 
   Vcharset_tag_lists = make_vector(NUM_LEADING_BYTES, Qnil);
-  staticpro (&Vcharset_tag_lists); 
+  staticpro (&Vcharset_tag_lists);
 }
--- a/src/specifier.h	Sun May 11 11:20:24 2008 +0200
+++ b/src/specifier.h	Sun May 11 11:24:01 2008 +0200
@@ -139,7 +139,7 @@
   void (*validate_matchspec_method) (Lisp_Object matchspec);
 
   /* Instantiate method: Return SPECIFIER instance in DOMAIN,
-     specified by INSTANTIATOR.  MATCHSPEC specifies an additional
+     specified by INSTANTIATOR.  MATCHSPEC specifies additional
      constraints on the instance value (see the docstring for
      Fspecifier_matching_instance function). MATCHSPEC is passed
      Qunbound when no matching constraints are imposed. The method is
@@ -152,6 +152,9 @@
      name specifier_instance) to avoid creating "external"
      specification loops.
 
+     NO_FALLBACK indicates that the method should not try the fallbacks
+     (and thus simply return Qunbound) in case of a failure to instantiate.
+
      This method must presume that both INSTANTIATOR and MATCHSPEC are
      already validated by the corresponding validate_* methods, and
      may abort if they are invalid.
@@ -166,7 +169,8 @@
 				     Lisp_Object matchspec,
 				     Lisp_Object domain,
 				     Lisp_Object instantiator,
-				     Lisp_Object depth);
+				     Lisp_Object depth,
+				     int no_fallback);
 
   /* Going-to-add method: Called when an instantiator is about
      to be added to a specifier.  This function can specify
@@ -343,7 +347,7 @@
   INITIALIZE_SPECIFIER_TYPE (type, obj_name, pred_sym);			\
   type##_specifier_methods->extra_data_size =				\
     sizeof (struct type##_specifier);					\
-  type##_specifier_methods->extra_description = 			\
+  type##_specifier_methods->extra_description =			\
     &type##_specifier_description_0;					\
 } while (0)
 
@@ -573,13 +577,13 @@
    font for CHARSET that matches iso10646-1, since we haven't found a font
    that matches its registry."  */
 enum font_specifier_matchspec_stages {
-  initial, 
+  initial,
   final,
-  impossible, 
+  impossible,
 };
 
 Lisp_Object define_specifier_tag(Lisp_Object tag,
-				 Lisp_Object device_predicate, 
+				 Lisp_Object device_predicate,
 				 Lisp_Object charset_predicate);
 
 #endif /* INCLUDED_specifier_h_ */
--- a/src/text.h	Sun May 11 11:20:24 2008 +0200
+++ b/src/text.h	Sun May 11 11:24:01 2008 +0200
@@ -2988,7 +2988,6 @@
 /* Extra indirection needed in case of manifest constant as arg */
 #define WEXTSTRING_1(arg) L##arg
 #define WEXTSTRING(arg) WEXTSTRING_1(arg)
-#define MAX_XETCHAR_SIZE sizeof (WCHAR)
 #define wext_strlen wcslen
 #define wext_strcmp wcscmp
 #define wext_strncmp wcsncmp
@@ -3014,7 +3013,6 @@
 #else
 #define WEXTTEXT_ZTERM_SIZE sizeof (char)
 #define WEXTSTRING(arg) arg
-#define MAX_XETCHAR_SIZE sizeof (char)
 #define wext_strlen strlen
 #define wext_strcmp strcmp
 #define wext_strncmp strncmp
--- a/src/window.c	Sun May 11 11:20:24 2008 +0200
+++ b/src/window.c	Sun May 11 11:24:01 2008 +0200
@@ -3520,8 +3520,6 @@
   int line_size;
   int defheight, defwidth;
 
-  /* #### This is very likely incorrect and instead the char_to_pixel_
-     functions should be called. */
   default_face_height_and_width (window, &defheight, &defwidth);
   line_size = (set_height ? defheight : defwidth);
 
@@ -3532,7 +3530,7 @@
 
   if (!nodelete
       && !TOP_LEVEL_WINDOW_P (w)
-      && new_pixsize < minsize)
+      && (new_pixsize + window_modeline_height (w)) < minsize)
     {
       Fdelete_window (window, Qnil);
       return;
@@ -3603,7 +3601,17 @@
 	  /* All but the last window should have a height which is
              a multiple of the default line height. */
 	  if (!NILP (c->next))
-	    pos = (pos / line_size) * line_size;
+	    {
+	      /*
+	       * Round up when we're shrinking, down when we're growing
+	       * to make sure that pairs of grow / shrink meant to
+	       * cancel out actually do cancel out.
+	       */
+	      if (pixel_adj_left < 0)
+		pos = ((pos + line_size -1) / line_size) * line_size;
+	      else
+		pos = (pos / line_size) * line_size;
+	    }
 
 	  /* Avoid confusion: don't delete child if it becomes too small */
 	  set_window_pixsize (child, pos + first - last_pos, 1, set_height);
@@ -4369,8 +4377,6 @@
   if (EQ (window, FRAME_ROOT_WINDOW (f)))
     invalid_operation ("Won't change only window", Qunbound);
 
-  /* #### This is very likely incorrect and instead the char_to_pixel_
-     functions should be called. */
   default_face_height_and_width (window, &defheight, &defwidth);
 
   while (1)
--- a/src/xemacs.def.in.in	Sun May 11 11:20:24 2008 +0200
+++ b/src/xemacs.def.in.in	Sun May 11 11:24:01 2008 +0200
@@ -1,4 +1,23 @@
-/* Put the usual header here */
+/* The module API: core symbols that are visible to modules.
+   Copyright (C) 2008 Jerry James
+
+This file is part of XEmacs.
+
+XEmacs is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+XEmacs is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with XEmacs; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+Boston, MA 02110-1301, USA. */
+
 /* The symbol to import/export is on the left.  If the symbol is not
    meant to be used directly, but a macro or inline function in the
    API expands to a form containing the symbol, then the macro or
--- a/tests/ChangeLog	Sun May 11 11:20:24 2008 +0200
+++ b/tests/ChangeLog	Sun May 11 11:24:01 2008 +0200
@@ -1,3 +1,72 @@
+2008-02-14  Aidan Kehoe  <kehoea@parhasard.net>
+
+	* automated/case-tests.el (let):
+	Correct and extend the previous test, thank you Stephen. 
+
+2008-02-11  Aidan Kehoe  <kehoea@parhasard.net>
+
+	* automated/case-tests.el (Assert): 
+	New test case; thank you Michael Sperber. 
+
+2008-01-30  Aidan Kehoe  <kehoea@parhasard.net>
+
+	* automated/case-tests.el (pristine-case-table): 
+	New var, reflecting the standard case table before case-table.el
+	messes with it. 
+	* automated/case-tests.el: 
+	Call Skip-Test-Unless correctly, following Vin's report of
+	20a807210801300635v7533d26rdb32a8d82fb4239b@mail.gmail.com . 
+	Use pristine-case-table, add in a couple more tests.
+	* automated/test-harness.el (test-harness-from-buffer): 
+	Update the error message in the light of tests skipped for other
+	reasons (not to do with absent packages). In this case, because
+	we're exposing diagnostics in a DEBUG_XEMACS build that are no
+	appropriate to expose to non-DEBUG_XEMACS builds. 
+
+2008-01-30  Aidan Kehoe  <kehoea@parhasard.net>
+
+	* automated/case-tests.el:
+	Check for a bug Mike Sperber reported; check algorithms used, if
+	available. 
+
+2008-01-16  Aidan Kehoe  <kehoea@parhasard.net>
+
+	* automated/mule-tests.el (test-file-name): 
+	Call #'make-temp-file now it's available. Remove a long comment
+	saying, essentially, that it should be used, not
+	#'make-temp-name. 
+
+2008-01-16  Aidan Kehoe  <kehoea@parhasard.net>
+
+	* automated/hash-table-tests.el: 
+	Assert that two short lists with the same contents in distinct
+	orders hash differently. 
+
+2008-01-15  Aidan Kehoe  <kehoea@parhasard.net>
+
+	* automated/lisp-tests.el (literal-with-uninterned):
+	Use ?\x syntax for Latin-1 characters, don't assume that the file
+	will be read as UTF-8. 
+
+2008-01-15  Aidan Kehoe  <kehoea@parhasard.net>
+
+	* automated/lisp-tests.el (thing): 
+	Check that printing a hash table literal doesn't clear
+	print-gensym-alist. 
+
+2008-01-03  Stephen J. Turnbull  <stephen@xemacs.org>
+
+	* automated/symbol-tests.el (Symbol documentation): Add tests to
+	check documentation extraction.
+
+2007-12-29  Stephen J. Turnbull  <stephen@xemacs.org>
+
+	* automated/test-harness.el (test-harness-test-compiled):
+	Improve docstring.
+
+	* automated/weak-tests.el (test-harness-test-compiled):
+	Remove debugging code.
+
 2007-12-21  Stephen J. Turnbull  <stephen@xemacs.org>
 
 	* reproduce-crashes.el: Renamed from reproduce-bugs.el.  Update to-do.
--- a/tests/automated/case-tests.el	Sun May 11 11:20:24 2008 +0200
+++ b/tests/automated/case-tests.el	Sun May 11 11:24:01 2008 +0200
@@ -30,6 +30,16 @@
 
 ;; Test case-table related functionality.
 
+(defvar pristine-case-table nil
+  "The standard case table, without manipulation from case-tests.el")
+
+(setq pristine-case-table (or
+			   ;; This is the compiled run; we've retained
+			   ;; it from the interpreted run.
+			   pristine-case-table 
+			   ;; This is the interpreted run; set it.
+			   (copy-case-table (standard-case-table))))
+
 (Assert (case-table-p (standard-case-table)))
 ;; Old case table test.
 (Assert (case-table-p (list
@@ -268,3 +278,56 @@
       (goto-char (point-max))
       (Assert (not (search-backward string nil t 6))))))
 
+;; Bug reported in http://mid.gmane.org/y9lk5lu5orq.fsf@deinprogramm.de from
+;; Michael Sperber. Fixed 2008-01-29.
+(with-string-as-buffer-contents "\n\nDer beruhmte deutsche Flei\xdf\n\n"
+  (goto-char (point-min))
+  (Assert (search-forward "Flei\xdf")))
+
+(with-temp-buffer
+  (let ((target "M\xe9zard")
+        (debug-xemacs-searches 1))
+    (Assert (not (search-forward target nil t)))
+    (insert target)
+    (goto-char (point-min))
+    ;; #### search-algorithm-used is simple-search after the following,
+    ;; which shouldn't be necessary; it should be possible to use
+    ;; Boyer-Moore. 
+    ;;
+    ;; But searches for ASCII strings in buffers with nothing above ?\xFF
+    ;; use Boyer Moore with the current implementation, which is the
+    ;; important thing for the Gnus use case.
+    (Assert (= (1+ (length target)) (search-forward target nil t)))))
+
+(Skip-Test-Unless
+ (boundp 'debug-xemacs-searches) ; normal when we have DEBUG_XEMACS
+ "not a DEBUG_XEMACS build"
+ "checks that the algorithm chosen by #'search-forward is relatively sane"
+ (let ((debug-xemacs-searches 1))
+   (with-temp-buffer
+     (set-case-table pristine-case-table)
+     (insert "\n\nDer beruhmte deutsche Fleiss\n\n")
+     (goto-char (point-min))
+     (Assert (search-forward "Fleiss"))
+     (delete-region (point-min) (point-max))
+     (insert "\n\nDer beruhmte deutsche Flei\xdf\n\n")
+     (goto-char (point-min))
+     (Assert (search-forward "Flei\xdf"))
+     (Assert (eq 'boyer-moore search-algorithm-used))
+     (delete-region (point-min) (point-max))
+     (when (featurep 'mule)
+       (insert "\n\nDer beruhmte deutsche Flei\xdf\n\n")
+       (goto-char (point-min))
+       (Assert 
+        (search-forward (format "Fle%c\xdf"
+                                (make-char 'latin-iso8859-9 #xfd))))
+       (Assert (eq 'boyer-moore search-algorithm-used))
+       (insert (make-char 'latin-iso8859-9 #xfd))
+       (goto-char (point-min))
+       (Assert (search-forward "Flei\xdf"))
+       (Assert (eq 'simple-search search-algorithm-used)) 
+       (goto-char (point-min))
+       (Assert (search-forward (format "Fle%c\xdf"
+                                       (make-char 'latin-iso8859-9 #xfd))))
+       (Assert (eq 'simple-search search-algorithm-used))))))
+
--- a/tests/automated/hash-table-tests.el	Sun May 11 11:20:24 2008 +0200
+++ b/tests/automated/hash-table-tests.el	Sun May 11 11:24:01 2008 +0200
@@ -281,3 +281,4 @@
 ;;; Test sxhash
 (Assert (= (sxhash "foo") (sxhash "foo")))
 (Assert (= (sxhash '(1 2 3)) (sxhash '(1 2 3))))
+(Assert (/= (sxhash '(1 2 3)) (sxhash '(3 2 1))))
--- a/tests/automated/lisp-tests.el	Sun May 11 11:20:24 2008 +0200
+++ b/tests/automated/lisp-tests.el	Sun May 11 11:24:01 2008 +0200
@@ -1299,3 +1299,17 @@
 ;; Check all-completions ignore element start with space.
 (Assert (not (all-completions "" '((" hidden" . "object")))))
 (Assert (all-completions " " '((" hidden" . "object"))))
+
+(let* ((literal-with-uninterned
+	'(first-element
+	  [#1=#:G32976 #2=#:G32974 #3=#:G32971 #4=#:G32969 alias
+		       #s(hash-table size 256 data (969 ?\xF9 55 ?7 166 ?\xA6))
+		       #5=#:G32970 #6=#:G32972]))
+       (print-readably t)
+       (print-gensym t)
+       (printed-with-uninterned (prin1-to-string literal-with-uninterned))
+       (awkward-regexp "#1=#")
+       (first-match-start (string-match awkward-regexp
+					printed-with-uninterned)))
+  (Assert (null (string-match awkward-regexp printed-with-uninterned
+			      (1+ first-match-start)))))
--- a/tests/automated/mule-tests.el	Sun May 11 11:20:24 2008 +0200
+++ b/tests/automated/mule-tests.el	Sun May 11 11:24:01 2008 +0200
@@ -118,21 +118,8 @@
 ;; Fixed 2007-06-22 <18043.2793.611745.734215@parhasard.net>.
 ;;----------------------------------------------------------------
 
-(let ((test-file-name
-       ;; The Gnus people, when they call #'make-temp-name, then loop,
-       ;; checking if the corresponding file exists. Our #'make-temp-name
-       ;; already does this loop, and the Gnus approach doesn't bring
-       ;; anything; there remains a race condition if you can predict the
-       ;; path name. The path name in question depends on the process ID and
-       ;; a (weak) PRNG seeded with the seconds to the power of the
-       ;; milliseconds of some instant close to the startup time of this
-       ;; XEmacs; without being able to read the address space of this
-       ;; XEmacs, or monitor what stat() calls it does, it is not predictable.
-       ;;
-       ;; The really kosher way to do this is to merge GNU's make-temp-file
-       ;; and use that. It basically has the functionality of the Unix
-       ;; mkstemp.
-       (make-temp-name (expand-file-name "tXfXsKc" (temp-directory))))
+(let ((test-file-name 
+       (make-temp-file (expand-file-name "tXfXsKc" (temp-directory))))
       revert-buffer-function
       kill-buffer-hook)		; paranoia
   (find-file test-file-name)
--- a/tests/automated/symbol-tests.el	Sun May 11 11:20:24 2008 +0200
+++ b/tests/automated/symbol-tests.el	Sun May 11 11:24:01 2008 +0200
@@ -332,3 +332,23 @@
 ;  (Assert (equal (catch 'test-tag
 ;		   (set mysym 'foo))
 ;		 `(,mysym (foo) make-local nil nil))))
+
+;; ----------------------------------------------------------------
+;; Symbol documentation
+;; ----------------------------------------------------------------
+
+;; built-in variable documentation
+(Assert (string= (built-in-symbol-file 'internal-doc-file-name)
+		 "doc.c"))
+
+;; built-in function documentation
+(Assert (string= (built-in-symbol-file 'built-in-symbol-file)
+		 "doc.c"))
+
+;; built-in macro documentation
+(Assert (string= (built-in-symbol-file 'when)
+		 "eval.c"))
+
+;; #### we should handle symbols defined in Lisp, dumped, autoloaded,
+;; and required, too.
+
--- a/tests/automated/test-harness.el	Sun May 11 11:20:24 2008 +0200
+++ b/tests/automated/test-harness.el	Sun May 11 11:24:01 2008 +0200
@@ -71,7 +71,17 @@
 (defvar unexpected-test-file-failures)
 
 (defvar test-harness-test-compiled nil
-  "Non-nil means the test code was compiled before execution.")
+  "Non-nil means the test code was compiled before execution.
+
+You probably should not make tests depend on compilation.
+However, it can be useful to conditionally change messages based on whether
+the code was compiled or not.  For example, the case that motivated the
+implementation of this variable:
+
+\(when test-harness-test-compiled
+  ;; this ha-a-ack depends on the failing compiled test coming last
+  \(setq test-harness-failure-tag
+	\"KNOWN BUG - fix reverted; after 2003-10-31 notify stephen\n\"))")
 
 (defvar test-harness-verbose
   (and (not noninteractive) (> (device-baud-rate) search-slow-speed))
@@ -434,9 +444,9 @@
 		 skipped-test-reasons)
 	(when (> (length reasons) 1)
 	  (setq summary-msg (concat summary-msg reasons "
-    Probably XEmacs cannot find your installed packages.  Set EMACSPACKAGEPATH
-    to the package hierarchy root or configure with --package-path to enable
-    the skipped tests.")))
+    It may be that XEmacs cannot find your installed packages.  Set
+    EMACSPACKAGEPATH to the package hierarchy root or configure with
+    --package-path to enable the skipped tests.")))
 	(setq test-harness-file-results-alist
 	      (cons (list filename passes total)
 		    test-harness-file-results-alist))
--- a/tests/automated/weak-tests.el	Sun May 11 11:20:24 2008 +0200
+++ b/tests/automated/weak-tests.el	Sun May 11 11:24:01 2008 +0200
@@ -36,11 +36,6 @@
      (push (file-name-directory load-file-name) load-path)
      (require 'test-harness))))
 
-(when test-harness-test-compiled
-  ;; this ha-a-ack depends on the compiled test coming last
-  (setq test-harness-failure-tag
-	"KNOWN BUG - fix reverted; after 2003-10-31 bitch at stephen\n"))
-
 (garbage-collect)
 
 ;; tests for weak-boxes
--- a/version.sh	Sun May 11 11:20:24 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
-#!/bin/sh
-emacs_is_beta=t
-emacs_major_version=21
-emacs_minor_version=5
-emacs_beta_version=28
-xemacs_codename="fuki"
-emacs_kit_version=
-infodock_major_version=4
-infodock_minor_version=0
-infodock_build_version=8
-xemacs_extra_name="(+CVS-20071205)"
-xemacs_release_date="2007-05-21"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/version.sh.in	Sun May 11 11:24:01 2008 +0200
@@ -0,0 +1,12 @@
+#!/bin/sh
+emacs_is_beta=t
+emacs_major_version=21
+emacs_minor_version=5
+emacs_beta_version=28
+xemacs_codename="fuki"
+emacs_kit_version=
+infodock_major_version=4
+infodock_minor_version=0
+infodock_build_version=8
+xemacs_release_date="2007-05-21"
+xemacs_extra_name=
\ No newline at end of file