changeset 187:b405438285a2 r20-3b20

Import from CVS: tag r20-3b20
author cvs
date Mon, 13 Aug 2007 09:56:28 +0200
parents 24ac94803b48
children e29a8e7498d9
files CHANGES-beta ChangeLog configure configure.in etc/dv.xpm.Z etc/dvm.xpm.Z etc/slb.xpm.Z etc/slbm.xpm.Z lisp/ChangeLog lisp/cc-mode/cc-align.el lisp/cc-mode/cc-cmds.el lisp/cc-mode/cc-compat.el lisp/cc-mode/cc-defs.el lisp/cc-mode/cc-engine.el lisp/cc-mode/cc-langs.el lisp/cc-mode/cc-menus.el lisp/cc-mode/cc-mode.el lisp/cc-mode/cc-styles.el lisp/cc-mode/cc-vars.el lisp/cl/cl-extra.el lisp/cl/cl.el lisp/custom/custom-load.el lisp/ediff/custom-load.el lisp/ediff/ediff-diff.el lisp/ediff/ediff-ptch.el lisp/ediff/ediff-util.el lisp/ediff/ediff.el lisp/efs/dired.el lisp/games/auto-autoloads.el lisp/games/tetris.el lisp/modes/strokes.el lisp/mule/mule-cmds.el lisp/mule/mule-util.el lisp/packages/custom-load.el lisp/packages/etags.el lisp/packages/tar-mode.el lisp/packages/vc.el lisp/prim/about.el lisp/prim/custom-load.el lisp/prim/dumped-lisp.el lisp/prim/loaddefs.el lisp/prim/loadup.el lisp/prim/make-docfile.el lisp/prim/packages.el lisp/prim/startup.el lisp/prim/subr.el lisp/psgml/custom-load.el lisp/utils/autoload.el lisp/utils/custom-load.el lisp/utils/edmacro.el lisp/utils/finder-inf.el lisp/version.el lisp/viper/viper-keym.el lisp/viper/viper.el lisp/x11/x-compose.el lisp/x11/x-init.el lisp/x11/x-toolbar.el lisp/x11/x-win-sun.el lisp/x11/x-win-xfree86.el man/cc-mode.texi man/ediff.texi src/ChangeLog src/console-x.h src/database.c src/device-x.c src/dgif_lib.c src/doprnt.c src/elhash.c src/emacs.c src/emacsfns.h src/eval.c src/event-Xt.c src/event-stream.c src/fns.c src/glyphs.h src/mule-coding.h src/print.c src/redisplay.c src/search.c src/sysdep.c src/window.h version.sh
diffstat 82 files changed, 2512 insertions(+), 2062 deletions(-) [+]
line wrap: on
line diff
--- a/CHANGES-beta	Mon Aug 13 09:55:30 2007 +0200
+++ b/CHANGES-beta	Mon Aug 13 09:56:28 2007 +0200
@@ -1,6 +1,16 @@
 							-*- indented-text -*-
-to 20.3 beta19 "Kiev"
--- Mega Martin Buccholz patch
+to 20.3 beta20 "Tirana"
+-- Miscellaneous patches from Martin and Hrvoje
+-- tetris.el-1.8
+-- viper update courtesy of Michael Kifer
+-- ediff updates courtesy of Michael Kifer
+-- strokes.el-2.4-beta
+-- cc-mode-5.17
+-- edmacro.el-3.19 courtesy of Hrvoje Niksic
+-- Miscellaneous bug fixes
+
+to 20.3 beta19 "Kyiv"
+-- Mega Martin Buchholz patch
 -- Major Viper update, Viper is now Mule aware
 -- ediff updates courtesy of Michael Kifer
 -- tpu-edt.el/tpu-extras.el synched with Emacs 19.34/XEmacs 19.16 courtesy of
--- a/ChangeLog	Mon Aug 13 09:55:30 2007 +0200
+++ b/ChangeLog	Mon Aug 13 09:56:28 2007 +0200
@@ -1,3 +1,43 @@
+1997-09-13  SL Baur  <steve@altair.xemacs.org>
+
+	* XEmacs 20.3-beta20 is released.
+
+1997-09-11  Martin Buchholz  <mrb@eng.sun.com>
+
+	* configure.in: Use `PATH' for options that take multiple dirs.
+	- Fix test for $PWD == `pwd`
+	- Prefer autodetected X11R6 to X11 so that broken HP and Linux
+	systems can work.  (untested)
+
+	* lisp/cl/cl.el:  Fix `loop' indentation to be same as `defun'.
+	* lisp/prim/dumped-lisp.el:  cl-extra and cl-seq always end up
+	being autoloaded - let's make them part of the core.
+
+	* lisp/x11/x-compose.el:
+	* lisp/x11/x-init.el:
+	* lisp/x11/x-win-sun.el:
+	* lisp/x11/x-winxfree86.el:
+	* src/device-x.c:
+	* src/event-Xt.c:
+	- Yet another rewrite of key handling (not the last, though)
+	- x-keysym-on-keyboard-p is much faster.
+	- x-keysym-on-keyboard-sans-modifiers-p introduced.
+	- x-keysym-hashtable introduced.
+	- allow X11R4 libs to guess keysyms on X11R5 servers.
+	- A better workaround for the bug that some Xlibs generate 
+	  Multi_key a adiaeresis when pressing Multi_key a "
+	
+	* src/dgif_lib.c: Make sure size_t is defined before using it.
+
+1997-09-12  SL Baur  <steve@altair.xemacs.org>
+
+	XEmacs 19.16-pre1 "Queens" is released.
+
+1997-09-08  SL Baur  <steve@altair.xemacs.org>
+
+	* configure.in: Reverse package-path.
+	From Colin Rafferty <craffert@ml.com>
+
 1997-09-02  SL Baur  <steve@altair.xemacs.org>
 
 	* XEmacs 20.3-beta19 is released.
--- a/configure	Mon Aug 13 09:55:30 2007 +0200
+++ b/configure	Mon Aug 13 09:56:28 2007 +0200
@@ -259,6 +259,8 @@
 
 Options marked with a (*) are autodetected.
 
+Use colons (or quoted spaces) to separate directory names in option
+values which are PATHs (i.e. lists of directories).
 
 General options:
 
@@ -278,11 +280,11 @@
 			option.  This just allows for simultaneous
 			in-place and --srcdir building.)
 --cflags=FLAGS		Compiler flags. Overrides environment variable CFLAGS.
---site-includes=DIR	Other header file directories.  Separate multiple
-			dirs with spaces and use quotes to enclose.
---site-libraries=DIR	Other library directories.
---site-runtime-libraries=DIR
-			Paths to add with -R flag.
+--site-includes=PATH	List of directories to search first for header files.
+--site-libraries=PATH	List of directories to search first for libraries.
+--site-runtime-libraries=PATH
+			List of ALL directories to search for dynamically
+			linked libraries at run time.
 --dynamic=yes		Link dynamically if supported by system.
 --dynamic=no		Force static linking on systems where dynamic
 			linking is the default.
@@ -298,8 +300,8 @@
 
 Window-system options:
 
---with-x (*)		Support the X Window System.
---with-x=no		Don't support X.
+--with-x11 (*)		Support the X Window System.
+--with-x11=no		Don't support X.
 --x-includes=DIR 	Search for X header files in DIR.
 --x-libraries=DIR	Search for X libraries in DIR.
 --with-toolbars=no	Don't compile with any toolbar support.
@@ -312,9 +314,8 @@
 --with-scrollbars=TYPE	Use TYPE scrollbars
 			(lucid, motif, athena, athena3d, or no).
 --with-dialogs=TYPE	Use TYPE dialog boxes (motif, athena, athena3d, or no).
-			(Lucid menubars and scrollbars are the default.
-			 Motif dialog boxes will be used if Motif can be
-			 found.)
+			Lucid menubars and scrollbars are the default.
+			Motif dialog boxes will be used if Motif can be found.
 --with-cde (*)		Compile in support for CDE drag and drop.
 --with-offix (*)	Compile in support for OffiX drag and drop.
 --with-xmu=no (*)	For those unfortunates whose vendors don't ship Xmu.
@@ -374,9 +375,8 @@
 --mail-locking=TYPE (*)	Specify the locking to be used by movemail to prevent
 			concurrent updates of mail spool files. Valid types
 			are \`lockf', \`flock', and \`file'.
---package-path=PATH     A list of blank separated directories for finding 
-                        packages to dump with xemacs.
-			Defaults to \`$prefix/lib/xemacs/packages ~/.xemacs'
+--package-path=PATH     Directories to search for packages to dump with xemacs.
+                        Defaults to \`$prefix/lib/xemacs/packages:~/.xemacs'.
 
 Internationalization options:
 
@@ -653,8 +653,8 @@
 
         	"with_xfs" )
 	  case "$val" in
-	  y | ye | yes )                val=yes   ;;
-	  n | no | non | none )         val=no    ;;
+	  y | ye | yes )		val=yes	;;
+	  n | no | non | none )		val=no	;;
 	  * ) (echo "$progname: Usage error:"
 echo " " "The \`--$optname' option must have one of these values:
  \`yes', or \`no'."
@@ -788,9 +788,9 @@
 
 test "$extra_verbose" = "yes" && verbose=yes
 
-case "$site_includes" in *:* ) site_includes="`echo '' $site_includes | sed -e 's:^ ::' -e 's/:/ /g'`";; esac
-case "$site_libraries" in *:* ) site_libraries="`echo '' $site_libraries | sed -e 's:^ ::' -e 's/:/ /g'`";; esac
-case "$site_runtime_libraries" in *:* ) site_runtime_libraries="`echo '' $site_runtime_libraries | sed -e 's:^ ::' -e 's/:/ /g'`";; esac
+case "$site_includes" in *:* ) site_includes="`echo '' $site_includes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
+case "$site_libraries" in *:* ) site_libraries="`echo '' $site_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
+case "$site_runtime_libraries" in *:* ) site_runtime_libraries="`echo '' $site_runtime_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
 
 test -n "$with_x" && with_x11="$with_x"
 
@@ -874,7 +874,7 @@
 done
 
 absolute_pwd="`pwd`";
-if test -n "$PWD" && "`cd $PWD && pwd`" = "$absolute_pwd"
+if test -n "$PWD" -a "`cd $PWD && pwd`" = "$absolute_pwd"
 then blddir="$PWD"
 else blddir="$absolute_pwd"
 fi
@@ -1416,7 +1416,7 @@
     decosf* ) ld_call_shared="-call_shared" ;;
   esac
 else   case "$opsys" in
-    sol2 ) 
+    sol2 )
       echo "Static linking is not supported on Solaris 2."
       echo "Rerun configure without specifying --dynamic=no."
       exit 1 ;;
@@ -4094,26 +4094,35 @@
 echo "checking "for specified window system"" 1>&6
 echo "configure:4096: checking "for specified window system"" >&5
 
-if test "$x_includes $x_libraries" = "NONE NONE"; then
-  if test -n "$OPENWINHOME" \
-   -a "$OPENWINHOME" != "/usr/openwin" \
-   -a -d "$OPENWINHOME"; then
-    test -d "$OPENWINHOME/lib"           && x_libraries="$OPENWINHOME/lib"
-    test -d "$OPENWINHOME/include"       && x_includes="$OPENWINHOME/include"
-    test -d "$OPENWINHOME/share/include" && x_includes="$OPENWINHOME/share/include"
+if test "$with_x11" != "no"; then
+    test "$x_includes $x_libraries" != "NONE NONE" && \
+   window_system=x11 with_x11=yes
+
+      if test "$x_includes $x_libraries" = "NONE NONE"; then
+    if test -n "$OPENWINHOME" \
+     -a "$OPENWINHOME" != "/usr/openwin" \
+     -a -d "$OPENWINHOME"; then
+      test -d "$OPENWINHOME/lib"           && x_libraries="$OPENWINHOME/lib"
+      test -d "$OPENWINHOME/include"       && x_includes="$OPENWINHOME/include"
+      test -d "$OPENWINHOME/share/include" && x_includes="$OPENWINHOME/share/include"
+    else
+                        for dir in "/usr/X11R6/include" "/usr/include/X11R6"; do
+        if test -d "$dir/X11"; then x_includes="$dir"; break; fi
+      done
+      if test "$x_includes" != "NONE"; then
+        for dir in "/usr/X11R6/lib" "/usr/lib/X11R6"; do
+          if test -d "$dir"; then x_libraries="$dir"; break; fi
+        done
+      fi
+    fi
   fi
-fi
-
-test "$x_includes $x_libraries" != "NONE NONE" && \
- window_system=x11 with_x11=yes
-
-if test "$with_x11" != "no"; then
+
   # If we find X, set shell vars x_includes and x_libraries to the
 # paths, otherwise set no_x=yes.
 # Uses ac_ vars as temps to allow command line to override cache and checks.
 # --without-x overrides everything else, but does not touch the cache.
 echo $ac_n "checking for X""... $ac_c" 1>&6
-echo "configure:4117: checking for X" >&5
+echo "configure:4126: checking for X" >&5
 
 # Check whether --with-x or --without-x was given.
 if test "${with_x+set}" = set; then
@@ -4173,12 +4182,12 @@
 
   # First, try using that file with no special directory specified.
 cat > conftest.$ac_ext <<EOF
-#line 4177 "configure"
+#line 4186 "configure"
 #include "confdefs.h"
 #include <$x_direct_test_include>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4182: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4191: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4247,14 +4256,14 @@
   ac_save_LIBS="$LIBS"
   LIBS="-l$x_direct_test_library $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4251 "configure"
+#line 4260 "configure"
 #include "confdefs.h"
 
 int main() {
 ${x_direct_test_function}()
 ; return 0; }
 EOF
-if { (eval echo configure:4258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   LIBS="$ac_save_LIBS"
 # We can link X programs with no special library path.
@@ -4363,17 +4372,17 @@
     case "`(uname -sr) 2>/dev/null`" in
     "SunOS 5"*)
       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
-echo "configure:4367: checking whether -R must be followed by a space" >&5
+echo "configure:4376: checking whether -R must be followed by a space" >&5
       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
       cat > conftest.$ac_ext <<EOF
-#line 4370 "configure"
+#line 4379 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:4377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   ac_R_nospace=yes
 else
@@ -4389,14 +4398,14 @@
       else
 	LIBS="$ac_xsave_LIBS -R $x_libraries"
 	cat > conftest.$ac_ext <<EOF
-#line 4393 "configure"
+#line 4402 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:4400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   ac_R_space=yes
 else
@@ -4432,12 +4441,12 @@
 else
 
 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
-echo "configure:4436: checking for dnet_ntoa in -ldnet" >&5
+echo "configure:4445: checking for dnet_ntoa in -ldnet" >&5
 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -ldnet "
 cat > conftest.$ac_ext <<EOF
-#line 4441 "configure"
+#line 4450 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -4448,7 +4457,7 @@
 dnet_ntoa()
 ; return 0; }
 EOF
-if { (eval echo configure:4452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4472,12 +4481,12 @@
     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
       
 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
-echo "configure:4476: checking for dnet_ntoa in -ldnet_stub" >&5
+echo "configure:4485: checking for dnet_ntoa in -ldnet_stub" >&5
 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -ldnet_stub "
 cat > conftest.$ac_ext <<EOF
-#line 4481 "configure"
+#line 4490 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -4488,7 +4497,7 @@
 dnet_ntoa()
 ; return 0; }
 EOF
-if { (eval echo configure:4492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4517,10 +4526,10 @@
     # The nsl library prevents programs from opening the X display
     # on Irix 5.2, according to dickey@clark.net.
     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
-echo "configure:4521: checking for gethostbyname" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 4524 "configure"
+echo "configure:4530: checking for gethostbyname" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 4533 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char gethostbyname(); below.  */
@@ -4543,7 +4552,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:4547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_gethostbyname=yes"
 else
@@ -4564,12 +4573,12 @@
     if test $ac_cv_func_gethostbyname = no; then
       
 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
-echo "configure:4568: checking for gethostbyname in -lnsl" >&5
+echo "configure:4577: checking for gethostbyname in -lnsl" >&5
 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lnsl "
 cat > conftest.$ac_ext <<EOF
-#line 4573 "configure"
+#line 4582 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -4580,7 +4589,7 @@
 gethostbyname()
 ; return 0; }
 EOF
-if { (eval echo configure:4584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4610,10 +4619,10 @@
     # -lsocket must be given before -lnsl if both are needed.
     # We assume that if connect needs -lnsl, so does gethostbyname.
     echo $ac_n "checking for connect""... $ac_c" 1>&6
-echo "configure:4614: checking for connect" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 4617 "configure"
+echo "configure:4623: checking for connect" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 4626 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char connect(); below.  */
@@ -4636,7 +4645,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:4640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_connect=yes"
 else
@@ -4659,12 +4668,12 @@
 xe_msg_checking="for connect in -lsocket"
 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
-echo "configure:4663: checking "$xe_msg_checking"" >&5
+echo "configure:4672: checking "$xe_msg_checking"" >&5
 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lsocket $X_EXTRA_LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4668 "configure"
+#line 4677 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -4675,7 +4684,7 @@
 connect()
 ; return 0; }
 EOF
-if { (eval echo configure:4679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4699,10 +4708,10 @@
 
     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
     echo $ac_n "checking for remove""... $ac_c" 1>&6
-echo "configure:4703: checking for remove" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 4706 "configure"
+echo "configure:4712: checking for remove" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 4715 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char remove(); below.  */
@@ -4725,7 +4734,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:4729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_remove=yes"
 else
@@ -4746,12 +4755,12 @@
     if test $ac_cv_func_remove = no; then
       
 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
-echo "configure:4750: checking for remove in -lposix" >&5
+echo "configure:4759: checking for remove in -lposix" >&5
 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lposix "
 cat > conftest.$ac_ext <<EOF
-#line 4755 "configure"
+#line 4764 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -4762,7 +4771,7 @@
 remove()
 ; return 0; }
 EOF
-if { (eval echo configure:4766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4786,10 +4795,10 @@
 
     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
     echo $ac_n "checking for shmat""... $ac_c" 1>&6
-echo "configure:4790: checking for shmat" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 4793 "configure"
+echo "configure:4799: checking for shmat" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 4802 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char shmat(); below.  */
@@ -4812,7 +4821,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:4816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_shmat=yes"
 else
@@ -4833,12 +4842,12 @@
     if test $ac_cv_func_shmat = no; then
       
 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
-echo "configure:4837: checking for shmat in -lipc" >&5
+echo "configure:4846: checking for shmat in -lipc" >&5
 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lipc "
 cat > conftest.$ac_ext <<EOF
-#line 4842 "configure"
+#line 4851 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -4849,7 +4858,7 @@
 shmat()
 ; return 0; }
 EOF
-if { (eval echo configure:4853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4883,12 +4892,12 @@
   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
   
 echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
-echo "configure:4887: checking for IceConnectionNumber in -lICE" >&5
+echo "configure:4896: checking for IceConnectionNumber in -lICE" >&5
 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lICE "
 cat > conftest.$ac_ext <<EOF
-#line 4892 "configure"
+#line 4901 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -4899,7 +4908,7 @@
 IceConnectionNumber()
 ; return 0; }
 EOF
-if { (eval echo configure:4903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5032,7 +5041,7 @@
   fi
 
     echo "checking for X defines extracted by xmkmf" 1>&6
-echo "configure:5036: checking for X defines extracted by xmkmf" >&5
+echo "configure:5045: checking for X defines extracted by xmkmf" >&5
   rm -fr conftestdir
   if mkdir conftestdir; then
     cd conftestdir
@@ -5064,15 +5073,15 @@
 
     ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6
-echo "configure:5068: checking for X11/Intrinsic.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 5071 "configure"
+echo "configure:5077: checking for X11/Intrinsic.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 5080 "configure"
 #include "confdefs.h"
 #include <X11/Intrinsic.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5076: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5085: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -5096,12 +5105,12 @@
 
       
 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
-echo "configure:5100: checking for XOpenDisplay in -lX11" >&5
+echo "configure:5109: checking for XOpenDisplay in -lX11" >&5
 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lX11 "
 cat > conftest.$ac_ext <<EOF
-#line 5105 "configure"
+#line 5114 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -5112,7 +5121,7 @@
 XOpenDisplay()
 ; return 0; }
 EOF
-if { (eval echo configure:5116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5137,12 +5146,12 @@
 xe_msg_checking="for XGetFontProperty in -lX11"
 test -n "-b i486-linuxaout" && xe_msg_checking="$xe_msg_checking using extra libs -b i486-linuxaout"
 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
-echo "configure:5141: checking "$xe_msg_checking"" >&5
+echo "configure:5150: checking "$xe_msg_checking"" >&5
 ac_lib_var=`echo X11'_'XGetFontProperty | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lX11 -b i486-linuxaout"
 cat > conftest.$ac_ext <<EOF
-#line 5146 "configure"
+#line 5155 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -5153,7 +5162,7 @@
 XGetFontProperty()
 ; return 0; }
 EOF
-if { (eval echo configure:5157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5180,12 +5189,12 @@
 
     
 echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6
-echo "configure:5184: checking for XShapeSelectInput in -lXext" >&5
+echo "configure:5193: checking for XShapeSelectInput in -lXext" >&5
 ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lXext "
 cat > conftest.$ac_ext <<EOF
-#line 5189 "configure"
+#line 5198 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -5196,7 +5205,7 @@
 XShapeSelectInput()
 ; return 0; }
 EOF
-if { (eval echo configure:5200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5219,12 +5228,12 @@
 
     
 echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6
-echo "configure:5223: checking for XtOpenDisplay in -lXt" >&5
+echo "configure:5232: checking for XtOpenDisplay in -lXt" >&5
 ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lXt "
 cat > conftest.$ac_ext <<EOF
-#line 5228 "configure"
+#line 5237 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -5235,7 +5244,7 @@
 XtOpenDisplay()
 ; return 0; }
 EOF
-if { (eval echo configure:5239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5258,14 +5267,14 @@
 
 
   echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6
-echo "configure:5262: checking the version of X11 being used" >&5
+echo "configure:5271: checking the version of X11 being used" >&5
   cat > conftest.$ac_ext <<EOF
-#line 5264 "configure"
+#line 5273 "configure"
 #include "confdefs.h"
 #include <X11/Intrinsic.h>
     main(int c, char* v[]) { return c>1 ? XlibSpecificationRelease : 0; }
 EOF
-if { (eval echo configure:5269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+if { (eval echo configure:5278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
 then
   ./conftest foobar; x11_release=$?
 else
@@ -5289,15 +5298,15 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5293: checking for $ac_hdr" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 5296 "configure"
+echo "configure:5302: checking for $ac_hdr" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 5305 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5301: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5310: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -5328,7 +5337,7 @@
 
 
     echo $ac_n "checking for XFree86""... $ac_c" 1>&6
-echo "configure:5332: checking for XFree86" >&5
+echo "configure:5341: checking for XFree86" >&5
   if test -d "/usr/X386/include" -o \
           -f "/etc/XF86Config"    -o \
 	  -f "/etc/X11/XF86Config" -o \
@@ -5348,12 +5357,12 @@
 
     test -z "$with_xmu" && { 
 echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6
-echo "configure:5352: checking for XmuReadBitmapDataFromFile in -lXmu" >&5
+echo "configure:5361: checking for XmuReadBitmapDataFromFile in -lXmu" >&5
 ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lXmu "
 cat > conftest.$ac_ext <<EOF
-#line 5357 "configure"
+#line 5366 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -5364,7 +5373,7 @@
 XmuReadBitmapDataFromFile()
 ; return 0; }
 EOF
-if { (eval echo configure:5368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5389,7 +5398,7 @@
     extra_objs="$extra_objs xmu.o" &&  if test "$extra_verbose" = "yes"; then
    echo "    xemacs will be linked with \"xmu.o\""
  fi
-  else 
+  else
     libs_x="-lXmu $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXmu\" to \$libs_x"; fi
     { test "$extra_verbose" = "yes" && cat << \EOF
     Defining HAVE_XMU
@@ -5403,19 +5412,19 @@
 
       
 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
-echo "configure:5407: checking for main in -lXbsd" >&5
+echo "configure:5416: checking for main in -lXbsd" >&5
 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lXbsd "
 cat > conftest.$ac_ext <<EOF
-#line 5412 "configure"
+#line 5421 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:5419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5438,12 +5447,12 @@
 
     
 echo $ac_n "checking for XawScrollbarSetThumb in -lXaw""... $ac_c" 1>&6
-echo "configure:5442: checking for XawScrollbarSetThumb in -lXaw" >&5
+echo "configure:5451: checking for XawScrollbarSetThumb in -lXaw" >&5
 ac_lib_var=`echo Xaw'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lXaw "
 cat > conftest.$ac_ext <<EOF
-#line 5447 "configure"
+#line 5456 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -5454,7 +5463,7 @@
 XawScrollbarSetThumb()
 ; return 0; }
 EOF
-if { (eval echo configure:5458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5478,15 +5487,15 @@
   if test "$have_xaw" = "yes"; then
     ac_safe=`echo "X11/Xaw/Reports.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for X11/Xaw/Reports.h""... $ac_c" 1>&6
-echo "configure:5482: checking for X11/Xaw/Reports.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 5485 "configure"
+echo "configure:5491: checking for X11/Xaw/Reports.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 5494 "configure"
 #include "confdefs.h"
 #include <X11/Xaw/Reports.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5490: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5499: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -5543,7 +5552,7 @@
 esac
 
 echo "checking for session-management option" 1>&6
-echo "configure:5547: checking for session-management option" >&5;
+echo "configure:5556: checking for session-management option" >&5;
 if test "$with_session" != "no"; then
   { test "$extra_verbose" = "yes" && cat << \EOF
     Defining HAVE_SESSION
@@ -5558,15 +5567,15 @@
 test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no
 test -z "$with_xauth" && { ac_safe=`echo "X11/Xauth.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for X11/Xauth.h""... $ac_c" 1>&6
-echo "configure:5562: checking for X11/Xauth.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 5565 "configure"
+echo "configure:5571: checking for X11/Xauth.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 5574 "configure"
 #include "confdefs.h"
 #include <X11/Xauth.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5570: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5579: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -5589,12 +5598,12 @@
  }
 test -z "$with_xauth" && { 
 echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6
-echo "configure:5593: checking for XauGetAuthByAddr in -lXau" >&5
+echo "configure:5602: checking for XauGetAuthByAddr in -lXau" >&5
 ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lXau "
 cat > conftest.$ac_ext <<EOF
-#line 5598 "configure"
+#line 5607 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -5605,7 +5614,7 @@
 XauGetAuthByAddr()
 ; return 0; }
 EOF
-if { (eval echo configure:5609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5646,15 +5655,15 @@
 
 test -z "$with_offix" && { ac_safe=`echo "OffiX/DragAndDrop.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for OffiX/DragAndDrop.h""... $ac_c" 1>&6
-echo "configure:5650: checking for OffiX/DragAndDrop.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 5653 "configure"
+echo "configure:5659: checking for OffiX/DragAndDrop.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 5662 "configure"
 #include "confdefs.h"
 #include <OffiX/DragAndDrop.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5658: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5667: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -5677,12 +5686,12 @@
  }
 test -z "$with_offix" && { 
 echo $ac_n "checking for DndInitialize in -lDnd""... $ac_c" 1>&6
-echo "configure:5681: checking for DndInitialize in -lDnd" >&5
+echo "configure:5690: checking for DndInitialize in -lDnd" >&5
 ac_lib_var=`echo Dnd'_'DndInitialize | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lDnd "
 cat > conftest.$ac_ext <<EOF
-#line 5686 "configure"
+#line 5695 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -5693,7 +5702,7 @@
 DndInitialize()
 ; return 0; }
 EOF
-if { (eval echo configure:5697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5732,15 +5741,15 @@
       for dir in "" "Tt/" "desktop/" ; do
     ac_safe=`echo "${dir}tt_c.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for ${dir}tt_c.h""... $ac_c" 1>&6
-echo "configure:5736: checking for ${dir}tt_c.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 5739 "configure"
+echo "configure:5745: checking for ${dir}tt_c.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 5748 "configure"
 #include "confdefs.h"
 #include <${dir}tt_c.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5744: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5753: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -5769,12 +5778,12 @@
 xe_msg_checking="for tt_message_create in -ltt"
 test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs"
 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
-echo "configure:5773: checking "$xe_msg_checking"" >&5
+echo "configure:5782: checking "$xe_msg_checking"" >&5
 ac_lib_var=`echo tt'_'tt_message_create | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -ltt $extra_libs"
 cat > conftest.$ac_ext <<EOF
-#line 5778 "configure"
+#line 5787 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -5785,7 +5794,7 @@
 tt_message_create()
 ; return 0; }
 EOF
-if { (eval echo configure:5789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5834,15 +5843,15 @@
 
 test -z "$with_cde" && { ac_safe=`echo "Dt/Dt.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for Dt/Dt.h""... $ac_c" 1>&6
-echo "configure:5838: checking for Dt/Dt.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 5841 "configure"
+echo "configure:5847: checking for Dt/Dt.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 5850 "configure"
 #include "confdefs.h"
 #include <Dt/Dt.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5846: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5855: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -5865,12 +5874,12 @@
  }
 test -z "$with_cde" && { 
 echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6
-echo "configure:5869: checking for DtDndDragStart in -lDtSvc" >&5
+echo "configure:5878: checking for DtDndDragStart in -lDtSvc" >&5
 ac_lib_var=`echo DtSvc'_'DtDndDragStart | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lDtSvc "
 cat > conftest.$ac_ext <<EOF
-#line 5874 "configure"
+#line 5883 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -5881,7 +5890,7 @@
 DtDndDragStart()
 ; return 0; }
 EOF
-if { (eval echo configure:5885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5928,19 +5937,19 @@
 
   
 echo $ac_n "checking for main in -lenergize""... $ac_c" 1>&6
-echo "configure:5932: checking for main in -lenergize" >&5
+echo "configure:5941: checking for main in -lenergize" >&5
 ac_lib_var=`echo energize'_'main | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lenergize "
 cat > conftest.$ac_ext <<EOF
-#line 5937 "configure"
+#line 5946 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:5944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5972,19 +5981,19 @@
   if test -z "$energize_version"; then
     
 echo $ac_n "checking for main in -lconn""... $ac_c" 1>&6
-echo "configure:5976: checking for main in -lconn" >&5
+echo "configure:5985: checking for main in -lconn" >&5
 ac_lib_var=`echo conn'_'main | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lconn "
 cat > conftest.$ac_ext <<EOF
-#line 5981 "configure"
+#line 5990 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:5988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -6017,15 +6026,15 @@
   fi
   ac_safe=`echo "editorconn.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for editorconn.h""... $ac_c" 1>&6
-echo "configure:6021: checking for editorconn.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 6024 "configure"
+echo "configure:6030: checking for editorconn.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 6033 "configure"
 #include "confdefs.h"
 #include <editorconn.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6029: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6038: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -6067,7 +6076,7 @@
 
 
 echo "checking for graphics libraries" 1>&6
-echo "configure:6071: checking for graphics libraries" >&5
+echo "configure:6080: checking for graphics libraries" >&5
 test -z "$with_gif" && with_gif=yes;
 if test "$with_gif" = "yes"; then
   { test "$extra_verbose" = "yes" && cat << \EOF
@@ -6084,10 +6093,10 @@
 fi
 
 echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c" 1>&6
-echo "configure:6088: checking for Xpm - no older than 3.4f" >&5
+echo "configure:6097: checking for Xpm - no older than 3.4f" >&5
 xe_check_libs=-lXpm
 test -z "$with_xpm" && { cat > conftest.$ac_ext <<EOF
-#line 6091 "configure"
+#line 6100 "configure"
 #include "confdefs.h"
 #include <X11/xpm.h>
 int main(int c, char **v) {
@@ -6097,7 +6106,7 @@
 		0 ;
 }
 EOF
-if { (eval echo configure:6101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+if { (eval echo configure:6110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
 then
   ./conftest foobar; xpm_status=$?;
   if test "$xpm_status" = "0"; then with_xpm=yes; else with_xpm=no; fi;
@@ -6135,15 +6144,15 @@
 
 test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
-echo "configure:6139: checking for compface.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 6142 "configure"
+echo "configure:6148: checking for compface.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 6151 "configure"
 #include "confdefs.h"
 #include <compface.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6147: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6156: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -6166,12 +6175,12 @@
  }
 test -z "$with_xface" && { 
 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
-echo "configure:6170: checking for UnGenFace in -lcompface" >&5
+echo "configure:6179: checking for UnGenFace in -lcompface" >&5
 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lcompface "
 cat > conftest.$ac_ext <<EOF
-#line 6175 "configure"
+#line 6184 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -6182,7 +6191,7 @@
 UnGenFace()
 ; return 0; }
 EOF
-if { (eval echo configure:6186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -6218,15 +6227,15 @@
 
 test -z "$with_jpeg" && { ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6
-echo "configure:6222: checking for jpeglib.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 6225 "configure"
+echo "configure:6231: checking for jpeglib.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 6234 "configure"
 #include "confdefs.h"
 #include <jpeglib.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6230: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6239: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -6249,12 +6258,12 @@
  }
 test -z "$with_jpeg" && { 
 echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6
-echo "configure:6253: checking for jpeg_destroy_decompress in -ljpeg" >&5
+echo "configure:6262: checking for jpeg_destroy_decompress in -ljpeg" >&5
 ac_lib_var=`echo jpeg'_'jpeg_destroy_decompress | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -ljpeg "
 cat > conftest.$ac_ext <<EOF
-#line 6258 "configure"
+#line 6267 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -6265,7 +6274,7 @@
 jpeg_destroy_decompress()
 ; return 0; }
 EOF
-if { (eval echo configure:6269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -6301,15 +6310,15 @@
 
 test -z "$with_png" && { ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for png.h""... $ac_c" 1>&6
-echo "configure:6305: checking for png.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 6308 "configure"
+echo "configure:6314: checking for png.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 6317 "configure"
 #include "confdefs.h"
 #include <png.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6313: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6322: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -6331,10 +6340,10 @@
 fi
  }
 test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6
-echo "configure:6335: checking for pow" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 6338 "configure"
+echo "configure:6344: checking for pow" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 6347 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char pow(); below.  */
@@ -6357,7 +6366,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:6361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_pow=yes"
 else
@@ -6382,12 +6391,12 @@
 xe_msg_checking="for png_read_image in -lpng"
 test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs"
 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
-echo "configure:6386: checking "$xe_msg_checking"" >&5
+echo "configure:6395: checking "$xe_msg_checking"" >&5
 ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lpng $extra_libs"
 cat > conftest.$ac_ext <<EOF
-#line 6391 "configure"
+#line 6400 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -6398,7 +6407,7 @@
 png_read_image()
 ; return 0; }
 EOF
-if { (eval echo configure:6402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -6448,15 +6457,15 @@
 
   ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
-echo "configure:6452: checking for Xm/Xm.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 6455 "configure"
+echo "configure:6461: checking for Xm/Xm.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 6464 "configure"
 #include "confdefs.h"
 #include <Xm/Xm.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6460: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6469: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -6473,12 +6482,12 @@
   echo "$ac_t""yes" 1>&6
   
 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
-echo "configure:6477: checking for XmStringFree in -lXm" >&5
+echo "configure:6486: checking for XmStringFree in -lXm" >&5
 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lXm "
 cat > conftest.$ac_ext <<EOF
-#line 6482 "configure"
+#line 6491 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -6489,7 +6498,7 @@
 XmStringFree()
 ; return 0; }
 EOF
-if { (eval echo configure:6493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -6737,7 +6746,7 @@
 
 if test "$with_mule" = "yes" ; then
   echo "checking for Mule-related features" 1>&6
-echo "configure:6741: checking for Mule-related features" >&5
+echo "configure:6750: checking for Mule-related features" >&5
   { test "$extra_verbose" = "yes" && cat << \EOF
     Defining MULE
 EOF
@@ -6754,15 +6763,15 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:6758: checking for $ac_hdr" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 6761 "configure"
+echo "configure:6767: checking for $ac_hdr" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 6770 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6766: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6775: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -6793,12 +6802,12 @@
 
   
 echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6
-echo "configure:6797: checking for strerror in -lintl" >&5
+echo "configure:6806: checking for strerror in -lintl" >&5
 ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lintl "
 cat > conftest.$ac_ext <<EOF
-#line 6802 "configure"
+#line 6811 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -6809,7 +6818,7 @@
 strerror()
 ; return 0; }
 EOF
-if { (eval echo configure:6813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -6842,19 +6851,19 @@
 
 
   echo "checking for Mule input methods" 1>&6
-echo "configure:6846: checking for Mule input methods" >&5
+echo "configure:6855: checking for Mule input methods" >&5
       test -z "$with_xim" -a "$opsys" != "sol2" && with_xim=no
   case "$with_xim" in "" | "yes" )
     echo "checking for XIM" 1>&6
-echo "configure:6850: checking for XIM" >&5
+echo "configure:6859: checking for XIM" >&5
     
 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
-echo "configure:6853: checking for XmImMbLookupString in -lXm" >&5
+echo "configure:6862: checking for XmImMbLookupString in -lXm" >&5
 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lXm "
 cat > conftest.$ac_ext <<EOF
-#line 6858 "configure"
+#line 6867 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -6865,7 +6874,7 @@
 XmImMbLookupString()
 ; return 0; }
 EOF
-if { (eval echo configure:6869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -6928,15 +6937,15 @@
     fi
   else     case "$with_xfs" in  "yes" )
       echo "checking for XFontSet" 1>&6
-echo "configure:6932: checking for XFontSet" >&5
+echo "configure:6941: checking for XFontSet" >&5
       
 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6
-echo "configure:6935: checking for XmbDrawString in -lX11" >&5
+echo "configure:6944: checking for XmbDrawString in -lX11" >&5
 ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lX11 "
 cat > conftest.$ac_ext <<EOF
-#line 6940 "configure"
+#line 6949 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -6947,7 +6956,7 @@
 XmbDrawString()
 ; return 0; }
 EOF
-if { (eval echo configure:6951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -6986,15 +6995,15 @@
     test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support
   test -z "$with_wnn" && { ac_safe=`echo "wnn/jllib.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for wnn/jllib.h""... $ac_c" 1>&6
-echo "configure:6990: checking for wnn/jllib.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 6993 "configure"
+echo "configure:6999: checking for wnn/jllib.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7002 "configure"
 #include "confdefs.h"
 #include <wnn/jllib.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6998: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7007: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -7019,10 +7028,10 @@
     for ac_func in crypt
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:7023: checking for $ac_func" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 7026 "configure"
+echo "configure:7032: checking for $ac_func" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7035 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -7045,7 +7054,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:7049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -7074,12 +7083,12 @@
 
     test "$ac_cv_func_crypt" != "yes" && { 
 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
-echo "configure:7078: checking for crypt in -lcrypt" >&5
+echo "configure:7087: checking for crypt in -lcrypt" >&5
 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lcrypt "
 cat > conftest.$ac_ext <<EOF
-#line 7083 "configure"
+#line 7092 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -7090,7 +7099,7 @@
 crypt()
 ; return 0; }
 EOF
-if { (eval echo configure:7094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -7124,12 +7133,12 @@
   fi
     test -z "$with_wnn" && { 
 echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6
-echo "configure:7128: checking for jl_dic_list_e in -lwnn" >&5
+echo "configure:7137: checking for jl_dic_list_e in -lwnn" >&5
 ac_lib_var=`echo wnn'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lwnn "
 cat > conftest.$ac_ext <<EOF
-#line 7133 "configure"
+#line 7142 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -7140,7 +7149,7 @@
 jl_dic_list_e()
 ; return 0; }
 EOF
-if { (eval echo configure:7144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -7177,12 +7186,12 @@
  fi
     
 echo $ac_n "checking for jl_fi_dic_list in -lwnn""... $ac_c" 1>&6
-echo "configure:7181: checking for jl_fi_dic_list in -lwnn" >&5
+echo "configure:7190: checking for jl_fi_dic_list in -lwnn" >&5
 ac_lib_var=`echo wnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lwnn "
 cat > conftest.$ac_ext <<EOF
-#line 7186 "configure"
+#line 7195 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -7193,7 +7202,7 @@
 jl_fi_dic_list()
 ; return 0; }
 EOF
-if { (eval echo configure:7197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -7225,15 +7234,15 @@
 
     test -z "$with_canna" && { ac_safe=`echo "canna/RK.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for canna/RK.h""... $ac_c" 1>&6
-echo "configure:7229: checking for canna/RK.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 7232 "configure"
+echo "configure:7238: checking for canna/RK.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7241 "configure"
 #include "confdefs.h"
 #include <canna/RK.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7237: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7246: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -7256,12 +7265,12 @@
  }
   test -z "$with_canna" && { 
 echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6
-echo "configure:7260: checking for RkBgnBun in -lRKC" >&5
+echo "configure:7269: checking for RkBgnBun in -lRKC" >&5
 ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lRKC "
 cat > conftest.$ac_ext <<EOF
-#line 7265 "configure"
+#line 7274 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -7272,7 +7281,7 @@
 RkBgnBun()
 ; return 0; }
 EOF
-if { (eval echo configure:7276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -7295,12 +7304,12 @@
  }
   test -z "$with_canna" && { 
 echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6
-echo "configure:7299: checking for jrKanjiControl in -lcanna" >&5
+echo "configure:7308: checking for jrKanjiControl in -lcanna" >&5
 ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lcanna "
 cat > conftest.$ac_ext <<EOF
-#line 7304 "configure"
+#line 7313 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -7311,7 +7320,7 @@
 jrKanjiControl()
 ; return 0; }
 EOF
-if { (eval echo configure:7315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -7411,10 +7420,10 @@
 for ac_func in acosh asinh atanh cbrt closedir dup2 eaccess fmod fpathconf frexp ftime gethostname getpagesize gettimeofday getcwd getwd logb lrand48 matherr mkdir mktime perror poll random rename res_init rint rmdir select setitimer setpgid setlocale setsid sigblock sighold sigprocmask strcasecmp strerror tzset ulimit usleep utimes waitpid
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:7415: checking for $ac_func" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 7418 "configure"
+echo "configure:7424: checking for $ac_func" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7427 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -7437,7 +7446,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:7441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -7474,10 +7483,10 @@
     for ac_func in realpath
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:7478: checking for $ac_func" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 7481 "configure"
+echo "configure:7487: checking for $ac_func" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7490 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -7500,7 +7509,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:7504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -7533,16 +7542,16 @@
 esac
 
 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
-echo "configure:7537: checking whether netdb declares h_errno" >&5
-cat > conftest.$ac_ext <<EOF
-#line 7539 "configure"
+echo "configure:7546: checking whether netdb declares h_errno" >&5
+cat > conftest.$ac_ext <<EOF
+#line 7548 "configure"
 #include "confdefs.h"
 #include <netdb.h>
 int main() {
 return h_errno;
 ; return 0; }
 EOF
-if { (eval echo configure:7546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   echo "$ac_t""yes" 1>&6
    { test "$extra_verbose" = "yes" && cat << \EOF
@@ -7562,16 +7571,16 @@
 rm -f conftest*
 
 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
-echo "configure:7566: checking for sigsetjmp" >&5
-cat > conftest.$ac_ext <<EOF
-#line 7568 "configure"
+echo "configure:7575: checking for sigsetjmp" >&5
+cat > conftest.$ac_ext <<EOF
+#line 7577 "configure"
 #include "confdefs.h"
 #include <setjmp.h>
 int main() {
 sigjmp_buf bar; sigsetjmp (bar, 0);
 ; return 0; }
 EOF
-if { (eval echo configure:7575: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7584: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   echo "$ac_t""yes" 1>&6
    { test "$extra_verbose" = "yes" && cat << \EOF
@@ -7591,11 +7600,11 @@
 rm -f conftest*
 
 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
-echo "configure:7595: checking whether localtime caches TZ" >&5
+echo "configure:7604: checking whether localtime caches TZ" >&5
 
 if test "$ac_cv_func_tzset" = "yes"; then
 cat > conftest.$ac_ext <<EOF
-#line 7599 "configure"
+#line 7608 "configure"
 #include "confdefs.h"
 #include <time.h>
 #if STDC_HEADERS
@@ -7630,7 +7639,7 @@
   exit (0);
 }
 EOF
-if { (eval echo configure:7634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+if { (eval echo configure:7643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
 then
   emacs_cv_localtime_cache=no
 else
@@ -7659,9 +7668,9 @@
 
 if test "$HAVE_TIMEVAL" = "yes"; then
 echo $ac_n "checking whether gettimeofday cannot accept two arguments""... $ac_c" 1>&6
-echo "configure:7663: checking whether gettimeofday cannot accept two arguments" >&5
-cat > conftest.$ac_ext <<EOF
-#line 7665 "configure"
+echo "configure:7672: checking whether gettimeofday cannot accept two arguments" >&5
+cat > conftest.$ac_ext <<EOF
+#line 7674 "configure"
 #include "confdefs.h"
 
 #ifdef TIME_WITH_SYS_TIME
@@ -7683,7 +7692,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:7687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   echo "$ac_t""no" 1>&6
 else
@@ -7705,19 +7714,19 @@
 
 
 echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:7709: checking for inline" >&5
+echo "configure:7718: checking for inline" >&5
 
 ac_cv_c_inline=no
 for ac_kw in inline __inline__ __inline; do
   cat > conftest.$ac_ext <<EOF
-#line 7714 "configure"
+#line 7723 "configure"
 #include "confdefs.h"
 
 int main() {
 } $ac_kw foo() {
 ; return 0; }
 EOF
-if { (eval echo configure:7721: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7730: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_inline=$ac_kw; break
 else
@@ -7767,17 +7776,17 @@
 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
 # for constant arguments.  Useless!
 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:7771: checking for working alloca.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 7774 "configure"
+echo "configure:7780: checking for working alloca.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7783 "configure"
 #include "confdefs.h"
 #include <alloca.h>
 int main() {
 char *p = alloca(2 * sizeof(int));
 ; return 0; }
 EOF
-if { (eval echo configure:7781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   ac_cv_header_alloca_h=yes
 else
@@ -7801,10 +7810,10 @@
 fi
 
 echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:7805: checking for alloca" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 7808 "configure"
+echo "configure:7814: checking for alloca" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7817 "configure"
 #include "confdefs.h"
 
 #ifdef __GNUC__
@@ -7827,7 +7836,7 @@
 char *p = (char *) alloca(1);
 ; return 0; }
 EOF
-if { (eval echo configure:7831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   ac_cv_func_alloca_works=yes
 else
@@ -7866,10 +7875,10 @@
 
 
 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:7870: checking whether alloca needs Cray hooks" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 7873 "configure"
+echo "configure:7879: checking whether alloca needs Cray hooks" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7882 "configure"
 #include "confdefs.h"
 #if defined(CRAY) && ! defined(CRAY2)
 webecray
@@ -7893,10 +7902,10 @@
 if test $ac_cv_os_cray = yes; then
 for ac_func in _getb67 GETB67 getb67; do
   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:7897: checking for $ac_func" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 7900 "configure"
+echo "configure:7906: checking for $ac_func" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7909 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -7919,7 +7928,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:7923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -7949,10 +7958,10 @@
 fi
 
 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:7953: checking stack direction for C alloca" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 7956 "configure"
+echo "configure:7962: checking stack direction for C alloca" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7965 "configure"
 #include "confdefs.h"
 find_stack_direction ()
 {
@@ -7971,7 +7980,7 @@
   exit (find_stack_direction() < 0);
 }
 EOF
-if { (eval echo configure:7975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+if { (eval echo configure:7984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
 then
   ac_cv_c_stack_direction=1
 else
@@ -7999,15 +8008,15 @@
 
 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
-echo "configure:8003: checking for vfork.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8006 "configure"
+echo "configure:8012: checking for vfork.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8015 "configure"
 #include "confdefs.h"
 #include <vfork.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8011: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8020: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -8035,10 +8044,10 @@
 fi
 
 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
-echo "configure:8039: checking for working vfork" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8042 "configure"
+echo "configure:8048: checking for working vfork" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8051 "configure"
 #include "confdefs.h"
 /* Thanks to Paul Eggert for this test.  */
 #include <stdio.h>
@@ -8133,7 +8142,7 @@
   }
 }
 EOF
-if { (eval echo configure:8137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+if { (eval echo configure:8146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
 then
   ac_cv_func_vfork_works=yes
 else
@@ -8158,10 +8167,10 @@
 
 
 echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
-echo "configure:8162: checking for working strcoll" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8165 "configure"
+echo "configure:8171: checking for working strcoll" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8174 "configure"
 #include "confdefs.h"
 #include <string.h>
 main ()
@@ -8171,7 +8180,7 @@
 	strcoll ("123", "456") >= 0);
 }
 EOF
-if { (eval echo configure:8175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+if { (eval echo configure:8184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
 then
   ac_cv_func_strcoll_works=yes
 else
@@ -8198,10 +8207,10 @@
 for ac_func in getpgrp
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:8202: checking for $ac_func" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8205 "configure"
+echo "configure:8211: checking for $ac_func" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8214 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -8224,7 +8233,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:8228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:8237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -8252,10 +8261,10 @@
 done
 
 echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
-echo "configure:8256: checking whether getpgrp takes no argument" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8259 "configure"
+echo "configure:8265: checking whether getpgrp takes no argument" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8268 "configure"
 #include "confdefs.h"
 
 /*
@@ -8310,7 +8319,7 @@
 }
 
 EOF
-if { (eval echo configure:8314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+if { (eval echo configure:8323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
 then
   ac_cv_func_getpgrp_void=yes
 else
@@ -8336,10 +8345,10 @@
 
 
 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:8340: checking for working mmap" >&5
+echo "configure:8349: checking for working mmap" >&5
 case "$opsys" in ultrix* ) have_mmap=no ;; *)
 cat > conftest.$ac_ext <<EOF
-#line 8343 "configure"
+#line 8352 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 #include <unistd.h>
@@ -8372,7 +8381,7 @@
   return 1;
 }
 EOF
-if { (eval echo configure:8376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+if { (eval echo configure:8385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
 then
   have_mmap=yes
 else
@@ -8406,15 +8415,15 @@
 
 ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for termios.h""... $ac_c" 1>&6
-echo "configure:8410: checking for termios.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8413 "configure"
+echo "configure:8419: checking for termios.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8422 "configure"
 #include "confdefs.h"
 #include <termios.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8418: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8427: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -8457,15 +8466,15 @@
   echo "$ac_t""no" 1>&6
 ac_safe=`echo "termio.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for termio.h""... $ac_c" 1>&6
-echo "configure:8461: checking for termio.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8464 "configure"
+echo "configure:8470: checking for termio.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8473 "configure"
 #include "confdefs.h"
 #include <termio.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8469: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8478: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -8497,10 +8506,10 @@
 
 
 echo $ac_n "checking for socket""... $ac_c" 1>&6
-echo "configure:8501: checking for socket" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8504 "configure"
+echo "configure:8510: checking for socket" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8513 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char socket(); below.  */
@@ -8523,7 +8532,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:8527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:8536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_socket=yes"
 else
@@ -8538,15 +8547,15 @@
   echo "$ac_t""yes" 1>&6
   ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
-echo "configure:8542: checking for netinet/in.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8545 "configure"
+echo "configure:8551: checking for netinet/in.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8554 "configure"
 #include "confdefs.h"
 #include <netinet/in.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8550: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8559: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -8563,15 +8572,15 @@
   echo "$ac_t""yes" 1>&6
   ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
-echo "configure:8567: checking for arpa/inet.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8570 "configure"
+echo "configure:8576: checking for arpa/inet.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8579 "configure"
 #include "confdefs.h"
 #include <arpa/inet.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8575: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8584: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -8596,9 +8605,9 @@
 }
 
       echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6
-echo "configure:8600: checking "for sun_len member in struct sockaddr_un"" >&5
+echo "configure:8609: checking "for sun_len member in struct sockaddr_un"" >&5
       cat > conftest.$ac_ext <<EOF
-#line 8602 "configure"
+#line 8611 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -8609,7 +8618,7 @@
 static struct sockaddr_un x; x.sun_len = 1;
 ; return 0; }
 EOF
-if { (eval echo configure:8613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:8622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
     Defining HAVE_SOCKADDR_SUN_LEN
@@ -8640,10 +8649,10 @@
 
 
 echo $ac_n "checking for msgget""... $ac_c" 1>&6
-echo "configure:8644: checking for msgget" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8647 "configure"
+echo "configure:8653: checking for msgget" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8656 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char msgget(); below.  */
@@ -8666,7 +8675,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:8670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:8679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_msgget=yes"
 else
@@ -8681,15 +8690,15 @@
   echo "$ac_t""yes" 1>&6
   ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
-echo "configure:8685: checking for sys/ipc.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8688 "configure"
+echo "configure:8694: checking for sys/ipc.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8697 "configure"
 #include "confdefs.h"
 #include <sys/ipc.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8693: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8702: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -8706,15 +8715,15 @@
   echo "$ac_t""yes" 1>&6
   ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6
-echo "configure:8710: checking for sys/msg.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8713 "configure"
+echo "configure:8719: checking for sys/msg.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8722 "configure"
 #include "confdefs.h"
 #include <sys/msg.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8718: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8727: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -8752,15 +8761,15 @@
 
 ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for dirent.h""... $ac_c" 1>&6
-echo "configure:8756: checking for dirent.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8759 "configure"
+echo "configure:8765: checking for dirent.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8768 "configure"
 #include "confdefs.h"
 #include <dirent.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8764: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8773: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -8787,15 +8796,15 @@
   echo "$ac_t""no" 1>&6
 ac_safe=`echo "sys/dir.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for sys/dir.h""... $ac_c" 1>&6
-echo "configure:8791: checking for sys/dir.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8794 "configure"
+echo "configure:8800: checking for sys/dir.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8803 "configure"
 #include "confdefs.h"
 #include <sys/dir.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8799: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8808: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -8828,15 +8837,15 @@
 
 ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
-echo "configure:8832: checking for nlist.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8835 "configure"
+echo "configure:8841: checking for nlist.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8844 "configure"
 #include "confdefs.h"
 #include <nlist.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8840: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8849: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -8877,7 +8886,7 @@
 
 
 echo "checking "for sound support"" 1>&6
-echo "configure:8881: checking "for sound support"" >&5
+echo "configure:8890: checking "for sound support"" >&5
 case "$with_sound" in
   native | both ) with_native_sound=yes;;
   nas    | no   ) with_native_sound=no;;
@@ -8888,15 +8897,15 @@
     if test -n "$native_sound_lib"; then
     ac_safe=`echo "multimedia/audio_device.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for multimedia/audio_device.h""... $ac_c" 1>&6
-echo "configure:8892: checking for multimedia/audio_device.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8895 "configure"
+echo "configure:8901: checking for multimedia/audio_device.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8904 "configure"
 #include "confdefs.h"
 #include <multimedia/audio_device.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8900: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8909: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -8944,12 +8953,12 @@
       if test -z "$native_sound_lib"; then
         
 echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6
-echo "configure:8948: checking for ALopenport in -laudio" >&5
+echo "configure:8957: checking for ALopenport in -laudio" >&5
 ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -laudio "
 cat > conftest.$ac_ext <<EOF
-#line 8953 "configure"
+#line 8962 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -8960,7 +8969,7 @@
 ALopenport()
 ; return 0; }
 EOF
-if { (eval echo configure:8964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:8973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -8991,12 +9000,12 @@
       if test -z "$native_sound_lib"; then
 	
 echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6
-echo "configure:8995: checking for AOpenAudio in -lAlib" >&5
+echo "configure:9004: checking for AOpenAudio in -lAlib" >&5
 ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lAlib "
 cat > conftest.$ac_ext <<EOF
-#line 9000 "configure"
+#line 9009 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -9007,7 +9016,7 @@
 AOpenAudio()
 ; return 0; }
 EOF
-if { (eval echo configure:9011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:9020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -9045,15 +9054,15 @@
     for dir in "machine" "sys" "linux"; do
       ac_safe=`echo "${dir}/soundcard.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for ${dir}/soundcard.h""... $ac_c" 1>&6
-echo "configure:9049: checking for ${dir}/soundcard.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 9052 "configure"
+echo "configure:9058: checking for ${dir}/soundcard.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 9061 "configure"
 #include "confdefs.h"
 #include <${dir}/soundcard.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9057: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:9066: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -9123,7 +9132,7 @@
  fi
   LIBS="-laudio $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-laudio\" to \$LIBS"; fi
       cat > conftest.$ac_ext <<EOF
-#line 9127 "configure"
+#line 9136 "configure"
 #include "confdefs.h"
 #include <audio/Xtutil.h>
 EOF
@@ -9150,7 +9159,7 @@
 
 if test "$with_tty" = "yes"  ; then
   echo "checking for TTY-related features" 1>&6
-echo "configure:9154: checking for TTY-related features" >&5
+echo "configure:9163: checking for TTY-related features" >&5
   { test "$extra_verbose" = "yes" && cat << \EOF
     Defining HAVE_TTY
 EOF
@@ -9166,12 +9175,12 @@
     if test -z "$with_ncurses"; then
     
 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
-echo "configure:9170: checking for tgetent in -lncurses" >&5
+echo "configure:9179: checking for tgetent in -lncurses" >&5
 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lncurses "
 cat > conftest.$ac_ext <<EOF
-#line 9175 "configure"
+#line 9184 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -9182,7 +9191,7 @@
 tgetent()
 ; return 0; }
 EOF
-if { (eval echo configure:9186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:9195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -9215,15 +9224,15 @@
 
     ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
-echo "configure:9219: checking for ncurses/curses.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 9222 "configure"
+echo "configure:9228: checking for ncurses/curses.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 9231 "configure"
 #include "confdefs.h"
 #include <ncurses/curses.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9227: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:9236: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -9245,15 +9254,15 @@
 
     ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6
-echo "configure:9249: checking for ncurses/term.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 9252 "configure"
+echo "configure:9258: checking for ncurses/term.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 9261 "configure"
 #include "confdefs.h"
 #include <ncurses/term.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9257: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:9266: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -9283,15 +9292,15 @@
       c_switch_site="$c_switch_site -I/usr/include/ncurses"
       ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
-echo "configure:9287: checking for ncurses/curses.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 9290 "configure"
+echo "configure:9296: checking for ncurses/curses.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 9299 "configure"
 #include "confdefs.h"
 #include <ncurses/curses.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9295: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:9304: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -9326,12 +9335,12 @@
 	for lib in curses termlib termcap; do
 	  
 echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6
-echo "configure:9330: checking for tgetent in -l$lib" >&5
+echo "configure:9339: checking for tgetent in -l$lib" >&5
 ac_lib_var=`echo $lib'_'tgetent | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -l$lib "
 cat > conftest.$ac_ext <<EOF
-#line 9335 "configure"
+#line 9344 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -9342,7 +9351,7 @@
 tgetent()
 ; return 0; }
 EOF
-if { (eval echo configure:9346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:9355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -9373,12 +9382,12 @@
       else
 	
 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
-echo "configure:9377: checking for tgetent in -lcurses" >&5
+echo "configure:9386: checking for tgetent in -lcurses" >&5
 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lcurses "
 cat > conftest.$ac_ext <<EOF
-#line 9382 "configure"
+#line 9391 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -9389,7 +9398,7 @@
 tgetent()
 ; return 0; }
 EOF
-if { (eval echo configure:9393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:9402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -9407,12 +9416,12 @@
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
-echo "configure:9411: checking for tgetent in -ltermcap" >&5
+echo "configure:9420: checking for tgetent in -ltermcap" >&5
 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -ltermcap "
 cat > conftest.$ac_ext <<EOF
-#line 9416 "configure"
+#line 9425 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -9423,7 +9432,7 @@
 tgetent()
 ; return 0; }
 EOF
-if { (eval echo configure:9427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:9436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -9471,15 +9480,15 @@
 
     test -z "$with_gpm" && { ac_safe=`echo "gpm.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for gpm.h""... $ac_c" 1>&6
-echo "configure:9475: checking for gpm.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 9478 "configure"
+echo "configure:9484: checking for gpm.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 9487 "configure"
 #include "confdefs.h"
 #include <gpm.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9483: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:9492: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -9502,12 +9511,12 @@
  }
   test -z "$with_gpm" && { 
 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
-echo "configure:9506: checking for Gpm_Open in -lgpm" >&5
+echo "configure:9515: checking for Gpm_Open in -lgpm" >&5
 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lgpm "
 cat > conftest.$ac_ext <<EOF
-#line 9511 "configure"
+#line 9520 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -9518,7 +9527,7 @@
 Gpm_Open()
 ; return 0; }
 EOF
-if { (eval echo configure:9522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:9531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -9567,17 +9576,17 @@
 
 
 echo "checking for database support" 1>&6
-echo "configure:9571: checking for database support" >&5
+echo "configure:9580: checking for database support" >&5
 
 if test "$with_database_gnudbm" != "no"; then
   
 echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6
-echo "configure:9576: checking for dbm_open in -lgdbm" >&5
+echo "configure:9585: checking for dbm_open in -lgdbm" >&5
 ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lgdbm "
 cat > conftest.$ac_ext <<EOF
-#line 9581 "configure"
+#line 9590 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -9588,7 +9597,7 @@
 dbm_open()
 ; return 0; }
 EOF
-if { (eval echo configure:9592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:9601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -9610,10 +9619,10 @@
 
   if test "$with_database_gnudbm" != "yes"; then
     echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
-echo "configure:9614: checking for dbm_open" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 9617 "configure"
+echo "configure:9623: checking for dbm_open" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 9626 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char dbm_open(); below.  */
@@ -9636,7 +9645,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:9640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:9649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_dbm_open=yes"
 else
@@ -9672,10 +9681,10 @@
 
 if test "$with_database_dbm" != "no"; then
   echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
-echo "configure:9676: checking for dbm_open" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 9679 "configure"
+echo "configure:9685: checking for dbm_open" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 9688 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char dbm_open(); below.  */
@@ -9698,7 +9707,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:9702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:9711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_dbm_open=yes"
 else
@@ -9719,12 +9728,12 @@
   if test "$need_libdbm" != "no"; then
     
 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
-echo "configure:9723: checking for dbm_open in -ldbm" >&5
+echo "configure:9732: checking for dbm_open in -ldbm" >&5
 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -ldbm "
 cat > conftest.$ac_ext <<EOF
-#line 9728 "configure"
+#line 9737 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -9735,7 +9744,7 @@
 dbm_open()
 ; return 0; }
 EOF
-if { (eval echo configure:9739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:9748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -9772,10 +9781,10 @@
 
 if test "$with_database_berkdb" != "no"; then
   echo $ac_n "checking for dbopen""... $ac_c" 1>&6
-echo "configure:9776: checking for dbopen" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 9779 "configure"
+echo "configure:9785: checking for dbopen" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 9788 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char dbopen(); below.  */
@@ -9798,7 +9807,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:9802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:9811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_dbopen=yes"
 else
@@ -9819,12 +9828,12 @@
   if test "$need_libdb" != "no"; then
     
 echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
-echo "configure:9823: checking for dbopen in -ldb" >&5
+echo "configure:9832: checking for dbopen in -ldb" >&5
 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -ldb "
 cat > conftest.$ac_ext <<EOF
-#line 9828 "configure"
+#line 9837 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -9835,7 +9844,7 @@
 dbopen()
 ; return 0; }
 EOF
-if { (eval echo configure:9839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:9848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -9859,7 +9868,7 @@
   if test "$with_database_berkdb" = "yes"; then
     for path in "db/db.h" "db.h"; do
 cat > conftest.$ac_ext <<EOF
-#line 9863 "configure"
+#line 9872 "configure"
 #include "confdefs.h"
 #ifdef HAVE_INTTYPES_H
 #define __BIT_TYPES_DEFINED__
@@ -9882,7 +9891,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:9886: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9895: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   db_h_path="$path"; break
 else
@@ -9934,12 +9943,12 @@
 if test "$with_socks" = "yes"; then
   
 echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6
-echo "configure:9938: checking for SOCKSinit in -lsocks" >&5
+echo "configure:9947: checking for SOCKSinit in -lsocks" >&5
 ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lsocks "
 cat > conftest.$ac_ext <<EOF
-#line 9943 "configure"
+#line 9952 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -9950,7 +9959,7 @@
 SOCKSinit()
 ; return 0; }
 EOF
-if { (eval echo configure:9954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:9963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -10166,8 +10175,8 @@
 
 
 
-if test "x${package_path}" = "xNONE" ; then
-	package_path="${prefix}/lib/xemacs/packages:~/.xemacs"
+if test "${package_path}" = "NONE" ; then
+	package_path="~/.xemacs:${prefix}/lib/xemacs/packages"
 fi
 package_path=`echo $package_path | sed 'y/ /:/'`
 { test "$extra_verbose" = "yes" && cat << EOF
--- a/configure.in	Mon Aug 13 09:55:30 2007 +0200
+++ b/configure.in	Mon Aug 13 09:56:28 2007 +0200
@@ -374,6 +374,8 @@
 
 Options marked with a (*) are autodetected.
 
+Use colons (or quoted spaces) to separate directory names in option
+values which are PATHs (i.e. lists of directories).
 
 General options:
 
@@ -393,11 +395,11 @@
 			option.  This just allows for simultaneous
 			in-place and --srcdir building.)
 --cflags=FLAGS		Compiler flags. Overrides environment variable CFLAGS.
---site-includes=DIR	Other header file directories.  Separate multiple
-			dirs with spaces and use quotes to enclose.
---site-libraries=DIR	Other library directories.
---site-runtime-libraries=DIR
-			Paths to add with -R flag.
+--site-includes=PATH	List of directories to search first for header files.
+--site-libraries=PATH	List of directories to search first for libraries.
+--site-runtime-libraries=PATH
+			List of ALL directories to search for dynamically
+			linked libraries at run time.
 --dynamic=yes		Link dynamically if supported by system.
 --dynamic=no		Force static linking on systems where dynamic
 			linking is the default.
@@ -413,8 +415,8 @@
 
 Window-system options:
 
---with-x (*)		Support the X Window System.
---with-x=no		Don't support X.
+--with-x11 (*)		Support the X Window System.
+--with-x11=no		Don't support X.
 --x-includes=DIR 	Search for X header files in DIR.
 --x-libraries=DIR	Search for X libraries in DIR.
 --with-toolbars=no	Don't compile with any toolbar support.
@@ -427,9 +429,8 @@
 --with-scrollbars=TYPE	Use TYPE scrollbars
 			(lucid, motif, athena, athena3d, or no).
 --with-dialogs=TYPE	Use TYPE dialog boxes (motif, athena, athena3d, or no).
-			(Lucid menubars and scrollbars are the default.
-			 Motif dialog boxes will be used if Motif can be
-			 found.)
+			Lucid menubars and scrollbars are the default.
+			Motif dialog boxes will be used if Motif can be found.
 --with-cde (*)		Compile in support for CDE drag and drop.
 --with-offix (*)	Compile in support for OffiX drag and drop.
 --with-xmu=no (*)	For those unfortunates whose vendors don't ship Xmu.
@@ -489,9 +490,8 @@
 --mail-locking=TYPE (*)	Specify the locking to be used by movemail to prevent
 			concurrent updates of mail spool files. Valid types
 			are \`lockf', \`flock', and \`file'.
---package-path=PATH     A list of blank separated directories for finding 
-                        packages to dump with xemacs.
-			Defaults to \`$prefix/lib/xemacs/packages ~/.xemacs'
+--package-path=PATH     Directories to search for packages to dump with xemacs.
+                        Defaults to \`$prefix/lib/xemacs/packages:~/.xemacs'.
 
 Internationalization options:
 
@@ -797,8 +797,8 @@
         dnl XFontSet support?
 	"with_xfs" )
 	  case "$val" in
-	  y | ye | yes )                val=yes   ;;
-	  n | no | non | none )         val=no    ;;
+	  y | ye | yes )		val=yes	;;
+	  n | no | non | none )		val=no	;;
 	  * ) USAGE_ERROR(["The \`--$optname' option must have one of these values:
  \`yes', or \`no'."]) ;;
 	  esac
@@ -951,12 +951,12 @@
 
 dnl Allow use of either ":" or spaces for lists of directories
 define(COLON_TO_SPACE,
-  [case "$[$1]" in *:* [)] [$1]="`echo '' $[$1] | sed -e 's:^ ::' -e 's/:/ /g'`";; esac])dnl
+  [case "$[$1]" in *:* [)] [$1]="`echo '' $[$1] | sed -e 's/^ //' -e 's/:/ /g'`";; esac])dnl
 COLON_TO_SPACE(site_includes)
 COLON_TO_SPACE(site_libraries)
 COLON_TO_SPACE(site_runtime_libraries)
 
-dnl with_x is obsolete synonym for with_x11
+dnl with_x is an obsolete synonym for with_x11
 test -n "$with_x" && with_x11="$with_x"
 
 dnl# Ignore useless run-in-place flag
@@ -1030,7 +1030,7 @@
 dnl PWD may already be the preferable absolute name for ".",
 dnl but we can't trust it - it is sometimes inaccurate.
 absolute_pwd="`pwd`";
-if test -n "$PWD" && "`cd $PWD && pwd`" = "$absolute_pwd"
+if test -n "$PWD" -a "`cd $PWD && pwd`" = "$absolute_pwd"
 then blddir="$PWD"
 else blddir="$absolute_pwd"
 fi
@@ -1611,7 +1611,7 @@
   esac
 else dnl "$dynamic" = "no"
   case "$opsys" in
-    sol2 ) 
+    sol2 )
       echo "Static linking is not supported on Solaris 2."
       echo "Rerun configure without specifying --dynamic=no."
       exit 1 ;;
@@ -2216,23 +2216,35 @@
 
 AC_CHECKING("for specified window system")
 
-dnl $OPENWINHOME implies --x-includes and --x-libraries
-dnl Not (yet) handled by autoconf2
-if test "$x_includes $x_libraries" = "NONE NONE"; then
-  if test -n "$OPENWINHOME" \
-   -a "$OPENWINHOME" != "/usr/openwin" \
-   -a -d "$OPENWINHOME"; then
-    test -d "$OPENWINHOME/lib"           && x_libraries="$OPENWINHOME/lib"
-    test -d "$OPENWINHOME/include"       && x_includes="$OPENWINHOME/include"
-    test -d "$OPENWINHOME/share/include" && x_includes="$OPENWINHOME/share/include"
+if test "$with_x11" != "no"; then
+  dnl User-specified --x-includes or --x-libraries implies --with-x11.
+  test "$x_includes $x_libraries" != "NONE NONE" && \
+   window_system=x11 with_x11=yes
+
+  dnl $OPENWINHOME implies --x-includes and --x-libraries
+  dnl Not (yet) handled by autoconf2
+  if test "$x_includes $x_libraries" = "NONE NONE"; then
+    if test -n "$OPENWINHOME" \
+     -a "$OPENWINHOME" != "/usr/openwin" \
+     -a -d "$OPENWINHOME"; then
+      test -d "$OPENWINHOME/lib"           && x_libraries="$OPENWINHOME/lib"
+      test -d "$OPENWINHOME/include"       && x_includes="$OPENWINHOME/include"
+      test -d "$OPENWINHOME/share/include" && x_includes="$OPENWINHOME/share/include"
+    else
+      dnl AC_PATH_XTRA often guesses /usr/include, when some other 
+      dnl include directory is a MUCH better guess (Linux, HP-UX 10.20).
+      dnl This is a workaround for idiot (esp. HP) system packagers.
+      for dir in "/usr/X11R6/include" "/usr/include/X11R6"; do
+        if test -d "$dir/X11"; then x_includes="$dir"; break; fi
+      done
+      if test "$x_includes" != "NONE"; then
+        for dir in "/usr/X11R6/lib" "/usr/lib/X11R6"; do
+          if test -d "$dir"; then x_libraries="$dir"; break; fi
+        done
+      fi
+    fi
   fi
-fi
-
-dnl --x-includes or --x-libraries implies --with-x11.
-test "$x_includes $x_libraries" != "NONE NONE" && \
- window_system=x11 with_x11=yes
-
-if test "$with_x11" != "no"; then
+
   AC_PATH_XTRA # Autoconf claims to find X library and include dirs for us.
   if test "$no_x" = "yes"
   then with_x11=no  window_system=none HAVE_X_WINDOWS=no
@@ -2366,7 +2378,7 @@
                            with_xmu=yes, with_xmu=no) }
   if test "$with_xmu" = "no"; then
     XE_ADD_OBJS(xmu.o)
-  else 
+  else
     XE_PREPEND(-lXmu, libs_x)
     AC_DEFINE(HAVE_XMU)
   fi
@@ -2929,7 +2941,7 @@
 
 dnl Check for terminal I/O variants
 dnl TERMIOS systems may have termio.h, but not vice-versa, I think.
-AC_CHECK_HEADER(termios.h, 
+AC_CHECK_HEADER(termios.h,
   AC_DEFINE(HAVE_TERMIOS)
   AC_DEFINE(SIGNALS_VIA_CHARACTERS)
   AC_DEFINE(NO_TERMIO),
@@ -3374,8 +3386,8 @@
 
 
 dnl if --package-path wasn't passed to configure, give the default value
-if test "x${package_path}" = "xNONE" ; then
-	package_path="${prefix}/lib/xemacs/packages:~/.xemacs"
+if test "${package_path}" = "NONE" ; then
+	package_path="~/.xemacs:${prefix}/lib/xemacs/packages"
 fi
 dnl change blanks to colons in package path, and make available to config.h
 package_path=`echo $package_path | sed 'y/ /:/'`
Binary file etc/dv.xpm.Z has changed
Binary file etc/dvm.xpm.Z has changed
Binary file etc/slb.xpm.Z has changed
Binary file etc/slbm.xpm.Z has changed
--- a/lisp/ChangeLog	Mon Aug 13 09:55:30 2007 +0200
+++ b/lisp/ChangeLog	Mon Aug 13 09:56:28 2007 +0200
@@ -1,3 +1,175 @@
+1997-09-13  SL Baur  <steve@altair.xemacs.org>
+
+	* x11/x-toolbar.el (toolbar-paste-function): Remove reference to
+	x-yank-primary-selection.
+	Suggested by: Hrvoje Niksic <hniksic@srce.hr>
+
+	* prim/about.el (about-xemacs): Update release date with worst
+	case.
+	(about-maintainer-info): Sync entry with 19.16.
+
+1997-09-11  Jens-Ulrik Holger Petersen  <petersen@kurims.kyoto-u.ac.jp>
+
+	* packages/vc.el (vc-default-init-version): Make the default value 
+	be `nil'.  Improve the docstring.
+
+1997-09-12  SL Baur  <steve@altair.xemacs.org>
+
+	* prim/make-docfile.el: Spawn make-docfile to csh on next-mach as
+	well as BSD.
+
+1997-09-13  Hrvoje Niksic  <hniksic@srce.hr>
+
+	* mule/mule-util.el: Clean of Emacs-ported things.
+
+1997-09-12  Hrvoje Niksic  <hniksic@srce.hr>
+
+	* packages/etags.el (tags-file-pattern): Allow `,' in file names.
+
+	* prim/startup.el (initial-scratch-message): Converted to defcustom.
+
+1997-09-11  Hrvoje Niksic  <hniksic@srce.hr>
+
+	* packages/tar-mode.el: Customize; use cl.el instead of
+	home-brewed extensions.
+
+1997-09-10  Hrvoje Niksic  <hniksic@srce.hr>
+
+	* prim/subr.el (mapc-internal): Define for backward compatibility.
+
+	* cl/cl-extra.el: Don't define `mapc'.
+
+1997-09-07  Hrvoje Niksic  <hniksic@srce.hr>
+
+	* prim/startup.el (initial-scratch-message): Cosmetic change.
+
+Fri Sep  5 00:50:41 1997  Barry A. Warsaw  <cc-mode-help@python.org>
+
+	* cc-mode/Release 5.17
+
+Fri Sep  5 04:47:03 1997  Barry A. Warsaw  <cc-mode-help@python.org>
+
+	* cc-mode/cc-cmds.el (c-beginning-of-statement):
+	Fixes in sentence movement to properly
+	handle M-e moving forward into a comment when looking at preceding
+	whitespace, and M-a moving backward into comment when looking at
+	following whitespace.
+
+	* cc-mode/cc-langs.el:
+	Define `/' in c-mode-base-map since all modes now support
+	c-electric-slash.
+
+	Define C-c C-e in mode-specific maps instead of c-mode-base-map since
+	c-expand-macro is meaningless in Java and IDL.
+
+	* cc-mode/cc-engine.el (c-end-of-statement-1):
+	Wrap backward-up-list in a c-safe call so no error results when
+	buffer contains only a comment and point is at eob.
+
+	* cc-mode/cc-cmds.el (c-beginning-of-statement):
+	Uncommented the looking-at call in the
+	sentence-flag clause so that moving by forward-sentence when looking
+	at the beginning of a comment works again.  A previous log message in
+	cc-mode.el indicates this was commented out "because
+	c-beginning-of-statement-1 should do the right thing", but clearly it
+	doesn't.
+
+	I don't know if this breaks something else, because I can't figure out
+	why it was commented out in the first place.
+
+Tue Aug 26 22:31:55 1997  Barry A. Warsaw  <cc-mode-help@python.org>
+
+	* cc-mode/cc-styles.el (c-style-alist): "python" style,
+	knr-argdecl-intro == +
+
+Mon Aug 25 17:25:12 1997  Barry A. Warsaw  <cc-mode-help@python.org>
+
+	* cc-mode/cc-engine.el (c-inside-bracelist-p):
+	Add a test to the enum list test so that the
+	following code won't erroneously recognize as inside a brace list:
+
+	static PyObject **
+	unpack_sequence(v, argcnt, why)
+	     PyObject **v;
+	     int argcnt;
+	     enum *why_code;
+	{
+		int i;
+
+	Otherwise, the `enum' in the K&R decl trips this code up.
+
+	* cc-mode/cc-styles.el (c-style-alist): "python" style,
+	fill-column = 78
+
+Fri Aug 22 20:25:57 1997  Barry A. Warsaw  <cc-mode-help@python.org>
+
+	* cc-mode/cc-cmds.el (c-comment-line-break-function):
+	Don't break line in the middle of a string.
+
+Mon Aug 18 17:37:24 1997  Barry A. Warsaw  <cc-mode-help@python.org>
+
+	* cc-mode/cc-styles.el (c-style-alist):
+	"python" style change: arglist-intro <= +
+	"python" style change: inextern-lang <= 0
+
+Fri Aug 15 18:39:10 1997  Barry A. Warsaw  <cc-mode-help@python.org>
+
+	* cc-mode/cc-styles.el (c-style-alist):
+	"python" style requires c-comment-continuation-stars
+	to be "".
+
+1997-09-09  SL Baur  <steve@altair.xemacs.org>
+
+	* utils/autoload.el: One too many -autoload suffixes.
+
+1997-09-07  Hrvoje Niksic  <hniksic@srce.hr>
+
+	* prim/startup.el (initial-scratch-message): Cosmetic grammar
+	fixup in startup *scratch* message.
+
+1997-09-09  Jens-Ulrik Holger Petersen  <petersen@kurims.kyoto-u.ac.jp>
+
+	* packages/vc.el (vc-register): make the second option arg COMMENT 
+	do something
+
+	* packages/vc.el (vc-register): Make the default initial
+	version be `vc-default-init-version', a new variable
+	defaulting to "0.1".
+
+1997-09-08  SL Baur  <steve@altair.xemacs.org>
+
+	* prim/packages.el (packages-find-packages): Reverse package path.
+	From Colin Rafferty <craffert@ml.com>
+
+1997-09-07  Hrvoje Niksic  <hniksic@srce.hr>
+
+	* utils/edmacro.el (edmacro-parse-word): Accept ^foo (would signal 
+	error).
+	(edmacro-format-1): Add SPC after ^.
+
+1997-09-03  SL Baur  <steve@altair.xemacs.org>
+
+	* prim/make-docfile.el (Top Level): Ensure `load-path' always has
+	directory names ending in '/'.
+
+	* prim/packages.el (list-autoloads-path): Assume `load-path'
+	always has directories ending with trailing `/'s.
+
+	* version.el (emacs-version): Preserve previous matching info.
+	From Didier Verna <verna@inf.enst.fr>
+
+Wed Sep  3 13:53:10 1997  SL Baur  <steve@altair.xemacs.org>
+
+	* prim/loadup.el:  *Never* add directories to the load-path
+	without trailing slashes.
+
+1997-09-03  SL Baur  <steve@altair.xemacs.org>
+
+	* prim/packages.el (packages-find-packages): New argument:
+	`suppress-user' to allow suppression of searching package
+	hierarchies beginning with "~".
+	(Top Level): Suppress searching user directories at dump time.
+
 1997-08-30  Karl M. Hegbloom  <karlheg@inetarena.com>
 
 	* packages/info.el (Info-mouse-track-double-click-hook): Added,
--- a/lisp/cc-mode/cc-align.el	Mon Aug 13 09:55:30 2007 +0200
+++ b/lisp/cc-mode/cc-align.el	Mon Aug 13 09:56:28 2007 +0200
@@ -7,7 +7,7 @@
 ;;             1985 Richard M. Stallman
 ;; Maintainer: cc-mode-help@python.org
 ;; Created:    22-Apr-1997 (split from cc-mode.el)
-;; Version:    5.16
+;; Version:    5.17
 ;; Keywords:   c languages oop
 
 ;; This file is part of GNU Emacs.
--- a/lisp/cc-mode/cc-cmds.el	Mon Aug 13 09:55:30 2007 +0200
+++ b/lisp/cc-mode/cc-cmds.el	Mon Aug 13 09:56:28 2007 +0200
@@ -7,7 +7,7 @@
 ;;             1985 Richard M. Stallman
 ;; Maintainer: cc-mode-help@python.org
 ;; Created:    22-Apr-1997 (split from cc-mode.el)
-;; Version:    5.16
+;; Version:    5.17
 ;; Keywords:   c languages oop
 
 ;; This file is part of GNU Emacs.
@@ -617,11 +617,17 @@
     (if (and sentence-flag
 	     (or (nth 3 state)
 		 (nth 4 state)
-;		 (looking-at (concat "[ \t]*" comment-start-skip))
-		 (save-excursion
-		   (skip-chars-backward " \t")
-		   (goto-char (- (point) 2))
-		   (looking-at "\\*/"))))
+		 ;; skipping forward into a comment?
+		 (and (> 0 count)
+		      (save-excursion
+			(skip-chars-forward " \t\n")
+			(or (eobp)
+			    (looking-at comment-start-skip))))
+		 (and (< 0 count)
+		      (save-excursion
+			(skip-chars-backward " \t\n")
+			(goto-char (- (point) 2))
+			(looking-at "\\*/")))))
 	(forward-sentence (- count))
       (while (> count 0)
 	(c-beginning-of-statement-1 lim)
@@ -747,28 +753,33 @@
 		 comment-column))
 	 )))))
 
+
 ;; for proposed new variable comment-line-break-function
 (defun c-comment-line-break-function (&optional soft)
   ;; we currently don't do anything with soft line breaks
-  (if (or (not c-comment-continuation-stars)
-	  (not (c-in-literal)))
-      (indent-new-comment-line soft)
-    (let ((here (point))
-	  (leader c-comment-continuation-stars))
-      (back-to-indentation)
-      ;; are we looking at a block or lines style comment?
-      (if (and (looking-at (concat "\\(" c-comment-start-regexp "\\)[ \t]+"))
-	       (string-equal (match-string 1) "//"))
-	  ;; line style
-	  (setq leader "// "))
-      (goto-char here)
-      (delete-region (progn (skip-chars-backward " \t") (point))
-		     (progn (skip-chars-forward " \t") (point)))
-      (newline)
-      ;; to avoid having an anchored comment that c-indent-line will
-      ;; trip up on
-      (insert " " leader)
-      (c-indent-line))))
+  (let ((literal (c-in-literal)))
+    (cond
+     ((eq literal 'string))
+     ((or (not c-comment-continuation-stars)
+	  (not literal))
+      (indent-new-comment-line soft))
+     (t (let ((here (point))
+	      (leader c-comment-continuation-stars))
+	  (back-to-indentation)
+	  ;; are we looking at a block or lines style comment?
+	  (if (and (looking-at (concat "\\(" c-comment-start-regexp
+				       "\\)[ \t]+"))
+		   (string-equal (match-string 1) "//"))
+	      ;; line style
+	      (setq leader "// "))
+	  (goto-char here)
+	  (delete-region (progn (skip-chars-backward " \t") (point))
+			 (progn (skip-chars-forward " \t") (point)))
+	  (newline)
+	  ;; to avoid having an anchored comment that c-indent-line will
+	  ;; trip up on
+	  (insert " " leader)
+	  (c-indent-line))))))
 
 ;; advice for indent-new-comment-line for older Emacsen
 (if (boundp 'comment-line-break-function)
--- a/lisp/cc-mode/cc-compat.el	Mon Aug 13 09:55:30 2007 +0200
+++ b/lisp/cc-mode/cc-compat.el	Mon Aug 13 09:56:28 2007 +0200
@@ -5,7 +5,7 @@
 ;; Author:     1994-1997 Barry A. Warsaw
 ;; Maintainer: cc-mode-help@python.org
 ;; Created:    August 1994, split from cc-mode.el
-;; Version:    5.16
+;; Version:    5.17
 ;; Keywords:   c languages oop
 
 ;; This file is part of GNU Emacs.
--- a/lisp/cc-mode/cc-defs.el	Mon Aug 13 09:55:30 2007 +0200
+++ b/lisp/cc-mode/cc-defs.el	Mon Aug 13 09:56:28 2007 +0200
@@ -7,7 +7,7 @@
 ;;             1985 Richard M. Stallman
 ;; Maintainer: cc-mode-help@python.org
 ;; Created:    22-Apr-1997 (split from cc-mode.el)
-;; Version:    5.16
+;; Version:    5.17
 ;; Keywords:   c languages oop
 
 ;; This file is part of GNU Emacs.
--- a/lisp/cc-mode/cc-engine.el	Mon Aug 13 09:55:30 2007 +0200
+++ b/lisp/cc-mode/cc-engine.el	Mon Aug 13 09:56:28 2007 +0200
@@ -7,7 +7,7 @@
 ;;             1985 Richard M. Stallman
 ;; Maintainer: cc-mode-help@python.org
 ;; Created:    22-Apr-1997 (split from cc-mode.el)
-;; Version:    5.16
+;; Version:    5.17
 ;; Keywords:   c languages oop
 
 ;; This file is part of GNU Emacs.
@@ -188,13 +188,13 @@
 	  (goto-char end))
 	(re-search-backward "[;{}]")
 	(forward-char 1))
-    (error 
+    (error
      (let ((beg (point)))
-       (backward-up-list -1)
+       (c-safe (backward-up-list -1))
        (let ((end (point)))
 	 (goto-char beg)
-	 (search-forward ";" end 'move))))))
-
+	 (search-forward ";" end 'move)))
+     )))
 
 
 (defun c-crosses-statement-barrier-p (from to)
@@ -750,9 +750,11 @@
        (save-excursion
 	 (goto-char containing-sexp)
 	 (forward-sexp -1)
-	 (if (or (looking-at "enum[\t\n ]+")
-		 (progn (forward-sexp -1)
-			(looking-at "enum[\t\n ]+")))
+	 (if (and (or (looking-at "enum[\t\n ]+")
+		      (progn (forward-sexp -1)
+			     (looking-at "enum[\t\n ]+")))
+		  (progn (c-end-of-statement-1)
+			 (> (point) containing-sexp)))
 	     (point)))
      (error nil))
    ;; this will pick up array/aggregate init lists, even if they are nested.
--- a/lisp/cc-mode/cc-langs.el	Mon Aug 13 09:55:30 2007 +0200
+++ b/lisp/cc-mode/cc-langs.el	Mon Aug 13 09:56:28 2007 +0200
@@ -7,7 +7,7 @@
 ;;             1985 Richard M. Stallman
 ;; Maintainer: cc-mode-help@python.org
 ;; Created:    22-Apr-1997 (split from cc-mode.el)
-;; Version:    5.16
+;; Version:    5.17
 ;; Keywords:   c languages oop
 
 ;; This file is part of GNU Emacs.
@@ -373,7 +373,6 @@
   (define-key c-mode-base-map "\C-c\C-b"  'c-submit-bug-report)
   (define-key c-mode-base-map "\C-c\C-c"  'comment-region)
   (define-key c-mode-base-map "\C-c\C-d"  'c-toggle-hungry-state)
-  (define-key c-mode-base-map "\C-c\C-e"  'c-macro-expand)
   (define-key c-mode-base-map "\C-c\C-o"  'c-set-offset)
   (define-key c-mode-base-map "\C-c\C-s"  'c-show-syntactic-information)
   (define-key c-mode-base-map "\C-c\C-t"  'c-toggle-auto-hungry-state)
@@ -427,6 +426,7 @@
     nil
   (setq c-mode-map (c-make-inherited-keymap))
   ;; add bindings which are only useful for C
+  (define-key c-mode-map "\C-c\C-e"  'c-macro-expand)
   )
 
 ;;;###autoload
@@ -453,9 +453,10 @@
     nil
   (setq c++-mode-map (c-make-inherited-keymap))
   ;; add bindings which are only useful for C++
-  (define-key c++-mode-map "\C-c:"  'c-scope-operator)
-  (define-key c++-mode-map "<"      'c-electric-lt-gt)
-  (define-key c++-mode-map ">"      'c-electric-lt-gt))
+  (define-key c++-mode-map "\C-c\C-e" 'c-macro-expand)
+  (define-key c++-mode-map "\C-c:"    'c-scope-operator)
+  (define-key c++-mode-map "<"        'c-electric-lt-gt)
+  (define-key c++-mode-map ">"        'c-electric-lt-gt))
 
 ;;;###autoload
 (defvar c++-mode-syntax-table nil
@@ -489,7 +490,7 @@
     nil
   (setq objc-mode-map (c-make-inherited-keymap))
   ;; add bindings which are only useful for Objective-C
-  (define-key objc-mode-map "/"      'c-electric-slash))
+  (define-key objc-mode-map "\C-c\C-e" 'c-macro-expand))
 
 ;;;###autoload
 (defvar objc-mode-syntax-table nil
@@ -517,7 +518,7 @@
     nil
   (setq java-mode-map (c-make-inherited-keymap))
   ;; add bindings which are only useful for Java
-  (define-key java-mode-map "/"      'c-electric-slash))
+  )
 
 ;;;###autoload
 (defvar java-mode-syntax-table nil
@@ -542,8 +543,8 @@
 (if idl-mode-map
     nil
   (setq idl-mode-map (c-make-inherited-keymap))
-  ;; additional bindings
-  (define-key idl-mode-map "/" 'c-electric-slash))
+  ;; add bindings which are only useful for IDL
+  )
 
 ;;;###autoload
 (defvar idl-mode-syntax-table nil
--- a/lisp/cc-mode/cc-menus.el	Mon Aug 13 09:55:30 2007 +0200
+++ b/lisp/cc-mode/cc-menus.el	Mon Aug 13 09:56:28 2007 +0200
@@ -7,7 +7,7 @@
 ;;             1985 Richard M. Stallman
 ;; Maintainer: cc-mode-help@python.org
 ;; Created:    22-Apr-1997 (split from cc-mode.el)
-;; Version:    5.16
+;; Version:    5.17
 ;; Keywords:   c languages oop
 
 ;; This file is part of GNU Emacs.
--- a/lisp/cc-mode/cc-mode.el	Mon Aug 13 09:55:30 2007 +0200
+++ b/lisp/cc-mode/cc-mode.el	Mon Aug 13 09:56:28 2007 +0200
@@ -7,7 +7,7 @@
 ;;             1985 Richard M. Stallman
 ;; Maintainer: cc-mode-help@python.org
 ;; Created:    a long, long, time ago. adapted from the original c-mode.el
-;; Version:    5.16
+;; Version:    5.17
 ;; Keywords:   c languages oop
 
 ;; NOTE: Read the commentary below for the right way to submit bug reports!
@@ -243,7 +243,7 @@
 ;;;###autoload
 (defun java-mode ()
   "Major mode for editing Java code.
-To submit a problem report, enter `\\[c-submit-bug-report]' from an
+To submit a problem report, enter `\\[c-submit-bug-report]' from a
 java-mode buffer.  This automatically sets up a mail buffer with
 version information already added.  You just need to add a description
 of the problem, including a reproducible test case and send the
@@ -326,7 +326,7 @@
 
 
 ;; defuns for submitting bug reports
-(defconst c-version "5.16"
+(defconst c-version "5.17"
   "CC Mode version number.")
 
 (defconst c-mode-help-address
--- a/lisp/cc-mode/cc-styles.el	Mon Aug 13 09:55:30 2007 +0200
+++ b/lisp/cc-mode/cc-styles.el	Mon Aug 13 09:56:28 2007 +0200
@@ -7,7 +7,7 @@
 ;;             1985 Richard M. Stallman
 ;; Maintainer: cc-mode-help@python.org
 ;; Created:    22-Apr-1997 (split from cc-mode.el)
-;; Version:    5.16
+;; Version:    5.17
 ;; Keywords:   c languages oop
 
 ;; This file is part of GNU Emacs.
@@ -119,6 +119,9 @@
      (fill-column      . 72)
      (c-basic-offset   . 8)
      (c-offsets-alist  . ((substatement-open . 0)
+			  (inextern-lang . 0)
+			  (arglist-intro . +)
+			  (knr-argdecl-intro . +)
 			  ))
      (c-hanging-braces-alist . ((brace-list-open)
 				(brace-list-intro)
@@ -126,7 +129,9 @@
 				(substatement-open after)
 				(block-close . c-snug-do-while)
 				))
-     (c-comment-continuation-stars "")
+     (c-comment-continuation-stars . "")
+     (c-hanging-comment-ender-p . nil)
+     (fill-column . 78)
      )
     ("java"
      (c-basic-offset . 2)
--- a/lisp/cc-mode/cc-vars.el	Mon Aug 13 09:55:30 2007 +0200
+++ b/lisp/cc-mode/cc-vars.el	Mon Aug 13 09:56:28 2007 +0200
@@ -7,7 +7,7 @@
 ;;             1985 Richard M. Stallman
 ;; Maintainer: cc-mode-help@python.org
 ;; Created:    22-Apr-1997 (split from cc-mode.el)
-;; Version:    5.16
+;; Version:    5.17
 ;; Keywords:   c languages oop
 
 ;; This file is part of GNU Emacs.
--- a/lisp/cl/cl-extra.el	Mon Aug 13 09:55:30 2007 +0200
+++ b/lisp/cl/cl-extra.el	Mon Aug 13 09:56:28 2007 +0200
@@ -163,14 +163,17 @@
 	(setq cl-list (cdr cl-list)))
       (nreverse cl-res))))
 
-(defun mapc (cl-func cl-seq &rest cl-rest)
-  "Like `mapcar', but does not accumulate values returned by the function."
-  (if cl-rest
-      (apply 'map nil cl-func cl-seq cl-rest)
-    ;; XEmacs change: we call mapc-internal, which really doesn't
-    ;; accumulate any results.
-    (mapc-internal cl-func cl-seq))
-  cl-seq)
+
+;; mapc is now in C, renamed from `mapc-internal'.
+
+;(defun mapc (cl-func cl-seq &rest cl-rest)
+;  "Like `mapcar', but does not accumulate values returned by the function."
+;  (if cl-rest
+;      (apply 'map nil cl-func cl-seq cl-rest)
+;    ;; XEmacs change: we call mapc-internal, which really doesn't
+;    ;; accumulate any results.
+;    (mapc-internal cl-func cl-seq))
+;  cl-seq)
 
 (defun mapl (cl-func cl-list &rest cl-rest)
   "Like `maplist', but does not accumulate values returned by the function."
--- a/lisp/cl/cl.el	Mon Aug 13 09:55:30 2007 +0200
+++ b/lisp/cl/cl.el	Mon Aug 13 09:56:28 2007 +0200
@@ -665,7 +665,7 @@
 		      (or (get func 'edebug-form-spec)
 			  (put func 'edebug-form-spec (nth 2 entry)))))
 		   (car entry))))
-	'(((defun* defmacro*) 2)
+	'(((defun* defmacro*) defun)
 	  ((function*) nil
 	   (&or symbolp ([&optional 'macro] 'lambda (&rest sexp) &rest form)))
 	  ((eval-when) 1 (sexp &rest form))
@@ -693,7 +693,7 @@
 	  ((letf letf*) 1 ((&rest (&rest form)) &rest form))
 	  ((callf destructuring-bind) 2 (sexp form &rest form))
 	  ((callf2) 3 (sexp form form &rest form))
-	  ((loop) nil (&rest &or symbolp form))
+	  ((loop) defun (&rest &or symbolp form))
 	  ((ignore-errors) 0 (&rest form))))
 
 
--- a/lisp/custom/custom-load.el	Mon Aug 13 09:55:30 2007 +0200
+++ b/lisp/custom/custom-load.el	Mon Aug 13 09:56:28 2007 +0200
@@ -1,53 +1,53 @@
-(custom-put 'widget-button 'custom-loads '("wid-edit"))
-(custom-put 'widget-faces 'custom-loads '("wid-edit"))
-(custom-put 'widget-documentation 'custom-loads '("wid-edit"))
-(custom-put 'widgets 'custom-loads '("wid-browse" "wid-edit"))
-(custom-put 'widget-browse 'custom-loads '("wid-browse"))
-(custom-put 'custom-magic-faces 'custom-loads '("cus-edit"))
-(custom-put 'windows 'custom-loads '())
-(custom-put 'processes-basics 'custom-loads '())
-(custom-put 'auto-save 'custom-loads '())
-(custom-put 'keyboard 'custom-loads '())
-(custom-put 'minibuffer 'custom-loads '())
-(custom-put 'debug 'custom-loads '())
-(custom-put 'limits 'custom-loads '())
-(custom-put 'dired 'custom-loads '())
-(custom-put 'execute 'custom-loads '())
-(custom-put 'display 'custom-loads '())
-(custom-put 'editing-basics 'custom-loads '())
-(custom-put 'fill 'custom-loads '())
-(custom-put 'modeline 'custom-loads '())
-(custom-put 'undo 'custom-loads '())
-(custom-put 'alloc 'custom-loads '())
-(custom-put 'custom-menu 'custom-loads '("cus-edit"))
-(custom-put 'custom-buffer 'custom-loads '("cus-edit"))
-(custom-put 'custom-browse 'custom-loads '("cus-edit"))
-(custom-put 'custom-faces 'custom-loads '("cus-edit"))
-(custom-put 'customize 'custom-loads '("cus-edit" "wid-edit" "cus-face"))
+(custom-put 'emacs 'custom-loads '("cus-edit"))
+(custom-put 'editing 'custom-loads '("cus-edit"))
+(custom-put 'abbrev 'custom-loads '("cus-edit"))
+(custom-put 'matching 'custom-loads '())
+(custom-put 'mouse 'custom-loads '())
+(custom-put 'external 'custom-loads '("cus-edit"))
+(custom-put 'processes 'custom-loads '("cus-edit"))
+(custom-put 'programming 'custom-loads '("cus-edit"))
+(custom-put 'languages 'custom-loads '("cus-edit"))
+(custom-put 'lisp 'custom-loads '())
+(custom-put 'applications 'custom-loads '("cus-edit"))
+(custom-put 'calendar 'custom-loads '())
+(custom-put 'development 'custom-loads '("cus-edit"))
+(custom-put 'extensions 'custom-loads '("wid-edit"))
+(custom-put 'internal 'custom-loads '("cus-edit"))
+(custom-put 'maint 'custom-loads '())
+(custom-put 'environment 'custom-loads '("cus-edit"))
+(custom-put 'i18n 'custom-loads '("cus-edit"))
+(custom-put 'x 'custom-loads '())
+(custom-put 'frames 'custom-loads '())
+(custom-put 'data 'custom-loads '())
+(custom-put 'files 'custom-loads '("cus-edit"))
+(custom-put 'wp 'custom-loads '("cus-edit"))
+(custom-put 'faces 'custom-loads '("cus-edit" "wid-edit"))
+(custom-put 'hypermedia 'custom-loads '("wid-edit"))
+(custom-put 'help 'custom-loads '("cus-edit"))
 (custom-put 'local 'custom-loads '())
-(custom-put 'help 'custom-loads '("cus-edit"))
-(custom-put 'hypermedia 'custom-loads '("wid-edit"))
-(custom-put 'faces 'custom-loads '("cus-edit" "wid-edit"))
-(custom-put 'wp 'custom-loads '("cus-edit"))
-(custom-put 'files 'custom-loads '("cus-edit"))
-(custom-put 'data 'custom-loads '())
-(custom-put 'frames 'custom-loads '())
-(custom-put 'x 'custom-loads '())
-(custom-put 'i18n 'custom-loads '("cus-edit"))
-(custom-put 'environment 'custom-loads '("cus-edit"))
-(custom-put 'maint 'custom-loads '())
-(custom-put 'internal 'custom-loads '("cus-edit"))
-(custom-put 'extensions 'custom-loads '("wid-edit"))
-(custom-put 'development 'custom-loads '("cus-edit"))
-(custom-put 'calendar 'custom-loads '())
-(custom-put 'applications 'custom-loads '("cus-edit"))
-(custom-put 'lisp 'custom-loads '())
-(custom-put 'languages 'custom-loads '("cus-edit"))
-(custom-put 'programming 'custom-loads '("cus-edit"))
-(custom-put 'processes 'custom-loads '("cus-edit"))
-(custom-put 'external 'custom-loads '("cus-edit"))
-(custom-put 'mouse 'custom-loads '())
-(custom-put 'matching 'custom-loads '())
-(custom-put 'abbrev 'custom-loads '("cus-edit"))
-(custom-put 'editing 'custom-loads '("cus-edit"))
-(custom-put 'emacs 'custom-loads '("cus-edit"))
+(custom-put 'customize 'custom-loads '("cus-edit" "wid-edit" "cus-face"))
+(custom-put 'custom-faces 'custom-loads '("cus-edit"))
+(custom-put 'custom-browse 'custom-loads '("cus-edit"))
+(custom-put 'custom-buffer 'custom-loads '("cus-edit"))
+(custom-put 'custom-menu 'custom-loads '("cus-edit"))
+(custom-put 'alloc 'custom-loads '())
+(custom-put 'undo 'custom-loads '())
+(custom-put 'modeline 'custom-loads '())
+(custom-put 'fill 'custom-loads '())
+(custom-put 'editing-basics 'custom-loads '())
+(custom-put 'display 'custom-loads '())
+(custom-put 'execute 'custom-loads '())
+(custom-put 'dired 'custom-loads '())
+(custom-put 'limits 'custom-loads '())
+(custom-put 'debug 'custom-loads '())
+(custom-put 'minibuffer 'custom-loads '())
+(custom-put 'keyboard 'custom-loads '())
+(custom-put 'auto-save 'custom-loads '())
+(custom-put 'processes-basics 'custom-loads '())
+(custom-put 'windows 'custom-loads '())
+(custom-put 'custom-magic-faces 'custom-loads '("cus-edit"))
+(custom-put 'widget-browse 'custom-loads '("wid-browse"))
+(custom-put 'widgets 'custom-loads '("wid-browse" "wid-edit"))
+(custom-put 'widget-documentation 'custom-loads '("wid-edit"))
+(custom-put 'widget-faces 'custom-loads '("wid-edit"))
+(custom-put 'widget-button 'custom-loads '("wid-edit"))
--- a/lisp/ediff/custom-load.el	Mon Aug 13 09:55:30 2007 +0200
+++ b/lisp/ediff/custom-load.el	Mon Aug 13 09:56:28 2007 +0200
@@ -1,5 +1,5 @@
-(custom-put 'ediff-diff 'custom-loads '("ediff-diff"))
-(custom-put 'ediff-merge 'custom-loads '("ediff-merg"))
+(custom-put 'ediff 'custom-loads '("ediff-diff" "ediff-merg" "ediff-mult" "ediff-ptch" "ediff-wind" "ediff" "ediff-init"))
+(custom-put 'ediff-ptch 'custom-loads '("ediff-ptch"))
 (custom-put 'ediff-mult 'custom-loads '("ediff-mult"))
-(custom-put 'ediff-ptch 'custom-loads '("ediff-ptch"))
-(custom-put 'ediff 'custom-loads '("ediff-diff" "ediff-merg" "ediff-mult" "ediff-ptch" "ediff-wind" "ediff" "ediff-init"))
+(custom-put 'ediff-merge 'custom-loads '("ediff-merg"))
+(custom-put 'ediff-diff 'custom-loads '("ediff-diff"))
--- a/lisp/ediff/ediff-diff.el	Mon Aug 13 09:55:30 2007 +0200
+++ b/lisp/ediff/ediff-diff.el	Mon Aug 13 09:56:28 2007 +0200
@@ -68,8 +68,7 @@
   "*Options to pass to `ediff-diff-program'. 
 If diff\(1\) is used as `ediff-diff-program', then the most useful options are
 `-w', to ignore space, and `-i', to ignore case of letters.
-At present, the option `-c' is ignored, since Ediff doesn't understand this
-type of output."
+At present, the option `-c' is not allowed."
   :type 'string
   :group 'ediff-diff)
 
@@ -158,9 +157,8 @@
 ;; ediff-setup-diff-regions-function, which can also have the value
 ;; ediff-setup-diff-regions3, which takes 4 arguments.
 (defun ediff-setup-diff-regions (file-A file-B file-C)
-;;;  ;; Force all minibuffers to display ediff's messages.
-;;;  ;; When xemacs implements minibufferless frames, this won't be necessary
-;;;  (if ediff-xemacs-p (setq synchronize-minibuffers t))
+  (if (string-match "c" ediff-diff-options)
+      (error "Option `-c' is not allowed in `ediff-diff-options'"))
 						  
   ;; create, if it doesn't exist
   (or (ediff-buffer-live-p ediff-diff-buffer)
@@ -210,7 +208,6 @@
 				 diff-buffer
 				 'synchronize
 				 ediff-diff-options file1 file2)
-	     ;;(message "Computing differences ... done")
 	     (message "")
 	     (ediff-with-current-buffer diff-buffer
 	       (buffer-size))))))
@@ -1043,11 +1040,6 @@
 ;; File-C is either the third file to compare (in case of 3-way comparison)
 ;; or it is the ancestor file.
 (defun ediff-setup-diff-regions3 (file-A file-B file-C)
-  
-;;;  ;; force all minibuffers to display ediff's messages.
-;;;  ;; when xemacs implements minibufferless frames, this won't be necessary
-;;;  (if ediff-xemacs-p (setq synchronize-minibuffers t))
-						  
   (or (ediff-buffer-live-p ediff-diff-buffer)
       (setq ediff-diff-buffer
 	    (get-buffer-create (ediff-unique-buffer-name "*ediff-diff" "*"))))
--- a/lisp/ediff/ediff-ptch.el	Mon Aug 13 09:55:30 2007 +0200
+++ b/lisp/ediff/ediff-ptch.el	Mon Aug 13 09:56:28 2007 +0200
@@ -81,18 +81,26 @@
   :type 'string
   :group 'ediff-ptch)
 
+(defun ediff-test-patch-utility ()
+  (cond ((zerop (call-process ediff-patch-program nil nil nil "-z." "-b"))
+	 ;; GNU `patch' v. >= 2.2
+	 'gnu)
+	((zerop (call-process ediff-patch-program nil nil nil "-b"))
+	 'posix)
+	(t 'traditional)))
+
 (defcustom ediff-backup-specs 
-  (cond
-   ((zerop (call-process ediff-patch-program nil nil nil "-z." "-b"))
-    ;; GNU `patch' v. >= 2.2
-    (format "-z%s -b" ediff-backup-extension))
-   ((zerop (call-process ediff-patch-program nil nil nil "-b"))
-    ;; POSIX `patch' -- ediff-backup-extension must be ".orig"
-    (setq ediff-backup-extension ediff-default-backup-extension)
-    "-b")
-   (t
-    ;; traditional `patch'
-    (format "-b %s" ediff-backup-extension)))
+  (let ((type (ediff-test-patch-utility)))
+    (cond ((eq type 'gnu)
+	   ;; GNU `patch' v. >= 2.2
+	   (format "-z%s -b" ediff-backup-extension))
+	  ((eq type 'posix)
+	   ;; POSIX `patch' -- ediff-backup-extension must be ".orig"
+	   (setq ediff-backup-extension ediff-default-backup-extension)
+	   "-b")
+	  (t
+	   ;; traditional `patch'
+	   (format "-b %s" ediff-backup-extension))))
   "*Backup directives to pass to the patch program.
 Ediff requires that the old version of the file \(before applying the patch\)
 be saved in a file named `the-patch-file.extension'. Usually `extension' is
@@ -107,7 +115,11 @@
 Note that both `ediff-backup-extension' and `ediff-backup-specs'
 must be set properly. If your patch program takes the option `-b',
 but not `-b extension', the variable `ediff-backup-extension' must
-still be set so Ediff will know which extension to use."
+still be set so Ediff will know which extension to use.
+
+Ediff tries to guess the appropriate value for this variables. It is believed
+to be working for `traditional' patch, all versions of GNU patch, and for POSIX
+patch. So, don't change these variables, unless the default doesn't work."
   :type 'string
   :group 'ediff-ptch)
 
@@ -278,10 +290,8 @@
 				 (princ
 				  (format "
 The patch file contains a context diff for
-
 	%s
 	%s
-
 However, Ediff cannot infer the name of the actual file
 to be patched on your system. If you know the correct file name,
 please enter it now.
@@ -336,7 +346,7 @@
 Ediff has inferred that
 	%s
 	%s
-are possible targets for applying the patch.
+are two possible targets for applying the patch.
 Both files seem to be plausible alternatives.
 
 Please advice:
@@ -351,17 +361,19 @@
 			   (f1-exists (setcar triple file1))
 			   (t
 			    (with-output-to-temp-buffer ediff-msg-buffer
-			      (princ (format "
-Ediff inferred that 
+			      (princ "\nEdiff has inferred that")
+			      (if (string= file1 file2)
+				  (princ (format "
+	%s
+is the target for this patch. However, this file does not exist."
+						 file1))
+				(princ (format "
 	%s
 	%s
-are possible alternative targets for this patch.
-
-However, these files do not exist.
-
-Please enter an alternative patch target ... 
-"
-					     file1 file2)))
+are two possible targets for this patch. However, these files do not exist."
+					       file1 file2)))
+			      (princ "
+\nPlease enter an alternative patch target ...\n"))
 			    (let ((directory t)
 				  target)
 			      (while directory
@@ -392,12 +404,21 @@
 		   (ediff-use-last-dir ediff-last-dir-patch)
 		   (t default-directory)))
 	patch-buf)
-    (if (y-or-n-p "Is the patch already in a buffer? ")
+    (if (let ((last-nonmenu-event t) ; Emacs: don't use dialog box
+	      last-command-event)    ; XEmacs: don't use dialog box
+	  (y-or-n-p "Is the patch already in a buffer? "))
 	(setq patch-buf
 	      (get-buffer
 	       (read-buffer
 		"Which buffer contains the patch? "
-		(current-buffer) 'must-match)))
+		(ediff-other-buffer
+		 (if (eq (next-window (selected-window)) (selected-window))
+		     ;; only one window in frame --- don't skip current buff
+		     ""
+		   ;; >1 window --- skip current buff, assuming this is the one
+		   ;; to patch, not the one that has the patch
+		   (current-buffer)))
+		'must-match)))
       (setq patch-buf
 	    (find-file-noselect
 	     (read-file-name "Which file contains the patch? "
@@ -433,56 +454,71 @@
     ))
 
 
-(defun ediff-patch-buffer-internal (patch-buf buf-to-patch-name
-					      &optional startup-hooks)
+;; When patching a buffer, never change the orig file. Instead, create a new
+;; buffer, ***_patched, even if the buff visits a file.
+;; Users who want to actually patch the buffer should use
+;; ediff-patch-file, not ediff-patch-buffer.
+(defun ediff-patch-buffer-internal (patch-buf
+				    buf-to-patch-name
+				    &optional startup-hooks)
   (let* ((buf-to-patch (get-buffer buf-to-patch-name))
-	 (file-name-ok (if buf-to-patch (buffer-file-name  buf-to-patch)))
+	 (visited-file (if buf-to-patch (buffer-file-name  buf-to-patch)))
 	 (buf-mod-status (buffer-modified-p buf-to-patch))
 	 (multifile-patch-p (> (length (ediff-with-current-buffer patch-buf
 					 ediff-patch-map)) 1))
 	 default-dir file-name ctl-buf)
-    (if file-name-ok
-	(setq file-name file-name-ok)
-      (if multifile-patch-p
-	  (error
-	   "Can't apply multi-file patches to buffers that visit no files"))
-      (ediff-with-current-buffer buf-to-patch
-	(setq default-dir default-directory)
-	(setq file-name (ediff-make-temp-file buf-to-patch))
-	(set-visited-file-name file-name)
-	(setq buffer-auto-save-file-name nil) ; don't create auto-save file
-	;;don't confuse the user with a new bufname
-	(rename-buffer buf-to-patch-name)
-	(set-buffer-modified-p nil)
-	(set-visited-file-modtime) ; sync buffer and temp file
-	(setq default-directory default-dir)
-	))
-    
+    (if multifile-patch-p
+	(error
+	 "Can't apply multi-file patches to buffers that visit no files"))
+
+    ;; create a temp file to patch
+    (ediff-with-current-buffer buf-to-patch
+      (setq default-dir default-directory)
+      (setq file-name (ediff-make-temp-file buf-to-patch))
+      ;; temporarily switch visited file name, if any
+      (set-visited-file-name file-name)
+      ;; don't create auto-save file, if buff was visiting a file
+      (or visited-file
+	  (setq buffer-auto-save-file-name nil))
+      ;; don't confuse the user with a new bufname
+      (rename-buffer buf-to-patch-name)
+      (set-buffer-modified-p nil)
+      (set-visited-file-modtime) ; sync buffer and temp file
+      (setq default-directory default-dir)
+      )
+  
     ;; dispatch a patch function
     (setq ctl-buf (ediff-dispatch-file-patching-job
 		   patch-buf file-name startup-hooks))
     
-    (if file-name-ok
-	()
-      ;; buffer wasn't visiting any file,
-      ;; so we will not run meta-level ediff here
-      (ediff-with-current-buffer ctl-buf
-	(delete-file (buffer-file-name ediff-buffer-A))
-	(delete-file (buffer-file-name ediff-buffer-B))
-	(ediff-with-current-buffer ediff-buffer-A
-	  (if default-dir (setq default-directory default-dir))
-	  (set-visited-file-name nil)
-	  (rename-buffer buf-to-patch-name)
-	  (set-buffer-modified-p buf-mod-status))
-	(ediff-with-current-buffer ediff-buffer-B
-	  (setq buffer-auto-save-file-name nil) ; don't create auto-save file
-	  (if default-dir (setq default-directory default-dir))
-	  (set-visited-file-name nil)
-	  (rename-buffer (ediff-unique-buffer-name 
-			  (concat buf-to-patch-name "_patched") ""))
-	  (set-buffer-modified-p t))))
+    (ediff-with-current-buffer ctl-buf
+      (delete-file (buffer-file-name ediff-buffer-A))
+      (delete-file (buffer-file-name ediff-buffer-B))
+      (ediff-with-current-buffer ediff-buffer-A
+	(if default-dir (setq default-directory default-dir))
+	(set-visited-file-name visited-file) ; visited-file might be nil
+	(rename-buffer buf-to-patch-name)
+	(set-buffer-modified-p buf-mod-status))
+      (ediff-with-current-buffer ediff-buffer-B
+	(setq buffer-auto-save-file-name nil) ; don't create auto-save file
+	(if default-dir (setq default-directory default-dir))
+	(set-visited-file-name nil)
+	(rename-buffer (ediff-unique-buffer-name 
+			(concat buf-to-patch-name "_patched") ""))
+	(set-buffer-modified-p t)))
     ))
 
+
+;; Traditional patch has weird return codes.
+;; GNU and Posix return 1 if some hanks failed and 2 in case of trouble.
+;; 0 is a good code in all cases.
+;; We'll do the concervative thing.
+(defun ediff-patch-return-code-ok (code)
+  (eq code 0))
+;;;  (if (eq (ediff-test-patch-utility) 'traditional)
+;;;      (eq code 0)
+;;;    (not (eq code 2))))
+
 (defun ediff-patch-file-internal (patch-buf source-filename
 					    &optional startup-hooks)
   (setq source-filename (expand-file-name source-filename))
@@ -498,7 +534,7 @@
 	 target-buf buf-to-patch file-name-magic-p 
 	 patch-return-code ctl-buf backup-style aux-wind)
 	  
-    (if (string-match "-V" ediff-patch-options)
+    (if (string-match "V" ediff-patch-options)
 	(error
 	 "Ediff doesn't take the -V option in `ediff-patch-options'--sorry"))
 					
@@ -550,26 +586,29 @@
     (switch-to-buffer patch-diagnostics)
     (sit-for 0) ; synchronize - let the user see diagnostics
     
-    (or (and (eq patch-return-code 0) ; patch reported success
+    (or (and (ediff-patch-return-code-ok patch-return-code)
 	     (file-exists-p
 	      (concat true-source-filename ediff-backup-extension)))
 	(progn
 	  (with-output-to-temp-buffer ediff-msg-buffer
 	    (princ (format 
-		    "Patch program has failed due to a bad patch file OR
-because it couldn't create the backup for the file to be patched.
+		    "Patch program has failed due to a bad patch file,
+it couldn't apply all hunks, OR
+it couldn't create the backup for the file being patched.
 
 The former could be caused by a corrupt patch file or because the %S
 program doesn't understand the format of the patch file in use.
 
 The second problem might be due to an incompatibility among these settings:
-    ediff-patch-program    = %S
-    ediff-patch-options    = %S
-    ediff-backup-extension = %S
-    ediff-backup-specs     = %S
+    ediff-patch-program    = %S             ediff-patch-options    = %S
+    ediff-backup-extension = %S             ediff-backup-specs     = %S
 
 See Ediff on-line manual for more details on these variables.
-In particular, check the documentation for `ediff-backup-specs'. "
+In particular, check the documentation for `ediff-backup-specs'. 
+
+In any of the above cases, Ediff doesn't compare files automatically.
+However, if the patch was applied partially and the backup file was created,
+you can still examine the changes via M-x ediff-files"
 			   ediff-patch-program
 			   ediff-patch-program
 			   ediff-patch-options
--- a/lisp/ediff/ediff-util.el	Mon Aug 13 09:55:30 2007 +0200
+++ b/lisp/ediff/ediff-util.el	Mon Aug 13 09:56:28 2007 +0200
@@ -688,10 +688,6 @@
 Reestablish the default three-window display."
   (interactive)
   (ediff-barf-if-not-control-buffer)
-  
-;;  ;; No longer needed: XEmacs has surrogate minibuffers now.
-;;  (if ediff-xemacs-p (setq synchronize-minibuffers t))
-  
   (let (buffer-read-only)
     (if (and (ediff-buffer-live-p ediff-buffer-A)
 	     (ediff-buffer-live-p ediff-buffer-B)
@@ -2359,10 +2355,7 @@
 
   ;; warp mouse into a working window
   (setq warp-frame  ; if mouse is over a reasonable frame, use it
-	(cond ((and ediff-xemacs-p (window-live-p (car (mouse-position))))
-	       (window-frame (car (mouse-position))))
-	      ((frame-live-p (car (mouse-position)))
-	       (car (mouse-position)))
+	(cond ((ediff-good-frame-under-mouse))
 	      (t warp-frame)))
   (if (frame-live-p warp-frame)
       (set-mouse-position (if ediff-emacs-p
@@ -2373,6 +2366,24 @@
   (if (ediff-buffer-live-p meta-buffer)
       (ediff-show-meta-buffer meta-buffer))
   ))
+
+;; Returns frame under mouse, if this frame is not a minibuffer
+;; frame. Otherwise: nil
+(defun ediff-good-frame-under-mouse ()
+  (let ((frame-or-win (car (mouse-position)))
+	(buf-name "")
+	frame obj-ok)
+    (setq obj-ok
+	  (if ediff-emacs-p
+	      (frame-live-p frame-or-win)
+	    (window-live-p frame-or-win)))
+    (if obj-ok
+	(setq frame (if ediff-emacs-p frame-or-win (window-frame frame-or-win))
+	      buf-name
+	      (buffer-name (window-buffer (frame-selected-window frame)))))
+    (if (string-match "Minibuf" buf-name)
+	nil
+      frame)))
   
   
 (defun ediff-delete-temp-files ()
@@ -2919,6 +2930,15 @@
       (error "Buffer out of sync for file %s" buffer-file-name))))
 
 
+(defun ediff-file-compressed-p (file)
+  (require 'jka-compr)
+  (string-match (jka-compr-build-file-regexp) file))
+
+(defun ediff-filename-magic-p (file)
+  (or (ediff-file-compressed-p file)
+      (ediff-file-remote-p file)))
+
+
 (defun ediff-save-buffer (arg)
   "Safe way of saving buffers A, B, C, and the diff output.
 `wa' saves buffer A, `wb' saves buffer B, `wc' saves buffer C,
@@ -3315,17 +3335,23 @@
 ;; other insignificant buffers (those beginning with "^[ *]").
 ;; Gets one arg--buffer name or a list of buffer names (it won't return
 ;; these buffers).
-(defun ediff-other-buffer (buff)
-  (if (not (listp buff)) (setq buff (list buff)))
+(defun ediff-other-buffer (buff-lst)
+  (or (listp buff-lst) (setq buff-lst (list buff-lst)))
   (let* ((frame-buffers (buffer-list))
+	 (buff-name-list 
+	  (mapcar 
+	   (function (lambda (b)
+		       (cond ((stringp b) b)
+			     ((bufferp b) (buffer-name b)))))
+	   buff-lst))
 	 (significant-buffers
 	  (mapcar
 	   (function (lambda (x)
-		       (cond ((member (buffer-name x) buff)
-			      nil)
-			     ((not (ediff-get-visible-buffer-window x))
-			      nil)
-			     ((string-match "^ " (buffer-name x))
+		       (cond ((member (buffer-name x) buff-name-list) nil)
+			     ((not (ediff-get-visible-buffer-window x)) nil)
+			     ((string-match "^[ *]" (buffer-name x)) nil)
+			     ((memq (ediff-with-current-buffer x major-mode)
+				    '(dired-mode))
 			      nil)
 			     (t x))))
 	   frame-buffers))
@@ -3339,8 +3365,12 @@
 		       (mapcar
 			(function
 			 (lambda (x)
-			   (cond ((member (buffer-name x) buff) nil)
+			   (cond ((member (buffer-name x) buff-name-list) nil)
 				 ((string-match "^[ *]" (buffer-name x)) nil)
+				 ((memq
+				   (ediff-with-current-buffer x major-mode)
+				   '(dired-mode))
+				  nil)
 				 (t x))))
 			frame-buffers)))
 	   (car less-significant-buffers))
--- a/lisp/ediff/ediff.el	Mon Aug 13 09:55:30 2007 +0200
+++ b/lisp/ediff/ediff.el	Mon Aug 13 09:56:28 2007 +0200
@@ -7,7 +7,7 @@
 ;; Keywords: comparing, merging, patching, version control.
 
 (defconst ediff-version "2.67" "The current version of Ediff")
-(defconst ediff-date "August 7, 1997" "Date of last update")  
+(defconst ediff-date "September 3, 1997" "Date of last update")  
 
 
 ;; This file is part of GNU Emacs.
@@ -275,7 +275,7 @@
 ;; deleted.
 (defun ediff-find-file (file-var buffer-name &optional last-dir hooks-var)
   (let* ((file (symbol-value file-var))
-	 (file-magic (find-file-name-handler file 'find-file-noselect))
+	 (file-magic (ediff-filename-magic-p file))
 	 (temp-file-name-prefix (file-name-nondirectory file)))
     (cond ((not (file-readable-p file))
 	   (error "File `%s' does not exist or is not readable" file))
@@ -1182,7 +1182,8 @@
 			   (t default-directory)))
     (setq source-file
 	  ;; the default is the directory, not the visited file name
-	  (ediff-read-file-name "Which file to patch? " source-dir source-dir))
+	  (ediff-read-file-name 
+	   "Which file to patch? " source-dir (ediff-get-default-file-name)))
     (ediff-dispatch-file-patching-job patch-buf source-file)))
 
 ;;;###autoload
@@ -1196,7 +1197,7 @@
      patch-buf
      (read-buffer "Which buffer to patch? "
 		  (cond ((eq patch-buf (current-buffer))
-			 (window-buffer (other-window 1)))
+			 (ediff-other-buffer (current-buffer)))
 			(t (current-buffer)))
 		  'must-match))))
   
--- a/lisp/efs/dired.el	Mon Aug 13 09:55:30 2007 +0200
+++ b/lisp/efs/dired.el	Mon Aug 13 09:56:28 2007 +0200
@@ -2207,7 +2207,7 @@
 (defun dired-next-line (arg)
   "Move down lines then position at filename.
 Optional prefix ARG says how many lines to move; default is one line."
-  (interactive "p")
+  (interactive "_p")
   (condition-case err
       (next-line arg)
     (error
@@ -2220,7 +2220,7 @@
 (defun dired-previous-line (arg)
   "Move up lines then position at filename.
 Optional prefix ARG says how many lines to move; default is one line."
-  (interactive "p")
+  (interactive "_p")
   (previous-line arg)
   (dired-move-to-filename)
   (dired-update-mode-line))
@@ -2229,7 +2229,7 @@
   "Dired version of scroll up.
 Scroll text of current window upward ARG lines; or near full screen if no ARG.
 When calling from a program, supply a number as argument or nil."
-  (interactive "P")
+  (interactive "_P")
   (scroll-up arg)
   (dired-move-to-filename)
   (dired-update-mode-line))
@@ -2238,20 +2238,20 @@
   "Dired version of scroll-down.
 Scroll text of current window down ARG lines; or near full screen if no ARG.
 When calling from a program, supply a number as argument or nil."
-  (interactive "P")
+  (interactive "_P")
   (scroll-down arg)
   (dired-move-to-filename)
   (dired-update-mode-line))
 
 (defun dired-beginning-of-buffer (arg)
   "Dired version of `beginning of buffer'."
-  (interactive "P")
+  (interactive "_P")
   (beginning-of-buffer arg)
   (dired-update-mode-line))
 
 (defun dired-end-of-buffer (arg)
   "Dired version of `end-of-buffer'."
-  (interactive "P")
+  (interactive "_P")
   (end-of-buffer arg)
   (while (not (or (dired-move-to-filename) (dired-get-subdir) (bobp)))
     (forward-line -1))
@@ -2259,7 +2259,7 @@
 
 (defun dired-next-dirline (arg &optional opoint)
   "Goto ARG'th next directory file line."
-  (interactive "p")
+  (interactive "_p")
   (if dired-re-dir
       (progn
 	(dired-check-ls-l)
@@ -2276,12 +2276,12 @@
 
 (defun dired-prev-dirline (arg)
   "Goto ARG'th previous directory file line."
-  (interactive "p")
+  (interactive "_p")
   (dired-next-dirline (- arg)))
 
 (defun dired-next-marked-file (arg &optional wrap opoint)
   "Move to the next marked file, wrapping around the end of the buffer."
-  (interactive "p\np")
+  (interactive "_p\np")
   (or opoint (setq opoint (point))) ; return to where interactively started
   (if (if (> arg 0)
 	  (re-search-forward dired-re-mark nil t arg)
@@ -2299,7 +2299,7 @@
 
 (defun dired-prev-marked-file (arg &optional wrap)
   "Move to the previous marked file, wrapping around the end of the buffer."
-  (interactive "p\np")
+  (interactive "_p\np")
   (dired-next-marked-file (- arg) wrap)
   (dired-update-mode-line))
 
--- a/lisp/games/auto-autoloads.el	Mon Aug 13 09:55:30 2007 +0200
+++ b/lisp/games/auto-autoloads.el	Mon Aug 13 09:56:28 2007 +0200
@@ -261,6 +261,29 @@
 
 ;;;***
 
+;;;### (autoloads (tetris) "tetris" "games/tetris.el")
+
+(autoload 'tetris "tetris" "\
+Tetris
+
+Shapes drop from the top of the screen, and the user has to move and
+rotate the shape to fit in with those at the bottom of the screen so
+as to form complete rows.
+
+tetris-mode keybindings:
+   \\<tetris-mode-map>
+\\[tetris-start-game]	Starts a new game of Tetris
+\\[tetris-end-game]	Terminates the current game
+\\[tetris-move-left]	Moves the shape one square to the left
+\\[tetris-move-right]	Moves the shape one square to the right
+\\[tetris-rotate-prev]	Rotates the shape clockwise
+\\[tetris-rotate-next]	Rotates the shape anticlockwise
+\\[tetris-move-bottom]	Drops the shape to the bottom of the playing area
+
+" t nil)
+
+;;;***
+
 ;;;### (autoloads (xmine-mode) "xmine" "games/xmine.el")
 
 (autoload 'xmine-mode "xmine" "\
--- a/lisp/games/tetris.el	Mon Aug 13 09:55:30 2007 +0200
+++ b/lisp/games/tetris.el	Mon Aug 13 09:56:28 2007 +0200
@@ -3,7 +3,7 @@
 ;; Copyright (C) 1997 Glynn Clements <glynn@sensei.co.uk>
 
 ;; Author: Glynn Clements <glynn@sensei.co.uk>
-;; Version: 1.7
+;; Version: 1.8
 ;; Created: 1997-08-13
 ;; Keywords: games
 
@@ -42,6 +42,9 @@
 ;;	added color support for non-glyph mode
 ;;	added tetris-mode-hook
 ;;	added tetris-update-speed-function
+;; Modified: 1997-09-09, changed layout to work in a 22 line window
+;; Modified: 1997-09-12
+;;	fixed tetris-shift-down to deal with multiple rows correctly
 ;; URL: ftp://sensei.co.uk/misc/tetris.el.gz
 ;; Tested with XEmacs 20.3-beta and Emacs 19.34
 ;; Reported to work with XEmacs 19.15 and 20.2
@@ -95,10 +98,10 @@
 (defconst tetris-border-char [?\+]
   "Character vector for a border square in text mode")
 
-(defconst tetris-buffer-width 25
+(defconst tetris-buffer-width 30
   "Width of used portion of buffer")
 
-(defconst tetris-buffer-height 25
+(defconst tetris-buffer-height 22
   "Height of used portion of buffer")
 
 (defconst tetris-width 10
@@ -119,10 +122,10 @@
 (defconst tetris-next-y tetris-top-left-y
   "Y position of next shape")
 
-(defconst tetris-score-x tetris-top-left-x
+(defconst tetris-score-x tetris-next-x
   "X position of score")
 
-(defconst tetris-score-y (+ tetris-top-left-y tetris-height 2)
+(defconst tetris-score-y (+ tetris-next-y 6)
   "Y position of score")
 
 (defconst tetris-blank 0)
@@ -612,7 +615,7 @@
 	   c))))
 
 (defun tetris-shift-down ()
-  (loop for y0 from (1- tetris-height) downto 0 do
+  (loop for y0 from 0 to (1- tetris-height) do
 	(if (tetris-full-row y0)
 	    (progn
 	      (setq tetris-n-rows (1+ tetris-n-rows))
@@ -629,6 +632,7 @@
     (setq tetris-buffer-start (point))
     (dotimes (i tetris-buffer-height)
       (insert-string line))
+    (goto-char (point-min))
     (if (tetris-draw-border-p)
       (loop for y from -1 to tetris-height do
 	    (loop for x from -1 to tetris-width do
@@ -792,6 +796,7 @@
 
   (run-hooks 'tetris-mode-hook))
 
+;;;###autoload
 (defun tetris ()
   "Tetris
 
--- a/lisp/modes/strokes.el	Mon Aug 13 09:55:30 2007 +0200
+++ b/lisp/modes/strokes.el	Mon Aug 13 09:56:28 2007 +0200
@@ -1,5 +1,5 @@
 ;;; strokes.el	-- Control XEmacs through mouse strokes --
-;;  Mon Jul 25 12:40:41 EDT 1997
+;;  Thursday September 4 12:40:41 EDT 1997
 
 ;; Copyright (C) 1997 Free Software Foundation, Inc.
 
@@ -30,10 +30,10 @@
 
 ;;; Commentary:
 
-;; This package is written for for XEmacs v19.15 and up.  This is the
-;; strokes package.  It is intended to allow the user to control
-;; XEmacs by means of mouse strokes.  Once strokes is loaded, you can
-;; always get help be invoking `strokes-help':
+;; This package is written for for XEmacs v20.*.  This is the strokes
+;; package.  It is intended to allow the user to control XEmacs by
+;; means of mouse strokes.  Once strokes is loaded, you can always get
+;; help be invoking `strokes-help':
 
 ;; > M-x strokes-help
 
@@ -326,6 +326,11 @@
 ;;      took place n times.  So to deal, I put in some extra checks to
 ;;      see if the frame parameters really changed, making an update
 ;;      worthwhile.  See `strokes-update-window-configuration-plist'.
+;; 2.4  For XEmacs 20.*, all hashtables were changed to char-tables,
+;;      since this is more modern, more efficient, and faster.  God only 
+;;      knows how inefficient the hash function was before the advent of 
+;;      char-tables.  I also did this out of necessity since MIT's
+;;      version of XEmacs-20.2 was hashtable-buggy.  
 
 ;;; Code:
 
@@ -979,66 +984,6 @@
       (setq grid-locs (strokes-renormalize-to-grid (nreverse pix-locs)))
       (strokes-fill-stroke (strokes-eliminate-consecutive-redundancies grid-locs)))))
 
-;;; This version of `strokes-read-stroke' is not broken, but pathetic.
-;;(defun strokes-read-stroke (&optional prompt event)
-;;  "Read a simple stroke (interactively) and return the stroke.
-;;Optional PROMPT in minibuffer displays before and during stroke reading.
-;;This function will display the stroke interactively as it is being
-;;entered in the strokes buffer if the variable
-;;`strokes-use-strokes-buffer' is non-nil.
-;;Optional EVENT is currently not used, but hopefully will be soon."
-;;  (save-excursion
-;;    (strokes-while-inhibiting-garbage-collector
-;;     (let ((pix-locs nil)
-;;	  (grid-locs nil)
-;;	  (event (or event (make-event))))
-;;      (if strokes-use-strokes-buffer
-;;	  ;; switch to the strokes buffer and
-;;	  ;; display the stroke as it's being read
-;;	  (save-window-excursion
-;;	    (set-window-configuration strokes-window-configuration)
-;;	    (if prompt
-;;		(progn
-;;		  (setq event (next-event event prompt))
-;;		  (while (not (button-press-event-p event))
-;;		    (dispatch-event event)
-;;		    (setq event (next-event event)))))
-;;	    (unwind-protect
-;;		(progn
-;;		  (setq event (next-event event))
-;;		  (while (not (button-release-event-p event))
-;;		    (if (mouse-event-p event)
-;;			(let ((point (event-closest-point event)))
-;;			  (when point
-;;			    (goto-char point)
-;;			    (subst-char-in-region point (1+ point) ?\  strokes-character))
-;;			  (push (cons (event-x-pixel event)
-;;				      (event-y-pixel event))
-;;				pix-locs)))
-;;		    (setq event (next-event event))))
-;;	      ;; protected
-;;	      ;; clean up strokes buffer and then bury it.
-;;	      (when (equal (buffer-name) strokes-buffer-name)
-;;		(subst-char-in-region (point-min) (point-max) strokes-character ?\ )
-;;		(goto-char (point-min))
-;;		(bury-buffer))))
-;;	;; Otherwise, don't use strokes buffer and read stroke silently
-;;	(if prompt
-;;	    (progn
-;;	      (setq event (next-event event prompt))
-;;	      (while (not (button-press-event-p event))
-;;		(dispatch-event event)
-;;		(setq event (next-event event)))))
-;;	(setq event (next-event))
-;;	(while (not (button-release-event-p event))
-;;	  (if (mouse-event-p event)
-;;	      (push (cons (event-x-pixel event)
-;;			  (event-y-pixel event))
-;;		    pix-locs))
-;;	  (setq event (next-event event))))
-;;      (setq grid-locs (strokes-renormalize-to-grid (nreverse pix-locs)))
-;;      (strokes-fill-stroke (strokes-eliminate-consecutive-redundancies grid-locs))))))
-
 (defun strokes-read-complex-stroke (&optional prompt event)
   "Read a complex stroke (interactively) and return the stroke.
 Optional PROMPT in minibuffer displays before and during stroke reading.
@@ -1799,76 +1744,70 @@
 					; lazy right now.
 					; In a few days.
 
-(defconst strokes-char-value-hashtable (make-hashtable 62) ;
-					; (make-char-table
-					; 'syntax)
-					; in 20.*
-  ;; ### This will/should become a char-table for XEmacs-20 !!! ###
+(defconst strokes-char-table (make-char-table 'generic) ;
   "The table which stores values for the character keys.")
-(puthash ?0 0 strokes-char-value-hashtable) ; (put-char-table ?0 0
-					; strokes-value-chartable)
-					; in 20.*
-(puthash ?1 1 strokes-char-value-hashtable)
-(puthash ?2 2 strokes-char-value-hashtable)
-(puthash ?3 3 strokes-char-value-hashtable)
-(puthash ?4 4 strokes-char-value-hashtable)
-(puthash ?5 5 strokes-char-value-hashtable)
-(puthash ?6 6 strokes-char-value-hashtable)
-(puthash ?7 7 strokes-char-value-hashtable)
-(puthash ?8 8 strokes-char-value-hashtable)
-(puthash ?9 9 strokes-char-value-hashtable)
-(puthash ?a 10 strokes-char-value-hashtable)
-(puthash ?b 11 strokes-char-value-hashtable)
-(puthash ?c 12 strokes-char-value-hashtable)
-(puthash ?d 13 strokes-char-value-hashtable)
-(puthash ?e 14 strokes-char-value-hashtable)
-(puthash ?f 15 strokes-char-value-hashtable)
-(puthash ?g 16 strokes-char-value-hashtable)
-(puthash ?h 17 strokes-char-value-hashtable)
-(puthash ?i 18 strokes-char-value-hashtable)
-(puthash ?j 19 strokes-char-value-hashtable)
-(puthash ?k 20 strokes-char-value-hashtable)
-(puthash ?l 21 strokes-char-value-hashtable)
-(puthash ?m 22 strokes-char-value-hashtable)
-(puthash ?n 23 strokes-char-value-hashtable)
-(puthash ?o 24 strokes-char-value-hashtable)
-(puthash ?p 25 strokes-char-value-hashtable)
-(puthash ?q 26 strokes-char-value-hashtable)
-(puthash ?r 27 strokes-char-value-hashtable)
-(puthash ?s 28 strokes-char-value-hashtable)
-(puthash ?t 29 strokes-char-value-hashtable)
-(puthash ?u 30 strokes-char-value-hashtable)
-(puthash ?v 31 strokes-char-value-hashtable)
-(puthash ?w 32 strokes-char-value-hashtable)
-(puthash ?x 33 strokes-char-value-hashtable)
-(puthash ?y 34 strokes-char-value-hashtable)
-(puthash ?z 35 strokes-char-value-hashtable)
-(puthash ?A 36 strokes-char-value-hashtable)
-(puthash ?B 37 strokes-char-value-hashtable)
-(puthash ?C 38 strokes-char-value-hashtable)
-(puthash ?D 39 strokes-char-value-hashtable)
-(puthash ?E 40 strokes-char-value-hashtable)
-(puthash ?F 41 strokes-char-value-hashtable)
-(puthash ?G 42 strokes-char-value-hashtable)
-(puthash ?H 43 strokes-char-value-hashtable)
-(puthash ?I 44 strokes-char-value-hashtable)
-(puthash ?J 45 strokes-char-value-hashtable)
-(puthash ?K 46 strokes-char-value-hashtable)
-(puthash ?L 47 strokes-char-value-hashtable)
-(puthash ?M 48 strokes-char-value-hashtable)
-(puthash ?N 49 strokes-char-value-hashtable)
-(puthash ?O 50 strokes-char-value-hashtable)
-(puthash ?P 51 strokes-char-value-hashtable)
-(puthash ?Q 52 strokes-char-value-hashtable)
-(puthash ?R 53 strokes-char-value-hashtable)
-(puthash ?S 54 strokes-char-value-hashtable)
-(puthash ?T 55 strokes-char-value-hashtable)
-(puthash ?U 56 strokes-char-value-hashtable)
-(puthash ?V 57 strokes-char-value-hashtable)
-(puthash ?W 58 strokes-char-value-hashtable)
-(puthash ?X 59 strokes-char-value-hashtable)
-(puthash ?Y 60 strokes-char-value-hashtable)
-(puthash ?Z 61 strokes-char-value-hashtable)
+(put-char-table ?0 0 strokes-char-table)
+(put-char-table ?1 1 strokes-char-table)
+(put-char-table ?2 2 strokes-char-table)
+(put-char-table ?3 3 strokes-char-table)
+(put-char-table ?4 4 strokes-char-table)
+(put-char-table ?5 5 strokes-char-table)
+(put-char-table ?6 6 strokes-char-table)
+(put-char-table ?7 7 strokes-char-table)
+(put-char-table ?8 8 strokes-char-table)
+(put-char-table ?9 9 strokes-char-table)
+(put-char-table ?a 10 strokes-char-table)
+(put-char-table ?b 11 strokes-char-table)
+(put-char-table ?c 12 strokes-char-table)
+(put-char-table ?d 13 strokes-char-table)
+(put-char-table ?e 14 strokes-char-table)
+(put-char-table ?f 15 strokes-char-table)
+(put-char-table ?g 16 strokes-char-table)
+(put-char-table ?h 17 strokes-char-table)
+(put-char-table ?i 18 strokes-char-table)
+(put-char-table ?j 19 strokes-char-table)
+(put-char-table ?k 20 strokes-char-table)
+(put-char-table ?l 21 strokes-char-table)
+(put-char-table ?m 22 strokes-char-table)
+(put-char-table ?n 23 strokes-char-table)
+(put-char-table ?o 24 strokes-char-table)
+(put-char-table ?p 25 strokes-char-table)
+(put-char-table ?q 26 strokes-char-table)
+(put-char-table ?r 27 strokes-char-table)
+(put-char-table ?s 28 strokes-char-table)
+(put-char-table ?t 29 strokes-char-table)
+(put-char-table ?u 30 strokes-char-table)
+(put-char-table ?v 31 strokes-char-table)
+(put-char-table ?w 32 strokes-char-table)
+(put-char-table ?x 33 strokes-char-table)
+(put-char-table ?y 34 strokes-char-table)
+(put-char-table ?z 35 strokes-char-table)
+(put-char-table ?A 36 strokes-char-table)
+(put-char-table ?B 37 strokes-char-table)
+(put-char-table ?C 38 strokes-char-table)
+(put-char-table ?D 39 strokes-char-table)
+(put-char-table ?E 40 strokes-char-table)
+(put-char-table ?F 41 strokes-char-table)
+(put-char-table ?G 42 strokes-char-table)
+(put-char-table ?H 43 strokes-char-table)
+(put-char-table ?I 44 strokes-char-table)
+(put-char-table ?J 45 strokes-char-table)
+(put-char-table ?K 46 strokes-char-table)
+(put-char-table ?L 47 strokes-char-table)
+(put-char-table ?M 48 strokes-char-table)
+(put-char-table ?N 49 strokes-char-table)
+(put-char-table ?O 50 strokes-char-table)
+(put-char-table ?P 51 strokes-char-table)
+(put-char-table ?Q 52 strokes-char-table)
+(put-char-table ?R 53 strokes-char-table)
+(put-char-table ?S 54 strokes-char-table)
+(put-char-table ?T 55 strokes-char-table)
+(put-char-table ?U 56 strokes-char-table)
+(put-char-table ?V 57 strokes-char-table)
+(put-char-table ?W 58 strokes-char-table)
+(put-char-table ?X 59 strokes-char-table)
+(put-char-table ?Y 60 strokes-char-table)
+(put-char-table ?Z 61 strokes-char-table)
 
 (defconst strokes-base64-chars
   ;; I can easily have made this a vector of single-character strings,
@@ -1890,15 +1829,13 @@
   "Character vector for fast lookup of base-64 encoding of numbers in [0,61].")
 
 (defsubst strokes-xpm-char-on-p (char)
-  ;; ### CAUTION: `char-equal' may need to change to `char=' ###
   "Non-nil if CHAR represents an `on' bit in the xpm."
-  (char-equal char ?*))
+  (char= char ?*))
 
 (defsubst strokes-xpm-char-bit-p (char)
   "Non-nil if CHAR represents an `on' or `off' bit in the xpm."
-  ;; ### CAUTION: `char-equal' may need to change to `char=' ###
-  (or (char-equal char ?\ )
-      (char-equal char ?*)))
+  (or (char= char ?\ )
+      (char= char ?*)))
 
 ;;(defsubst strokes-xor (a b)  ### Should I make this an inline function? ###
 ;;  "T iff one and only one of A and B is non-nil; otherwise, returns nil.
@@ -1912,11 +1849,7 @@
 		   
 (defsubst strokes-xpm-decode-char (character)
   "Given a CHARACTER, do a fast lookup to find its corresponding integer value."
-  ;; ### NOTE: for XEmacs-20.* this will need to be changed to deal w/
-  ;; char-tables !!! ###
-  (gethash character strokes-char-value-hashtable)) ; (get-char-table
-					; character
-					; strokes-value-chartable)
+  (get-char-table character strokes-char-table))
 		   
 (defun strokes-xpm-to-compressed-string (&optional xpm-buffer)
   "Convert the xpm in XPM-BUFFER into a compressed string representing the stroke.
@@ -1936,7 +1869,7 @@
 					; represented `on' bits
 	  (current-char-is-on-p nil)	; current stream represents `on' bits
 	  (char-at-point (char-after)))	; read the first char
-      (while (not (char-equal char-at-point ?})) ; a `}' denotes the
+      (while (not (char= char-at-point ?})) ; a `}' denotes the
 					; end of the pixmap
 	(cond ((zerop count)		; must restart counting
 	       ;; check to see if the `char-at-point' is an actual pixmap bit
--- a/lisp/mule/mule-cmds.el	Mon Aug 13 09:55:30 2007 +0200
+++ b/lisp/mule/mule-cmds.el	Mon Aug 13 09:56:28 2007 +0200
@@ -1,4 +1,4 @@
-;;; mule-cmds.el --- Commands for mulitilingual environment
+;;; mule-cmds.el --- Commands for multilingual environment
 
 ;; Copyright (C) 1995 Free Software Foundation, Inc.
 ;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN.
--- a/lisp/mule/mule-util.el	Mon Aug 13 09:55:30 2007 +0200
+++ b/lisp/mule/mule-util.el	Mon Aug 13 09:56:28 2007 +0200
@@ -1,4 +1,4 @@
-;;; mule-util.el --- Utility functions for mulitilingual environment (mule)
+;;; mule-util.el --- Utility functions for multilingual environment (mule)
 
 ;; Copyright (C) 1995 Free Software Foundation, Inc.
 ;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN.
@@ -28,88 +28,12 @@
 ;;; String manipulations while paying attention to multibyte
 ;;; characters.
 
-;; [Was defsubst]
-;;;###autoload
-(defun string-to-sequence (string type)
-  "Convert STRING to a sequence of TYPE which contains characters in STRING.
-TYPE should be `list' or `vector'.
-Multibyte characters are concerned."
-  (map type (function identity) string))
-
-;; [Was defsubst]
-;;;###autoload
-(defun string-to-list (string)
-  "Return a list of characters in STRING."
-  (mapcar (function identity) string))
-
-;; [Was defsubst]
-;;;###autoload
-(defun string-to-vector (string)
-  "Return a vector of characters in STRING."
-  (string-to-sequence string 'vector))
-
-;;;###autoload
-(defun store-substring (string idx obj)
-  "Embed OBJ (string or character) at index IDX of STRING."
-  (let* ((str (cond ((stringp obj) obj)
-		    ((characterp obj) (char-to-string obj))
-		    (t (error
-			"Invalid argument (should be string or character): %s"
-			obj))))
-	 (string-len (length string))
-	 (len (length str))
-	 (i 0))
-    (while (and (< i len) (< idx string-len))
-      (aset string idx (aref str i))
-      (setq idx (1+ idx) i (1+ i)))
-    string))
+;; That code is pointless in XEmacs/Mule, since our multibyte
+;; representation doesn't leak to Lisp.
 
-;;;###autoload
-(defun truncate-string-to-width (str width &optional start-column padding)
-  "Truncate string STR to fit in WIDTH columns.
-Optional 1st arg START-COLUMN if non-nil specifies the starting column.
-Optional 2nd arg PADDING if non-nil is a padding character to be padded at
-the head and tail of the resulting string to fit in WIDTH if necessary.
-If PADDING is nil, the resulting string may be narrower than WIDTH."
-  (or start-column
-      (setq start-column 0))
-  (let ((len (length str))
-	(idx 0)
-	(column 0)
-	(head-padding "") (tail-padding "")
-	ch last-column last-idx from-idx)
-    (condition-case nil
-	(while (< column start-column)
-	  (setq ch (sref str idx)
-		column (+ column (char-width ch))
-		idx (+ idx (char-bytes ch))))
-      (args-out-of-range (setq idx len)))
-    (if (< column start-column)
-	(if padding (make-string width padding) "")
-      (if (and padding (> column start-column))
-	  (setq head-padding (make-string (- column start-column) ?\ )))
-      (setq from-idx idx)
-      (condition-case nil
-	  (while (< column width)
-	    (setq last-column column
-		  last-idx idx
-		  ch (sref str idx)
-		  column (+ column (char-width ch))
-		  idx (+ idx (char-bytes ch))))
-	(args-out-of-range (setq idx len)))
-      (if (> column width)
-	  (setq column last-column idx last-idx))
-      (if (and padding (< column width))
-	  (setq tail-padding (make-string (- width column) padding)))
-      (setq str (substring str from-idx idx))
-      (if padding
-	  (concat head-padding str tail-padding)
-	str))))
+;; string-to-sequence, string-to-list, string-to-vector, store-substring,
+;; truncate-string-to-width
 
-;;; For backward compatiblity ...
-;;;###autoload
-(defalias 'truncate-string 'truncate-string-to-width)
-(make-obsolete 'truncate-string 'truncate-string-to-width)
 
 ;;; Nested alist handler.  Nested alist is alist whose elements are
 ;;; also nested alist.
--- a/lisp/packages/custom-load.el	Mon Aug 13 09:55:30 2007 +0200
+++ b/lisp/packages/custom-load.el	Mon Aug 13 09:56:28 2007 +0200
@@ -1,46 +1,46 @@
-(custom-put 'igrep 'custom-loads '("igrep"))
-(custom-put 'change-log 'custom-loads '("add-log"))
-(custom-put 'auto-save 'custom-loads '("auto-save"))
-(custom-put 'avoid 'custom-loads '("avoid"))
-(custom-put 'balloon-help 'custom-loads '("balloon-help"))
-(custom-put 'compilation 'custom-loads '("compile"))
-(custom-put 'completion 'custom-loads '("completion"))
-(custom-put 'dabbrev 'custom-loads '("dabbrev"))
-(custom-put 'desktop 'custom-loads '("desktop"))
-(custom-put 'diff 'custom-loads '("diff"))
-(custom-put 'etags 'custom-loads '("etags"))
-(custom-put 'fast-lock 'custom-loads '("fast-lock"))
-(custom-put 'feedmail 'custom-loads '("feedmail"))
-(custom-put 'filladapt 'custom-loads '("filladapt"))
-(custom-put 'fume 'custom-loads '("func-menu"))
-(custom-put 'generic-sc 'custom-loads '("generic-sc"))
-(custom-put 'gnuserv 'custom-loads '("gnuserv"))
-(custom-put 'gopher 'custom-loads '("gopher"))
-(custom-put 'hyper-apropos 'custom-loads '("hyper-apropos"))
-(custom-put 'hyper-apropos-faces 'custom-loads '("hyper-apropos"))
-(custom-put 'info 'custom-loads '("info"))
-(custom-put 'ispell 'custom-loads '("ispell"))
+(custom-put 'copyright 'custom-loads '("upd-copyr"))
+(custom-put 'time-stamp 'custom-loads '("time-stamp"))
+(custom-put 'texinfo-tex 'custom-loads '("texnfo-tex"))
+(custom-put 'supercite-hooks 'custom-loads '("supercite"))
+(custom-put 'supercite-cite 'custom-loads '("supercite"))
+(custom-put 'supercite-attr 'custom-loads '("supercite"))
+(custom-put 'supercite-frames 'custom-loads '("supercite"))
+(custom-put 'supercite 'custom-loads '("supercite"))
+(custom-put 'save-place 'custom-loads '("saveplace"))
+(custom-put 'recent-files-menu 'custom-loads '("recent-files"))
+(custom-put 'recent-files 'custom-loads '("recent-files"))
+(custom-put 'remote-compile 'custom-loads '("rcompile"))
+(custom-put 'ps-print-face 'custom-loads '("ps-print"))
+(custom-put 'ps-print-color 'custom-loads '("ps-print"))
+(custom-put 'ps-print-font 'custom-loads '("ps-print"))
+(custom-put 'ps-print-header 'custom-loads '("ps-print"))
+(custom-put 'ps-print-vertical 'custom-loads '("ps-print"))
+(custom-put 'ps-print-horizontal 'custom-loads '("ps-print"))
+(custom-put 'ps-print 'custom-loads '("ps-print"))
+(custom-put 'pages 'custom-loads '("page-ext"))
+(custom-put 'metamail 'custom-loads '("metamail"))
+(custom-put 'man 'custom-loads '("man"))
+(custom-put 'makeinfo 'custom-loads '("makeinfo"))
 (custom-put 'lpr 'custom-loads '("lpr"))
-(custom-put 'makeinfo 'custom-loads '("makeinfo"))
-(custom-put 'man 'custom-loads '("man"))
-(custom-put 'metamail 'custom-loads '("metamail"))
-(custom-put 'pages 'custom-loads '("page-ext"))
-(custom-put 'ps-print 'custom-loads '("ps-print"))
-(custom-put 'ps-print-horizontal 'custom-loads '("ps-print"))
-(custom-put 'ps-print-vertical 'custom-loads '("ps-print"))
-(custom-put 'ps-print-header 'custom-loads '("ps-print"))
-(custom-put 'ps-print-font 'custom-loads '("ps-print"))
-(custom-put 'ps-print-color 'custom-loads '("ps-print"))
-(custom-put 'ps-print-face 'custom-loads '("ps-print"))
-(custom-put 'remote-compile 'custom-loads '("rcompile"))
-(custom-put 'recent-files 'custom-loads '("recent-files"))
-(custom-put 'recent-files-menu 'custom-loads '("recent-files"))
-(custom-put 'save-place 'custom-loads '("saveplace"))
-(custom-put 'supercite 'custom-loads '("supercite"))
-(custom-put 'supercite-frames 'custom-loads '("supercite"))
-(custom-put 'supercite-attr 'custom-loads '("supercite"))
-(custom-put 'supercite-cite 'custom-loads '("supercite"))
-(custom-put 'supercite-hooks 'custom-loads '("supercite"))
-(custom-put 'texinfo-tex 'custom-loads '("texnfo-tex"))
-(custom-put 'time-stamp 'custom-loads '("time-stamp"))
-(custom-put 'copyright 'custom-loads '("upd-copyr"))
+(custom-put 'ispell 'custom-loads '("ispell"))
+(custom-put 'info 'custom-loads '("info"))
+(custom-put 'hyper-apropos-faces 'custom-loads '("hyper-apropos"))
+(custom-put 'hyper-apropos 'custom-loads '("hyper-apropos"))
+(custom-put 'gopher 'custom-loads '("gopher"))
+(custom-put 'gnuserv 'custom-loads '("gnuserv"))
+(custom-put 'generic-sc 'custom-loads '("generic-sc"))
+(custom-put 'fume 'custom-loads '("func-menu"))
+(custom-put 'filladapt 'custom-loads '("filladapt"))
+(custom-put 'feedmail 'custom-loads '("feedmail"))
+(custom-put 'fast-lock 'custom-loads '("fast-lock"))
+(custom-put 'etags 'custom-loads '("etags"))
+(custom-put 'diff 'custom-loads '("diff"))
+(custom-put 'desktop 'custom-loads '("desktop"))
+(custom-put 'dabbrev 'custom-loads '("dabbrev"))
+(custom-put 'completion 'custom-loads '("completion"))
+(custom-put 'compilation 'custom-loads '("compile"))
+(custom-put 'balloon-help 'custom-loads '("balloon-help"))
+(custom-put 'avoid 'custom-loads '("avoid"))
+(custom-put 'auto-save 'custom-loads '("auto-save"))
+(custom-put 'change-log 'custom-loads '("add-log"))
+(custom-put 'igrep 'custom-loads '("igrep"))
--- a/lisp/packages/etags.el	Mon Aug 13 09:55:30 2007 +0200
+++ b/lisp/packages/etags.el	Mon Aug 13 09:56:28 2007 +0200
@@ -633,7 +633,7 @@
 ;; "\\(.*[ \t]+\\)?\\(\\(\\sw\\|\\s_\\)+\\)[ ()]*\C-?"
 ;; "\\(\\sw\\|\\s_\\)+[ ()]*\C-?"
       )
-(defconst tags-file-pattern "^\f\n\\([^,]+\\),[0-9]+\n")
+(defconst tags-file-pattern "^\f\n\\(.+\\),[0-9]+\n")
 
 (defun add-to-tag-completion-table ()
   "Sucks the current buffer (a TAGS table) into the completion-table."
--- a/lisp/packages/tar-mode.el	Mon Aug 13 09:55:30 2007 +0200
+++ b/lisp/packages/tar-mode.el	Mon Aug 13 09:56:28 2007 +0200
@@ -90,17 +90,24 @@
 
 ;;; Code:
 
-(defvar tar-anal-blocksize 20
+(defgroup tar ()
+  "Simple editing of tar files from GNU emacs."
+  :group 'unix
+  :group 'data)
+
+
+(defcustom tar-anal-blocksize 20
   "*The blocksize of tar files written by Emacs, or nil, meaning don't care.
 The blocksize of a tar file is not really the size of the blocks; rather, it is
 the number of blocks written with one system call.  When tarring to a tape, 
 this is the size of the *tape* blocks, but when writing to a file, it doesn't
 matter much.  The only noticeable difference is that if a tar file does not
 have a blocksize of 20, the tar program will issue a warning; all this really
-controls is how many null padding bytes go on the end of the tar file.")
+controls is how many null padding bytes go on the end of the tar file."
+  :type 'integer
+  :group 'tar)
 
-(defvar tar-update-datestamp (or (fboundp 'current-time)
-				 (fboundp 'current-time-seconds))
+(defcustom tar-update-datestamp t
   "*Whether tar-mode should play fast and loose with sub-file datestamps;
 if this is true, then editing and saving a tar file entry back into its
 tar file will update its datestamp.  If false, the datestamp is unchanged.
@@ -111,58 +118,21 @@
 
 This does not work in Emacs 18, because there's no way to get the current 
 time as an integer - if this var is true, then editing a file sets its date
-to midnight, Jan 1 1970 GMT, which happens to be what 0 encodes.")
+to midnight, Jan 1 1970 GMT, which happens to be what 0 encodes."
+  :type 'boolean
+  :group 'tar)
 
 
 ;;; First, duplicate some Common Lisp functions; I used to just (require 'cl)
 ;;; but "cl.el" was messing some people up (also it's really big).
 
-(defmacro tar-setf (form val)
-  "A mind-numbingly simple implementation of setf."
-  (let ((mform (macroexpand form (and (boundp 'byte-compile-macro-environment)
-				      byte-compile-macro-environment))))
-    (cond ((symbolp mform) (list 'setq mform val))
-	  ((not (consp mform)) (error "can't setf %s" form))
-	  ((eq (car mform) 'aref)
-	   (list 'aset (nth 1 mform) (nth 2 mform) val))
-	  ((eq (car mform) 'car)
-	   (list 'setcar (nth 1 mform) val))
-	  ((eq (car mform) 'cdr)
-	   (list 'setcdr (nth 1 mform) val))
-	  (t (error "don't know how to setf %s" form)))))
-
-(defmacro tar-dolist (control &rest body)
-  "syntax: (dolist (var-name list-expr &optional return-value) &body body)"
-  (let ((var (car control))
-	(init (car (cdr control)))
-	(val (car (cdr (cdr control)))))
-    (list 'let (list (list '_dolist_iterator_ init))
-	  (list 'while '_dolist_iterator_
-	    (cons 'let
-	      (cons (list (list var '(car _dolist_iterator_)))
-		    (append body
-			    (list (list 'setq '_dolist_iterator_
-					(list 'cdr '_dolist_iterator_)))))))
-	  val)))
-
-(defmacro tar-dotimes (control &rest body)
-  "syntax: (dotimes (var-name count-expr &optional return-value) &body body)"
-  (let ((var (car control))
-	(n (car (cdr control)))
-	(val (car (cdr (cdr control)))))
-    (list 'let (list (list '_dotimes_end_ n)
-		     (list var 0))
-	  (cons 'while
-		(cons (list '< var '_dotimes_end_)
-		      (append body
-			      (list (list 'setq var (list '1+ var))))))
-	  val)))
+;; No need for that stuff anymore -- XEmacs preloads cl.el anyway.
 
 
 ;;; down to business.
 
 (defmacro make-tar-header (name mode uid git size date ck lt ln
-			   magic uname gname devmaj devmin)
+				magic uname gname devmaj devmin)
   (list 'vector name mode uid git size date ck lt ln
 	magic uname gname devmaj devmin))
 
@@ -208,7 +178,7 @@
   "Returns a 'tar-header' structure (a list of name, mode, uid, gid, size, 
 write-date, checksum, link-type, and link-name)."
   (cond ((< (length string) 512) nil)
-	(;(some 'plusp string)		 ; <-- oops, massive cycle hog!
+	(				;(some 'plusp string)		 ; <-- oops, massive cycle hog!
 	 (or (not (= 0 (aref string 0))) ; This will do.
 	     (not (= 0 (aref string 101))))
 	 (let* ((name-end (1- tar-mode-offset))
@@ -230,21 +200,21 @@
 			  (- link-p ?0)))
 	   (if (and (null link-p) (string-match "/$" name)) (setq link-p 5)) ; directory
 	   (make-tar-header
-	     name
-	     (tar-parse-octal-integer string tar-mode-offset (1- tar-uid-offset))
-	     (tar-parse-octal-integer string tar-uid-offset (1- tar-gid-offset))
-	     (tar-parse-octal-integer string tar-gid-offset (1- tar-size-offset))
-	     (tar-parse-octal-integer string tar-size-offset (1- tar-time-offset))
-	     (tar-parse-octal-integer-32 string tar-time-offset (1- tar-chk-offset))
-	     (tar-parse-octal-integer string tar-chk-offset (1- tar-linkp-offset))
-	     link-p
-	     (substring string tar-link-offset link-end)
-	     uname-valid-p
-	     (and uname-valid-p (substring string tar-uname-offset uname-end))
-	     (and uname-valid-p (substring string tar-gname-offset gname-end))
-	     (tar-parse-octal-integer string tar-dmaj-offset (1- tar-dmin-offset))
-	     (tar-parse-octal-integer string tar-dmin-offset (1- tar-end-offset))
-	     )))
+	    name
+	    (tar-parse-octal-integer string tar-mode-offset (1- tar-uid-offset))
+	    (tar-parse-octal-integer string tar-uid-offset (1- tar-gid-offset))
+	    (tar-parse-octal-integer string tar-gid-offset (1- tar-size-offset))
+	    (tar-parse-octal-integer string tar-size-offset (1- tar-time-offset))
+	    (tar-parse-octal-integer-32 string tar-time-offset (1- tar-chk-offset))
+	    (tar-parse-octal-integer string tar-chk-offset (1- tar-linkp-offset))
+	    link-p
+	    (substring string tar-link-offset link-end)
+	    uname-valid-p
+	    (and uname-valid-p (substring string tar-uname-offset uname-end))
+	    (and uname-valid-p (substring string tar-gname-offset gname-end))
+	    (tar-parse-octal-integer string tar-dmaj-offset (1- tar-dmin-offset))
+	    (tar-parse-octal-integer string tar-dmin-offset (1- tar-end-offset))
+	    )))
 	(t 'empty-tar-block)))
 
 
@@ -275,10 +245,10 @@
 (defun tar-parse-octal-integer-safe (string)
   (let ((L (length string)))
     (if (= L 0) (error "empty string"))
-    (tar-dotimes (i L)
-       (if (or (< (aref string i) ?0)
-	       (> (aref string i) ?7))
-	   (error "'%c' is not an octal digit."))))
+    (dotimes (i L)
+      (if (or (< (aref string i) ?0)
+	      (> (aref string i) ?7))
+	  (error "'%c' is not an octal digit."))))
   (tar-parse-octal-integer string))
 
 
@@ -311,7 +281,7 @@
 	 (l (length chk-string)))
     (aset hblock 154 0)
     (aset hblock 155 32)
-    (tar-dotimes (i l) (aset hblock (- 153 i) (aref chk-string (- l i 1)))))
+    (dotimes (i l) (aset hblock (- 153 i) (aref chk-string (- l i 1)))))
   hblock)
 
 
@@ -362,25 +332,25 @@
       (aset string 0 (if mod-p ?* ? ))
       (aset string 1
 	    (cond ((or (eq type nil) (eq type 0)) ?-)
-		  ((eq type 1) ?l)  ; link
-		  ((eq type 2) ?s)  ; symlink
-		  ((eq type 3) ?c)  ; char special
-		  ((eq type 4) ?b)  ; block special
-		  ((eq type 5) ?d)  ; directory
-		  ((eq type 6) ?p)  ; FIFO/pipe
-		  ((eq type 20) ?*) ; directory listing
-		  ((eq type 29) ?M) ; multivolume continuation
-		  ((eq type 35) ?S) ; sparse
-		  ((eq type 38) ?V) ; volume header
+		  ((eq type 1) ?l)	; link
+		  ((eq type 2) ?s)	; symlink
+		  ((eq type 3) ?c)	; char special
+		  ((eq type 4) ?b)	; block special
+		  ((eq type 5) ?d)	; directory
+		  ((eq type 6) ?p)	; FIFO/pipe
+		  ((eq type 20) ?*)	; directory listing
+		  ((eq type 29) ?M)	; multivolume continuation
+		  ((eq type 35) ?S)	; sparse
+		  ((eq type 38) ?V)	; volume header
 		  ))
       (tar-grind-file-mode mode string 2)
       (setq uid (if (= 0 (length uname)) (int-to-string uid) uname))
       (setq gid (if (= 0 (length gname)) (int-to-string gid) gname))
       (setq size (int-to-string size))
-      (tar-dotimes (i (min (1- namew) (length uid))) (aset string (- slash i) (aref uid (- (length uid) i 1))))
+      (dotimes (i (min (1- namew) (length uid))) (aset string (- slash i) (aref uid (- (length uid) i 1))))
       (aset string (1+ slash) ?/)
-      (tar-dotimes (i (min (1- groupw) (length gid))) (aset string (+ (+ slash 2) i) (aref gid i)))
-      (tar-dotimes (i (min sizew (length size))) (aset string (- lastdigit i) (aref size (- (length size) i 1))))
+      (dotimes (i (min (1- groupw) (length gid))) (aset string (+ (+ slash 2) i) (aref gid i)))
+      (dotimes (i (min sizew (length size))) (aset string (- lastdigit i) (aref size (- (length size) i 1))))
 
       (if tar-can-print-dates
 	  (let* ((year (substring (current-time-string) -4))
@@ -390,20 +360,20 @@
 		 (str (if (equal year file-year)
 			  (substring file 4 16)
 			(concat (substring file 4 11) " " file-year))))
-	    (tar-dotimes (i 12) (aset string (- namestart (- 13 i)) (aref str i)))))
+	    (dotimes (i 12) (aset string (- namestart (- 13 i)) (aref str i)))))
 
-      (tar-dotimes (i (length name)) (aset string (+ namestart i) (aref name i)))
+      (dotimes (i (length name)) (aset string (+ namestart i) (aref name i)))
       (if (or (eq link-p 1) (eq link-p 2))
 	  (progn
-	    (tar-dotimes (i 3) (aset string (+ namestart 1 (length name) i) (aref (if (= link-p 1) "==>" "-->") i)))
-	    (tar-dotimes (i (length link-name)) (aset string (+ namestart 5 (length name) i) (aref link-name i)))))
+	    (dotimes (i 3) (aset string (+ namestart 1 (length name) i) (aref (if (= link-p 1) "==>" "-->") i)))
+	    (dotimes (i (length link-name)) (aset string (+ namestart 5 (length name) i) (aref link-name i)))))
       string)))
 
 
 ;; buffer-local variables in the tar file's buffer:
 ;;
-(defvar tar-parse-info)		; the header structures
-(defvar tar-header-offset)	; the end of the "pretty" data
+(defvar tar-parse-info)			; the header structures
+(defvar tar-header-offset)		; the end of the "pretty" data
 
 (defun tar-summarize-buffer ()
   "Parse the contents of the tar file in the current buffer, and place a
@@ -414,7 +384,7 @@
 	 (pos 1)
 	 (bs (max 1 (- (buffer-size) 1024))) ; always 2+ empty blocks at end.
 	 (bs100 (max 1 (/ bs 100)))
-	(tokens nil))
+	 (tokens nil))
     (while (not (eq tokens 'empty-tar-block))
       (if (> (+ pos 512) (point-max))
 	  (error "truncated tar file"))
@@ -422,8 +392,8 @@
 	(setq tokens (tokenize-tar-header-block hblock))
 	(setq pos (+ pos 512))
 	(message "parsing tar file...%s%%"
-		 ;(/ (* pos 100) bs)   ; this gets round-off lossage
-		 (/ pos bs100)         ; this doesn't
+				;(/ (* pos 100) bs)   ; this gets round-off lossage
+		 (/ pos bs100)		; this doesn't
 		 )
 	(if (eq tokens 'empty-tar-block)
 	    nil
@@ -435,20 +405,20 @@
 	    (if (< size 0)
 		(error "%s has size %s - corrupted."
 		       (tar-header-name tokens) size))
-	    ;
-	    ; This is just too slow.  Don't really need it anyway....
-	    ;(check-tar-header-block-checksum
-	    ;  hblock (checksum-tar-header-block hblock)
-	    ;  (tar-header-name tokens))
+			;
+			; This is just too slow.  Don't really need it anyway....
+			;(check-tar-header-block-checksum
+			;  hblock (checksum-tar-header-block hblock)
+			;  (tar-header-name tokens))
 	    
 	    (setq result (cons (make-tar-desc pos tokens) result))
 	    
 	    (if (and (null (tar-header-link-type tokens))
 		     (> size 0))
 		(setq pos
-		  (+ pos 512 (ash (ash (1- size) -9) 9))        ; this works
-		  ;(+ pos (+ size (- 512 (rem (1- size) 512)))) ; this doesn't
-		  ))
+		      (+ pos 512 (ash (ash (1- size) -9) 9)) ; this works
+			;(+ pos (+ size (- 512 (rem (1- size) 512)))) ; this doesn't
+		      ))
 	    ))))
     (make-local-variable 'tar-parse-info)
     (setq tar-parse-info (nreverse result)))
@@ -456,10 +426,10 @@
   (save-excursion
     (goto-char (point-min))
     (let ((buffer-read-only nil))
-      (tar-dolist (tar-desc tar-parse-info)
+      (dolist (tar-desc tar-parse-info)
 	(insert
-	  (summarize-tar-header-block (tar-desc-tokens tar-desc))
-	  "\n"))
+	 (summarize-tar-header-block (tar-desc-tokens tar-desc))
+	 "\n"))
       (make-local-variable 'tar-header-offset)
       (setq tar-header-offset (point))
       (narrow-to-region 1 tar-header-offset)
@@ -577,7 +547,7 @@
   (make-local-variable 'tar-header-offset)
   (make-local-variable 'tar-parse-info)
   (make-local-variable 'require-final-newline)
-  (setq require-final-newline nil) ; binary data, dude...
+  (setq require-final-newline nil)	; binary data, dude...
   (make-local-variable 'revert-buffer-function)
   (setq revert-buffer-function 'tar-mode-revert)
   (setq major-mode 'tar-mode)
@@ -587,7 +557,7 @@
   (widen)
   (if (and (boundp 'tar-header-offset) tar-header-offset)
       (narrow-to-region 1 tar-header-offset)
-      (tar-summarize-buffer))
+    (tar-summarize-buffer))
 
   (cond ((string-match "XEmacs" emacs-version)
 	 (require 'mode-motion)
@@ -623,7 +593,7 @@
   (setq tar-subfile-mode
 	(if (null p)
 	    (not tar-subfile-mode)
-	    (> (prefix-numeric-value p) 0)))
+	  (> (prefix-numeric-value p) 0)))
   (cond (tar-subfile-mode
 	 ;; copy the local keymap so that we don't accidentally
 	 ;; alter a keymap like 'lisp-mode-map' which is shared
@@ -680,7 +650,7 @@
 	   tar-parse-info)
       (if noerror
 	  nil
-	  (error "This line does not describe a tar-file entry."))))
+	(error "This line does not describe a tar-file entry."))))
 
 
 (defun tar-extract (&optional other-window-p)
@@ -705,10 +675,10 @@
     (if (zerop size) (error "This is a zero-length file."))
     (let* ((tar-buffer (current-buffer))
 	   (bufname (file-name-nondirectory name))
-	   (bufid (concat ;" (" name " in "
-		   	  " (in "
-			  (file-name-nondirectory (buffer-file-name))
-			  ")"))
+	   (bufid (concat		;" (" name " in "
+		   " (in "
+		   (file-name-nondirectory (buffer-file-name))
+		   ")"))
 	   (read-only-p (or buffer-read-only view-p))
 	   (buffer nil)
 	   (buffers (buffer-list))
@@ -720,7 +690,7 @@
 		 (boundp 'superior-tar-descriptor)
 		 (eq superior-tar-descriptor descriptor))
 	    (setq buffer (car buffers))
-	    (setq buffers (cdr buffers))))
+	  (setq buffers (cdr buffers))))
       (set-buffer tar-buffer)
       (if buffer
 	  nil
@@ -735,8 +705,8 @@
 		(goto-char 0)
 		(let ((lock-directory nil)) ; disable locking
 		  (set-visited-file-name name) ; give it a name to decide mode.
-;;		  (normal-mode)  ; pick a mode.
-;;		  (after-find-file nil nil)  ; pick a mode; works with crypt.el
+		  ;;		  (normal-mode)  ; pick a mode.
+		  ;;		  (after-find-file nil nil)  ; pick a mode; works with crypt.el
 		  ;; Ok, instead of running after-find-file, just invoke the
 		  ;; find-file-hooks instead.  This does everything we want
 		  ;; from after-find-file, without losing when visiting .tar
@@ -823,7 +793,7 @@
 	    (file-directory-p target))
 	(setq target (concat (if (string-match "/$" target)
 				 (substring target 0 (1- (match-end 0)))
-				 target)
+			       target)
 			     "/"
 			     (file-name-nondirectory default-file))))
     target))
@@ -866,7 +836,7 @@
 With a prefix argument, mark that many files."
   (interactive "p")
   (beginning-of-line)
-  (tar-dotimes (i (if (< p 0) (- p) p))
+  (dotimes (i (if (< p 0) (- p) p))
     (if (tar-current-descriptor unflag) ; barf if we're not on an entry-line.
 	(progn
 	  (delete-char 1)
@@ -897,7 +867,7 @@
 	 (link-p (tar-header-link-type tokens))
 	 (start (tar-desc-data-start descriptor))
 	 (following-descs (cdr (memq descriptor tar-parse-info))))
-    (if link-p (setq size 0)) ; size lies for hard-links.
+    (if link-p (setq size 0))		; size lies for hard-links.
     ;;
     ;; delete the current line...
     (beginning-of-line)
@@ -924,9 +894,9 @@
       ;; iteration over the files that remain, or only iterate up to
       ;; the next file to be deleted.
       (let ((data-length (- data-end data-start)))
-	(tar-dolist (desc following-descs)
-	  (tar-setf (tar-desc-data-start desc)
-		    (- (tar-desc-data-start desc) data-length))))
+	(dolist (desc following-descs)
+	  (setf (tar-desc-data-start desc)
+		(- (tar-desc-data-start desc) data-length))))
       ))
   (narrow-to-region 1 tar-header-offset))
 
@@ -945,14 +915,14 @@
 	    (if (looking-at "D")
 		(progn (tar-expunge-internal)
 		       (setq n (1+ n)))
-		(forward-line 1)))
+	      (forward-line 1)))
 	  ;; after doing the deletions, add any padding that may be necessary.
 	  (tar-pad-to-blocksize)
 	  (narrow-to-region 1 tar-header-offset)
 	  )
 	(if (zerop n)
 	    (message "nothing to expunge.")
-	    (message "%s expunged.  Be sure to save this buffer." n)))))
+	  (message "%s expunged.  Be sure to save this buffer." n)))))
 
 
 (defun tar-clear-modification-flags ()
@@ -973,24 +943,24 @@
 This does not modify the disk image; you must save the tar file itself
 for this to be permanent."
   (interactive (list
-		 (let ((tokens (tar-desc-tokens (tar-current-descriptor))))
-		   (if (or current-prefix-arg
-			   (not (tar-header-magic tokens)))
-		       (let (n)
-			 (while (not (numberp (setq n (read-minibuffer
-							"New UID number: "
-							(format "%s" (tar-header-uid tokens)))))))
-			 n)
-		       (read-string "New UID string: " (tar-header-uname tokens))))))
+		(let ((tokens (tar-desc-tokens (tar-current-descriptor))))
+		  (if (or current-prefix-arg
+			  (not (tar-header-magic tokens)))
+		      (let (n)
+			(while (not (numberp (setq n (read-minibuffer
+						      "New UID number: "
+						      (format "%s" (tar-header-uid tokens)))))))
+			n)
+		    (read-string "New UID string: " (tar-header-uname tokens))))))
   (cond ((stringp new-uid)
-	 (tar-setf (tar-header-uname (tar-desc-tokens (tar-current-descriptor)))
-		   new-uid)
+	 (setf (tar-header-uname (tar-desc-tokens (tar-current-descriptor)))
+	       new-uid)
 	 (tar-alter-one-field tar-uname-offset (concat new-uid "\000")))
 	(t
-	 (tar-setf (tar-header-uid (tar-desc-tokens (tar-current-descriptor)))
-		   new-uid)
+	 (setf (tar-header-uid (tar-desc-tokens (tar-current-descriptor)))
+	       new-uid)
 	 (tar-alter-one-field tar-uid-offset
-	   (concat (substring (format "%6o" new-uid) 0 6) "\000 ")))))
+			      (concat (substring (format "%6o" new-uid) 0 6) "\000 ")))))
 
 
 (defun tar-chgrp-entry (new-gid)
@@ -1001,39 +971,39 @@
 This does not modify the disk image; you must save the tar file itself
 for this to be permanent."
   (interactive (list
-		 (let ((tokens (tar-desc-tokens (tar-current-descriptor))))
-		   (if (or current-prefix-arg
-			   (not (tar-header-magic tokens)))
-		       (let (n)
-			 (while (not (numberp (setq n (read-minibuffer
-							"New GID number: "
-							(format "%s" (tar-header-gid tokens)))))))
-			 n)
-		       (read-string "New GID string: " (tar-header-gname tokens))))))
+		(let ((tokens (tar-desc-tokens (tar-current-descriptor))))
+		  (if (or current-prefix-arg
+			  (not (tar-header-magic tokens)))
+		      (let (n)
+			(while (not (numberp (setq n (read-minibuffer
+						      "New GID number: "
+						      (format "%s" (tar-header-gid tokens)))))))
+			n)
+		    (read-string "New GID string: " (tar-header-gname tokens))))))
   (cond ((stringp new-gid)
-	 (tar-setf (tar-header-gname (tar-desc-tokens (tar-current-descriptor)))
-		   new-gid)
+	 (setf (tar-header-gname (tar-desc-tokens (tar-current-descriptor)))
+	       new-gid)
 	 (tar-alter-one-field tar-gname-offset
-	   (concat new-gid "\000")))
+			      (concat new-gid "\000")))
 	(t
-	 (tar-setf (tar-header-gid (tar-desc-tokens (tar-current-descriptor)))
-		   new-gid)
+	 (setf (tar-header-gid (tar-desc-tokens (tar-current-descriptor)))
+	       new-gid)
 	 (tar-alter-one-field tar-gid-offset
-	   (concat (substring (format "%6o" new-gid) 0 6) "\000 ")))))
+			      (concat (substring (format "%6o" new-gid) 0 6) "\000 ")))))
 
 (defun tar-rename-entry (new-name)
   "*Change the name associated with this entry in the tar file.
 This does not modify the disk image; you must save the tar file itself
 for this to be permanent."
   (interactive
-    (list (read-string "New name: "
-	    (tar-header-name (tar-desc-tokens (tar-current-descriptor))))))
+   (list (read-string "New name: "
+		      (tar-header-name (tar-desc-tokens (tar-current-descriptor))))))
   (if (string= "" new-name) (error "zero length name."))
   (if (> (length new-name) 98) (error "name too long."))
-  (tar-setf (tar-header-name (tar-desc-tokens (tar-current-descriptor)))
-	    new-name)
+  (setf (tar-header-name (tar-desc-tokens (tar-current-descriptor)))
+	new-name)
   (tar-alter-one-field 0
-    (substring (concat new-name (make-string 99 0)) 0 99)))
+		       (substring (concat new-name (make-string 99 0)) 0 99)))
 
 
 (defun tar-chmod-entry (new-mode)
@@ -1041,11 +1011,11 @@
 This does not modify the disk image; you must save the tar file itself
 for this to be permanent."
   (interactive (list (tar-parse-octal-integer-safe
-		       (read-string "New protection (octal): "))))
-  (tar-setf (tar-header-mode (tar-desc-tokens (tar-current-descriptor)))
-	    new-mode)
+		      (read-string "New protection (octal): "))))
+  (setf (tar-header-mode (tar-desc-tokens (tar-current-descriptor)))
+	new-mode)
   (tar-alter-one-field tar-mode-offset
-    (concat (substring (format "%6o" new-mode) 0 6) "\000 ")))
+		       (concat (substring (format "%6o" new-mode) 0 6) "\000 ")))
 
 
 (defun tar-alter-one-field (data-position new-data-string)
@@ -1068,7 +1038,7 @@
 	    ;; delete the old field and insert a new one.
 	    (goto-char (+ start data-position))
 	    (delete-region (point) (+ (point) (length new-data-string))) ; <--
-	    (insert new-data-string) ; <--
+	    (insert new-data-string)	; <--
 	    ;;
 	    ;; compute a new checksum and insert it.
 	    (let ((chk (checksum-tar-header-block
@@ -1078,12 +1048,12 @@
 	      (insert (format "%6o" chk))
 	      (insert 0)
 	      (insert ? )
-	      (tar-setf (tar-header-checksum tokens) chk)
+	      (setf (tar-header-checksum tokens) chk)
 	      ;;
 	      ;; ok, make sure we didn't botch it.
 	      (check-tar-header-block-checksum
-	        (buffer-substring start (+ start 512))
-	        chk (tar-header-name tokens))
+	       (buffer-substring start (+ start 512))
+	       chk (tar-header-name tokens))
 	      )))
       (narrow-to-region 1 tar-header-offset))))
 
@@ -1115,15 +1085,15 @@
   ;; (because it won't work - the .Z subfile it writes won't really be
   ;; compressed.)
   ;;
-;  ;; These are for the old crypt.el
-;  (if (and (boundp 'buffer-save-encrypted) buffer-save-encrypted)
-;      (error "Don't know how to encrypt back into a tar file."))
-;  (if (and (boundp 'buffer-save-compacted) buffer-save-compacted)
-;      (error "Don't know how to compact back into a tar file."))
-;  (if (and (boundp 'buffer-save-compressed) buffer-save-compressed)
-;      (error "Don't know how to compress back into a tar file."))
-;  (if (and (boundp 'buffer-save-gzipped) buffer-save-gzipped)
-;      (error "Don't know how to gzip back into a tar file."))
+					;  ;; These are for the old crypt.el
+					;  (if (and (boundp 'buffer-save-encrypted) buffer-save-encrypted)
+					;      (error "Don't know how to encrypt back into a tar file."))
+					;  (if (and (boundp 'buffer-save-compacted) buffer-save-compacted)
+					;      (error "Don't know how to compact back into a tar file."))
+					;  (if (and (boundp 'buffer-save-compressed) buffer-save-compressed)
+					;      (error "Don't know how to compress back into a tar file."))
+					;  (if (and (boundp 'buffer-save-gzipped) buffer-save-gzipped)
+					;      (error "Don't know how to gzip back into a tar file."))
 
   ;; These are for the new crypt++.el
   (if (and (boundp 'crypt-buffer-save-encrypted) crypt-buffer-save-encrypted)
@@ -1138,109 +1108,109 @@
       (error "Don't know how to freeze back into a tar file."))
 
   (save-excursion
-  (let ((subfile (current-buffer))
-	(subfile-size (buffer-size))
-	(descriptor superior-tar-descriptor))
-    (set-buffer superior-tar-buffer)
-    (let* ((tokens (tar-desc-tokens descriptor))
-	   (start (tar-desc-data-start descriptor))
-	   (name (tar-header-name tokens))
-	   (size (tar-header-size tokens))
-	   (size-pad (ash (ash (+ size 511) -9) 9))
-	   (head (memq descriptor tar-parse-info))
-	   (following-descs (cdr head)))
-      (if (not head)
-	(error "Can't find this tar file entry in its parent tar file!"))
-      (unwind-protect
-       (save-excursion
-	(widen)
-	;; delete the old data...
-	(let* ((data-start (+ start tar-header-offset -1))
-	       (data-end (+ data-start (ash (ash (+ size 511) -9) 9))))
-	  (delete-region data-start data-end)
-	  ;; insert the new data...
-	  (goto-char data-start)
-	  (insert-buffer subfile)
-	  ;;
-	  ;; pad the new data out to a multiple of 512...
-	  (let ((subfile-size-pad (ash (ash (+ subfile-size 511) -9) 9)))
-	    (goto-char (+ data-start subfile-size))
-	    (insert (make-string (- subfile-size-pad subfile-size) 0))
-	    ;;
-	    ;; update the data pointer of this and all following files...
-	    (tar-setf (tar-header-size tokens) subfile-size)
-	    (let ((difference (- subfile-size-pad size-pad)))
-	      (tar-dolist (desc following-descs)
-		(tar-setf (tar-desc-data-start desc)
-			  (+ (tar-desc-data-start desc) difference))))
-	    ;;
-	    ;; Update the size field in the header block.
-	    (let ((header-start (- data-start 512)))
-	      (goto-char (+ header-start tar-size-offset))
-	      (delete-region (point) (+ (point) 12))
-	      (insert (format "%11o" subfile-size))
-	      (insert ? )
-	      ;;
-	      ;; Maybe update the datestamp.
-	      (if (not tar-update-datestamp)
-		  nil
-		(goto-char (+ header-start tar-time-offset))
-		(delete-region (point) (+ (point) 12))
-		(let (now top bot)
-		  (cond ((fboundp 'current-time)
-			 (setq now (current-time))
-			 (setcdr now (car (cdr now))))
-;			((fboundp 'current-time-seconds)
-;			 (setq now (current-time-seconds)))
-			)
-		  (setq top (car now)
-			bot (cdr now))
-		  (cond
-		   (now
-		    (tar-setf (tar-header-date tokens) now)
-		    ;; hair to print two 16-bit numbers as one octal number.
-		    (setq bot (logior (ash (logand top 3) 16) bot))
-		    (setq top (ash top -2))
-		    (insert (format "%5o" top))
-		    (insert (format "%06o " bot)))
-		   (t
-		    ;; otherwise, set it to the epoch.
-		    (insert (format "%11o " 0))
-		    (tar-setf (tar-header-date tokens) (cons 0 0))
-		    ))))
-	      ;;
-	      ;; compute a new checksum and insert it.
-	      (let ((chk (checksum-tar-header-block
-			  (buffer-substring header-start data-start))))
-		(goto-char (+ header-start tar-chk-offset))
-		(delete-region (point) (+ (point) 8))
-		(insert (format "%6o" chk))
-		(insert 0)
-		(insert ? )
-		(tar-setf (tar-header-checksum tokens) chk)))
-	    ;;
-	    ;; alter the descriptor-line...
-	    ;;
-	    (let ((position (- (length tar-parse-info) (length head))))
-	      (goto-char 1)
-	      (next-line position)
-	      (beginning-of-line)
-	      (let ((p (point))
-		    (m (set-marker (make-marker) tar-header-offset)))
-		(forward-line 1)
-		(delete-region p (point))
-		(insert-before-markers (summarize-tar-header-block tokens t) "\n")
-		(setq tar-header-offset (marker-position m)))
-	      )))
-	;; after doing the insertion, add any final padding that may be necessary.
-	(tar-pad-to-blocksize))
-       (narrow-to-region 1 tar-header-offset)))
-    (set-buffer-modified-p t)   ; mark the tar file as modified
-    (set-buffer subfile)
-    (set-buffer-modified-p nil) ; mark the tar subfile as unmodified
-    (message "saved into tar-buffer \"%s\" - remember to save that buffer!"
-	     (buffer-name superior-tar-buffer))
-    )))
+    (let ((subfile (current-buffer))
+	  (subfile-size (buffer-size))
+	  (descriptor superior-tar-descriptor))
+      (set-buffer superior-tar-buffer)
+      (let* ((tokens (tar-desc-tokens descriptor))
+	     (start (tar-desc-data-start descriptor))
+	     (name (tar-header-name tokens))
+	     (size (tar-header-size tokens))
+	     (size-pad (ash (ash (+ size 511) -9) 9))
+	     (head (memq descriptor tar-parse-info))
+	     (following-descs (cdr head)))
+	(if (not head)
+	    (error "Can't find this tar file entry in its parent tar file!"))
+	(unwind-protect
+	    (save-excursion
+	      (widen)
+	      ;; delete the old data...
+	      (let* ((data-start (+ start tar-header-offset -1))
+		     (data-end (+ data-start (ash (ash (+ size 511) -9) 9))))
+		(delete-region data-start data-end)
+		;; insert the new data...
+		(goto-char data-start)
+		(insert-buffer subfile)
+		;;
+		;; pad the new data out to a multiple of 512...
+		(let ((subfile-size-pad (ash (ash (+ subfile-size 511) -9) 9)))
+		  (goto-char (+ data-start subfile-size))
+		  (insert (make-string (- subfile-size-pad subfile-size) 0))
+		  ;;
+		  ;; update the data pointer of this and all following files...
+		  (setf (tar-header-size tokens) subfile-size)
+		  (let ((difference (- subfile-size-pad size-pad)))
+		    (dolist (desc following-descs)
+		      (setf (tar-desc-data-start desc)
+			    (+ (tar-desc-data-start desc) difference))))
+		  ;;
+		  ;; Update the size field in the header block.
+		  (let ((header-start (- data-start 512)))
+		    (goto-char (+ header-start tar-size-offset))
+		    (delete-region (point) (+ (point) 12))
+		    (insert (format "%11o" subfile-size))
+		    (insert ? )
+		    ;;
+		    ;; Maybe update the datestamp.
+		    (if (not tar-update-datestamp)
+			nil
+		      (goto-char (+ header-start tar-time-offset))
+		      (delete-region (point) (+ (point) 12))
+		      (let (now top bot)
+			(cond ((fboundp 'current-time)
+			       (setq now (current-time))
+			       (setcdr now (car (cdr now))))
+					;			((fboundp 'current-time-seconds)
+					;			 (setq now (current-time-seconds)))
+			      )
+			(setq top (car now)
+			      bot (cdr now))
+			(cond
+			 (now
+			  (setf (tar-header-date tokens) now)
+			  ;; hair to print two 16-bit numbers as one octal number.
+			  (setq bot (logior (ash (logand top 3) 16) bot))
+			  (setq top (ash top -2))
+			  (insert (format "%5o" top))
+			  (insert (format "%06o " bot)))
+			 (t
+			  ;; otherwise, set it to the epoch.
+			  (insert (format "%11o " 0))
+			  (setf (tar-header-date tokens) (cons 0 0))
+			  ))))
+		    ;;
+		    ;; compute a new checksum and insert it.
+		    (let ((chk (checksum-tar-header-block
+				(buffer-substring header-start data-start))))
+		      (goto-char (+ header-start tar-chk-offset))
+		      (delete-region (point) (+ (point) 8))
+		      (insert (format "%6o" chk))
+		      (insert 0)
+		      (insert ? )
+		      (setf (tar-header-checksum tokens) chk)))
+		  ;;
+		  ;; alter the descriptor-line...
+		  ;;
+		  (let ((position (- (length tar-parse-info) (length head))))
+		    (goto-char 1)
+		    (next-line position)
+		    (beginning-of-line)
+		    (let ((p (point))
+			  (m (set-marker (make-marker) tar-header-offset)))
+		      (forward-line 1)
+		      (delete-region p (point))
+		      (insert-before-markers (summarize-tar-header-block tokens t) "\n")
+		      (setq tar-header-offset (marker-position m)))
+		    )))
+	      ;; after doing the insertion, add any final padding that may be necessary.
+	      (tar-pad-to-blocksize))
+	  (narrow-to-region 1 tar-header-offset)))
+      (set-buffer-modified-p t)		; mark the tar file as modified
+      (set-buffer subfile)
+      (set-buffer-modified-p nil)	; mark the tar subfile as unmodified
+      (message "saved into tar-buffer \"%s\" - remember to save that buffer!"
+	       (buffer-name superior-tar-buffer))
+      )))
 
 
 (defun tar-pad-to-blocksize ()
@@ -1257,7 +1227,7 @@
 	   (data-end (+ start size))
 	   (bbytes (ash tar-anal-blocksize 9))
 	   (pad-to (+ bbytes (* bbytes (/ (1- data-end) bbytes))))
-	   (buffer-read-only nil) ; ##
+	   (buffer-read-only nil)	; ##
 	   )
       ;; If the padding after the last data is too long, delete some;
       ;; else insert some until we are padded out to the right number of blocks.
@@ -1265,9 +1235,9 @@
       (goto-char (+ (or tar-header-offset 0) data-end))
       (if (> (1+ (buffer-size)) (+ (or tar-header-offset 0) pad-to))
 	  (delete-region (+ (or tar-header-offset 0) pad-to) (1+ (buffer-size)))
-	  (insert (make-string (- (+ (or tar-header-offset 0) pad-to)
-				  (1+ (buffer-size)))
-			       0)))
+	(insert (make-string (- (+ (or tar-header-offset 0) pad-to)
+				(1+ (buffer-size)))
+			     0)))
       )))
 
 
@@ -1302,23 +1272,23 @@
 	      header-string
 	      done)
 	 (save-excursion
-	  (save-restriction
-	   (widen)
-	   (tar-clear-modification-flags)
-	   (setq header-string (buffer-substring 1 tar-header-offset))
-	   (delete-region 1 tar-header-offset)
-	   (unwind-protect
-	       (progn
-		 (while (and remaining-hooks
-			     (not (setq done (funcall (car remaining-hooks)))))
-		   (setq remaining-hooks (cdr remaining-hooks)))
-		 (cond ((not done)
-			(write-region 1 (1+ (buffer-size))
-				     buffer-file-name nil t)
-			(setq done t))))
-	     (goto-char 1)
-	     (insert header-string)
-	     (set-buffer-modified-p nil))))
+	   (save-restriction
+	     (widen)
+	     (tar-clear-modification-flags)
+	     (setq header-string (buffer-substring 1 tar-header-offset))
+	     (delete-region 1 tar-header-offset)
+	     (unwind-protect
+		 (progn
+		   (while (and remaining-hooks
+			       (not (setq done (funcall (car remaining-hooks)))))
+		     (setq remaining-hooks (cdr remaining-hooks)))
+		   (cond ((not done)
+			  (write-region 1 (1+ (buffer-size))
+					buffer-file-name nil t)
+			  (setq done t))))
+	       (goto-char 1)
+	       (insert header-string)
+	       (set-buffer-modified-p nil))))
 	 done)))
 
 
@@ -1334,14 +1304,14 @@
 ;; hooks which might write the file.  Since things like crypt-mode add things
 ;; to the end of the write-file-hooks, this will normally be the case.
 
-;(or (boundp 'write-file-hooks) (setq write-file-hooks nil))
-;(or (listp write-file-hooks)
-;    (setq write-file-hooks (list write-file-hooks)))
-;(or (memq 'maybe-write-tar-file write-file-hooks)
-;    (setq write-file-hooks
-;	  (cons 'maybe-write-tar-file write-file-hooks)))
+					;(or (boundp 'write-file-hooks) (setq write-file-hooks nil))
+					;(or (listp write-file-hooks)
+					;    (setq write-file-hooks (list write-file-hooks)))
+					;(or (memq 'maybe-write-tar-file write-file-hooks)
+					;    (setq write-file-hooks
+					;	  (cons 'maybe-write-tar-file write-file-hooks)))
 
-(add-hook 'write-file-hooks 'maybe-write-tar-file); ####write-contents-hooks??
+(add-hook 'write-file-hooks 'maybe-write-tar-file) ; ####write-contents-hooks??
 (cond ((boundp 'after-save-hook)
        (add-hook 'after-save-hook 'tar-subfile-after-write-file-hook))
       ((boundp 'after-write-file-hooks)
@@ -1373,7 +1343,7 @@
   (if (and buffer-file-name
 	   (string-match tar-regexp buffer-file-name))
       (tar-mode)
-      (tar-real-normal-mode find-file)))
+    (tar-real-normal-mode find-file)))
 
 ;; We have to shadow this as well to get along with crypt.el.
 ;; Shadowing this alone isn't enough, though; we need to shadow 
@@ -1395,7 +1365,7 @@
   (if (and buffer-file-name
 	   (string-match tar-regexp buffer-file-name))
       (tar-mode)
-      (tar-real-set-auto-mode)))
+    (tar-real-set-auto-mode)))
 
 (if (not (fboundp 'tar-real-normal-mode))
     (fset 'tar-real-normal-mode (symbol-function 'normal-mode)))
--- a/lisp/packages/vc.el	Mon Aug 13 09:55:30 2007 +0200
+++ b/lisp/packages/vc.el	Mon Aug 13 09:56:28 2007 +0200
@@ -123,6 +123,11 @@
 (defvar vc-directory-exclusion-list '("SCCS" "RCS" "CVS")
   "*A list of directory names ignored by functions that recursively 
 walk file trees.")
+(defvar vc-default-init-version nil
+  "*A string giving the default version number for the function `vc-register'.
+If `nil' (default), the choice of initial version is left to the
+version control program.  Can be overridden by giving a prefix
+argument to `vc-register'.")
 
 (defconst vc-maximum-comment-ring-size 32
   "Maximum number of saved comments in the comment ring.")
@@ -819,7 +824,9 @@
 
 ;;;###autoload
 (defun vc-register (&optional override comment)
-  "Register the current file into your version-control system."
+  "Register the current file into your version-control system.
+The default initial version number, taken to be `vc-default-init-version',
+can be overridden by giving a prefix arg."
   (interactive "P")
   (or buffer-file-name
       (error "No visited file"))
@@ -842,10 +849,12 @@
 	 (setq backup-inhibited t)))
   (vc-admin
    buffer-file-name
-   (and override
-	(read-string
-	 (format "Initial version level for %s: " buffer-file-name))))
-  )
+   (or (and override
+	    (read-string
+	     (format "Initial version level for %s: "
+		     buffer-file-name)))
+       vc-default-init-version)
+   comment))
 
 (defun vc-resynch-window (file &optional keep noquery)
   ;; If the given file is in the current buffer,
--- a/lisp/prim/about.el	Mon Aug 13 09:55:30 2007 +0200
+++ b/lisp/prim/about.el	Mon Aug 13 09:56:28 2007 +0200
@@ -3,7 +3,7 @@
 ;; Copyright (c) 1997 Free Software Foundation, Inc.
 
 ;; Keywords: extensions
-;; Version: 2.3
+;; Version: 2.4
 ;; Maintainer: Hrvoje Niksic <hniksic@srce.hr>
 
 ;; This file is part of XEmacs.
@@ -152,9 +152,8 @@
 			     (bury-buffer))
 		   "Kill"))
   (widget-insert " this buffer.\n")
-  (use-local-map (let ((map (make-sparse-keymap)))
-		   (set-keymap-parent map widget-keymap)
-		   map))
+  (use-local-map (make-sparse-keymap))
+  (set-keymap-parent (current-local-map) widget-keymap)
   (if (eq type 'bury)
       (progn
 	(local-set-key "q" 'bury-buffer)
@@ -186,7 +185,7 @@
     (widget-insert "\n")
     (let* ((emacs-short-version (concat emacs-major-version
 					"." emacs-minor-version))
-	   (emacs-about-version (format "version %s; Oct 1997"
+	   (emacs-about-version (format "version %s; Jan 1998"
 					emacs-short-version)))
       (widget-insert (about-center emacs-about-version))
       (widget-create 'link :help-echo "The latest NEWS of XEmacs"
@@ -550,12 +549,8 @@
 network administrator and Unix systems programmer for Calag.com,
 Inc. a small, but growing ISP in California.
 
-My main contributions to XEmacs have been reviving the FAQ,
-testing and integrating patches, tracking down and fixing bugs, and
-answering hundreds of questions on Usenet.
-
-Is that my picture?  I believe I already answered that in
-xemacs-beta-discuss ...")
+My main hobby while not maintaining XEmacs or working is ...
+you have got to be kidding ...")
      (widget-insert ".\n"))
     (mrb
      (widget-insert "\
@@ -1020,7 +1015,15 @@
        (print-short "Hans Muller" "hmuller@eng.sun.com" "\
 Author of the code used to connect XEmacs with ToolTalk, and of an
 early client of the external Emacs widget.\n")
+       (print-short "Didier Verna" "verna@inf.enst.fr" "\
+I'm currently working (Ph.D.) on the cognitive aspects of
+Human-Machine Interaction in Virtual Environments, and especialy on
+the possibility of adding (artificial) intelligence between the system 
+and the operator, in order to detect the intentions of the latter.
 
+Otherwise, I'm, say, 35.82% professional Jazz guitar player,
+which means that's not the way I earn my crust, but things may very
+well reverse in the future ...\n")
        "\n\
 In addition to those just mentioned, the following people have spent a
 great deal of effort providing feedback, testing beta versions of
--- a/lisp/prim/custom-load.el	Mon Aug 13 09:55:30 2007 +0200
+++ b/lisp/prim/custom-load.el	Mon Aug 13 09:56:28 2007 +0200
@@ -1,12 +1,12 @@
-(custom-put 'sound 'custom-loads '("sound"))
-(custom-put 'paren-matching 'custom-loads '())
-(custom-put 'fill-comments 'custom-loads '("simple"))
-(custom-put 'killing 'custom-loads '("simple"))
-(custom-put 'editing-basics 'custom-loads '("simple" "files" "lisp" "cmdloop"))
+(custom-put 'backup 'custom-loads '("files"))
+(custom-put 'find-file 'custom-loads '("files"))
+(custom-put 'frames 'custom-loads '("frame" "window-xemacs" "gui"))
+(custom-put 'help-appearance 'custom-loads '("help"))
+(custom-put 'isearch 'custom-loads '("isearch-mode"))
+(custom-put 'minibuffer 'custom-loads '("minibuf"))
 (custom-put 'modeline 'custom-loads '("modeline"))
-(custom-put 'minibuffer 'custom-loads '("minibuf"))
-(custom-put 'isearch 'custom-loads '("isearch-mode"))
-(custom-put 'help-appearance 'custom-loads '("help"))
-(custom-put 'frames 'custom-loads '("frame" "window-xemacs" "gui"))
-(custom-put 'find-file 'custom-loads '("files"))
-(custom-put 'backup 'custom-loads '("files"))
+(custom-put 'editing-basics 'custom-loads '("simple" "files" "lisp" "cmdloop"))
+(custom-put 'killing 'custom-loads '("simple"))
+(custom-put 'fill-comments 'custom-loads '("simple"))
+(custom-put 'paren-matching 'custom-loads '())
+(custom-put 'sound 'custom-loads '("sound"))
--- a/lisp/prim/dumped-lisp.el	Mon Aug 13 09:55:30 2007 +0200
+++ b/lisp/prim/dumped-lisp.el	Mon Aug 13 09:56:28 2007 +0200
@@ -6,6 +6,8 @@
 	"replace" 		; match-string used in version.el.
 	"version.el"		; Ignore compiled-by-mistake version.elc
 	"cl"
+	;; "cl-extra"		; These cause lossage at dump
+	;; "cl-seq"		; Fix it first, if you want these dumped
 	;;"featurep"
 	"widget"
 	"custom"		; Before the world so everything can be
@@ -179,17 +181,18 @@
 	"auto-show"
 ;; #+energize "energize/energize-load.el"
 ;;; formerly in sunpro/sunpro-load.el
+;;	#+(and mule sparcworks) "mime-setup"
 	#+sparcworks "cc-mode"
 	#+sparcworks "sunpro-init"
 	#+sparcworks "ring"
 	#+sparcworks "comint"
 	#+sparcworks "annotations"
 ;;; formerly in eos/sun-eos-load.el
-	#+sparcworks "sun-eos-init"
-	#+sparcworks "sun-eos-common"
-	#+sparcworks "sun-eos-editor"
-	#+sparcworks "sun-eos-browser"
-	#+sparcworks "sun-eos-debugger"
-	#+sparcworks "sun-eos-debugger-extra"
-	#+sparcworks "sun-eos-menubar"
+;;	#+sparcworks "sun-eos-init"
+;;	#+sparcworks "sun-eos-common"
+;;	#+sparcworks "sun-eos-editor"
+;;	#+sparcworks "sun-eos-browser"
+;;	#+sparcworks "sun-eos-debugger"
+;;	#+sparcworks "sun-eos-debugger-extra"
+;;	#+sparcworks "sun-eos-menubar"
 ))
--- a/lisp/prim/loaddefs.el	Mon Aug 13 09:55:30 2007 +0200
+++ b/lisp/prim/loaddefs.el	Mon Aug 13 09:56:28 2007 +0200
@@ -383,7 +383,7 @@
 (let ((dir load-path))
   (while dir
     (condition-case nil
-	(load (concat (car dir) "/auto-autoloads"))
+	(load (concat (car dir) "auto-autoloads"))
       (t nil))
     (pop dir)))
 
--- a/lisp/prim/loadup.el	Mon Aug 13 09:55:30 2007 +0200
+++ b/lisp/prim/loadup.el	Mon Aug 13 09:56:28 2007 +0200
@@ -59,8 +59,10 @@
      ;;
      (let ((temp-path (expand-file-name ".." (car load-path))))
        (setq source-directory temp-path)
-       (setq load-path (nconc (directory-files temp-path t "^[^-.]"
-					       nil 'dirs-only)
+       (setq load-path (nconc (mapcar
+			       #'(lambda (i) (concat i "/"))
+			       (directory-files temp-path t "^[^-.]"
+						nil 'dirs-only))
 			      (cons temp-path load-path))))
 
      (setq load-warn-when-source-newer t ; set to nil at the end
--- a/lisp/prim/make-docfile.el	Mon Aug 13 09:55:30 2007 +0200
+++ b/lisp/prim/make-docfile.el	Mon Aug 13 09:56:28 2007 +0200
@@ -77,8 +77,10 @@
 ;; Then process the list of Lisp files.
 (define-function 'defalias 'define-function)
 (let ((temp-path (expand-file-name ".." (car load-path))))
-  (setq load-path (nconc (directory-files temp-path t "^[^-.]"
-					  nil 'dirs-only)
+  (setq load-path (nconc (mapcar
+			  #'(lambda (i) (concat i "/"))
+			  (directory-files temp-path t "^[^-.]"
+					   nil 'dirs-only))
 			 (cons temp-path load-path))))
 
 ;; Then process the autoloads
@@ -159,7 +161,7 @@
       (setq exec-path (list (concat default-directory "../lib-src")))
 
       ;; (locate-file-clear-hashing nil)
-      (if (eq system-type 'berkeley-unix)
+      (if (memq system-type '(berkeley-unix next-mach))
 	  ;; Suboptimal, but we have a unresolved bug somewhere in the
 	  ;; low-level process code
 	  (call-process-internal
--- a/lisp/prim/packages.el	Mon Aug 13 09:55:30 2007 +0200
+++ b/lisp/prim/packages.el	Mon Aug 13 09:56:28 2007 +0200
@@ -140,9 +140,9 @@
 	autoloads)
     (while path
       (if (file-exists-p (concat (car path)
-				 "/" autoload-file-name))
+				 autoload-file-name))
 	  (setq autoloads (cons (concat (car path)
-					"/" autoload-file-name)
+					autoload-file-name)
 				autoloads)))
       (setq path (cdr path)))
     autoloads))
@@ -184,27 +184,38 @@
   ;; Lisp files
   (if (file-directory-p (concat package "/lisp"))
       (progn
+	;; (print (concat "DIR: " package "/lisp/"))
 	(setq load-path (cons (concat package "/lisp/") load-path))
 	(let ((dirs (directory-files (concat package "/lisp/")
 				     t "^[^-.]" nil 'dirs-only))
 	      dir)
 	  (while dirs
 	    (setq dir (car dirs))
+	    ;; (print (concat "DIR: " dir "/"))
 	    (setq load-path (cons (concat dir "/") load-path))
 	    (packages-find-packages-1 dir path-only)
 	    (setq dirs (cdr dirs)))))))
 
 ;; The following function is called from temacs
-(defun packages-find-packages (pkg-path path-only)
+(defun packages-find-packages (pkg-path path-only &optional suppress-user)
   "Search the supplied path for additional info/etc/lisp directories.
 Lisp directories if configured prior to build time will have equivalent
-status as bundled packages."
-  (let ((path pkg-path)
+status as bundled packages.
+If the argument `path-only' is non-nil, only the `load-path' will be set,
+otherwise data directories and info directories will be added.
+If the optional argument `suppress-user' is non-nil, package directories
+rooted in a user login directory (like ~/.xemacs) will not be searched.
+This is used at dump time to suppress the builder's local environment."
+  (let ((path (reverse pkg-path))
 	dir)
     (while path
       (setq dir (car path))
       ;; (prin1 (concat "Find: " (expand-file-name dir) "\n"))
-      (packages-find-packages-1 (expand-file-name dir) path-only)
+      (if (null (and suppress-user
+		     (string-match "^~" dir)))
+	  (progn
+	    ;; (print dir)
+	    (packages-find-packages-1 (expand-file-name dir) path-only)))
       (setq path (cdr path)))))
 
 ;; Data-directory is really a list now.  Provide something to search it for
@@ -225,7 +236,7 @@
 ;; If we are being loaded as part of being dumped, bootstrap the rest of the
 ;; load-path for loaddefs.
 (if (fboundp 'load-gc)
-    (packages-find-packages package-path t))
+    (packages-find-packages package-path t t))
 
 (provide 'packages)
 
--- a/lisp/prim/startup.el	Mon Aug 13 09:55:30 2007 +0200
+++ b/lisp/prim/startup.el	Mon Aug 13 09:56:28 2007 +0200
@@ -470,13 +470,13 @@
     (nreverse new-args)))
 
 (defconst initial-scratch-message "\
-;; If you want to create a file, don't type the text in this buffer.
 ;; This buffer is for notes you don't want to save, and for Lisp evaluation.
 ;; If you want to create a file, first visit that file with C-x C-f,
 ;; then enter the text in that file's own buffer.
 
 "
-  "Initial message displayed in *scratch* buffer at startup.")
+  "Initial message displayed in *scratch* buffer at startup.
+If this is nil, no message will be displayed.")
 
 (defun command-line ()
   (let ((command-line-args-left (cdr command-line-args)))
--- a/lisp/prim/subr.el	Mon Aug 13 09:55:30 2007 +0200
+++ b/lisp/prim/subr.el	Mon Aug 13 09:56:28 2007 +0200
@@ -531,6 +531,9 @@
   (interactive)
   nil)
 
+(define-function 'mapc-internal 'mapc)
+(make-obsolete 'mapc-internal 'mapc)
+
 (define-function 'eval-in-buffer 'with-current-buffer)
 (make-obsolete 'eval-in-buffer 'with-current-buffer)
 
@@ -595,6 +598,60 @@
   (eval-after-load file (read)))
 (make-compatible 'eval-next-after-load "")
 
+(defun string-to-sequence (string type)
+  "Convert STRING to a sequence of TYPE which contains characters in STRING.
+TYPE should be `list' or `vector'.
+Multibyte characters are concerned."
+  (cond ((eq type 'list)
+	 (mapcar #'identity string))
+	((eq type 'vector)
+	 (mapcar #'identity string))
+	(t
+	 (error "Type must be `list' or `vector'"))))
+
+(defun string-to-list (string)
+  "Return a list of characters in STRING."
+  (mapcar #'identity string))
+
+(defun string-to-vector (string)
+  "Return a vector of characters in STRING."
+  (mapvector #'identity string))
+
+(defun store-substring (string idx obj)
+  "Embed OBJ (string or character) at index IDX of STRING."
+  (let* ((str (cond ((stringp obj) obj)
+		    ((characterp obj) (char-to-string obj))
+		    (t (error
+			"Invalid argument (should be string or character): %s"
+			obj))))
+	 (string-len (length string))
+	 (len (length str))
+	 (i 0))
+    (while (and (< i len) (< idx string-len))
+      (aset string idx (aref str i))
+      (setq idx (1+ idx) i (1+ i)))
+    string))
+
+;;; ### Check compatibility with FSF
+;; The FSF version of this function does complex things to make each
+;; multibyte character behave as one "column".  We don't need any of
+;; it.
+(defun truncate-string-to-width (str width &optional start-column padding)
+  "Truncate string STR to fit in WIDTH columns.
+Optional 1st arg START-COLUMN if non-nil specifies the starting column.
+Optional 2nd arg PADDING if non-nil is a padding character to be padded at
+the head and tail of the resulting string to fit in WIDTH if necessary.
+If PADDING is nil, the resulting string may be narrower than WIDTH."
+  (or start-column
+      (setq start-column 0))
+  (if (< (+ start-column width) (length str))
+      (substring str start-column (+ start-column width))
+    (concat (substring str start-column)
+	    (if padding
+		(make-string (- width (length str) start-column) padding)))))
+(defalias 'truncate-string 'truncate-string-to-width)
+(make-obsolete 'truncate-string 'truncate-string-to-width)
+
 ; alternate names (not obsolete)
 (if (not (fboundp 'mod)) (define-function 'mod '%))
 (define-function 'move-marker 'set-marker)
--- a/lisp/psgml/custom-load.el	Mon Aug 13 09:55:30 2007 +0200
+++ b/lisp/psgml/custom-load.el	Mon Aug 13 09:56:28 2007 +0200
@@ -1,7 +1,7 @@
-(custom-put 'html 'custom-loads '("psgml-html"))
-(custom-put 'psgml-html 'custom-loads '("psgml-html"))
-(custom-put 'sgml 'custom-loads '("psgml-html" "psgml"))
+(custom-put 'tempo 'custom-loads '("tempo"))
+(custom-put 'psgml-dtd 'custom-loads '("psgml"))
+(custom-put 'psgml-insert 'custom-loads '("psgml"))
 (custom-put 'psgml 'custom-loads '("psgml-html" "psgml"))
-(custom-put 'psgml-insert 'custom-loads '("psgml"))
-(custom-put 'psgml-dtd 'custom-loads '("psgml"))
-(custom-put 'tempo 'custom-loads '("tempo"))
+(custom-put 'sgml 'custom-loads '("psgml-html" "psgml"))
+(custom-put 'psgml-html 'custom-loads '("psgml-html"))
+(custom-put 'html 'custom-loads '("psgml-html"))
--- a/lisp/utils/autoload.el	Mon Aug 13 09:55:30 2007 +0200
+++ b/lisp/utils/autoload.el	Mon Aug 13 09:56:28 2007 +0200
@@ -607,8 +607,8 @@
 	     (not (looking-at ";;; DO NOT MODIFY THIS FILE")))
 	(progn
 	  (insert ";;; DO NOT MODIFY THIS FILE\n")
-	  (insert "(if (featurep '" sym "-autoloads)")
-	  (insert " (error \"Already loaded\"))")
+	  (insert "(if (featurep '" sym ")")
+	  (insert " (error \"Already loaded\"))\n")
 	  (goto-char (point-max))
 	  (insert "\n(provide '" sym ")\n")))))
 
--- a/lisp/utils/custom-load.el	Mon Aug 13 09:55:30 2007 +0200
+++ b/lisp/utils/custom-load.el	Mon Aug 13 09:56:28 2007 +0200
@@ -1,13 +1,13 @@
-(custom-put 'uniquify 'custom-loads '("uniquify"))
-(custom-put 'smtpmail 'custom-loads '("smtpmail"))
-(custom-put 'savehist 'custom-loads '("savehist"))
-(custom-put 'ph 'custom-loads '("ph"))
-(custom-put 'passwd 'custom-loads '("passwd"))
-(custom-put 'highlight-headers 'custom-loads '("highlight-headers"))
+(custom-put 'highlight-headers-faces 'custom-loads '("highlight-headers"))
+(custom-put 'crontab 'custom-loads '("crontab"))
+(custom-put 'browse-url 'custom-loads '("browse-url"))
+(custom-put 'detached-minibuf 'custom-loads '("detached-minibuf"))
+(custom-put 'edmacro 'custom-loads '("edmacro"))
+(custom-put 'eldoc 'custom-loads '("eldoc"))
 (custom-put 'elp 'custom-loads '("elp"))
-(custom-put 'eldoc 'custom-loads '("eldoc"))
-(custom-put 'edmacro 'custom-loads '("edmacro"))
-(custom-put 'detached-minibuf 'custom-loads '("detached-minibuf"))
-(custom-put 'browse-url 'custom-loads '("browse-url"))
-(custom-put 'crontab 'custom-loads '("crontab"))
-(custom-put 'highlight-headers-faces 'custom-loads '("highlight-headers"))
+(custom-put 'highlight-headers 'custom-loads '("highlight-headers"))
+(custom-put 'passwd 'custom-loads '("passwd"))
+(custom-put 'ph 'custom-loads '("ph"))
+(custom-put 'savehist 'custom-loads '("savehist"))
+(custom-put 'smtpmail 'custom-loads '("smtpmail"))
+(custom-put 'uniquify 'custom-loads '("uniquify"))
--- a/lisp/utils/edmacro.el	Mon Aug 13 09:55:30 2007 +0200
+++ b/lisp/utils/edmacro.el	Mon Aug 13 09:56:28 2007 +0200
@@ -1,12 +1,12 @@
 ;;; edmacro.el --- keyboard macro editor
 
-;; Copyright (C) 1993, 1994 Free Software Foundation, Inc.
+;; Copyright (C) 1993, 1994, 1997 Free Software Foundation, Inc.
 
 ;; Author: Dave Gillespie <daveg@synaptics.com>
-;;         Hrvoje Niksic <hniksic@srce.hr>  -- XEmacs port
+;;         Hrvoje Niksic <hniksic@srce.hr>  -- XEmacs rewrite
 ;; Maintainer: Hrvoje Niksic <hniksic@srce.hr>
-;; Version: 3.17
-;; Keywords: abbrev
+;; Version: 3.19
+;; Keywords: abbrev, internal
 
 ;; This file is part of XEmacs.
 
@@ -26,10 +26,10 @@
 ;; 02111-1307, USA.
 
 ;;; Synched up with: FSF 19.34.
-;;; The important parts of this file have been rewritten for XEmacs,
-;;; so it's completely different from the FSF version.  The original
-;;; could not be used because it worked with the Emacs key
-;;; representation, and it mixed characters and integers too freely.
+;;; Most of this file has been rewritten for XEmacs, so the
+;;; implementations are out of synch.  The original version depended
+;;; too closely on GNU Emacs key representation and the equivalence of
+;;; characters and integers to be usable.
 
 ;;; Commentary:
 
@@ -83,13 +83,6 @@
 ;; With a prefix argument, `edit-kbd-macro' will format the
 ;; macro in a more concise way that omits the comments.
 
-;; This package requires GNU Emacs 19 or later, and daveg's CL
-;; package 2.02 or later.  (CL 2.02 comes standard starting with
-;; Emacs 19.18.)  This package does not work with Emacs 18 or
-;; Lucid Emacs.
-
-;; Ported to XEmacs.  This code will not run on GNU Emacs 19.  -hniksic
-
 ;;; Code:
 
 (eval-when-compile
@@ -192,7 +185,8 @@
 	(insert "\nCommand: " (if cmd (symbol-name cmd) "none") "\n")
 	(let ((keys (where-is-internal (or cmd mac))))
 	  (if keys
-	      (insert "Key: " (edmacro-format-keys (car keys)) "\n")
+	      (dolist (key keys)
+		(insert "Key: " (edmacro-format-keys key) "\n"))
 	    (insert "Key: none\n"))))
       (insert "\nMacro:\n\n")
       (save-excursion
@@ -220,13 +214,11 @@
   "Read the region as a keyboard macro definition.
 The region is interpreted as spelled-out keystrokes, e.g., \"M-x abc RET\".
 See documentation for `edmacro-mode' for details.
-Leading/trailing \"C-x (\" and \"C-x )\" in the text are allowed and ignored.
 The resulting macro is installed as the \"current\" keyboard macro.
 
 In Lisp, may also be called with a single STRING argument in which case
 the result is returned rather than being installed as the current macro.
-The result will be a string if possible, otherwise an event vector.
-Second argument NEED-VECTOR means to return an event vector always."
+The result will be a vector of keystrokes."
   (interactive "r")
   (if (stringp start)
       (edmacro-parse-keys start)
@@ -242,8 +234,7 @@
   "Return the keyboard macro MACRO as a human-readable string.
 This string is suitable for passing to `read-kbd-macro'.
 Second argument VERBOSE means to put one command per line with comments.
-If VERBOSE is `1', put everything on one line.  If VERBOSE is omitted
-or nil, use a compact 80-column format."
+If VERBOSE is nil, put everything on one line."
   (and macro (symbolp macro) (setq macro (symbol-function macro)))
   (edmacro-format-keys (or macro last-kbd-macro) verbose))
 
@@ -460,10 +451,9 @@
 
 ;;; Parsing a human-readable keyboard macro.
 
-;; Changes for XEmacs -- these two functions re-written from scratch.
-;; edmacro-parse-keys always returns a vector.  edmacro-format-keys
-;; accepts a vector (but works with a string too).  Vector may contain
-;; keypress events.      -hniksic
+;; In XEmacs version of edmacro, edmacro-parse-keys always returns a
+;; vector.  edmacro-format-keys accepts a vector (but works with a
+;; string too).
 (defun edmacro-parse-keys (string)
   (let* ((pos 0)
 	 (case-fold-search nil)
@@ -478,7 +468,7 @@
 	  (push (edmacro-parse-word word) res))))
     (mapvector 'identity (apply 'nconc (nreverse res)))))
 
-;; Parse a word.
+;; Parse a "word".
 (defun edmacro-parse-word (word)
   (let ((force-sym nil)
 	(times 1)
@@ -535,9 +525,9 @@
 	      (list (cdr abbr)))
 	     ((string-match "^\\^" word)
 	      ;; ^X == C-x
-	      (if (/= (length word) 2)
-		  (error "^ must be followed by one character"))
-	      `((control ,(aref word 1))))
+	      (if (= (length word) 2)
+		  `((control ,(aref word 1)))
+		(mapcar 'identity word)))
 	     ((string-match "^M--?[0-9]+$" word)
 	      ;; Special case: M- followed by an optional hyphen and
 	      ;; one or more digits
@@ -546,22 +536,22 @@
 		      (substring word 2)))
 	     ((string-match "^\\([MCSsAH]\\|Sh\\)-" word)
 	      ;; Parse C-* and stuff
-	      (list
-	       (let ((pos1 0)
-		     (r1 nil)
-		     follow curpart prefix)
-		 (while (progn (setq curpart (substring word pos1))
-			       (string-match "^\\([MCSsAH]\\|Sh\\)-"
-					     curpart))
-		   (setq prefix (assoc (match-string 1 curpart)
-				       edmacro-modifiers))
-		   (push (cdr prefix) r1)
-		   (incf pos1 (1+ (length (car prefix)))))
-		 (setq follow (substring word pos1))
-		 (if (equal follow "")
-		     (error "%s must precede a string"
-			    (substring word 0 pos1)))
-		 (nconc (nreverse r1) (list (funcall conv follow))))))
+	      (let ((pos1 0)
+		    (r1 nil)
+		    follow curpart prefix)
+		(while (progn (setq curpart (substring word pos1))
+			      (string-match "^\\([MCSsAH]\\|Sh\\)-"
+					    curpart))
+		  (setq prefix (assoc (match-string 1 curpart)
+				      edmacro-modifiers))
+		  (push (cdr prefix) r1)
+		  (incf pos1 (1+ (length (car prefix)))))
+		(setq follow (substring word pos1))
+		(if (equal follow "")
+		    ;; we've got something like "C-M-" -- just let it be,
+		    ;; because of the way `edmacro-format-keys' works.
+		    (mapcar 'identity word)
+		  (list (nconc (nreverse r1) (list (funcall conv follow)))))))
 	     (force-sym
 	      ;; This must be a symbol
 	      (list (intern word)))
@@ -574,7 +564,7 @@
 
 ;; Convert the keypress events in vector x to keys, and return a
 ;; vector of keys.  If a list element is not a keypress event, ignore
-;; it.
+;; it.  `events-to-keys' won't quite cut it here, as it is buggy.
 (defun edmacro-events-to-keys (x &optional list)
   (let (new)
     (mapc (lambda (el)
@@ -594,8 +584,7 @@
 	new
       (mapvector 'identity new))))
 
-;; Collapse a list of keys into a list of function keys, where
-;; applicable.
+;; Collapse a list of keys into a list of function keys, if any.
 (defun edmacro-fkeys (keys)
   (let (new k lookup)
     (while keys
@@ -616,7 +605,7 @@
 	(push k new))
     (apply 'nconc (nreverse new))))
 
-;; Convert a character or symbol to string
+;; Convert a character or symbol to string.
 (defun edmacro-conv (char-or-sym add-<>)
   (let ((char-to-word '((?\0 . "NUL")
 			(?\r . "RET")
@@ -659,10 +648,7 @@
 	(start keys)
 	el)
     (while keys
-      (when (or (eq (car keys) ?-)
-		(eq (car keys) '-)
-		(eq (car keys) ?>)
-		(not (or togetherp (eq start keys))))
+      (when (not (or togetherp (eq start keys)))
 	(callf concat res " "))
       (if (> times 1)
 	  (setq res (concat (format "%d*" times) res)))
@@ -687,6 +673,9 @@
 		   my)))
 	      (t
 	       (cdr (edmacro-conv el t)))))
+      (and (cdr keys)
+	   (memq (car keys) '(?- '- ?> ?^))
+	   (callf concat res " "))
       (pop keys))
     (if command
 	(callf concat res
@@ -706,9 +695,8 @@
 ;;; Formatting a keyboard macro as human-readable text.
 
 (defun edmacro-format-keys (macro &optional verbose)
-  ;; XEmacs:
   ;; If we're dealing with events, convert them to symbols first;
-  ;; also, deal with Fkeys.
+  ;; Then, collapse them into function keys, if possible.
   (setq macro (edmacro-fkeys (edmacro-events-to-keys macro t)))
   (let ((res ""))
     (while macro
--- a/lisp/utils/finder-inf.el	Mon Aug 13 09:55:30 2007 +0200
+++ b/lisp/utils/finder-inf.el	Mon Aug 13 09:56:28 2007 +0200
@@ -1335,7 +1335,7 @@
         nil
         "lisp/mule/")
     ("mule-cmds.el"
-        "Commands for mulitilingual environment"
+        "Commands for multilingual environment"
         (mule  multilingual)
         "lisp/mule/")
     ("mule-cne.el"
@@ -1363,7 +1363,7 @@
         nil
         "lisp/mule/")
     ("mule-util.el"
-        "Utility functions for mulitilingual environment (mule)"
+        "Utility functions for multilingual environment (mule)"
         (mule  multilingual)
         "lisp/mule/")
     ("mule-x-init.el"
--- a/lisp/version.el	Mon Aug 13 09:55:30 2007 +0200
+++ b/lisp/version.el	Mon Aug 13 09:56:28 2007 +0200
@@ -86,27 +86,28 @@
 Don't use this function in programs to choose actions according
 to the system configuration; look at `system-configuration' instead."
   (interactive "p")
-  (let ((version-string
-         (format
-	  "XEmacs %s %s(%s%s) of %s %s on %s"
-	  (substring emacs-version 0 (string-match " XEmacs" emacs-version))
-	  (if (not (featurep 'infodock))
-	      "[Lucid] "
-	    "")
-	  system-configuration
-	  (cond ((or (and (fboundp 'featurep)
-			  (featurep 'mule))
-		     (memq 'mule features)) ", Mule")
-		(t ""))
-	  (substring emacs-build-time 0
-		     (string-match " *[0-9]*:" emacs-build-time))
-	  (substring emacs-build-time
-		     (string-match "[0-9]*$" emacs-build-time))
-	  emacs-build-system)))
-    (cond
-     ((null arg) version-string)
-     ((eq arg 1) (message "%s" version-string))
-     (t          (insert version-string)))))
+  (save-match-data
+    (let ((version-string
+	   (format
+	    "XEmacs %s %s(%s%s) of %s %s on %s"
+	    (substring emacs-version 0 (string-match " XEmacs" emacs-version))
+	    (if (not (featurep 'infodock))
+		"[Lucid] "
+	      "")
+	    system-configuration
+	    (cond ((or (and (fboundp 'featurep)
+			    (featurep 'mule))
+		       (memq 'mule features)) ", Mule")
+		  (t ""))
+	    (substring emacs-build-time 0
+		       (string-match " *[0-9]*:" emacs-build-time))
+	    (substring emacs-build-time
+		       (string-match "[0-9]*$" emacs-build-time))
+	    emacs-build-system)))
+      (cond
+       ((null arg) version-string)
+       ((eq arg 1) (message "%s" version-string))
+       (t          (insert version-string))))))
 
 ;; from emacs-vers.el
 (defun emacs-version>= (major &optional minor)
--- a/lisp/viper/viper-keym.el	Mon Aug 13 09:55:30 2007 +0200
+++ b/lisp/viper/viper-keym.el	Mon Aug 13 09:56:28 2007 +0200
@@ -452,10 +452,6 @@
 (define-key viper-dired-modifier-map ":" 'viper-ex)
 (define-key viper-dired-modifier-map "/" 'viper-search-forward)
 
-(defvar viper-help-modifier-map (make-sparse-keymap)
-  "This map modifies Help mode behavior.")
-(define-key viper-help-modifier-map "q" (if viper-xemacs-p 'help-mode-quit))
-
 
 
 ;;; Code
--- a/lisp/viper/viper.el	Mon Aug 13 09:55:30 2007 +0200
+++ b/lisp/viper/viper.el	Mon Aug 13 09:56:28 2007 +0200
@@ -630,9 +630,10 @@
   (defvar makefile-mode-hook)
   (add-hook 'makefile-mode-hook 'viper-mode)
 
+  ;; Help mode is now for viewing only
   (defvar help-mode-hook)
-  (add-hook 'help-mode-hook 'viper-mode)
-  (viper-modify-major-mode 'help-mode 'vi-state viper-help-modifier-map)
+  (add-hook 'help-mode-hook 'viper-change-state-to-emacs)
+  (viper-modify-major-mode 'help-mode 'emacs-state viper-slash-and-colon-map)
 
   (defvar awk-mode-hook)
   (add-hook 'awk-mode-hook 'viper-mode)
--- a/lisp/x11/x-compose.el	Mon Aug 13 09:55:30 2007 +0200
+++ b/lisp/x11/x-compose.el	Mon Aug 13 09:56:28 2007 +0200
@@ -4,6 +4,8 @@
 
 ;; Author: Jamie Zawinski <jwz@netscape.com>
 ;; Maintainer: XEmacs Development Team
+;; Rewritten by Martin Buchholz far too many times.
+;;
 ;; Changed: 11 Jun 1997 by Heiko Muenkel <muenkel@tnt.uni-hannover.de>
 ;;	The degree sign couldn't be inserted with the old version.
 ;; Keywords: i18n
@@ -101,25 +103,24 @@
 
 (require 'x-iso8859-1)
 
-(defvar compose-map		(make-keymap))
-(defvar compose-acute-map	(make-sparse-keymap))
-(defvar compose-grave-map	(make-sparse-keymap))
-(defvar compose-cedilla-map	(make-sparse-keymap))
-(defvar compose-diaeresis-map	(make-sparse-keymap))
-(defvar compose-circumflex-map	(make-sparse-keymap))
-(defvar compose-tilde-map	(make-sparse-keymap))
-(defvar compose-ring-map	(make-sparse-keymap))
+(defun make-compose-map (map-sym)
+  (let ((map (make-sparse-keymap)))
+    (set map-sym map)
+    (set-keymap-name map map-sym)
+    ;; Required to tell XEmacs the keymaps were actually autoloaded.
+    ;; #### Make this unnecessary!
+    (fset map-sym map)))
 
-;; Required to tell XEmacs the keymaps were actually autoloaded.
-;; #### Make this unnecessary!
-(fset 'compose-map            compose-map)
-(fset 'compose-acute-map      compose-acute-map)
-(fset 'compose-grave-map      compose-grave-map)
-(fset 'compose-cedilla-map    compose-cedilla-map)
-(fset 'compose-diaeresis-map  compose-diaeresis-map)
-(fset 'compose-circumflex-map compose-circumflex-map)
-(fset 'compose-tilde-map      compose-tilde-map)
-(fset 'compose-ring-map       compose-ring-map)
+(make-compose-map 'compose-map)
+(make-compose-map 'compose-acute-map)
+(make-compose-map 'compose-grave-map)
+(make-compose-map 'compose-cedilla-map)
+(make-compose-map 'compose-diaeresis-map)
+(make-compose-map 'compose-circumflex-map)
+(make-compose-map 'compose-tilde-map)
+(make-compose-map 'compose-ring-map)
+
+(unintern 'make-compose-map)
 
 (define-key compose-map 'acute	    compose-acute-map)
 (define-key compose-map 'grave	    compose-grave-map)
@@ -165,14 +166,20 @@
 ;;(define-dead-key-map [diaeresis] compose-diaeresis-map)
 ;;(define-dead-key-map [degree]	 compose-ring-map)
 
-(define-key compose-map [?']	compose-acute-map)
-(define-key compose-map [?`]	compose-grave-map)
-(define-key compose-map [?,]	compose-cedilla-map)
-(define-key compose-map [?\"]	compose-diaeresis-map)
-(define-key compose-map [?:]	compose-diaeresis-map)
-(define-key compose-map [?^]	compose-circumflex-map)
-(define-key compose-map [~]	compose-tilde-map)
-(define-key compose-map [?*]	compose-ring-map)
+(define-key compose-map [acute]		compose-acute-map)
+(define-key compose-map [?']		compose-acute-map)
+(define-key compose-map [grave]		compose-grave-map)
+(define-key compose-map [?`]		compose-grave-map)
+(define-key compose-map [cedilla]	compose-cedilla-map)
+(define-key compose-map [?,]		compose-cedilla-map)
+(define-key compose-map [diaeresis]	compose-diaeresis-map)
+(define-key compose-map [?\"]		compose-diaeresis-map)
+(define-key compose-map [circumflex]	compose-circumflex-map)
+(define-key compose-map [?^]		compose-circumflex-map)
+(define-key compose-map [tilde]		compose-tilde-map)
+(define-key compose-map [~]		compose-tilde-map)
+(define-key compose-map [degree]	compose-ring-map)
+(define-key compose-map [?*]		compose-ring-map)
 
 
 ;;; The dead keys might really be called just about anything, depending
@@ -288,7 +295,6 @@
 ;;; The contents of the "dead key" maps.  These are shared by the
 ;;; compose-map.
 
-(set-keymap-name compose-acute-map 'compose-acute-map)
 (define-key compose-acute-map [space]	"'")
 (define-key compose-acute-map [?']	[acute])
 (define-key compose-acute-map [?A]	[Aacute])
@@ -304,7 +310,6 @@
 (define-key compose-acute-map [u]	[uacute])
 (define-key compose-acute-map [y]	[yacute])
 
-(set-keymap-name compose-grave-map 'compose-grave-map)
 (define-key compose-grave-map [space]	"`")
 (define-key compose-grave-map [?`]	[grave])
 (define-key compose-grave-map [A]	[Agrave])
@@ -318,13 +323,11 @@
 (define-key compose-grave-map [o]	[ograve])
 (define-key compose-grave-map [u]	[ugrave])
 
-(set-keymap-name compose-cedilla-map 'compose-cedilla-map)
 (define-key compose-cedilla-map [space]	",")
 (define-key compose-cedilla-map [?,]	[cedilla])
 (define-key compose-cedilla-map [C]	[Ccedilla])
 (define-key compose-cedilla-map [c]	[ccedilla])
 
-(set-keymap-name compose-diaeresis-map 'compose-diaeresis-map)
 (define-key compose-diaeresis-map [space] [diaeresis])
 (define-key compose-diaeresis-map [?\"]	[diaeresis])
 (define-key compose-diaeresis-map [A]	[Adiaeresis])
@@ -339,7 +342,6 @@
 (define-key compose-diaeresis-map [u]	[udiaeresis])
 (define-key compose-diaeresis-map [y]	[ydiaeresis])
 
-(set-keymap-name compose-circumflex-map 'compose-circumflex-map)
 (define-key compose-circumflex-map [space] "^")
 (define-key compose-circumflex-map [?/]	"|")
 (define-key compose-circumflex-map [?!]	[brokenbar])
@@ -361,7 +363,6 @@
 (define-key compose-circumflex-map [o]	[ocircumflex])
 (define-key compose-circumflex-map [u]	[ucircumflex])
 
-(set-keymap-name compose-tilde-map 'compose-tilde-map)
 (define-key compose-tilde-map [space]	"~")
 (define-key compose-tilde-map [A]	[Atilde])
 (define-key compose-tilde-map [N]	[Ntilde])
@@ -370,7 +371,6 @@
 (define-key compose-tilde-map [n]	[ntilde])
 (define-key compose-tilde-map [o]	[otilde])
 
-(set-keymap-name compose-ring-map 'compose-ring-map)
 (define-key compose-ring-map [space]	[degree])
 (define-key compose-ring-map [A]	[Aring])
 (define-key compose-ring-map [a]	[aring])
@@ -379,13 +379,13 @@
 ;;; The rest of the compose-map.  These are the composed characters
 ;;; that are not accessible via "dead" keys.
 
-(set-keymap-name compose-map 'compose-map)
 (define-key compose-map " '"	"'")
 (define-key compose-map " ^"	"^")
 (define-key compose-map " `"	"`")
 (define-key compose-map " ~"	"~")
 (define-key compose-map "  "	[nobreakspace])
 (define-key compose-map " \""	[diaeresis])
+(define-key compose-map " :"	[diaeresis])
 (define-key compose-map " *"	[degree])
 
 (define-key compose-map "!!"	[exclamdown])
@@ -579,6 +579,7 @@
 (define-key compose-map "i'"	[iacute])
 (define-key compose-map "i^"	[icircumflex])
 (define-key compose-map "i\""	[idiaeresis])
+(define-key compose-map "i:"	[idiaeresis])
 
 (define-key compose-map "l-"	[sterling])
 (define-key compose-map "l="	[sterling])
@@ -636,8 +637,48 @@
 (define-key compose-map "||"	[brokenbar])
 
 
+;; Suppose we type these three physical keys: [Multi_key " a]
+;; Xlib can deliver these keys as the following sequences of keysyms:
+;;
+;; - [Multi_key " a] (no surprise here)
+;; - [adiaeresis] (OK, Xlib is doing compose processing for us)
+;; - [Multi_key " adiaeresis] (Huh?)
+;;
+;; It is the last possibility that is arguably a bug.  Xlib can't
+;; decide whether it's really doing compose processing or not (or
+;; actually, different parts of Xlib disagree).
+;;
+;; So we'll just convert [Multi_key " adiaeresis] to [adiaeresis]
+(defun xlib-input-method-bug-workaround (keymap)
+  (map-keymap
+   (lambda (key value)
+     (cond
+      ((keymapp value)
+       (xlib-input-method-bug-workaround value))
+      ((and (sequencep value)
+	    (eq 1 (length value))
+	    (null (lookup-key keymap value)))
+       (define-key keymap value value))))
+   keymap))
+(xlib-input-method-bug-workaround compose-map)
+(unintern 'xlib-input-method-bug-workaround)
+
+;; While we're at it, a similar mechanism will make colon equivalent
+;; to doublequote for diaeresis processing.  Some Xlibs do this.
+(defun alias-colon-to-doublequote (keymap)
+  (map-keymap
+   (lambda (key value)
+     (when (keymapp value)
+       (alias-colon-to-doublequote value))
+     (when (eq key '\")
+       (define-key keymap ":" value)))
+   keymap))
+(alias-colon-to-doublequote compose-map)
+(unintern 'alias-colon-to-doublequote)
+
 ;;; Electric dead keys: making a' mean a-acute.
 
+
 (defun electric-diacritic (&optional count)
   "Modify the previous character with an accent.
 For example, if `:' is bound to this command, then typing `a:'
--- a/lisp/x11/x-init.el	Mon Aug 13 09:55:30 2007 +0200
+++ b/lisp/x11/x-init.el	Mon Aug 13 09:56:28 2007 +0200
@@ -129,89 +129,79 @@
   (x-define-dead-key degree			compose-ring-map)
 
   ;; Sun according to MIT:
-  (when (x-valid-keysym-name-p "SunFA_Acute")
-    (x-define-dead-key SunFA_Acute		compose-acute-map)
-    (x-define-dead-key SunFA_Grave		compose-grave-map)
-    (x-define-dead-key SunFA_Cedilla		compose-cedilla-map)
-    (x-define-dead-key SunFA_Diaeresis		compose-diaeresis-map)
-    (x-define-dead-key SunFA_Circum		compose-circumflex-map)
-    (x-define-dead-key SunFA_Tilde		compose-tilde-map))
+  (x-define-dead-key SunFA_Acute		compose-acute-map)
+  (x-define-dead-key SunFA_Grave		compose-grave-map)
+  (x-define-dead-key SunFA_Cedilla		compose-cedilla-map)
+  (x-define-dead-key SunFA_Diaeresis		compose-diaeresis-map)
+  (x-define-dead-key SunFA_Circum		compose-circumflex-map)
+  (x-define-dead-key SunFA_Tilde		compose-tilde-map)
 
   ;; Sun according to OpenWindows 2:
-  (when (x-valid-keysym-name-p "Dead_Grave")
-    (x-define-dead-key Dead_Grave		compose-grave-map)
-    (x-define-dead-key Dead_Circum		compose-circumflex-map)
-    (x-define-dead-key Dead_Tilde		compose-tilde-map))
+  (x-define-dead-key Dead_Grave			compose-grave-map)
+  (x-define-dead-key Dead_Circum		compose-circumflex-map)
+  (x-define-dead-key Dead_Tilde			compose-tilde-map)
 
   ;; Sun according to OpenWindows 3:
-  (when (x-valid-keysym-name-p "SunXK_FA_Acute")
-    (x-define-dead-key SunXK_FA_Acute		compose-acute-map)
-    (x-define-dead-key SunXK_FA_Grave		compose-grave-map)
-    (x-define-dead-key SunXK_FA_Cedilla		compose-cedilla-map)
-    (x-define-dead-key SunXK_FA_Diaeresis	compose-diaeresis-map)
-    (x-define-dead-key SunXK_FA_Circum		compose-circumflex-map)
-    (x-define-dead-key SunXK_FA_Tilde		compose-tilde-map))
+  (x-define-dead-key SunXK_FA_Acute		compose-acute-map)
+  (x-define-dead-key SunXK_FA_Grave		compose-grave-map)
+  (x-define-dead-key SunXK_FA_Cedilla		compose-cedilla-map)
+  (x-define-dead-key SunXK_FA_Diaeresis		compose-diaeresis-map)
+  (x-define-dead-key SunXK_FA_Circum		compose-circumflex-map)
+  (x-define-dead-key SunXK_FA_Tilde		compose-tilde-map)
 
   ;; DEC according to MIT:
-  (when (x-valid-keysym-name-p "Dacute_accent")
-    (x-define-dead-key Dacute_accent		compose-acute-map)
-    (x-define-dead-key Dgrave_accent		compose-grave-map)
-    (x-define-dead-key Dcedilla_accent		compose-cedilla-map)
-    (x-define-dead-key Dcircumflex_accent	compose-circumflex-map)
-    (x-define-dead-key Dtilde			compose-tilde-map)
-    (x-define-dead-key Dring_accent		compose-ring-map))
+  (x-define-dead-key Dacute_accent		compose-acute-map)
+  (x-define-dead-key Dgrave_accent		compose-grave-map)
+  (x-define-dead-key Dcedilla_accent		compose-cedilla-map)
+  (x-define-dead-key Dcircumflex_accent		compose-circumflex-map)
+  (x-define-dead-key Dtilde			compose-tilde-map)
+  (x-define-dead-key Dring_accent		compose-ring-map)
 
   ;; DEC according to OpenWindows 3:
-  (when (x-valid-keysym-name-p "DXK_acute_accent")
-    (x-define-dead-key DXK_acute_accent		compose-acute-map)
-    (x-define-dead-key DXK_grave_accent		compose-grave-map)
-    (x-define-dead-key DXK_cedilla_accent	compose-cedilla-map)
-    (x-define-dead-key DXK_circumflex_accent	compose-circumflex-map)
-    (x-define-dead-key DXK_tilde		compose-tilde-map)
-    (x-define-dead-key DXK_ring_accent		compose-ring-map))
+  (x-define-dead-key DXK_acute_accent		compose-acute-map)
+  (x-define-dead-key DXK_grave_accent		compose-grave-map)
+  (x-define-dead-key DXK_cedilla_accent		compose-cedilla-map)
+  (x-define-dead-key DXK_circumflex_accent	compose-circumflex-map)
+  (x-define-dead-key DXK_tilde			compose-tilde-map)
+  (x-define-dead-key DXK_ring_accent		compose-ring-map)
 
   ;; HP according to MIT:
-  (when (x-valid-keysym-name-p "hpmute_acute")
-    (x-define-dead-key hpmute_acute		compose-acute-map)
-    (x-define-dead-key hpmute_grave		compose-grave-map)
-    (x-define-dead-key hpmute_diaeresis		compose-diaeresis-map)
-    (x-define-dead-key hpmute_asciicircum	compose-circumflex-map)
-    (x-define-dead-key hpmute_asciitilde	compose-tilde-map))
+  (x-define-dead-key hpmute_acute		compose-acute-map)
+  (x-define-dead-key hpmute_grave		compose-grave-map)
+  (x-define-dead-key hpmute_diaeresis		compose-diaeresis-map)
+  (x-define-dead-key hpmute_asciicircum		compose-circumflex-map)
+  (x-define-dead-key hpmute_asciitilde		compose-tilde-map)
 
   ;; HP according to OpenWindows 3:
-  (when (x-valid-keysym-name-p "hpXK_mute_acute")
-    (x-define-dead-key hpXK_mute_acute		compose-acute-map)
-    (x-define-dead-key hpXK_mute_grave		compose-grave-map)
-    (x-define-dead-key hpXK_mute_diaeresis	compose-diaeresis-map)
-    (x-define-dead-key hpXK_mute_asciicircum	compose-circumflex-map)
-    (x-define-dead-key hpXK_mute_asciitilde	compose-tilde-map))
+  (x-define-dead-key hpXK_mute_acute		compose-acute-map)
+  (x-define-dead-key hpXK_mute_grave		compose-grave-map)
+  (x-define-dead-key hpXK_mute_diaeresis	compose-diaeresis-map)
+  (x-define-dead-key hpXK_mute_asciicircum	compose-circumflex-map)
+  (x-define-dead-key hpXK_mute_asciitilde	compose-tilde-map)
 
   ;; HP according to HP-UX 8.0:
-  (when (x-valid-keysym-name-p "XK_mute_acute")
-    (x-define-dead-key XK_mute_acute		compose-acute-map)
-    (x-define-dead-key XK_mute_grave		compose-grave-map)
-    (x-define-dead-key XK_mute_diaeresis	compose-diaeresis-map)
-    (x-define-dead-key XK_mute_asciicircum	compose-circumflex-map)
-    (x-define-dead-key XK_mute_asciitilde	compose-tilde-map))
+  (x-define-dead-key XK_mute_acute		compose-acute-map)
+  (x-define-dead-key XK_mute_grave		compose-grave-map)
+  (x-define-dead-key XK_mute_diaeresis		compose-diaeresis-map)
+  (x-define-dead-key XK_mute_asciicircum	compose-circumflex-map)
+  (x-define-dead-key XK_mute_asciitilde		compose-tilde-map)
 
   ;; Xfree86 seems to use lower case and a hyphen
-  (when (x-valid-keysym-name-p "dead-acute")
-    (x-define-dead-key dead-acute		compose-acute-map)
-    (x-define-dead-key dead-grave		compose-grave-map)
-    (x-define-dead-key dead-cedilla		compose-cedilla-map)
-    (x-define-dead-key dead-diaeresis		compose-diaeresis-map)
-    (x-define-dead-key dead-circum		compose-circumflex-map)
-    (x-define-dead-key dead-tilde		compose-tilde-map))
+  (x-define-dead-key dead-acute			compose-acute-map)
+  (x-define-dead-key dead-grave			compose-grave-map)
+  (x-define-dead-key dead-cedilla		compose-cedilla-map)
+  (x-define-dead-key dead-diaeresis		compose-diaeresis-map)
+  (x-define-dead-key dead-circum		compose-circumflex-map)
+  (x-define-dead-key dead-tilde			compose-tilde-map)
 
   ;;  and AIX uses underscore, sigh....
-  (when (x-valid-keysym-name-p "dead_acute")
-    (x-define-dead-key dead_acute		compose-acute-map)
-    (x-define-dead-key dead_grave		compose-grave-map)
-    (x-define-dead-key dead_cedilla		compose-cedilla-map)
-    (x-define-dead-key dead_diaeresis		compose-diaeresis-map)
-    (x-define-dead-key dead_circum		compose-circumflex-map)
-    (x-define-dead-key dead_tilde		compose-tilde-map))
-)
+  (x-define-dead-key dead_acute			compose-acute-map)
+  (x-define-dead-key dead_grave			compose-grave-map)
+  (x-define-dead-key dead_cedilla		compose-cedilla-map)
+  (x-define-dead-key dead_diaeresis		compose-diaeresis-map)
+  (x-define-dead-key dead_circum		compose-circumflex-map)
+  (x-define-dead-key dead_tilde			compose-tilde-map)
+  )
 
 (defun x-initialize-keyboard ()
   "Perform X-Server-specific initializations.  Don't call this."
@@ -230,13 +220,10 @@
 	       (string-equal "MIT X Consortium" vendor)
 	       (string-equal "X Consortium" vendor))
            ;; Ok, we think this could be a Sun keyboard.  Load the Sun code.
-           (or (load "x-win-sun" t t)
-               (warn "Unable to load term file x-win-sun")))
+           (load "x-win-sun"))
           ((string-match "XFree86" vendor)
            ;; Those XFree86 people do some weird keysym stuff, too.
-           (or (load "x-win-xfree86" t t)
-               (warn "Unable to load term file x-win-xfree86")))
-          )))
+           (load "x-win-xfree86")))))
 
 
 (defvar pre-x-win-initted nil)
--- a/lisp/x11/x-toolbar.el	Mon Aug 13 09:55:30 2007 +0200
+++ b/lisp/x11/x-toolbar.el	Mon Aug 13 09:56:28 2007 +0200
@@ -95,7 +95,6 @@
 (defcustom toolbar-paste-function 'x-yank-clipboard-selection
   "*Function to call when the paste icon is selected."
   :type '(radio (function-item x-yank-clipboard-selection)
-		(function-item x-yank-primary-selection)
                 (function :tag "Other"))
   :group 'toolbar)
 
--- a/lisp/x11/x-win-sun.el	Mon Aug 13 09:55:30 2007 +0200
+++ b/lisp/x11/x-win-sun.el	Mon Aug 13 09:56:28 2007 +0200
@@ -64,24 +64,17 @@
 
 ;;; Code:
 
-(defun x11-remap-keysyms-using-function-key-map (mapping)
-  (while mapping
-    (let ((k1 (caar mapping))
-          (k2 (cdar mapping)))
-      (mapc #'(lambda (prefix)
-                (define-key function-key-map
-                  (append prefix (list k1))
-                  (vector (append prefix (list k2)))))
-            '(() (shift) (control) (meta) (alt)
-              (shift control) (shift alt) (shift meta)
-              (control alt) (control meta) (alt meta)
-              (shift control alt) (shift control meta)
-              (shift alt meta) (control alt meta)
-              (shift control alt meta))
-            ))
-    (setq mapping (cdr mapping))))
+(defun x-remap-keysyms-using-function-key-map (from-key to-key)
+  (dolist (prefix '(() (shift) (control) (meta) (alt)
+		    (shift control) (shift alt) (shift meta)
+		    (control alt) (control meta) (alt meta)
+		    (shift control alt) (shift control meta)
+		    (shift alt meta) (control alt meta)
+		    (shift control alt meta)))
+    (define-key function-key-map
+      (append prefix (list from-key))
+      (vector (append prefix (list to-key))))))
 
-(x11-remap-keysyms-using-function-key-map
  ;; help is ok
  ;; num_lock is ok
  ;; up is ok
@@ -92,89 +85,86 @@
  ;; insert is ok
  ;; delete is ok
  ;; kp-enter is ok
- (append
-  ;; Sun Function keys
-  (cond ((x-keysym-on-keyboard-p "F21")
-         '((f21 . pause)
-           (f22 . print)
-           (f23 . scroll_lock))))
-         
-  (cond ((x-keysym-on-keyboard-p "SunCut") ; X11 R6 mappings
-         '((SunProps . props) (Undo     . undo)
-           (SunFront . front) (SunCopy  . copy)
-           (SunOpen  . open)  (SunPaste . paste)
-           (SunFind  . find)  (SunCut   . cut)
-           (cancel   . stop)))
-        
-        ((x-keysym-on-keyboard-p "F20")
-         '((f13	. props) (f14 . undo)
-           (f15	. front) (f16 . copy)
-           (f17	. open)  (f18 . paste)
-           (f19	. find)  (f20 . cut))))
-  
-  (if (x-keysym-on-keyboard-p "F25")    ; Sun Sparc keyboards
-      (append
-       '((f21 . pause)
-         (f22 . prsc)
-         (f23 . scroll)
-         (f25 . kp-divide)
-         (f26 . kp-multiply)
-         (f31 . kp-5))
-       
-       ;; Map f33 and r13 to end or kp-end
-       (cond
-        ((not (x-keysym-on-keyboard-p "End"))
-         '((f33 . end)    (r13 . end)))
-        ((not (x-keysym-on-keyboard-p "KP_End"))
-         '((f33 . kp-end) (r13 . kp-end))))
-  
-       (if (x-keysym-on-keyboard-p "F36")
-           '((f36 . stop) (f37 . again)) ; MIT Type 5 name
-         '((f11 . stop) (f12 . again)))  ; Sun name or MIT Type 4 name
-    
-       ;; Type 4 keyboards have a real kp-subtract  and a f24 labelled `='
-       ;; Type 5 keyboards have no key labelled `=' and a f24 labelled `-'
-       (if (x-keysym-on-keyboard-p "F24")
-           (if (x-keysym-on-keyboard-p "KP_Subtract")
-               '((f24 . kp-equal))
-             '((f24 . kp-subtract))))
-  
-       ;; Map f27 to home or kp-home, as appropriate
-       (cond ((not (x-keysym-on-keyboard-p "Home"))    '((f27 . home)))
-             ((not (x-keysym-on-keyboard-p "KP_Home")) '((f27 . kp-home))))
+;; Sun Function keys
+(loop for (x-name from-key to-key) in
+      `(("F21" f21 pause)
+	("F22" f22 print)
+	("F23" f23 scroll_lock)
+
+	;; X11 R6 mappings
+	("SunProps" SunProps props)
+	("SunFront" SunFront front)
+	("SunOpen"  SunOpen  open)
+	("SunFind"  SunFind  find)
+	("Cancel"   cancel   stop)
+	("Undo"     Undo     undo)
+	("SunCopy"  SunCopy  copy)
+	("SunPaste" SunPaste paste)
+	("SunCut"   SunCut   cut)
+
+	("F13" f13 props)
+	("F14" f14 undo)
+	("F15" f15 front)
+	("F16" f16 copy)
+	("F17" f17 open)
+	("F18" f18 paste)
+	("F19" f19 find)
+	("F20" f20 cut)
+
+	("F25" f25 kp-divide)
+	("F26" f26 kp-multiply)
+	("F31" f31 kp-5)
+
+	;; Map f33 and r13 to end or kp-end
+	,@(cond
+	   ((not (x-keysym-on-keyboard-sans-modifiers-p "End"))
+	    '(("F33" f33 end)
+	      ("R13" r13 end)))
+	   ((not (x-keysym-on-keyboard-sans-modifiers-p "KP_End"))
+	    '(("F33" f33 kp-end)
+	      ("R13" r13 kp-end))))
 
-       ;; Map f29 to prior or kp-prior, as appropriate
-       (cond ((not (x-keysym-on-keyboard-p "Prior"))     '((f29 . prior)))
-             ((not (x-keysym-on-keyboard-p "KP_Prior"))  '((f29 . kp-prior))))
+	,@(if (x-keysym-on-keyboard-sans-modifiers-p "F36")
+	      '(("F36" f36 stop)
+		("F37" f37 again)))
 
-       ;; Map f35 to next or kp-next, as appropriate
-       (cond ((not (x-keysym-on-keyboard-p "Next"))    '((f35 . next)))
-             ((not (x-keysym-on-keyboard-p "KP_Next")) '((f35 . kp-next))))
-       ))
+	;; Type 4 keyboards have a real kp-subtract  and a f24 labelled `='
+	;; Type 5 keyboards have no key labelled `=' and a f24 labelled `-'
+	,@(when (x-keysym-on-keyboard-sans-modifiers-p "F24")
+	    `(("F24" f24 ,(if (x-keysym-on-keyboard-sans-modifiers-p "KP_Subtract")
+			      'kp-equal
+			    'kp-subtract))))
 
-  (cond ((x-keysym-on-keyboard-p "apRead") ; SunOS 4.1.1
-         '((apRead . f11) (apEdit . f12)))
-        ((x-keysym-on-keyboard-p "SunF36") ; SunOS 5
-         '((SunF36 . f11) (SunF37 . f12))))
+	;; Map f27 to home or kp-home, as appropriate
+	,@(cond ((not (x-keysym-on-keyboard-sans-modifiers-p "Home"))
+		 '(("F27" f27 home)))
+		((not (x-keysym-on-keyboard-sans-modifiers-p "KP_Home"))
+		 '(("F27" f27 kp-home))))
 
-  ;; !@#$ SunOS 4 with SunOS5 X server
-  (if (string-match "sunos4.1" system-configuration)
-      '((unknown_keysym_0xFF9A . kp-prior)
-        (unknown_keysym_0xFF9B . kp-next)
-        (unknown_keysym_0xFF95 . kp-home)
-        (unknown_keysym_0xFF9C . kp-end)
-        (unknown_keysym_0xFF96 . kp-left)
-        (unknown_keysym_0xFF97 . kp-up)
-        (unknown_keysym_0xFF98 . kp-right)
-        (unknown_keysym_0xFF99 . kp-down)
-        (unknown_keysym_0xFF9E . kp-insert)))
-  ))
+	;; Map f29 to prior or kp-prior, as appropriate
+	,@(cond ((not (x-keysym-on-keyboard-sans-modifiers-p "Prior"))
+		 '(("F29" f29 prior)))
+		((not (x-keysym-on-keyboard-sans-modifiers-p "KP_Prior"))
+		 '(("F29" f29 kp-prior))))
 
-(fmakunbound 'x11-remap-keysyms-using-function-key-map)
+	;; Map f35 to next or kp-next, as appropriate
+	,@(cond ((not (x-keysym-on-keyboard-sans-modifiers-p "Next"))
+		 '(("F35" f35 next)))
+		((not (x-keysym-on-keyboard-sans-modifiers-p "KP_Next"))
+		 '(("F35" f35 kp-next))))
 
+	,@(cond ((x-keysym-on-keyboard-sans-modifiers-p "apRead") ; SunOS 4.1.1
+		 '(("apRead" apRead f11) ("apEdit" apEdit f12)))
+		((x-keysym-on-keyboard-sans-modifiers-p "SunF36") ; SunOS 5
+		 '(("SunF36" SunF36 f11) ("SunF37" SunF37 f12))))
+	)
+      do (when (x-keysym-on-keyboard-sans-modifiers-p x-name)
+	   (x-remap-keysyms-using-function-key-map from-key to-key)))
+
+(unintern 'x-remap-keysyms-using-function-key-map)
 
   ;; for each element in the left column of the above table, alias it
-  ;; to the thing in the right column.  Then do the same for mamy, but
+  ;; to the thing in the right column.  Then do the same for many, but
   ;; not all, modifier combinations.
   ;;
   ;; (Well, we omit hyper and super. #### Handle this some other way!)
@@ -193,14 +183,14 @@
 ;;; it's brain-dead in the typically FSF way, and associates *numbers*
 ;;; (who knows where the hell they come from?) with symbols.] --ben
 
-;;; And I've made it into a function which is not called by default --mrb
+;;; And I've made it into a function which is NOT called by default --mrb
 
 (defun sun-x11-keyboard-translate ()
   "Remap Sun's X11 keyboard.
 Keys with names like `f35' are remapped, at a low level,
 to more mnemonic ones,like `kp-3'."
   (interactive)
-  
+
   (keyboard-translate
    'f11		'stop			; the type4 keyboard Sun/MIT name
    'f36		'stop			; the type5 keyboard Sun name
@@ -251,7 +241,7 @@
 
 ;;; OpenWindows-like "find" processing.
 ;;; As far as I know, the `find' key is a Sunism, so we do that binding
-;;; here.  This is the only Sun-specific keybinding.  (The functions 
+;;; here.  This is the only Sun-specific keybinding.  (The functions
 ;;; themselves are in x-win.el in case someone wants to use them when
 ;;; not running on a Sun display.)
 
--- a/lisp/x11/x-win-xfree86.el	Mon Aug 13 09:55:30 2007 +0200
+++ b/lisp/x11/x-win-xfree86.el	Mon Aug 13 09:56:28 2007 +0200
@@ -3,6 +3,7 @@
 ;; Copyright (C) 1995 Ben Wing.
 
 ;; Author: Ben Wing
+;; Author: Martin Buchholz (rewritten to use function-key-map)
 ;; Keywords: terminals
 
 ;; This file is part of XEmacs.
@@ -18,7 +19,7 @@
 ;; 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 
+;; 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.
 
@@ -30,32 +31,58 @@
 
 ;;; #### bleck!!! Use key-translation-map!
 
+;;; #### Counter-bleck!! We shouldn't override a user binding for F13.
+;;; So we use function-key-map for now.
+;;; When we've implemented a fallback-style equivalent of
+;;; keyboard-translate-table, we'll use that instead. (mrb)
+
 ;; For no obvious reason, shift-F1 is called F13, although Meta-F1 and
 ;; Control-F1 have normal names.
 
-(let ((mapping '((f13 . (shift f1))
-		 (f14 . (shift f2))
-		 (f15 . (shift f3))
-		 (f16 . (shift f4))
-		 (f17 . (shift f5))
-		 (f18 . (shift f6))
-		 (f19 . (shift f7))
-		 (f20 . (shift f8))
-		 (f21 . (shift f9))
-		 (f22 . (shift f10))
-		 (f23 . (shift f11))
-		 (f24 . (shift f12)))))
+(loop for (x-key key sane-key) in
+  '(("F13" f13 f1)
+    ("F14" f14 f2)
+    ("F15" f15 f3)
+    ("F16" f16 f4)
+    ("F17" f17 f5)
+    ("F18" f18 f6)
+    ("F19" f19 f7)
+    ("F20" f20 f8)
+    ("F21" f21 f9)
+    ("F22" f22 f10)
+    ("F23" f23 f11)
+    ("F24" f24 f12))
+  do
+  (when (and (x-keysym-on-keyboard-p x-key)
+	     (not (x-keysym-on-keyboard-sans-modifiers-p x-key)))
+    ;; define also the control, meta, and meta-control versions.
+    (loop for mods in '(() (control) (meta) (meta control)) do
+      (define-key function-key-map `[(,@mods ,key)] `[(shift ,@mods ,sane-key)])
+      )))
 
-  ;; now define them and also the control, meta, and meta-control versions.
-  (while mapping
-    (let* ((foo (caar mapping))
-	   (bar (cdar mapping))
-	   (foo (if (listp foo) foo (list foo)))
-	   (bar (if (listp bar) bar (list bar))))
-      (let ((mods '(() (control) (meta) (meta control))))
-	(while mods
-	  (let ((k1 (vector (append (car mods) foo)))
-		(k2 (vector (append (car mods) bar))))
-	    (define-key global-map k1 k2))
-	  (setq mods (cdr mods))))
-      (setq mapping (cdr mapping)))))
+;; (let ((mapping '((f13 . (shift f1))
+;; 		 (f14 . (shift f2))
+;; 		 (f15 . (shift f3))
+;; 		 (f16 . (shift f4))
+;; 		 (f17 . (shift f5))
+;; 		 (f18 . (shift f6))
+;; 		 (f19 . (shift f7))
+;; 		 (f20 . (shift f8))
+;; 		 (f21 . (shift f9))
+;; 		 (f22 . (shift f10))
+;; 		 (f23 . (shift f11))
+;; 		 (f24 . (shift f12)))))
+;;
+;;   ;; now define them and also the control, meta, and meta-control versions.
+;;   (while mapping
+;;     (let* ((foo (caar mapping))
+;; 	   (bar (cdar mapping))
+;; 	   (foo (if (listp foo) foo (list foo)))
+;; 	   (bar (if (listp bar) bar (list bar))))
+;;       (let ((mods '(() (control) (meta) (meta control))))
+;; 	(while mods
+;; 	  (let ((k1 (vector (append (car mods) foo)))
+;; 		(k2 (vector (append (car mods) bar))))
+;; 	    (define-key global-map k1 k2))
+;; 	  (setq mods (cdr mods))))
+;;       (setq mapping (cdr mapping)))))
--- a/man/cc-mode.texi	Mon Aug 13 09:55:30 2007 +0200
+++ b/man/cc-mode.texi	Mon Aug 13 09:56:28 2007 +0200
@@ -46,7 +46,7 @@
 @comment The title is printed in a large font.
 @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
-@center @titlefont{CC Mode 5.16}
+@center @titlefont{CC Mode 5.17}
 @sp 2
 @center @subtitlefont{A GNU Emacs mode for editing C and C-like languages}
 @sp 2
--- a/man/ediff.texi	Mon Aug 13 09:55:30 2007 +0200
+++ b/man/ediff.texi	Mon Aug 13 09:56:28 2007 +0200
@@ -203,12 +203,42 @@
 @item ediff-patch-file
 @itemx epatch
 @findex ediff-patch-file
-@findex epatch
- Patch a file, then compare.
+@findex epatch 
+
+Patch a file or multiple files, then compare. If the patch applies to just
+one file, Ediff will invoke a regular comparison session. If it is a
+multi-file patch, then a session group interface will be used and the user
+will be able to patch the files selectively. @xref{Session Groups}, for
+more details.
+
+Note that @code{ediff-patch-file} will actually use the @file{patch}
+utility to change the the original files on disk. This is not that
+dangerous, since you will always have the original contents of the file
+saved in another file that has the extension @file{.orig}. 
+Furthermore, if the file is under version control, then you can always back
+out to one of the previous versions (see the section on Version Countrol in
+Emacs manual).
+
+@code{ediff-patch-file} is careful about versions control: if the file
+to be patched is checked in, then Ediff will offer to check it out, because
+failing to do so may result in the loss of the changes when the file is
+checked out the next time.
+
+If you don't intend to modify the file via the patch and just want to see
+what the patch is all about (and decide later), then
+@code{ediff-patch-buffer} might be a better choice.
+
 @item ediff-patch-buffer
 @itemx epatch-buffer
 @findex ediff-patch-buffer
-Patch a buffer, then compare.
+@findex epatch-buffer
+Patch a buffer, then compare. The buffer being patched and the file visited
+by that buffer (if any) is @emph{not} modified. The result of the patch
+appears in some other buffer that has the name ending with @emph{_patched}.
+
+This function would refuse to apply a multifile patch to a buffer. Use
+@code{ediff-patch-file} for that (and when you want the original file to be 
+modified by the @file{patch} utility).
 
 @item ediff-merge-files
 @itemx ediff-merge
@@ -323,8 +353,8 @@
 @code{ediff-buffers}.
 
 The functions @code{ediff-patch-file} and @code{ediff-patch-buffer} apply a
-patch to a file or a buffer and then run Ediff on these buffers, displaying
-the difference regions. 
+patch to a file or a buffer and then run Ediff on the appropriate
+files/buffers, displaying the difference regions.
 
 The entry points @code{ediff-directories}, @code{ediff-merge-directories},
 etc., provide a convenient interface for comparing and merging files in
@@ -2225,6 +2255,7 @@
 Tibor Polgar (tlp00@@spg.amdahl.com),
 David Prince (dave0d@@fegs.co.uk),
 Paul Raines (raines@@slac.stanford.edu), 
+Bill Richter (richter@@math.nwu.edu),
 C.S. Roberson (roberson@@aur.alcatel.com),
 Kevin Rodgers (kevin.rodgers@@ihs.com),
 Sandy Rutherford (sandy@@ibm550.sissa.it),
--- a/src/ChangeLog	Mon Aug 13 09:55:30 2007 +0200
+++ b/src/ChangeLog	Mon Aug 13 09:56:28 2007 +0200
@@ -1,3 +1,28 @@
+1997-09-10  Hrvoje Niksic  <hniksic@srce.hr>
+
+	* event-stream.c (inhibit_input_event_recording): New boolean
+ 	variable.
+	(Fnext_event): Use it.
+
+1997-09-13  Hrvoje Niksic  <hniksic@srce.hr>
+
+	* fns.c (Fmapc): Renamed from Fmapc_internal.
+
+1997-09-10  Hrvoje Niksic  <hniksic@srce.hr>
+
+	* database.c (Fmake_database): Expand FILE.
+
+	* redisplay.c (window-system): Warn against using it.
+
+1997-09-08  SL Baur  <steve@altair.xemacs.org>
+
+	* emacs.c (PACKAGE_PATH): Reverse PACKAGE_PATH.
+	Suggested by Colin Rafferty <craffert@ml.com>
+
+1997-09-03  SL Baur  <steve@altair.xemacs.org>
+
+	* print.c (print_internal): Special treatment for C-\.
+
 1997-08-13  P E Jareth Hein  <jareth@camelot-soft.com>
 
 	* insdel.c (buffer_delete_range): Changed the location where point
--- a/src/console-x.h	Mon Aug 13 09:55:30 2007 +0200
+++ b/src/console-x.h	Mon Aug 13 09:56:28 2007 +0200
@@ -126,6 +126,7 @@
   int x_keysym_map_min_code;
   int x_keysym_map_max_code;
   int x_keysym_map_keysyms_per_code;
+  Lisp_Object x_keysym_map_hashtable;
 
   /* frame that holds the WM_COMMAND property; there should be exactly
      one of these per device. */
@@ -177,64 +178,57 @@
 #define DEVICE_X_DATA(d) DEVICE_TYPE_DATA (d, x)
 
 #define FRAME_X_DISPLAY(f) (DEVICE_X_DISPLAY (XDEVICE (f->device)))
-#define DEVICE_X_DISPLAY(d) (DEVICE_X_DATA (d)->display)
-#define DEVICE_XT_APP_SHELL(d) (DEVICE_X_DATA (d)->Xt_app_shell)
-#define DEVICE_X_GC_CACHE(d) (DEVICE_X_DATA (d)->gc_cache)
+#define DEVICE_X_DISPLAY(d) 	(DEVICE_X_DATA (d)->display)
+#define DEVICE_XT_APP_SHELL(d) 	(DEVICE_X_DATA (d)->Xt_app_shell)
+#define DEVICE_X_GC_CACHE(d) 	(DEVICE_X_DATA (d)->gc_cache)
 #define DEVICE_X_GRAY_PIXMAP(d) (DEVICE_X_DATA (d)->gray_pixmap)
 #define DEVICE_X_WM_COMMAND_FRAME(d) (DEVICE_X_DATA (d)->WM_COMMAND_frame)
-#define DEVICE_X_MOUSE_TIMESTAMP(d) (DEVICE_X_DATA (d)->mouse_timestamp)
-#define DEVICE_X_GLOBAL_MOUSE_TIMESTAMP(d) \
-  (DEVICE_X_DATA (d)->global_mouse_timestamp)
-#define DEVICE_X_LAST_SERVER_TIMESTAMP(d) \
-  (DEVICE_X_DATA (d)->last_server_timestamp)
-/* #define DEVICE_X_X_COMPOSE_STATUS(d)
-   (DEVICE_X_DATA (d)->x_compose_status) */
+#define DEVICE_X_MOUSE_TIMESTAMP(d)  (DEVICE_X_DATA (d)->mouse_timestamp)
+#define DEVICE_X_GLOBAL_MOUSE_TIMESTAMP(d) (DEVICE_X_DATA (d)->global_mouse_timestamp)
+#define DEVICE_X_LAST_SERVER_TIMESTAMP(d)  (DEVICE_X_DATA (d)->last_server_timestamp)
+#define DEVICE_X_KEYSYM_MAP_HASHTABLE(d)  (DEVICE_X_DATA (d)->x_keysym_map_hashtable)
+/* #define DEVICE_X_X_COMPOSE_STATUS(d) (DEVICE_X_DATA (d)->x_compose_status) */
 #ifdef HAVE_XIM
-#define DEVICE_X_XIM(d) (DEVICE_X_DATA (d)->xim)
+#define DEVICE_X_XIM(d)        (DEVICE_X_DATA (d)->xim)
 #define DEVICE_X_XIM_STYLES(d) (DEVICE_X_DATA (d)->xim_styles)
 #define DEVICE_X_FONTSET(d)    (DEVICE_X_DATA (d)->fontset)
 #endif /* HAVE_XIM */
 
 /* allocated in Xatoms_of_xfns in xfns.c */
-#define DEVICE_XATOM_WM_PROTOCOLS(d) (DEVICE_X_DATA (d)->Xatom_WM_PROTOCOLS)
-#define DEVICE_XATOM_WM_DELETE_WINDOW(d) \
-  (DEVICE_X_DATA (d)->Xatom_WM_DELETE_WINDOW)
-#define DEVICE_XATOM_WM_SAVE_YOURSELF(d) \
-  (DEVICE_X_DATA (d)->Xatom_WM_SAVE_YOURSELF)
-#define DEVICE_XATOM_WM_TAKE_FOCUS(d) (DEVICE_X_DATA (d)->Xatom_WM_TAKE_FOCUS)
-#define DEVICE_XATOM_WM_STATE(d) (DEVICE_X_DATA (d)->Xatom_WM_STATE)
+#define DEVICE_XATOM_WM_PROTOCOLS(d)	 (DEVICE_X_DATA (d)->Xatom_WM_PROTOCOLS)
+#define DEVICE_XATOM_WM_DELETE_WINDOW(d) (DEVICE_X_DATA (d)->Xatom_WM_DELETE_WINDOW)
+#define DEVICE_XATOM_WM_SAVE_YOURSELF(d) (DEVICE_X_DATA (d)->Xatom_WM_SAVE_YOURSELF)
+#define DEVICE_XATOM_WM_TAKE_FOCUS(d)	 (DEVICE_X_DATA (d)->Xatom_WM_TAKE_FOCUS)
+#define DEVICE_XATOM_WM_STATE(d)	 (DEVICE_X_DATA (d)->Xatom_WM_STATE)
 
 /* allocated in Xatoms_of_xselect in xselect.c */
-#define DEVICE_XATOM_CLIPBOARD(d) (DEVICE_X_DATA (d)->Xatom_CLIPBOARD)
-#define DEVICE_XATOM_TIMESTAMP(d) (DEVICE_X_DATA (d)->Xatom_TIMESTAMP)
-#define DEVICE_XATOM_TEXT(d) (DEVICE_X_DATA (d)->Xatom_TEXT)
-#define DEVICE_XATOM_DELETE(d) (DEVICE_X_DATA (d)->Xatom_DELETE)
-#define DEVICE_XATOM_MULTIPLE(d) (DEVICE_X_DATA (d)->Xatom_MULTIPLE)
-#define DEVICE_XATOM_INCR(d) (DEVICE_X_DATA (d)->Xatom_INCR)
-#define DEVICE_XATOM_EMACS_TMP(d) (DEVICE_X_DATA (d)->Xatom_EMACS_TMP)
-#define DEVICE_XATOM_TARGETS(d) (DEVICE_X_DATA (d)->Xatom_TARGETS)
-#define DEVICE_XATOM_NULL(d) (DEVICE_X_DATA (d)->Xatom_NULL)
-#define DEVICE_XATOM_ATOM_PAIR(d) (DEVICE_X_DATA (d)->Xatom_ATOM_PAIR)
-#define DEVICE_XATOM_COMPOUND_TEXT(d) (DEVICE_X_DATA (d)->Xatom_COMPOUND_TEXT)
+#define DEVICE_XATOM_CLIPBOARD(d) 	(DEVICE_X_DATA (d)->Xatom_CLIPBOARD)
+#define DEVICE_XATOM_TIMESTAMP(d) 	(DEVICE_X_DATA (d)->Xatom_TIMESTAMP)
+#define DEVICE_XATOM_TEXT(d) 		(DEVICE_X_DATA (d)->Xatom_TEXT)
+#define DEVICE_XATOM_DELETE(d) 		(DEVICE_X_DATA (d)->Xatom_DELETE)
+#define DEVICE_XATOM_MULTIPLE(d) 	(DEVICE_X_DATA (d)->Xatom_MULTIPLE)
+#define DEVICE_XATOM_INCR(d) 		(DEVICE_X_DATA (d)->Xatom_INCR)
+#define DEVICE_XATOM_EMACS_TMP(d) 	(DEVICE_X_DATA (d)->Xatom_EMACS_TMP)
+#define DEVICE_XATOM_TARGETS(d) 	(DEVICE_X_DATA (d)->Xatom_TARGETS)
+#define DEVICE_XATOM_NULL(d) 		(DEVICE_X_DATA (d)->Xatom_NULL)
+#define DEVICE_XATOM_ATOM_PAIR(d) 	(DEVICE_X_DATA (d)->Xatom_ATOM_PAIR)
+#define DEVICE_XATOM_COMPOUND_TEXT(d) 	(DEVICE_X_DATA (d)->Xatom_COMPOUND_TEXT)
 
 /* allocated in Xatoms_of_objects_x in objects-x.c */
-#define DEVICE_XATOM_FOUNDRY(d) (DEVICE_X_DATA (d)->Xatom_FOUNDRY)
-#define DEVICE_XATOM_FAMILY_NAME(d) (DEVICE_X_DATA (d)->Xatom_FAMILY_NAME)
-#define DEVICE_XATOM_WEIGHT_NAME(d) (DEVICE_X_DATA (d)->Xatom_WEIGHT_NAME)
-#define DEVICE_XATOM_SLANT(d) (DEVICE_X_DATA (d)->Xatom_SLANT)
-#define DEVICE_XATOM_SETWIDTH_NAME(d) (DEVICE_X_DATA (d)->Xatom_SETWIDTH_NAME)
-#define DEVICE_XATOM_ADD_STYLE_NAME(d) \
-  (DEVICE_X_DATA (d)->Xatom_ADD_STYLE_NAME)
-#define DEVICE_XATOM_PIXEL_SIZE(d) (DEVICE_X_DATA (d)->Xatom_PIXEL_SIZE)
-#define DEVICE_XATOM_POINT_SIZE(d) (DEVICE_X_DATA (d)->Xatom_POINT_SIZE)
-#define DEVICE_XATOM_RESOLUTION_X(d) (DEVICE_X_DATA (d)->Xatom_RESOLUTION_X)
-#define DEVICE_XATOM_RESOLUTION_Y(d) (DEVICE_X_DATA (d)->Xatom_RESOLUTION_Y)
-#define DEVICE_XATOM_SPACING(d) (DEVICE_X_DATA (d)->Xatom_SPACING)
-#define DEVICE_XATOM_AVERAGE_WIDTH(d) (DEVICE_X_DATA (d)->Xatom_AVERAGE_WIDTH)
-#define DEVICE_XATOM_CHARSET_REGISTRY(d) \
-  (DEVICE_X_DATA (d)->Xatom_CHARSET_REGISTRY)
-#define DEVICE_XATOM_CHARSET_ENCODING(d) \
-  (DEVICE_X_DATA (d)->Xatom_CHARSET_ENCODING)
+#define DEVICE_XATOM_FOUNDRY(d)		(DEVICE_X_DATA (d)->Xatom_FOUNDRY)
+#define DEVICE_XATOM_FAMILY_NAME(d)	(DEVICE_X_DATA (d)->Xatom_FAMILY_NAME)
+#define DEVICE_XATOM_WEIGHT_NAME(d)	(DEVICE_X_DATA (d)->Xatom_WEIGHT_NAME)
+#define DEVICE_XATOM_SLANT(d)		(DEVICE_X_DATA (d)->Xatom_SLANT)
+#define DEVICE_XATOM_SETWIDTH_NAME(d)	(DEVICE_X_DATA (d)->Xatom_SETWIDTH_NAME)
+#define DEVICE_XATOM_ADD_STYLE_NAME(d)	(DEVICE_X_DATA (d)->Xatom_ADD_STYLE_NAME)
+#define DEVICE_XATOM_PIXEL_SIZE(d)	(DEVICE_X_DATA (d)->Xatom_PIXEL_SIZE)
+#define DEVICE_XATOM_POINT_SIZE(d)	(DEVICE_X_DATA (d)->Xatom_POINT_SIZE)
+#define DEVICE_XATOM_RESOLUTION_X(d)	(DEVICE_X_DATA (d)->Xatom_RESOLUTION_X)
+#define DEVICE_XATOM_RESOLUTION_Y(d)	(DEVICE_X_DATA (d)->Xatom_RESOLUTION_Y)
+#define DEVICE_XATOM_SPACING(d)		(DEVICE_X_DATA (d)->Xatom_SPACING)
+#define DEVICE_XATOM_AVERAGE_WIDTH(d)	(DEVICE_X_DATA (d)->Xatom_AVERAGE_WIDTH)
+#define DEVICE_XATOM_CHARSET_REGISTRY(d) (DEVICE_X_DATA (d)->Xatom_CHARSET_REGISTRY)
+#define DEVICE_XATOM_CHARSET_ENCODING(d) (DEVICE_X_DATA (d)->Xatom_CHARSET_ENCODING)
 
 /* The maximum number of widgets that can be displayed above the text
    area at one time.  Currently no more than 3 will ever actually be
@@ -264,10 +258,9 @@
   int num_top_widgets;
 
 #ifdef ENERGIZE
-  /* The Energize property-sheets.  The current_ slots are the ones which are
-     actually on the frame.  The desired_ slots are the ones which should
-     be there.  Redisplay synchs these.
-   */
+  /* The Energize property-sheets.  The current_* slots are the ones
+     which are actually on the frame.  The desired_ slots are the ones
+     which should be there.  Redisplay synchs these.  */
   int *current_psheets;
   int *desired_psheets;
   int current_psheet_count;
@@ -282,13 +275,17 @@
   Lisp_Object icon_pixmap;
   Lisp_Object icon_pixmap_mask;
 
-  /* We don't provide a mechanism for changing these are they are
+#ifdef HAVE_TOOLBARS
+  int old_toolbar_size[4];
+
+  /* We don't provide a mechanism for changing these after they are
      initialized so we might as well keep pointers to them and avoid
      lots of expensive calls to gc_cache_lookup. */
   GC toolbar_top_shadow_gc;
   GC toolbar_bottom_shadow_gc;
   GC toolbar_blank_background_gc;
   GC toolbar_pixmap_background_gc;
+#endif /* HAVE_TOOLBARS */
 
   /* geometry string that ought to be freed. */
   char *geom_free_me_please;
@@ -302,8 +299,6 @@
 #endif /* XIM_XLIB */
 #endif /* HAVE_XIM */
 
-  int old_toolbar_size[4];
-
   /* 1 if the frame is completely visible on the display, 0 otherwise.
      if 0 the frame may have been iconified or may be totally
      or partially hidden by another X window */
@@ -327,40 +322,33 @@
 
 #define FRAME_X_DATA(f) FRAME_TYPE_DATA (f, x)
 
-#define FRAME_X_SHELL_WIDGET(f) (FRAME_X_DATA (f)->widget)
+#define FRAME_X_SHELL_WIDGET(f)	    (FRAME_X_DATA (f)->widget)
 #define FRAME_X_CONTAINER_WIDGET(f) (FRAME_X_DATA (f)->container)
-#define FRAME_X_MENUBAR_WIDGET(f) (FRAME_X_DATA (f)->menubar_widget)
-#define FRAME_X_TEXT_WIDGET(f) (FRAME_X_DATA (f)->edit_widget)
-#define FRAME_X_TOP_WIDGETS(f) (FRAME_X_DATA (f)->top_widgets)
-#define FRAME_X_NUM_TOP_WIDGETS(f) (FRAME_X_DATA (f)->num_top_widgets)
-
-#define FRAME_X_OLD_TOOLBAR_SIZE(f, pos) \
-  (FRAME_X_DATA (f)->old_toolbar_size[pos])
+#define FRAME_X_MENUBAR_WIDGET(f)   (FRAME_X_DATA (f)->menubar_widget)
+#define FRAME_X_TEXT_WIDGET(f)	    (FRAME_X_DATA (f)->edit_widget)
+#define FRAME_X_TOP_WIDGETS(f)	    (FRAME_X_DATA (f)->top_widgets)
+#define FRAME_X_NUM_TOP_WIDGETS(f)  (FRAME_X_DATA (f)->num_top_widgets)
 
 #ifdef ENERGIZE
-#define FRAME_X_CURRENT_PSHEETS(f) (FRAME_X_DATA (f)->current_psheets)
-#define FRAME_X_DESIRED_PSHEETS(f) (FRAME_X_DATA (f)->desired_psheets)
-#define FRAME_X_CURRENT_PSHEET_COUNT(f) \
-  (FRAME_X_DATA (f)->current_psheet_count)
-#define FRAME_X_DESIRED_PSHEET_COUNT(f) \
-  (FRAME_X_DATA (f)->desired_psheet_count)
-#define FRAME_X_CURRENT_PSHEET_BUFFER(f) \
-  (FRAME_X_DATA (f)->current_psheet_buffer)
-#define FRAME_X_DESIRED_PSHEET_BUFFER(f) \
-  (FRAME_X_DATA (f)->desired_psheet_buffer)
-#endif
+#define FRAME_X_CURRENT_PSHEETS(f)	 (FRAME_X_DATA (f)->current_psheets)
+#define FRAME_X_DESIRED_PSHEETS(f)	 (FRAME_X_DATA (f)->desired_psheets)
+#define FRAME_X_CURRENT_PSHEET_COUNT(f)  (FRAME_X_DATA (f)->current_psheet_count)
+#define FRAME_X_DESIRED_PSHEET_COUNT(f)  (FRAME_X_DATA (f)->desired_psheet_count)
+#define FRAME_X_CURRENT_PSHEET_BUFFER(f) (FRAME_X_DATA (f)->current_psheet_buffer)
+#define FRAME_X_DESIRED_PSHEET_BUFFER(f) (FRAME_X_DATA (f)->desired_psheet_buffer)
+#endif /* ENERGIZE */
 
-#define FRAME_X_ICON_PIXMAP(f) (FRAME_X_DATA (f)->icon_pixmap)
+#define FRAME_X_ICON_PIXMAP(f)	    (FRAME_X_DATA (f)->icon_pixmap)
 #define FRAME_X_ICON_PIXMAP_MASK(f) (FRAME_X_DATA (f)->icon_pixmap_mask)
 
-#define FRAME_X_TOOLBAR_TOP_SHADOW_GC(f) \
-  (FRAME_X_DATA (f)->toolbar_top_shadow_gc)
-#define FRAME_X_TOOLBAR_BOTTOM_SHADOW_GC(f) \
-  (FRAME_X_DATA (f)->toolbar_bottom_shadow_gc)
-#define FRAME_X_TOOLBAR_BLANK_BACKGROUND_GC(f) \
-  (FRAME_X_DATA (f)->toolbar_blank_background_gc)
-#define FRAME_X_TOOLBAR_PIXMAP_BACKGROUND_GC(f) \
-  (FRAME_X_DATA (f)->toolbar_pixmap_background_gc)
+#ifdef HAVE_TOOLBARS
+#define FRAME_X_OLD_TOOLBAR_SIZE(f, pos) (FRAME_X_DATA (f)->old_toolbar_size[pos])
+
+#define FRAME_X_TOOLBAR_TOP_SHADOW_GC(f)	(FRAME_X_DATA (f)->toolbar_top_shadow_gc)
+#define FRAME_X_TOOLBAR_BOTTOM_SHADOW_GC(f)	(FRAME_X_DATA (f)->toolbar_bottom_shadow_gc)
+#define FRAME_X_TOOLBAR_BLANK_BACKGROUND_GC(f)	(FRAME_X_DATA (f)->toolbar_blank_background_gc)
+#define FRAME_X_TOOLBAR_PIXMAP_BACKGROUND_GC(f) (FRAME_X_DATA (f)->toolbar_pixmap_background_gc)
+#endif /* HAVE_TOOLBARS */
 
 #define FRAME_X_GEOM_FREE_ME_PLEASE(f) (FRAME_X_DATA (f)->geom_free_me_please)
 
--- a/src/database.c	Mon Aug 13 09:55:30 2007 +0200
+++ b/src/database.c	Mon Aug 13 09:56:28 2007 +0200
@@ -512,13 +512,18 @@
 */
        (file, type, subtype, access_, mode))
 {
+  /* This function can GC */
   Lisp_Object retval = Qnil;
   int modemask;
   int accessmask = 0;
   struct database *dbase = NULL;
   char *filename;
+  struct gcpro gcpro1, gcpro2;
 
   CHECK_STRING (file);
+  GCPRO2 (file, access_);
+  file = Fexpand_file_name (file, Qnil);
+  UNGCPRO;
   filename = (char *) XSTRING_DATA (file);
 
   if (NILP (access_))
--- a/src/device-x.c	Mon Aug 13 09:55:30 2007 +0200
+++ b/src/device-x.c	Mon Aug 13 09:56:28 2007 +0200
@@ -68,22 +68,21 @@
   {"-geometry", ".geometry", XrmoptionSepArg, NULL},
   {"-iconic", ".iconic", XrmoptionNoArg, "yes"},
 
-  {"-internal-border-width", "*EmacsFrame.internalBorderWidth",
-   XrmoptionSepArg, NULL},
-  {"-ib", "*EmacsFrame.internalBorderWidth", XrmoptionSepArg, NULL},
-  {"-scrollbar-width", "*EmacsFrame.scrollBarWidth", XrmoptionSepArg, NULL},
-  {"-scrollbar-height", "*EmacsFrame.scrollBarHeight", XrmoptionSepArg, NULL},
+  {"-internal-border-width", "*EmacsFrame.internalBorderWidth", XrmoptionSepArg, NULL},
+  {"-ib",                    "*EmacsFrame.internalBorderWidth", XrmoptionSepArg, NULL},
+  {"-scrollbar-width",       "*EmacsFrame.scrollBarWidth",      XrmoptionSepArg, NULL},
+  {"-scrollbar-height",      "*EmacsFrame.scrollBarHeight",     XrmoptionSepArg, NULL},
 
   /* #### Beware!  If the type of the shell changes, update this. */
-  {"-T",     "*TopLevelEmacsShell.title", XrmoptionSepArg, NULL},
-  {"-wn",    "*TopLevelEmacsShell.title", XrmoptionSepArg, NULL},
-  {"-title", "*TopLevelEmacsShell.title", XrmoptionSepArg, NULL},
+  {"-T",        "*TopLevelEmacsShell.title",    XrmoptionSepArg, NULL},
+  {"-wn",       "*TopLevelEmacsShell.title",    XrmoptionSepArg, NULL},
+  {"-title",    "*TopLevelEmacsShell.title",    XrmoptionSepArg, NULL},
 
   {"-iconname", "*TopLevelEmacsShell.iconName", XrmoptionSepArg, NULL},
-  {"-in", "*TopLevelEmacsShell.iconName", XrmoptionSepArg, NULL},
-  {"-mc", "*pointerColor", XrmoptionSepArg, NULL},
-  {"-cr", "*cursorColor",  XrmoptionSepArg, NULL},
-  {"-fontset", "*FontSet", XrmoptionSepArg, NULL},
+  {"-in",       "*TopLevelEmacsShell.iconName", XrmoptionSepArg, NULL},
+  {"-mc",       "*pointerColor",                XrmoptionSepArg, NULL},
+  {"-cr",       "*cursorColor",                 XrmoptionSepArg, NULL},
+  {"-fontset",  "*FontSet",                     XrmoptionSepArg, NULL},
 };
 
 static void validify_resource_string (char *str);
@@ -301,8 +300,8 @@
     Widget shell = DEVICE_XT_APP_SHELL (d);
 
     XtSetArg (al [0], XtNmappedWhenManaged, False);
-    XtSetArg (al [1],XtNwidth,  1);
-    XtSetArg (al [2],XtNheight, 1);
+    XtSetArg (al [1], XtNwidth,  1);
+    XtSetArg (al [2], XtNheight, 1);
     XtSetValues (shell, al, 3);
     XtRealizeWidget (shell);
 
@@ -351,7 +350,8 @@
 static void
 x_mark_device (struct device *d, void (*markobj) (Lisp_Object))
 {
-  ((markobj) (DEVICE_X_DATA (d)->WM_COMMAND_frame));
+  ((markobj) (DEVICE_X_WM_COMMAND_FRAME (d)));
+  ((markobj) (DEVICE_X_DATA (d)->x_keysym_map_hashtable));
 }
 
 
@@ -1215,9 +1215,9 @@
 {
   Display *dpy = get_x_display (device);
 
-  return list3 (make_int (ProtocolVersion (dpy)),
+  return list3 (make_int (ProtocolVersion  (dpy)),
 		make_int (ProtocolRevision (dpy)),
-		make_int (VendorRelease (dpy)));
+		make_int (VendorRelease    (dpy)));
 }
 
 DEFUN ("x-valid-keysym-name-p", Fx_valid_keysym_name_p, 1, 1, 0, /*
@@ -1235,7 +1235,21 @@
   return XStringToKeysym (keysym_ext) ? Qt : Qnil;
 }
 
-DEFUN ("x-keysym-on-keyboard-p", Fx_keysym_on_keyboard_p, 1, 2, 0, /*
+DEFUN ("x-keysym-hashtable", Fx_keysym_hashtable, 0, 1, 0, /*
+Return a hashtable which contains a hash key for all keysyms which
+name keys on the keyboard.  See `x-keysym-on-keyboard-p'.
+*/
+       (device))
+{
+  struct device *d = decode_device (device);
+  if (!DEVICE_X_P (d))
+    signal_simple_error ("Not an X device", device);
+
+  return DEVICE_X_DATA (d)->x_keysym_map_hashtable;
+}
+
+DEFUN ("x-keysym-on-keyboard-sans-modifiers-p",
+       Fx_keysym_on_keyboard_sans_modifiers_p, 1, 2, 0, /*
 Return true if KEYSYM names a key on the keyboard of DEVICE.
 More precisely, return true if pressing a physical key
 on the keyboard of DEVICE without any modifier keys generates KEYSYM.
@@ -1244,31 +1258,34 @@
 */
        (keysym, device))
 {
-  struct device *d = decode_device(device);
-  CONST char *keysym_string;
-  KeySym  keysym_KeySym;
-  KeySym *keysym_ptr, *keysym_last;
-  int min_code, max_code, keysyms_per_code;
+  struct device *d = decode_device (device);
+  if (!DEVICE_X_P (d))
+    signal_simple_error ("Not an X device", device);
+  CHECK_STRING (keysym);
+
+  return (EQ (Qsans_modifiers,
+	      Fgethash (keysym, DEVICE_X_KEYSYM_MAP_HASHTABLE (d), Qnil)) ?
+	  Qt : Qnil);
+}
+
+
+DEFUN ("x-keysym-on-keyboard-p", Fx_keysym_on_keyboard_p, 1, 2, 0, /*
+Return true if KEYSYM names a key on the keyboard of DEVICE.
+More precisely, return true if some keystroke (possibly including modifiers)
+on the keyboard of DEVICE keys generates KEYSYM.
+Valid keysyms are listed in the files /usr/include/X11/keysymdef.h and in
+/usr/lib/X11/XKeysymDB, or whatever the equivalents are on your system.
+*/
+       (keysym, device))
+{
+  struct device *d = decode_device (device);
 
   if (!DEVICE_X_P (d))
     signal_simple_error ("Not an X device", device);
   CHECK_STRING (keysym);
-  GET_C_STRING_CTEXT_DATA_ALLOCA (keysym, keysym_string);
-  keysym_KeySym = XStringToKeysym (keysym_string);
-  if (!keysym_KeySym)           /* Invalid keysym */
-    return Qnil;
 
-  XDisplayKeycodes (DEVICE_X_DISPLAY (d), &min_code, &max_code);
-  keysyms_per_code = DEVICE_X_DATA (d)->x_keysym_map_keysyms_per_code;
-  keysym_ptr       = DEVICE_X_DATA (d)->x_keysym_map;
-  keysym_last      = keysym_ptr + (max_code - min_code) * keysyms_per_code;
-  for ( ; keysym_ptr <= keysym_last; keysym_ptr += keysyms_per_code)
-    {
-      if (keysym_KeySym == *keysym_ptr)
-        return Qt;
-    }
-
-  return Qnil;
+  return (NILP (Fgethash (keysym, DEVICE_X_KEYSYM_MAP_HASHTABLE (d), Qnil)) ?
+	  Qnil : Qt);
 }
 
 
@@ -1416,7 +1433,9 @@
   DEFSUBR (Fx_server_vendor);
   DEFSUBR (Fx_server_version);
   DEFSUBR (Fx_valid_keysym_name_p);
+  DEFSUBR (Fx_keysym_hashtable);
   DEFSUBR (Fx_keysym_on_keyboard_p);
+  DEFSUBR (Fx_keysym_on_keyboard_sans_modifiers_p);
 
   DEFSUBR (Fx_grab_pointer);
   DEFSUBR (Fx_ungrab_pointer);
--- a/src/dgif_lib.c	Mon Aug 13 09:55:30 2007 +0200
+++ b/src/dgif_lib.c	Mon Aug 13 09:56:28 2007 +0200
@@ -14,14 +14,6 @@
 
 #ifdef emacs
 #include <config.h>
-void *xmalloc (size_t size);
-void *xrealloc (void *ptr, size_t size);
-#ifdef ERROR_CHECK_MALLOC
-void *xfree_1 (void *);
-#define xfree xfree_1
-#else
-void *xfree (void *);
-#endif
 #endif /* emacs */
 
 #ifdef __MSDOS__
@@ -43,6 +35,18 @@
 #include "gif_hash.h"
 #endif
 
+#ifdef emacs
+void *xmalloc (size_t size);
+void *xrealloc (void *ptr, size_t size);
+#ifdef ERROR_CHECK_MALLOC
+void *xfree_1 (void *);
+#define xfree xfree_1
+#else
+void *xfree (void *);
+#endif
+#endif /* emacs */
+
+
 #define PROGRAM_NAME	"GIF_LIBRARY"
 
 #define COMMENT_EXT_FUNC_CODE	0xfe /* Extension function code for comment. */
--- a/src/doprnt.c	Mon Aug 13 09:55:30 2007 +0200
+++ b/src/doprnt.c	Mon Aug 13 09:56:28 2007 +0200
@@ -455,7 +455,7 @@
                  empty string?  -dkindred@cs.cmu.edu 8/1997
 	      */
 	      if (!string)
-		string = "(null)";
+		string = (Bufbyte *) "(null)";
 	      string_len = strlen ((char *) string);
 	    }
 	  else
--- a/src/elhash.c	Mon Aug 13 09:55:30 2007 +0200
+++ b/src/elhash.c	Mon Aug 13 09:56:28 2007 +0200
@@ -211,8 +211,7 @@
   Lisp_Object obj1, obj2;
   CVOID_TO_LISP (obj1, x1);
   CVOID_TO_LISP (obj2, x2);
-  return
-    (FLOATP (obj1) ? !NILP (Fequal (obj1, obj2)) : EQ (obj1, obj2));
+  return FLOATP (obj1) ? !NILP (Fequal (obj1, obj2)) : EQ (obj1, obj2);
 }
 
 static unsigned long
@@ -257,8 +256,8 @@
   switch (test)
     {
     case HASHTABLE_EQ:
-      table->test_function = 0;
-      table->hash_function = 0;
+      table->test_function = NULL;
+      table->hash_function = NULL;
       break;
 
     case HASHTABLE_EQL:
@@ -292,11 +291,7 @@
 static enum hashtable_test_fun
 decode_hashtable_test_fun (Lisp_Object sym)
 {
-  if (NILP (sym))
-    return HASHTABLE_EQL;
-
-  CHECK_SYMBOL (sym);
-
+  if (NILP (sym))       return HASHTABLE_EQL;
   if (EQ (sym, Qeq))    return HASHTABLE_EQ;
   if (EQ (sym, Qequal)) return HASHTABLE_EQUAL;
   if (EQ (sym, Qeql))   return HASHTABLE_EQL;
@@ -366,16 +361,16 @@
 
 
 DEFUN ("gethash", Fgethash, 2, 3, 0, /*
-Find hash value for KEY in TABLE.
+Find hash value for KEY in HASHTABLE.
 If there is no corresponding value, return DEFAULT (defaults to nil).
 */
-       (key, table, default_))
+       (key, hashtable, default_))
 {
   CONST void *vval;
   struct _C_hashtable htbl;
   if (!gc_in_progress)
-    CHECK_HASHTABLE (table);
-  ht_copy_to_c (XHASHTABLE (table), &htbl);
+    CHECK_HASHTABLE (hashtable);
+  ht_copy_to_c (XHASHTABLE (hashtable), &htbl);
   if (gethash (LISP_TO_VOID (key), &htbl, &vval))
     {
       Lisp_Object val;
@@ -388,30 +383,30 @@
 
 
 DEFUN ("remhash", Fremhash, 2, 2, 0, /*
-Remove hash value for KEY in TABLE.
+Remove hash value for KEY in HASHTABLE.
 */
-       (key, table))
+       (key, hashtable))
 {
   struct _C_hashtable htbl;
-  CHECK_HASHTABLE (table);
+  CHECK_HASHTABLE (hashtable);
 
-  ht_copy_to_c (XHASHTABLE (table), &htbl);
+  ht_copy_to_c (XHASHTABLE (hashtable), &htbl);
   remhash (LISP_TO_VOID (key), &htbl);
-  ht_copy_from_c (&htbl, XHASHTABLE (table));
+  ht_copy_from_c (&htbl, XHASHTABLE (hashtable));
   return Qnil;
 }
 
 
 DEFUN ("puthash", Fputhash, 3, 3, 0, /*
-Hash KEY to VAL in TABLE.
+Hash KEY to VAL in HASHTABLE.
 */
-       (key, val, table))
+       (key, val, hashtable))
 {
   struct hashtable *ht;
   void *vkey = LISP_TO_VOID (key);
 
-  CHECK_HASHTABLE (table);
-  ht = XHASHTABLE (table);
+  CHECK_HASHTABLE (hashtable);
+  ht = XHASHTABLE (hashtable);
   if (!vkey)
     ht->zero_entry = val;
   else
@@ -419,36 +414,36 @@
       struct gcpro gcpro1, gcpro2, gcpro3;
       struct _C_hashtable htbl;
 
-      ht_copy_to_c (XHASHTABLE (table), &htbl);
-      GCPRO3 (key, val, table);
+      ht_copy_to_c (XHASHTABLE (hashtable), &htbl);
+      GCPRO3 (key, val, hashtable);
       puthash (vkey, LISP_TO_VOID (val), &htbl);
-      ht_copy_from_c (&htbl, XHASHTABLE (table));
+      ht_copy_from_c (&htbl, XHASHTABLE (hashtable));
       UNGCPRO;
     }
   return val;
 }
 
 DEFUN ("clrhash", Fclrhash, 1, 1, 0, /*
-Flush TABLE.
+Remove all entries from HASHTABLE.
 */
-       (table))
+       (hashtable))
 {
   struct _C_hashtable htbl;
-  CHECK_HASHTABLE (table);
-  ht_copy_to_c (XHASHTABLE (table), &htbl);
+  CHECK_HASHTABLE (hashtable);
+  ht_copy_to_c (XHASHTABLE (hashtable), &htbl);
   clrhash (&htbl);
-  ht_copy_from_c (&htbl, XHASHTABLE (table));
+  ht_copy_from_c (&htbl, XHASHTABLE (hashtable));
   return Qnil;
 }
 
 DEFUN ("hashtable-fullness", Fhashtable_fullness, 1, 1, 0, /*
-Return number of entries in TABLE.
+Return number of entries in HASHTABLE.
 */
-       (table))
+       (hashtable))
 {
   struct _C_hashtable htbl;
-  CHECK_HASHTABLE (table);
-  ht_copy_to_c (XHASHTABLE (table), &htbl);
+  CHECK_HASHTABLE (hashtable);
+  ht_copy_to_c (XHASHTABLE (hashtable), &htbl);
   return make_int (htbl.fullness);
 }
 
@@ -468,9 +463,8 @@
   else if (CONSP (function))
   {
     Lisp_Object funcar = Fcar (function);
-    if ((SYMBOLP (funcar))
-        && (EQ (funcar, Qlambda)
-            || EQ (funcar, Qautoload)))
+    if ((SYMBOLP (funcar)) && (EQ (funcar, Qlambda) ||
+			       EQ (funcar, Qautoload)))
       return;
   }
   signal_error (Qinvalid_function, list1 (function));
@@ -491,18 +485,18 @@
 
 
 DEFUN ("maphash", Fmaphash, 2, 2, 0, /*
-Map FUNCTION over entries in TABLE, calling it with two args,
+Map FUNCTION over entries in HASHTABLE, calling it with two args,
 each key and value in the table.
 */
-       (function, table))
+       (function, hashtable))
 {
   struct _C_hashtable htbl;
   struct gcpro gcpro1, gcpro2;
 
   verify_function (function, GETTEXT ("hashtable mapping function"));
-  CHECK_HASHTABLE (table);
-  ht_copy_to_c (XHASHTABLE (table), &htbl);
-  GCPRO2 (table, function);
+  CHECK_HASHTABLE (hashtable);
+  ht_copy_to_c (XHASHTABLE (hashtable), &htbl);
+  GCPRO2 (hashtable, function);
   maphash (lisp_maphash_function, &htbl, LISP_TO_VOID (function));
   UNGCPRO;
   return Qnil;
@@ -513,26 +507,25 @@
    lisp hashtable.
  */
 void
-elisp_maphash (maphash_function function, Lisp_Object table, void *closure)
+elisp_maphash (maphash_function function, Lisp_Object hashtable, void *closure)
 {
   struct _C_hashtable htbl;
 
-  if (!gc_in_progress) CHECK_HASHTABLE (table);
-  ht_copy_to_c (XHASHTABLE (table), &htbl);
+  if (!gc_in_progress) CHECK_HASHTABLE (hashtable);
+  ht_copy_to_c (XHASHTABLE (hashtable), &htbl);
   maphash (function, &htbl, closure);
 }
 
 void
-elisp_map_remhash (remhash_predicate function,
-                   Lisp_Object table,
-                   void *closure)
+elisp_map_remhash (remhash_predicate function, Lisp_Object hashtable,
+		   void *closure)
 {
   struct _C_hashtable htbl;
 
-  if (!gc_in_progress) CHECK_HASHTABLE (table);
-  ht_copy_to_c (XHASHTABLE (table), &htbl);
+  if (!gc_in_progress) CHECK_HASHTABLE (hashtable);
+  ht_copy_to_c (XHASHTABLE (hashtable), &htbl);
   map_remhash (function, &htbl, closure);
-  ht_copy_from_c (&htbl, XHASHTABLE (table));
+  ht_copy_from_c (&htbl, XHASHTABLE (hashtable));
 }
 
 #if 0
@@ -695,9 +688,10 @@
 	/* The hashtable is probably garbage.  Ignore it. */
 	continue;
       type = XHASHTABLE (rest)->type;
-      if (type == HASHTABLE_KEY_WEAK || type == HASHTABLE_VALUE_WEAK
-	  || type == HASHTABLE_KEY_CAR_WEAK
-	  || type == HASHTABLE_VALUE_CAR_WEAK)
+      if (type == HASHTABLE_KEY_WEAK     ||
+	  type == HASHTABLE_VALUE_WEAK   ||
+	  type == HASHTABLE_KEY_CAR_WEAK ||
+	  type == HASHTABLE_VALUE_CAR_WEAK)
 	{
           struct marking_closure fmh;
 
--- a/src/emacs.c	Mon Aug 13 09:55:30 2007 +0200
+++ b/src/emacs.c	Mon Aug 13 09:56:28 2007 +0200
@@ -191,7 +191,7 @@
   /* If fatal error occurs in code below, avoid infinite recursion.  */
   if (! fatal_error_in_progress)
     {
-      fatal_error_in_progress = 1;
+      fatal_error_in_progress = dont_check_for_quit = 1;
       shut_down_emacs (sig, Qnil);
       stderr_out("\nLisp backtrace follows:\n\n");
       Fbacktrace(Qexternal_debugging_output, Qt);
@@ -2363,7 +2363,7 @@
 List of directories configured for package searching.
 */ );
 #ifndef PACKAGE_PATH
-#define PACKAGE_PATH PATH_PREFIX "/lib/xemacs/packages:~/.xemacs"
+#define PACKAGE_PATH "~/.xemacs:" PATH_PREFIX "/lib/xemacs/packages"
 #endif
   Vpackage_path = decode_path(PACKAGE_PATH);
 
--- a/src/emacsfns.h	Mon Aug 13 09:55:30 2007 +0200
+++ b/src/emacsfns.h	Mon Aug 13 09:56:28 2007 +0200
@@ -749,6 +749,7 @@
 
 
 /* Defined in event-Xt.c */
+extern Lisp_Object Qsans_modifiers;
 void signal_special_Xt_user_event (Lisp_Object channel,
 				   Lisp_Object function,
 				   Lisp_Object object);
--- a/src/eval.c	Mon Aug 13 09:55:30 2007 +0200
+++ b/src/eval.c	Mon Aug 13 09:56:28 2007 +0200
@@ -3616,14 +3616,10 @@
 */
        (int nargs, Lisp_Object *args))
 {
-  Lisp_Object hook[1];
   REGISTER int i;
 
   for (i = 0; i < nargs; i++)
-    {
-      hook[0] = args[i];
-      run_hook_with_args (1, hook, RUN_HOOKS_TO_COMPLETION);
-    }
+    run_hook_with_args (1, args + i, RUN_HOOKS_TO_COMPLETION);
 
   return Qnil;
 }
--- a/src/event-Xt.c	Mon Aug 13 09:55:30 2007 +0200
+++ b/src/event-Xt.c	Mon Aug 13 09:56:28 2007 +0200
@@ -39,6 +39,7 @@
 #include "objects-x.h"
 #include "process.h"
 #include "redisplay.h"
+#include "elhash.h"
 
 #include "systime.h"
 #include "sysproc.h" /* for MAXDESC */
@@ -120,6 +121,7 @@
 static int last_quit_check_signal_tick_count;
 
 Lisp_Object Qkey_mapping;
+Lisp_Object Qsans_modifiers;
 
 
 /************************************************************************/
@@ -171,16 +173,52 @@
 {
   Display *display = DEVICE_X_DISPLAY (d);
   struct x_device *xd = DEVICE_X_DATA (d);
+  KeySym *keysym, *keysym_end;
+  Lisp_Object hashtable;
+  int key_code_count, keysyms_per_code;
+
   if (xd->x_keysym_map)
     XFree ((char *) xd->x_keysym_map);
   XDisplayKeycodes (display,
 		    &xd->x_keysym_map_min_code,
 		    &xd->x_keysym_map_max_code);
-  xd->x_keysym_map = XGetKeyboardMapping (display,
-					  xd->x_keysym_map_min_code,
-					  xd->x_keysym_map_max_code -
-					  xd->x_keysym_map_min_code + 1,
-					  &xd->x_keysym_map_keysyms_per_code);
+  key_code_count = xd->x_keysym_map_max_code - xd->x_keysym_map_min_code + 1;
+  xd->x_keysym_map =
+    XGetKeyboardMapping (display, xd->x_keysym_map_min_code, key_code_count,
+			 &xd->x_keysym_map_keysyms_per_code);
+
+  xd->x_keysym_map_hashtable = hashtable =
+    make_lisp_hashtable (128, HASHTABLE_NONWEAK, HASHTABLE_EQUAL);
+
+  for (keysym = xd->x_keysym_map,
+	 keysyms_per_code = xd->x_keysym_map_keysyms_per_code,
+	 keysym_end = keysym + (key_code_count * keysyms_per_code);
+       keysym < keysym_end;
+       keysym += keysyms_per_code)
+    {
+      int j;
+      char *keysym_name;
+
+      if (keysym[0] == NoSymbol)
+	continue;
+
+      if ((keysym_name = XKeysymToString (keysym[0])) != NULL)
+	Fputhash (build_string (keysym_name), Qsans_modifiers, hashtable);
+
+      for (j = 1; j < keysyms_per_code; j++)
+	{
+	  if (keysym[j] == keysym[0] ||
+	      keysym[j] == NoSymbol)
+	    continue;
+
+	  if ((keysym_name = XKeysymToString (keysym[j])) != NULL)
+	    {
+	      Lisp_Object name = build_string (keysym_name);
+	      if (NILP (Fgethash (name, hashtable, Qnil)))
+		Fputhash (name, Qt, hashtable);
+	    }
+	}
+    }
 }
 
 static CONST char *
@@ -393,8 +431,10 @@
 void
 x_init_modifier_mapping (struct device *d)
 {
-  DEVICE_X_DATA (d)->x_keysym_map = 0;
-  DEVICE_X_DATA (d)->x_modifier_keymap = 0;
+  struct x_device *xd = DEVICE_X_DATA (d);
+  xd->x_keysym_map_hashtable = Qnil;
+  xd->x_keysym_map = NULL;
+  xd->x_modifier_keymap = NULL;
   x_reset_modifier_mapping (d);
 }
 
@@ -648,12 +688,37 @@
       if (simple_p) return Qnil;
       /* !!#### not Mule-ized */
       name = XKeysymToString (keysym);
-      if (!name || !name[0])	/* this shouldn't happen... */
-	{
-	  char buf [255];
-	  sprintf (buf, "unknown_keysym_0x%X", (int) keysym);
-	  return KEYSYM (buf);
-	}
+      if (!name || !name[0])
+	/* This happens if there is a mismatch between the Xlib of
+           XEmacs and the Xlib of the X server...
+
+	   Let's hard-code in some knowledge of common keysyms introduced
+	   in recent X11 releases.  Snarfed from X11/keysymdef.h
+	   
+	   Probably we should add some stuff here for X11R6. */
+	switch (keysym)
+	  {
+	  case 0xFF95: return KEYSYM ("kp-home");
+	  case 0xFF96: return KEYSYM ("kp-left");
+	  case 0xFF97: return KEYSYM ("kp-up");
+	  case 0xFF98: return KEYSYM ("kp-right");
+	  case 0xFF99: return KEYSYM ("kp-down");
+	  case 0xFF9A: return KEYSYM ("kp-prior");
+	  case 0xFF9B: return KEYSYM ("kp-next");
+	  case 0xFF9C: return KEYSYM ("kp-end");
+	  case 0xFF9D: return KEYSYM ("kp-begin");
+	  case 0xFF9E: return KEYSYM ("kp-insert");
+	  case 0xFF9F: return KEYSYM ("kp-delete");
+
+	  case 0x1005FF10: return KEYSYM ("SunF36"); /* labeled F11 */
+	  case 0x1005FF11: return KEYSYM ("SunF37"); /* labeled F12 */
+	  default:
+	    {
+	      char buf [64];
+	      sprintf (buf, "unknown-keysym-0x%X", (int) keysym);
+	      return KEYSYM (buf);
+	    }
+	  }
       /* If it's got a one-character name, that's good enough. */
       if (!name[1])
 	return make_char (name[0]);
@@ -2614,6 +2679,7 @@
 syms_of_event_Xt (void)
 {
   defsymbol (&Qkey_mapping, "key-mapping");
+  defsymbol (&Qsans_modifiers, "sans-modifiers");
 }
 
 void
--- a/src/event-stream.c	Mon Aug 13 09:55:30 2007 +0200
+++ b/src/event-stream.c	Mon Aug 13 09:56:28 2007 +0200
@@ -224,6 +224,10 @@
 int recent_keys_ring_size;
 int recent_keys_ring_index;
 
+/* Boolean specifying whether keystrokes should be added to
+   recent-keys. */
+int inhibit_input_event_recording;
+
 /* prefix key(s) that must match in order to activate menu.
    This is ugly.  fix me.
    */
@@ -2220,7 +2224,8 @@
   if (store_this_key)
     {
       push_this_command_keys (event);
-      push_recent_keys (event);
+      if (!inhibit_input_event_recording)
+	push_recent_keys (event);
       dribble_out_event (event);
       if (!NILP (con->defining_kbd_macro) && NILP (Vexecuting_macro))
 	{
@@ -5159,6 +5164,11 @@
   debug_emacs_events = 0;
 #endif
 
+  DEFVAR_BOOL ("inhibit-input-event-recording", &inhibit_input_event_recording /*
+Non-nil inhibits recording of input-events to recent-keys ring.
+*/ );
+  inhibit_input_event_recording = 0;
+
   DEFVAR_LISP("menu-accelerator-prefix", &Vmenu_accelerator_prefix /*
 Prefix key(s) that must be typed before menu accelerators will be activated.
 Set this to a value acceptable by define-key.
--- a/src/fns.c	Mon Aug 13 09:55:30 2007 +0200
+++ b/src/fns.c	Mon Aug 13 09:56:28 2007 +0200
@@ -3272,7 +3272,7 @@
   return Fvector (len, args);
 }
 
-DEFUN ("mapc-internal", Fmapc_internal, 2, 2, 0, /*
+DEFUN ("mapc", Fmapc, 2, 2, 0, /*
 Apply FUNCTION to each element of SEQUENCE.
 SEQUENCE may be a list, a vector, a bit vector, or a string.
 This function is like `mapcar' but does not accumulate the results,
@@ -3282,7 +3282,7 @@
 {
   mapcar1 (XINT (Flength (seq)), 0, fn, seq);
 
-  return Qnil;
+  return seq;
 }
 
 
@@ -3540,12 +3540,10 @@
   DEFSUBR (Fnconc);
   DEFSUBR (Fmapcar);
   DEFSUBR (Fmapvector);
-  DEFSUBR (Fmapc_internal);
+  DEFSUBR (Fmapc);
   DEFSUBR (Fmapconcat);
   DEFSUBR (Fload_average);
-/*#ifndef FEATUREP_SYNTAX*/
   DEFSUBR (Ffeaturep);
-/*#endif*/
   DEFSUBR (Frequire);
   DEFSUBR (Fprovide);
 }
--- a/src/glyphs.h	Mon Aug 13 09:55:30 2007 +0200
+++ b/src/glyphs.h	Mon Aug 13 09:56:28 2007 +0200
@@ -270,53 +270,56 @@
 extern Lisp_Object Qsubwindow_image_instance_p;
 
 #define IMAGE_INSTANCE_TYPE_P(ii, type) \
-  (IMAGE_INSTANCEP (ii) && XIMAGE_INSTANCE_TYPE (ii) == type)
-
-#define NOTHING_IMAGE_INSTANCEP(ii) IMAGE_INSTANCE_TYPE_P (ii, IMAGE_NOTHING)
-#define TEXT_IMAGE_INSTANCEP(ii) IMAGE_INSTANCE_TYPE_P (ii, IMAGE_TEXT)
-#define MONO_PIXMAP_IMAGE_INSTANCEP(ii) \
-  IMAGE_INSTANCE_TYPE_P (ii, IMAGE_MONO_PIXMAP)
-#define COLOR_PIXMAP_IMAGE_INSTANCEP(ii) \
-  IMAGE_INSTANCE_TYPE_P (ii, IMAGE_COLOR_PIXMAP)
-#define POINTER_IMAGE_INSTANCEP(ii) IMAGE_INSTANCE_TYPE_P (ii, IMAGE_POINTER)
-#define SUBWINDOW_IMAGE_INSTANCEP(ii) \
-  IMAGE_INSTANCE_TYPE_P (ii, IMAGE_SUBWINDOW)
+(IMAGE_INSTANCEP (ii) && XIMAGE_INSTANCE_TYPE (ii) == type)
 
-#define CHECK_NOTHING_IMAGE_INSTANCE(x)					\
-  do { CHECK_IMAGE_INSTANCE (x);					\
-       if (!NOTHING_IMAGE_INSTANCEP (x))				\
-	 x = wrong_type_argument (Qnothing_image_instance_p, (x));	\
-     } while (0)
+#define NOTHING_IMAGE_INSTANCEP(ii) \
+     IMAGE_INSTANCE_TYPE_P (ii, IMAGE_NOTHING)
+#define TEXT_IMAGE_INSTANCEP(ii) \
+     IMAGE_INSTANCE_TYPE_P (ii, IMAGE_TEXT)
+#define MONO_PIXMAP_IMAGE_INSTANCEP(ii) \
+     IMAGE_INSTANCE_TYPE_P (ii, IMAGE_MONO_PIXMAP)
+#define COLOR_PIXMAP_IMAGE_INSTANCEP(ii) \
+     IMAGE_INSTANCE_TYPE_P (ii, IMAGE_COLOR_PIXMAP)
+#define POINTER_IMAGE_INSTANCEP(ii) \
+     IMAGE_INSTANCE_TYPE_P (ii, IMAGE_POINTER)
+#define SUBWINDOW_IMAGE_INSTANCEP(ii) \
+     IMAGE_INSTANCE_TYPE_P (ii, IMAGE_SUBWINDOW)
 
-#define CHECK_TEXT_IMAGE_INSTANCE(x)					\
-  do { CHECK_IMAGE_INSTANCE (x);					\
-       if (!TEXT_IMAGE_INSTANCEP (x))					\
-	 x = wrong_type_argument (Qtext_image_instance_p, (x));		\
-     } while (0)
+#define CHECK_NOTHING_IMAGE_INSTANCE(x) do {			\
+  CHECK_IMAGE_INSTANCE (x);					\
+  if (!NOTHING_IMAGE_INSTANCEP (x))				\
+    x = wrong_type_argument (Qnothing_image_instance_p, (x));	\
+} while (0)
 
-#define CHECK_MONO_PIXMAP_IMAGE_INSTANCE(x)				\
-  do { CHECK_IMAGE_INSTANCE (x);					\
-       if (!MONO_PIXMAP_IMAGE_INSTANCEP (x))				\
-	 x = wrong_type_argument (Qmono_pixmap_image_instance_p, (x));	\
-     } while (0)
+#define CHECK_TEXT_IMAGE_INSTANCE(x) do {			\
+  CHECK_IMAGE_INSTANCE (x);					\
+  if (!TEXT_IMAGE_INSTANCEP (x))				\
+    x = wrong_type_argument (Qtext_image_instance_p, (x));	\
+} while (0)
 
-#define CHECK_COLOR_PIXMAP_IMAGE_INSTANCE(x)				\
-  do { CHECK_IMAGE_INSTANCE (x);					\
-       if (!COLOR_PIXMAP_IMAGE_INSTANCEP (x))				\
-	 x = wrong_type_argument (Qcolor_pixmap_image_instance_p, (x));	\
-     } while (0)
+#define CHECK_MONO_PIXMAP_IMAGE_INSTANCE(x) do {			\
+  CHECK_IMAGE_INSTANCE (x);						\
+  if (!MONO_PIXMAP_IMAGE_INSTANCEP (x))					\
+    x = wrong_type_argument (Qmono_pixmap_image_instance_p, (x));	\
+} while (0)
 
-#define CHECK_POINTER_IMAGE_INSTANCE(x)					\
-  do { CHECK_IMAGE_INSTANCE (x);					\
-       if (!POINTER_IMAGE_INSTANCEP (x))				\
-	 x = wrong_type_argument (Qpointer_image_instance_p, (x));	\
-     } while (0)
+#define CHECK_COLOR_PIXMAP_IMAGE_INSTANCE(x) do {			\
+  CHECK_IMAGE_INSTANCE (x);						\
+  if (!COLOR_PIXMAP_IMAGE_INSTANCEP (x))				\
+    x = wrong_type_argument (Qcolor_pixmap_image_instance_p, (x));	\
+} while (0)
 
-#define CHECK_SUBWINDOW_IMAGE_INSTANCE(x)				\
-  do { CHECK_IMAGE_INSTANCE (x);					\
-       if (!SUBWINDOW_IMAGE_INSTANCEP (x))				\
-	 x = wrong_type_argument (Qsubwindow_image_instance_p, (x));	\
-     } while (0)
+#define CHECK_POINTER_IMAGE_INSTANCE(x) do {			\
+  CHECK_IMAGE_INSTANCE (x);					\
+  if (!POINTER_IMAGE_INSTANCEP (x))				\
+    x = wrong_type_argument (Qpointer_image_instance_p, (x));	\
+} while (0)
+
+#define CHECK_SUBWINDOW_IMAGE_INSTANCE(x) do {			\
+  CHECK_IMAGE_INSTANCE (x);					\
+  if (!SUBWINDOW_IMAGE_INSTANCEP (x))				\
+    x = wrong_type_argument (Qsubwindow_image_instance_p, (x));	\
+} while (0)
 
 struct Lisp_Image_Instance
 {
@@ -325,26 +328,26 @@
   Lisp_Object name;
   enum image_instance_type type;
   union
+  {
+    struct
     {
-      struct
-	{
-	  Lisp_Object string;
-	} text;
-      struct
-	{
-	  int width, height, depth;
-	  Lisp_Object hotspot_x, hotspot_y; /* integer or Qnil */
-	  Lisp_Object filename; /* string or Qnil */
-	  Lisp_Object mask_filename; /* string or Qnil */
-	  Lisp_Object fg, bg; /* foreground and background colors,
-				 if this is a colorized mono-pixmap
-				 or a pointer */
-	} pixmap; /* used for pointers as well */
-      struct
-	{
-	  int dummy; /* #### fill in this structure */
-	} subwindow;
-    } u;
+      Lisp_Object string;
+    } text;
+    struct
+    {
+      int width, height, depth;
+      Lisp_Object hotspot_x, hotspot_y; /* integer or Qnil */
+      Lisp_Object filename;	 /* string or Qnil */
+      Lisp_Object mask_filename; /* string or Qnil */
+      Lisp_Object fg, bg; /* foreground and background colors,
+			     if this is a colorized mono-pixmap
+			     or a pointer */
+    } pixmap; /* used for pointers as well */
+    struct
+    {
+      int dummy; /* #### fill in this structure */
+    } subwindow;
+  } u;
 
   /* console-type- and image-type-specific data */
   void *data;
@@ -438,23 +441,23 @@
 
 extern Lisp_Object Qbuffer_glyph_p, Qpointer_glyph_p, Qicon_glyph_p;
 
-#define CHECK_BUFFER_GLYPH(x)						\
-  do { CHECK_GLYPH (x);							\
-       if (XGLYPH (x)->type != GLYPH_BUFFER)				\
-	 x = wrong_type_argument (Qbuffer_glyph_p, (x));		\
-     } while (0)
+#define CHECK_BUFFER_GLYPH(x) do {			\
+  CHECK_GLYPH (x);					\
+  if (XGLYPH (x)->type != GLYPH_BUFFER)			\
+    x = wrong_type_argument (Qbuffer_glyph_p, (x));	\
+} while (0)
 
-#define CHECK_POINTER_GLYPH(x)						\
-  do { CHECK_GLYPH (x);							\
-       if (XGLYPH (x)->type != GLYPH_POINTER)				\
-	 x = wrong_type_argument (Qpointer_glyph_p, (x));		\
-     } while (0)
+#define CHECK_POINTER_GLYPH(x) do {			\
+  CHECK_GLYPH (x);					\
+  if (XGLYPH (x)->type != GLYPH_POINTER)		\
+    x = wrong_type_argument (Qpointer_glyph_p, (x));	\
+} while (0)
 
-#define CHECK_ICON_GLYPH(x)						\
-  do { CHECK_GLYPH (x);							\
-       if (XGLYPH (x)->type != GLYPH_ICON)				\
-	 x = wrong_type_argument (Qicon_glyph_p, (x));			\
-     } while (0)
+#define CHECK_ICON_GLYPH(x) do {			\
+  CHECK_GLYPH (x);					\
+  if (XGLYPH (x)->type != GLYPH_ICON)			\
+    x = wrong_type_argument (Qicon_glyph_p, (x));	\
+} while (0)
 
 #define GLYPH_TYPE(g) ((g)->type)
 #define GLYPH_IMAGE(g) ((g)->image)
--- a/src/mule-coding.h	Mon Aug 13 09:55:30 2007 +0200
+++ b/src/mule-coding.h	Mon Aug 13 09:56:28 2007 +0200
@@ -109,35 +109,35 @@
   Lisp_Object eol_lf, eol_crlf, eol_cr;
 
   struct
-    {
-      /* What are the charsets to be initially designated to G0, G1,
-	 G2, G3?  If t, no charset is initially designated.  If nil,
-	 no charset is initially designated and no charset is allowed
-	 to be designated. */
-      Lisp_Object initial_charset[4];
+  {
+    /* What are the charsets to be initially designated to G0, G1,
+       G2, G3?  If t, no charset is initially designated.  If nil,
+       no charset is initially designated and no charset is allowed
+       to be designated. */
+    Lisp_Object initial_charset[4];
 
-      /* If true, a designation escape sequence needs to be sent on output
-	 for the charset in G[0-3] before that charset is used. */
-      unsigned char force_charset_on_output[4];
+    /* If true, a designation escape sequence needs to be sent on output
+       for the charset in G[0-3] before that charset is used. */
+    unsigned char force_charset_on_output[4];
 
-      charset_conversion_spec_dynarr *input_conv;
-      charset_conversion_spec_dynarr *output_conv;
+    charset_conversion_spec_dynarr *input_conv;
+    charset_conversion_spec_dynarr *output_conv;
 
-      unsigned int shoort        :1; /* C makes you speak Dutch */
-      unsigned int no_ascii_eol  :1;
-      unsigned int no_ascii_cntl :1;
-      unsigned int seven         :1;
-      unsigned int lock_shift    :1;
-      unsigned int no_iso6429    :1;
-      unsigned int escape_quoted :1;
-    } iso2022;
+    unsigned int shoort		:1; /* C makes you speak Dutch */
+    unsigned int no_ascii_eol	:1;
+    unsigned int no_ascii_cntl	:1;
+    unsigned int seven		:1;
+    unsigned int lock_shift	:1;
+    unsigned int no_iso6429	:1;
+    unsigned int escape_quoted	:1;
+  } iso2022;
 
   struct
-    {
-      /* For a CCL coding system, these specify the CCL programs used for
-	 decoding (input) and encoding (output). */
-      Lisp_Object decode, encode;
-    } ccl;
+  {
+    /* For a CCL coding system, these specify the CCL programs used for
+       decoding (input) and encoding (output). */
+    Lisp_Object decode, encode;
+  } ccl;
 };
 
 DECLARE_LRECORD (coding_system, struct Lisp_Coding_System);
--- a/src/print.c	Mon Aug 13 09:55:30 2007 +0200
+++ b/src/print.c	Mon Aug 13 09:56:28 2007 +0200
@@ -946,9 +946,12 @@
 	  strcpy (buf, "\\r");
 	else if (ch == '\t')
 	  strcpy (buf, "\\t");
-	else if (ch < 32)
+	else if (ch < 32) {
 	  sprintf (buf, "\\^%c", ch + 64);
-	else if (ch == 127)
+	  if ((ch + 64) == '\\') {
+	    strcat(buf, "\\");
+	  }
+	} else if (ch == 127)
 	  strcpy (buf, "\\^?");
 	else if (ch >= 128 && ch < 160)
 	  {
--- a/src/redisplay.c	Mon Aug 13 09:55:30 2007 +0200
+++ b/src/redisplay.c	Mon Aug 13 09:56:28 2007 +0200
@@ -8229,6 +8229,10 @@
   DEFVAR_LISP ("window-system", &Vwindow_system /*
 A symbol naming the window-system under which Emacs is running,
 such as `x', or nil if emacs is running on an ordinary terminal.
+
+Do not use this variable, except for GNU Emacs compatibility, as it
+gives wrong values in a multi-device environment.  Use `console-type'
+instead.
 */ );
   Vwindow_system = Qnil;
 
--- a/src/search.c	Mon Aug 13 09:55:30 2007 +0200
+++ b/src/search.c	Mon Aug 13 09:56:28 2007 +0200
@@ -2257,7 +2257,8 @@
   Charcount len;
 
   if (NILP (last_thing_searched))
-    error ("match-data called before any match found");
+    /*error ("match-data called before any match found");*/
+    return Qnil;
 
   data = alloca_array (Lisp_Object, 2 * search_regs.num_regs);
 
--- a/src/sysdep.c	Mon Aug 13 09:55:30 2007 +0200
+++ b/src/sysdep.c	Mon Aug 13 09:56:28 2007 +0200
@@ -32,6 +32,8 @@
 #include <config.h>
 #include "lisp.h"
 
+#include <stddef.h>
+
 /* ------------------------------- */
 /*          basic includes         */
 /* ------------------------------- */
--- a/src/window.h	Mon Aug 13 09:55:30 2007 +0200
+++ b/src/window.h	Mon Aug 13 09:56:28 2007 +0200
@@ -194,7 +194,7 @@
   Lisp_Object scrollbar_height;
   /* Pointer to use for vertical and horizontal scrollbars. */
   Lisp_Object scrollbar_pointer;
-#endif
+#endif /* HAVE_SCROLLBARS */
 #ifdef HAVE_TOOLBARS
   /* Toolbar specification for each of the four positions.
      This is not a size hog because the value here is not copied,
@@ -211,14 +211,14 @@
   Lisp_Object default_toolbar;
   Lisp_Object default_toolbar_width, default_toolbar_height;
   Lisp_Object default_toolbar_visible_p;
-#endif
+#endif /* HAVE_TOOLBARS */
   Lisp_Object left_margin_width, right_margin_width;
   Lisp_Object minimum_line_ascent, minimum_line_descent;
   Lisp_Object use_left_overflow, use_right_overflow;
 #ifdef HAVE_MENUBARS
   /* Visibility of menubar. */
   Lisp_Object menubar_visible_p;
-#endif
+#endif /* HAVE_MENUBARS */
   Lisp_Object text_cursor_visible_p;
 
   /* one-bit flags: */
@@ -238,11 +238,11 @@
   /* new redisplay flag */
   unsigned int windows_changed :1;
   unsigned int shadow_thickness_changed :1;
-  };
+};
 
-#define CURRENT_DISP		0
-#define DESIRED_DISP		1
-#define CMOTION_DISP		2
+#define CURRENT_DISP	0
+#define DESIRED_DISP	1
+#define CMOTION_DISP	2
 
 struct window_mirror
 {
@@ -271,7 +271,7 @@
   /* Scrollbars associated with window, if any. */
   struct scrollbar_instance *scrollbar_vertical_instance;
   struct scrollbar_instance *scrollbar_horizontal_instance;
-#endif
+#endif /* HAVE_SCROLLBARS */
 
   /* Flag indicating whether a subwindow is currently being displayed. */
   unsigned int subwindows_being_displayed :1;
@@ -295,16 +295,16 @@
 extern Lisp_Object Qwindow_live_p;
 
 #define WINDOW_LIVE_P(x) (!(x)->dead)
-#define CHECK_LIVE_WINDOW(x)						\
-  do { CHECK_WINDOW (x);						\
-       if (!WINDOW_LIVE_P (XWINDOW (x)))				\
-	 dead_wrong_type_argument (Qwindow_live_p, (x));		\
-     } while (0)
-#define CONCHECK_LIVE_WINDOW(x)						\
-  do { CONCHECK_WINDOW (x);						\
-       if (!WINDOW_LIVE_P (XWINDOW (x)))				\
-	 x = wrong_type_argument (Qwindow_live_p, (x));			\
-     } while (0)
+#define CHECK_LIVE_WINDOW(x) do {			\
+  CHECK_WINDOW (x);					\
+  if (!WINDOW_LIVE_P (XWINDOW (x)))			\
+    dead_wrong_type_argument (Qwindow_live_p, (x));	\
+} while (0)
+#define CONCHECK_LIVE_WINDOW(x) do {			\
+  CONCHECK_WINDOW (x);					\
+  if (!WINDOW_LIVE_P (XWINDOW (x)))			\
+    x = wrong_type_argument (Qwindow_live_p, (x));	\
+} while (0)
 
 /* 1 if W is a minibuffer window.  */
 #define MINI_WINDOW_P(W)  (!EQ ((W)->mini_p, Qnil))
@@ -315,16 +315,17 @@
 #define TOP_LEVEL_WINDOW_P(w) NILP ((w)->parent)
 
 /* Set all redisplay flags indicating a window has changed */
-#define MARK_WINDOWS_CHANGED(w) do {					\
-  (w)->windows_changed = 1;						\
-  if (!NILP (w->frame))							\
-    MARK_FRAME_WINDOWS_CHANGED (XFRAME (w->frame));			\
-  else									\
-    windows_changed = 1; } while (0)
+#define MARK_WINDOWS_CHANGED(w) do {			\
+  (w)->windows_changed = 1;				\
+  if (!NILP (w->frame))					\
+    MARK_FRAME_WINDOWS_CHANGED (XFRAME (w->frame));	\
+  else							\
+    windows_changed = 1;				\
+} while (0)
 
 #define WINDOW_TTY_P(w) FRAME_TTY_P (XFRAME ((w)->frame))
-#define WINDOW_X_P(w) FRAME_X_P (XFRAME ((w)->frame))
-#define WINDOW_NS_P(w) FRAME_NS_P (XFRAME ((w)->frame))
+#define WINDOW_X_P(w)   FRAME_X_P   (XFRAME ((w)->frame))
+#define WINDOW_NS_P(w)  FRAME_NS_P  (XFRAME ((w)->frame))
 #define WINDOW_WIN_P(w) FRAME_WIN_P (XFRAME ((w)->frame))
 
 DECLARE_LRECORD (window_configuration, struct window_config);
--- a/version.sh	Mon Aug 13 09:55:30 2007 +0200
+++ b/version.sh	Mon Aug 13 09:56:28 2007 +0200
@@ -1,5 +1,5 @@
 #!/bin/sh
 emacs_major_version=20
 emacs_minor_version=3
-emacs_beta_version=19
-xemacs_codename="Kiev"
+emacs_beta_version=20
+xemacs_codename="Tirana"