changeset 215:1f0dabaa0855 r20-4b6

Import from CVS: tag r20-4b6
author cvs
date Mon, 13 Aug 2007 10:07:35 +0200
parents c5d88c05e1e9
children 43306a74e31c
files CHANGES-beta ChangeLog Makefile.in PROBLEMS configure configure.in configure.usage etc/DISTRIB etc/Emacs.ad etc/FTP etc/NEWS etc/TUTORIAL.no etc/TUTORIAL.pl etc/xemacs-beta.xpm etc/xemacs.1 lib-src/ChangeLog lib-src/fakemail.c lib-src/gnuserv.c lib-src/update-elc.sh lisp/ChangeLog lisp/cmdloop.el lisp/cus-edit.el lisp/egg/egg-leim.el lisp/egg/egg-wnn.el lisp/egg/egg.el lisp/emulators/crisp.el lisp/format.el lisp/help-nomule.el lisp/help.el lisp/language/european.el lisp/leim/auto-autoloads.el lisp/leim/quail.el lisp/leim/quail/latin-pre.el lisp/loadup.el lisp/minibuf.el lisp/modes/enriched.el lisp/msw-faces.el lisp/mule/mule-coding.el lisp/mule/mule-files.el lisp/packages.el lisp/packages/emacsbug.el lisp/packages/font-lock.el lisp/packages/gnuserv.el lisp/paragraphs.el lisp/prim/about.el lisp/prim/options.el lisp/simple.el lisp/startup.el lisp/utils/uniquify.el lisp/x-faces.el lisp/x-toolbar.el man/xemacs-faq.texi nt/ChangeLog nt/README nt/Todo nt/xemacs.mak src/ChangeLog src/EmacsFrame.c src/EmacsFrame.h src/EmacsFrameP.h src/Makefile.in.in src/callproc.c src/console.h src/emacs.c src/events.c src/fileio.c src/frame-msw.c src/frame-x.c src/frame.c src/frame.h src/frameslots.h src/glyphs-x.c src/keymap.c src/mule-coding.h src/redisplay-msw.c src/redisplay-x.c src/redisplay.c src/toolbar-x.c src/toolbar.c src/toolbar.h src/window.c src/window.h version.sh
diffstat 83 files changed, 4451 insertions(+), 1899 deletions(-) [+]
line wrap: on
line diff
--- a/CHANGES-beta	Mon Aug 13 10:06:48 2007 +0200
+++ b/CHANGES-beta	Mon Aug 13 10:07:35 2007 +0200
@@ -1,4 +1,20 @@
 							-*- indented-text -*-
+to 20.4 beta6 "Angora"
+-- New package-path syntax.  A null package indicates where the default lisp
+   should go.  This allows specifying packages that must be appended to the
+   package path.  Courtesy of Colin Rafferty
+-- `-flags' and `-?' are no longer command flags
+-- MS Windows updates from David Hobley, Jonathon Harris, and Marc Paquette
+-- Mule/enriched.el update courtesy of MORIOKA Tomohiko
+-- FAQ updates courtesy of Hrvoje Niksic and Aki Vehtari
+-- crisp.el-1.26 courtesy of Gary Foster
+-- Egg update courtesy of Jareth Hein
+-- Update to Norwegian TUTORIAL courtesy of Stig Bjørlykke
+-- Polish translation of the TUTORIAL courtesy of Remek Trzaska, update and
+   corrections courtesy of Rysiek Kubiak.
+-- Toolbar improvements courtesy of Kyle Jones
+-- Miscellaneous bug fixes
+
 to 20.4 beta5 "Anglo-Nubian"
 -- CCL synched with Emacs 20.2 courtesy of Olivier Galibert
 -- various updates from Hrvoje Niksic and Kyle Jones
--- a/ChangeLog	Mon Aug 13 10:06:48 2007 +0200
+++ b/ChangeLog	Mon Aug 13 10:07:35 2007 +0200
@@ -1,3 +1,55 @@
+1997-11-20  SL Baur  <steve@altair.xemacs.org>
+
+	* XEmacs 20.4-beta6 is released.
+
+1997-11-21  Stephen Turnbull  <turnbull@sk.tsukuba.ac.jp>
+
+	* configure.usage: Use `--' convention in "usage:" line.
+
+1997-11-20  Stephen Turnbull <turnbull@sk.tsukuba.ac.jp>
+
+	* configure.in: added `with_xfs' to list of boolean features.
+
+1997-11-20  SL Baur  <steve@altair.xemacs.org>
+
+	* XEmacs 20.3 is released.
+
+1997-11-19  Tor Arntsen <tor@spacetec.no>
+
+	* PROBLEMS: Removed IRIX entry about xemacs core dumps when using
+	xemacs dumped on one machine on another. Problem was fixed by 20.3.
+
+1997-11-19  SL Baur  <steve@altair.xemacs.org>
+
+	* etc/xemacs.1: Document -no-packages, -vanilla.
+	Document -h.
+
+1997-11-18  SL Baur  <steve@altair.xemacs.org>
+
+	* configure.usage: New file.
+
+	* configure.in: Use it instead of monster 10k shell variable.
+
+1997-11-17  SL Baur  <steve@altair.xemacs.org>
+
+	* XEmacs 20.3-pre4 is released.
+
+1997-11-17  Jens-Ulrik Holger Petersen  <petersen@kurims.kyoto-u.ac.jp>
+
+	* configure.in (infopath): List "/usr/local/" dirs before "/usr/"
+	dirs.
+
+1997-11-17  SL Baur  <steve@altair.xemacs.org>
+
+	* configure.in: Initialize infodir off of datadir.
+
+	* Makefile.in: Force LANG = C for building.
+
+1997-11-15  SL Baur  <steve@altair.xemacs.org>
+
+	* XEmacs 20.3-pre3 is released.
+	* XEmacs 20.4-beta5 is released.
+
 1997-11-13  Marc Paquette <marcpa@cam.org>
 
 	* nt/Todo: added a task for support of lisp packages through
@@ -22,6 +74,10 @@
 	* Deleted w32 build directory since nt build directory now handles
 	  X and native mswindows builds.
 
+1997-11-11  SL Baur  <steve@altair.xemacs.org>
+
+	* XEmacs 20.4-beta4 is released.
+
 1997-11-10  SL Baur  <steve@altair.xemacs.org>
 
 	* info/dir: remove packaged entries.
--- a/Makefile.in	Mon Aug 13 10:06:48 2007 +0200
+++ b/Makefile.in	Mon Aug 13 10:07:35 2007 +0200
@@ -52,6 +52,7 @@
 @SET_MAKE@
 RECURSIVE_MAKE=@RECURSIVE_MAKE@
 SHELL = /bin/sh
+LANG = C
 RM = rm -f
 pwd = /bin/pwd
 
@@ -268,13 +269,17 @@
 	MAKE='$(MAKE)' sh ${srcdir}/lib-src/update-custom.sh
 
 finder: src
+	@echo "Building finder database"
 	@(cd lisp/utils; \
 		${blddir}/src/xemacs -batch -q -no-site-file \
+		-eval '(setq finder-compile-keywords-quiet t)' \
 		-l finder -f finder-compile-keywords )
 
 lisp/utils/finder-inf.el:
+	@echo "Building finder database"
 	@(cd lisp/utils; \
 		${blddir}/src/xemacs -batch -q -no-site-file \
+		-eval '(setq finder-compile-keywords-quiet t)' \
 		-l finder -f finder-compile-keywords )
 
 ## We force the rebuilding of src/paths.h because the user might give
--- a/PROBLEMS	Mon Aug 13 10:06:48 2007 +0200
+++ b/PROBLEMS	Mon Aug 13 10:07:35 2007 +0200
@@ -108,18 +108,6 @@
 This occurs if you use the SGI linker version 7.1.  Installing the
 patch SG0001872 fixes this problem.
 
-** On Irix 5.x and 6.x, the dumped XEmacs (xemacs) core dumps when executed 
-on another machine, or after newer SGI IRIX patches have been installed.
-
-The xemacs binary must be executed with the same "libc.so" file which
-was used when the xemacs binary was dumped.  Some SGI IRIX patches
-update this file.  Make sure that all machines using the xemacs binary
-are using the same set of IRIX patches.  If xemacs core dumps after a
-patch upgrade then you will have to redump it from temacs.
-
-We don't know what causes this tight dependency, but we hope to fix it 
-in the future.
-
 ** xemacs: can't resolve symbol '__malloc_hook'
 
 This is a Linux problem where you've compiled the XEmacs binary on a libc
--- a/configure	Mon Aug 13 10:06:48 2007 +0200
+++ b/configure	Mon Aug 13 10:07:35 2007 +0200
@@ -218,9 +218,9 @@
 statedir='${prefix}/lib'
 libdir='${exec_prefix}/lib'
 mandir='${prefix}/man/man1'
-infodir='${prefix}/lib/xemacs-${version}/info'
+infodir='${datadir}/xemacs-${version}/info'
 infodir_user_defined='no'
-infopath='/usr/info:/usr/local/info:/usr/lib/texmf/doc/info:/usr/local/lib/texmf/doc/info'
+infopath='/usr/local/info:/usr/info:/usr/local/lib/texmf/doc/info:/usr/lib/texmf/doc/info'
 infopath_user_defined='no'
 lispdir='${datadir}/xemacs-${version}/lisp'
 lispdir_user_defined='no'
@@ -249,235 +249,6 @@
 use_union_type="no"
 with_dnet=""
 
-usage="Usage: $progname CONFIGURATION [-OPTION[=VALUE] ...]
-
-Set compilation and installation parameters for XEmacs, and report.
-CONFIGURATION specifies the machine and operating system to build for.
-
-Note that for most of the following options, you can explicitly enable
-them using \`--OPTION=yes' and explicitly disable them using \`--OPTION=no'.
-This is especially useful for auto-detected options.
-
-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:
-
---help			Issue this usage message.
---verbose		Display the results of configure tests.
---extra-verbose		Display even more information, useful for debugging.
-
-
-Compilation options:
-
---compiler=XXXX		Specify compiler.  Overrides environment variable CC.
---with-gcc (*)		Use GCC to compile XEmacs.
---with-gcc=no		Don't use GCC to compile XEmacs.
---with-gnu-make		Write the Makefiles to take advantage of
-			special features of GNU Make. (GNU Make
-			works fine on the Makefiles even without this
-			option.  This just allows for simultaneous
-			in-place and --srcdir building.)
---cflags=FLAGS		Compiler flags. Overrides environment variable CFLAGS.
---site-includes=PATH	List of directories to search first for header files.
---site-libraries=PATH	List of directories to search first for libraries.
---site-prefixes=PATH    List of directories to search for include/ and lib/ 
-                        subdirectories, just after 'site-includes' and 
-                        'site-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.
---srcdir=DIR		Look for the XEmacs source files in DIR.
-			See also --with-gnu-make.
---const-is-losing=no	Allow the use of const in the source code.
-
-
-Installation options:
-
---prefix=DIR		Install files below DIR.  Defaults to \`$prefix'.
-
-
-Window-system options:
-
---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.
---with-session=no	Compile without realized leader window which will
-			keep the WM_COMMAND property. Required for proper
-			session-management.
---with-menubars=TYPE	Use TYPE menubars (lucid, motif, or no).  The Lucid
-			widgets emulate Motif (mostly) but are faster.
-			*WARNING*  The Motif menubar is currently broken.
---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.
---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.
---external-widget	Compile with external widget support.
---with-gif		Compile with support for GIF image conversion.
-			This support is built-in and defaults to \`yes'.
---with-xpm (*)		Compile with support for XPM files.
-			It is highly recommended that you obtain XPM
-			(version 3.4h or better) if you don't already
-			have it.  Get it from the XEmacs FTP site.
---with-xface (*)	Compile with support for X-Face mail header
-	  		conversion.  Requires the compface library.
-			Get it from the XEmacs FTP site.
---with-imagick (*)	Compile with support for ImageMagick image conversion.
-			Requires ImageMagick from wizards.dupont.com and
-			libraries for whatever image types you wish to have
-			supported.
-			Get it from the XEmacs FTP site.
-
-
-TTY options:
-
---with-tty=no		Don't support TTY-s.
---with-ncurses (*)	Use the ncurses library for tty support.
---with-gpm (*) 		Compile in support for General Purpose Mouse.
-
-
-Additional features:
-
---with-tooltalk (*)	Support the ToolTalk IPC protocol.
---with-workshop		Support the Sun WorkShop (formerly Sparcworks)
-			development environment.
---with-energize		Support the Lucid Energize development environment.
-			This doesn't currently work.
---with-socks		Compile with support for SOCKS (an Internet proxy).
---with-term		Compile with support for TERM (a way to multiplex
-			serial lines and provide vaguely Internet-like
-			functionality over a simple dialup connection,
-			used on Linux and other systems.  NOTE: We can't
-			guarantee that our TERM support coexists well
-			with standard Internet connections).
---with-database=type (*) Compile with database support.  Valid types are
-			\`no' or a comma-separated list of one or more
-			of \`dbm', \`gnudbm', or \`berkdb'.
---with-sound=native (*)	Compile with native sound support.
---with-sound=nas	Compile with network sound support.
---with-sound=both	Compile with native and network sound support.
---native-sound-lib=LIB	Native sound support library.  Needed on Suns
-			with --with-sound=both because both sound libraries
-			are called libaudio.
---with-pop		support POP for mail retrieval
---with-kerberos		support Kerberos-authenticated POP
---with-hesiod		support Hesiod to get the POP server host
---with-dnet (*)		Compile with support for DECnet.
---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     Directories to search for packages to dump with xemacs.
-                        Defaults to \`$prefix/lib/xemacs/packages:~/.xemacs'.
---infodir=dir		Directory to install the XEmacs Info manuals and dir in.
-    Defaults to: \`$info_dir'.
---infopath=PATH		Directories to search for Info documents, info dir
-			and localdir files.  This is used to initialize
-			\`Info-default-directory-list' at dump time.
-			Directories on this path that do not exist in the
-			filesystem will be dropped by the startup code at
-			runtime, so it is safe to specify directories that do
-			not exist in the compilation environment, or that won't
-			exist in the runtime environment. The \"dir\"
-			file in the first existing directory in this list will
-			become the (dir)Top node of the Info tree.
-    Defaults to the value of \`INFOPATH', or:
-    \`$infopath'.
-
-Internationalization options:
-
---with-mule		Compile with Mule (MUlti-Lingual Emacs) support,
-			needed to suport non-Latin-1 (including Asian) languages.
---with-xim=xlib		Compile with support for X input methods,
---with-xim=motif (*)	Used in conjunction with Mule support.
-			Use either raw Xlib to provide XIM support, or
-			the Motif XmIm* routines (when available).
-			NOTE:  On some systems bugs in X11's XIM support
-			will cause XEmacs to crash, so by default,
-			no XIM support is compiled in, unless running
-			on Solaris and the XmIm* routines are detected.
---with-canna (*)	Compile with support for Canna (a Japanese input method
-			used in conjunction with Mule support).
---with-wnn (*)		Compile with support for WNN (a multi-language input method
-			used in conjunction with Mule support).
-			This is beta level code.
---with-wnn6 (*)		Compile with support for WNN version 6
-			This is alpha level code.
---with-i18n3		Compile with I18N level 3 (support for message
-			translation).  This doesn't currently work.
---with-xfs		Compile with XFontSet support for bilingual menubar.
-			Can't use this option with --with-xim=motif or xlib.
-			And should have --with-menubars=lucid.
-
-
-Debugging options:
-
---debug			Compile with support for debugging XEmacs.
-			(Causes code-size increase and little loss of speed.)
---error-checking=TYPE[,TYPE]...
-			Compile with internal error-checking added.
-			Causes noticeable loss of speed.  Valid types
-			are extents, bufpos, malloc, gc, typecheck.
---error-checking=none	Disable all internal error-checking (the default).
---error-checking=all	Enable all internal error-checking.
---memory-usage-stats 	Compile with additional code to allow you to
-			determine what XEmacs's memory is being used
-		        for.  Causes a small code increase but no loss
-			of speed.  Normally enabled when --debug is given.
---no-doc-file		Don't rebuild the DOC file unless it's explicitly
-			deleted.  Only use during development. (It speeds
-			up the compile-run-test cycle.)
---use-union-type	Enable or disable use of a union, instead of an
-			int, for the fundamental Lisp_Object type; this
-			provides stricter type-checking.  Only works with
-			some systems and compilers.
-
-
-Other options:
-
---puresize=VALUE	Override default amount of space for pure Lisp code.
---rel-alloc		Use the relocating allocator (default for this option
-  			is system-dependent).
---with-clash-detection	Use lock files to detect multiple edits of the same file.
-			The default is to not do clash detection.
---lockdir=dir		The directory to put clash detection files in, such as
-			\`/var/lock/emacs'.
-    Defaults to \`$lockdir'.
---with-system-malloc	Force use of the system malloc, rather than GNU malloc.
---with-debug-malloc	Use the debugging malloc package.
-
-You may also specify any of the \`path' variables found in
-Makefile.in, including --bindir, --libdir, --lispdir, --datadir, and
-so on.  Note that we recommend against explicitly setting any of these
-variables.  See the INSTALL file for a complete list plus the reasons
-we advise not changing them.
-
-If successful, $progname leaves its status in config.status.  If
-unsuccessful after disturbing the status quo, it removes config.status.
-
-The configure build process also used the following environment variables:
-CC        C compiler to use (but configure flags take precedence)
-CPP       C preprocessor to use (such as /usr/ccs/lib/cpp or cc -E)
-CFLAGS    C compiler compilation flags (such as -O)
-CPPFLAGS  Additional compilation flags (such as -I/foo) used only by the preprocessor
-LDFLAGS   Additional linker flags (such as -L/foo)
-LIBS      Additional libraries (such as -lfoo)
-
-INFOPATH  Path to search for Info documentation.
-
-For more details on the install process, consult the INSTALL file.
-"
-
 
 
 
@@ -541,6 +312,7 @@
 	with_quantify	| \
 	with_toolbars	| \
 	with_tty	| \
+	with_xfs	| \
 	with_i18n3	| \
 	with_mule	| \
 	with_canna	| \
@@ -769,7 +541,7 @@
 
 		"no_create" ) ;;
 
-		"usage" | "help" ) echo "$usage" | ${PAGER-more}; exit 0 ;;
+		"usage" | "help" ) ${PAGER-more} ${srcdir}/configure.usage; exit 0 ;;
 
 			"with_menubars" | "with_scrollbars" | "with_dialogs" )
 	  case "$val" in
@@ -873,7 +645,7 @@
 esac
 
 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:877: checking whether ln -s works" >&5
+echo "configure:649: checking whether ln -s works" >&5
 
 rm -f conftestdata
 if ln -s X conftestdata 2>/dev/null
@@ -1050,7 +822,7 @@
 
 
 echo "checking "the configuration name"" 1>&6
-echo "configure:1054: checking "the configuration name"" >&5
+echo "configure:826: checking "the configuration name"" >&5
 internal_configuration=`echo $configuration | sed 's/-\(energize\|workshop\)//'`
 if canonical=`$srcdir/config.sub "$internal_configuration"` ; then : ; else
   exit $?
@@ -1506,7 +1278,7 @@
 # Extract the first word of "gcc", so it can be a program name with args.
 set dummy gcc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1510: checking for $ac_word" >&5
+echo "configure:1282: checking for $ac_word" >&5
 
 if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -1532,7 +1304,7 @@
   # Extract the first word of "cc", so it can be a program name with args.
 set dummy cc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1536: checking for $ac_word" >&5
+echo "configure:1308: checking for $ac_word" >&5
 
 if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -1577,7 +1349,7 @@
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1581: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1353: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
 
 ac_ext=c
 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
@@ -1589,11 +1361,11 @@
 cross_compiling=no
 
 cat > conftest.$ac_ext <<EOF
-#line 1593 "configure"
+#line 1365 "configure"
 #include "confdefs.h"
 main(){return(0);}
 EOF
-if { (eval echo configure:1597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   ac_cv_prog_cc_works=yes
   # If we can't run a trivial program, we are probably using a cross compiler.
   if (./conftest; exit) 2>/dev/null; then
@@ -1613,19 +1385,19 @@
   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
 fi
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:1617: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1389: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
 cross_compiling=$ac_cv_prog_cc_cross
 
 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1622: checking whether we are using GNU C" >&5
+echo "configure:1394: checking whether we are using GNU C" >&5
 
 cat > conftest.c <<EOF
 #ifdef __GNUC__
   yes;
 #endif
 EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1629: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1401: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
   ac_cv_prog_gcc=yes
 else
   ac_cv_prog_gcc=no
@@ -1639,7 +1411,7 @@
   ac_save_CFLAGS="$CFLAGS"
   CFLAGS=
   echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1643: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1415: checking whether ${CC-cc} accepts -g" >&5
 
 echo 'void f(){}' > conftest.c
 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
@@ -1668,7 +1440,7 @@
   # Extract the first word of "gcc", so it can be a program name with args.
 set dummy gcc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1672: checking for $ac_word" >&5
+echo "configure:1444: checking for $ac_word" >&5
 
 if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -1694,7 +1466,7 @@
   # Extract the first word of "cc", so it can be a program name with args.
 set dummy cc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1698: checking for $ac_word" >&5
+echo "configure:1470: checking for $ac_word" >&5
 
 if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -1739,7 +1511,7 @@
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1743: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1515: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
 
 ac_ext=c
 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
@@ -1751,11 +1523,11 @@
 cross_compiling=no
 
 cat > conftest.$ac_ext <<EOF
-#line 1755 "configure"
+#line 1527 "configure"
 #include "confdefs.h"
 main(){return(0);}
 EOF
-if { (eval echo configure:1759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   ac_cv_prog_cc_works=yes
   # If we can't run a trivial program, we are probably using a cross compiler.
   if (./conftest; exit) 2>/dev/null; then
@@ -1775,19 +1547,19 @@
   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
 fi
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:1779: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1551: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
 cross_compiling=$ac_cv_prog_cc_cross
 
 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1784: checking whether we are using GNU C" >&5
+echo "configure:1556: checking whether we are using GNU C" >&5
 
 cat > conftest.c <<EOF
 #ifdef __GNUC__
   yes;
 #endif
 EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1791: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1563: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
   ac_cv_prog_gcc=yes
 else
   ac_cv_prog_gcc=no
@@ -1801,7 +1573,7 @@
   ac_save_CFLAGS="$CFLAGS"
   CFLAGS=
   echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1805: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1577: checking whether ${CC-cc} accepts -g" >&5
 
 echo 'void f(){}' > conftest.c
 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
@@ -1830,7 +1602,7 @@
   # Extract the first word of "gcc", so it can be a program name with args.
 set dummy gcc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1834: checking for $ac_word" >&5
+echo "configure:1606: checking for $ac_word" >&5
 
 if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -1856,7 +1628,7 @@
   # Extract the first word of "cc", so it can be a program name with args.
 set dummy cc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1860: checking for $ac_word" >&5
+echo "configure:1632: checking for $ac_word" >&5
 
 if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -1901,7 +1673,7 @@
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1905: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1677: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
 
 ac_ext=c
 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
@@ -1913,11 +1685,11 @@
 cross_compiling=no
 
 cat > conftest.$ac_ext <<EOF
-#line 1917 "configure"
+#line 1689 "configure"
 #include "confdefs.h"
 main(){return(0);}
 EOF
-if { (eval echo configure:1921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   ac_cv_prog_cc_works=yes
   # If we can't run a trivial program, we are probably using a cross compiler.
   if (./conftest; exit) 2>/dev/null; then
@@ -1937,19 +1709,19 @@
   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
 fi
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:1941: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1713: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
 cross_compiling=$ac_cv_prog_cc_cross
 
 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1946: checking whether we are using GNU C" >&5
+echo "configure:1718: checking whether we are using GNU C" >&5
 
 cat > conftest.c <<EOF
 #ifdef __GNUC__
   yes;
 #endif
 EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1953: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1725: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
   ac_cv_prog_gcc=yes
 else
   ac_cv_prog_gcc=no
@@ -1963,7 +1735,7 @@
   ac_save_CFLAGS="$CFLAGS"
   CFLAGS=
   echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1967: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1739: checking whether ${CC-cc} accepts -g" >&5
 
 echo 'void f(){}' > conftest.c
 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
@@ -1996,7 +1768,7 @@
 test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP"
 
 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:2000: checking how to run the C preprocessor" >&5
+echo "configure:1772: checking how to run the C preprocessor" >&5
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
@@ -2009,13 +1781,13 @@
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp.
   cat > conftest.$ac_ext <<EOF
-#line 2013 "configure"
+#line 1785 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2019: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1791: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   :
@@ -2026,13 +1798,13 @@
   rm -rf conftest*
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
-#line 2030 "configure"
+#line 1802 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2036: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1808: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   :
@@ -2055,9 +1827,9 @@
 
 
 echo $ac_n "checking for AIX""... $ac_c" 1>&6
-echo "configure:2059: checking for AIX" >&5
-cat > conftest.$ac_ext <<EOF
-#line 2061 "configure"
+echo "configure:1831: checking for AIX" >&5
+cat > conftest.$ac_ext <<EOF
+#line 1833 "configure"
 #include "confdefs.h"
 #ifdef _AIX
   yes
@@ -2084,9 +1856,9 @@
 
 
 echo $ac_n "checking whether we are using SunPro C""... $ac_c" 1>&6
-echo "configure:2088: checking whether we are using SunPro C" >&5
-cat > conftest.$ac_ext <<EOF
-#line 2090 "configure"
+echo "configure:1860: checking whether we are using SunPro C" >&5
+cat > conftest.$ac_ext <<EOF
+#line 1862 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -2097,7 +1869,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:2101: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1873: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   __sunpro_c=yes
 else
@@ -2375,7 +2147,7 @@
  fi
 
 echo $ac_n "checking for dynodump""... $ac_c" 1>&6
-echo "configure:2379: checking for dynodump" >&5
+echo "configure:2151: checking for dynodump" >&5
 if test "$unexec" != "unexsol2.o"; then
   echo "$ac_t""no" 1>&6
 else
@@ -2471,19 +2243,19 @@
 
 if test "$add_runtime_path" = "yes"; then
       echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6
-echo "configure:2475: checking "for runtime libraries flag"" >&5
+echo "configure:2247: checking "for runtime libraries flag"" >&5
   dash_r=""
   for try_dash_r in "-R" "-R " "-rpath "; do
     xe_check_libs="${try_dash_r}/no/such/file-or-directory"
     cat > conftest.$ac_ext <<EOF
-#line 2480 "configure"
+#line 2252 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:2487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   dash_r="$try_dash_r"
 else
@@ -2581,7 +2353,7 @@
 # Extract the first word of "ranlib", so it can be a program name with args.
 set dummy ranlib; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2585: checking for $ac_word" >&5
+echo "configure:2357: checking for $ac_word" >&5
 
 if test -n "$RANLIB"; then
   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
@@ -2634,7 +2406,7 @@
 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
 # ./install, which can be erroneously created by make from ./install.sh.
 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:2638: checking for a BSD compatible install" >&5
+echo "configure:2410: checking for a BSD compatible install" >&5
 if test -z "$INSTALL"; then
 
   IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS="${IFS}:"
@@ -2685,7 +2457,7 @@
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2689: checking for $ac_word" >&5
+echo "configure:2461: checking for $ac_word" >&5
 
 if test -n "$YACC"; then
   ac_cv_prog_YACC="$YACC" # Let the user override the test.
@@ -2716,15 +2488,15 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2720: checking for $ac_hdr" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 2723 "configure"
+echo "configure:2492: checking for $ac_hdr" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 2495 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2728: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2500: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2757,15 +2529,15 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2761: checking for $ac_hdr" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 2764 "configure"
+echo "configure:2533: checking for $ac_hdr" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 2536 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2769: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2541: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2798,15 +2570,15 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2802: checking for $ac_hdr" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 2805 "configure"
+echo "configure:2574: checking for $ac_hdr" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 2577 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2810: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2582: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2836,10 +2608,10 @@
 done
 
 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
-echo "configure:2840: checking for sys/wait.h that is POSIX.1 compatible" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 2843 "configure"
+echo "configure:2612: checking for sys/wait.h that is POSIX.1 compatible" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 2615 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/wait.h>
@@ -2855,7 +2627,7 @@
 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
 ; return 0; }
 EOF
-if { (eval echo configure:2859: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2631: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_header_sys_wait_h=yes
 else
@@ -2879,10 +2651,10 @@
 fi
 
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:2883: checking for ANSI C header files" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 2886 "configure"
+echo "configure:2655: checking for ANSI C header files" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 2658 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -2890,7 +2662,7 @@
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2894: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2666: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2907,7 +2679,7 @@
 if test $ac_cv_header_stdc = yes; then
   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 2911 "configure"
+#line 2683 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -2925,7 +2697,7 @@
 if test $ac_cv_header_stdc = yes; then
   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 2929 "configure"
+#line 2701 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -2943,7 +2715,7 @@
 if test $ac_cv_header_stdc = yes; then
   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
 cat > conftest.$ac_ext <<EOF
-#line 2947 "configure"
+#line 2719 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -2954,7 +2726,7 @@
 exit (0); }
 
 EOF
-if { (eval echo configure:2958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+if { (eval echo configure:2730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
 then
   :
 else
@@ -2979,10 +2751,10 @@
 fi
 
 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:2983: checking whether time.h and sys/time.h may both be included" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 2986 "configure"
+echo "configure:2755: checking whether time.h and sys/time.h may both be included" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 2758 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/time.h>
@@ -2991,7 +2763,7 @@
 struct tm *tp;
 ; return 0; }
 EOF
-if { (eval echo configure:2995: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2767: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_header_time=yes
 else
@@ -3015,10 +2787,10 @@
 fi
 
 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
-echo "configure:3019: checking for sys_siglist declaration in signal.h or unistd.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 3022 "configure"
+echo "configure:2791: checking for sys_siglist declaration in signal.h or unistd.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 2794 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <signal.h>
@@ -3030,7 +2802,7 @@
 char *msg = *(sys_siglist + 1);
 ; return 0; }
 EOF
-if { (eval echo configure:3034: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2806: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_decl_sys_siglist=yes
 else
@@ -3055,9 +2827,9 @@
 
 
 echo $ac_n "checking for struct utimbuf""... $ac_c" 1>&6
-echo "configure:3059: checking for struct utimbuf" >&5
-cat > conftest.$ac_ext <<EOF
-#line 3061 "configure"
+echo "configure:2831: checking for struct utimbuf" >&5
+cat > conftest.$ac_ext <<EOF
+#line 2833 "configure"
 #include "confdefs.h"
 #ifdef TIME_WITH_SYS_TIME
 #include <sys/time.h>
@@ -3076,7 +2848,7 @@
 static struct utimbuf x; x.actime = x.modtime;
 ; return 0; }
 EOF
-if { (eval echo configure:3080: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2852: \"$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
@@ -3096,10 +2868,10 @@
 rm -f conftest*
 
 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:3100: checking return type of signal handlers" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 3103 "configure"
+echo "configure:2872: checking return type of signal handlers" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 2875 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <signal.h>
@@ -3116,7 +2888,7 @@
 int i;
 ; return 0; }
 EOF
-if { (eval echo configure:3120: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2892: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_type_signal=void
 else
@@ -3138,10 +2910,10 @@
 
 
 echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:3142: checking for size_t" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 3145 "configure"
+echo "configure:2914: checking for size_t" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 2917 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -3172,10 +2944,10 @@
 fi
 
 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
-echo "configure:3176: checking for pid_t" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 3179 "configure"
+echo "configure:2948: checking for pid_t" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 2951 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -3206,10 +2978,10 @@
 fi
 
 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
-echo "configure:3210: checking for uid_t in sys/types.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 3213 "configure"
+echo "configure:2982: checking for uid_t in sys/types.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 2985 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 EOF
@@ -3245,10 +3017,10 @@
 fi
 
 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
-echo "configure:3249: checking for mode_t" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 3252 "configure"
+echo "configure:3021: checking for mode_t" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3024 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -3279,10 +3051,10 @@
 fi
 
 echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:3283: checking for off_t" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 3286 "configure"
+echo "configure:3055: checking for off_t" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3058 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -3314,9 +3086,9 @@
 
 
 echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
-echo "configure:3318: checking for struct timeval" >&5
-cat > conftest.$ac_ext <<EOF
-#line 3320 "configure"
+echo "configure:3090: checking for struct timeval" >&5
+cat > conftest.$ac_ext <<EOF
+#line 3092 "configure"
 #include "confdefs.h"
 #ifdef TIME_WITH_SYS_TIME
 #include <sys/time.h>
@@ -3332,7 +3104,7 @@
 static struct timeval x; x.tv_sec = x.tv_usec;
 ; return 0; }
 EOF
-if { (eval echo configure:3336: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3108: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   echo "$ac_t""yes" 1>&6
   HAVE_TIMEVAL=yes
@@ -3354,10 +3126,10 @@
 rm -f conftest*
 
 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
-echo "configure:3358: checking whether struct tm is in sys/time.h or time.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 3361 "configure"
+echo "configure:3130: checking whether struct tm is in sys/time.h or time.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3133 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <time.h>
@@ -3365,7 +3137,7 @@
 struct tm *tp; tp->tm_sec;
 ; return 0; }
 EOF
-if { (eval echo configure:3369: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3141: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_struct_tm=time.h
 else
@@ -3389,10 +3161,10 @@
 fi
 
 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
-echo "configure:3393: checking for tm_zone in struct tm" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 3396 "configure"
+echo "configure:3165: checking for tm_zone in struct tm" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3168 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <$ac_cv_struct_tm>
@@ -3400,7 +3172,7 @@
 struct tm tm; tm.tm_zone;
 ; return 0; }
 EOF
-if { (eval echo configure:3404: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3176: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_struct_tm_zone=yes
 else
@@ -3423,10 +3195,10 @@
 
 else
   echo $ac_n "checking for tzname""... $ac_c" 1>&6
-echo "configure:3427: checking for tzname" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 3430 "configure"
+echo "configure:3199: checking for tzname" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3202 "configure"
 #include "confdefs.h"
 #include <time.h>
 #ifndef tzname /* For SGI.  */
@@ -3436,7 +3208,7 @@
 atoi(*tzname);
 ; return 0; }
 EOF
-if { (eval echo configure:3440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   ac_cv_var_tzname=yes
 else
@@ -3462,10 +3234,10 @@
 
 
 echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:3466: checking for working const" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 3469 "configure"
+echo "configure:3238: checking for working const" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3241 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -3514,7 +3286,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:3518: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3290: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_const=yes
 else
@@ -3539,7 +3311,7 @@
 
 
 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:3543: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:3315: checking whether ${MAKE-make} sets \${MAKE}" >&5
 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
 
 cat > conftestmake <<\EOF
@@ -3564,12 +3336,12 @@
 
 
 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
-echo "configure:3568: checking whether byte ordering is bigendian" >&5
+echo "configure:3340: checking whether byte ordering is bigendian" >&5
 
 ac_cv_c_bigendian=unknown
 # See if sys/param.h defines the BYTE_ORDER macro.
 cat > conftest.$ac_ext <<EOF
-#line 3573 "configure"
+#line 3345 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/param.h>
@@ -3580,11 +3352,11 @@
 #endif
 ; return 0; }
 EOF
-if { (eval echo configure:3584: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3356: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   # It does; now see whether it defined to BIG_ENDIAN or not.
 cat > conftest.$ac_ext <<EOF
-#line 3588 "configure"
+#line 3360 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/param.h>
@@ -3595,7 +3367,7 @@
 #endif
 ; return 0; }
 EOF
-if { (eval echo configure:3599: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3371: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_bigendian=yes
 else
@@ -3612,7 +3384,7 @@
 rm -f conftest*
 if test $ac_cv_c_bigendian = unknown; then
 cat > conftest.$ac_ext <<EOF
-#line 3616 "configure"
+#line 3388 "configure"
 #include "confdefs.h"
 main () {
   /* Are we little or big endian?  From Harbison&Steele.  */
@@ -3625,7 +3397,7 @@
   exit (u.c[sizeof (long) - 1] == 1);
 }
 EOF
-if { (eval echo configure:3629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+if { (eval echo configure:3401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
 then
   ac_cv_c_bigendian=no
 else
@@ -3651,10 +3423,10 @@
 
 
 echo $ac_n "checking size of short""... $ac_c" 1>&6
-echo "configure:3655: checking size of short" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 3658 "configure"
+echo "configure:3427: checking size of short" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3430 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 main()
@@ -3665,7 +3437,7 @@
   exit(0);
 }
 EOF
-if { (eval echo configure:3669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+if { (eval echo configure:3441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
 then
   ac_cv_sizeof_short=`cat conftestval`
 else
@@ -3692,10 +3464,10 @@
   exit 1
 fi
 echo $ac_n "checking size of int""... $ac_c" 1>&6
-echo "configure:3696: checking size of int" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 3699 "configure"
+echo "configure:3468: checking size of int" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3471 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 main()
@@ -3706,7 +3478,7 @@
   exit(0);
 }
 EOF
-if { (eval echo configure:3710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+if { (eval echo configure:3482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
 then
   ac_cv_sizeof_int=`cat conftestval`
 else
@@ -3727,10 +3499,10 @@
 
 
 echo $ac_n "checking size of long""... $ac_c" 1>&6
-echo "configure:3731: checking size of long" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 3734 "configure"
+echo "configure:3503: checking size of long" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3506 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 main()
@@ -3741,7 +3513,7 @@
   exit(0);
 }
 EOF
-if { (eval echo configure:3745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+if { (eval echo configure:3517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
 then
   ac_cv_sizeof_long=`cat conftestval`
 else
@@ -3762,10 +3534,10 @@
 
 
 echo $ac_n "checking size of long long""... $ac_c" 1>&6
-echo "configure:3766: checking size of long long" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 3769 "configure"
+echo "configure:3538: checking size of long long" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3541 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 main()
@@ -3776,7 +3548,7 @@
   exit(0);
 }
 EOF
-if { (eval echo configure:3780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+if { (eval echo configure:3552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
 then
   ac_cv_sizeof_long_long=`cat conftestval`
 else
@@ -3797,10 +3569,10 @@
 
 
 echo $ac_n "checking size of void *""... $ac_c" 1>&6
-echo "configure:3801: checking size of void *" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 3804 "configure"
+echo "configure:3573: checking size of void *" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3576 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 main()
@@ -3811,7 +3583,7 @@
   exit(0);
 }
 EOF
-if { (eval echo configure:3815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+if { (eval echo configure:3587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
 then
   ac_cv_sizeof_void_p=`cat conftestval`
 else
@@ -3833,7 +3605,7 @@
 
 
 echo $ac_n "checking for long file names""... $ac_c" 1>&6
-echo "configure:3837: checking for long file names" >&5
+echo "configure:3609: checking for long file names" >&5
 
 ac_cv_sys_long_file_names=yes
 # Test for long file names in all the places we know might matter:
@@ -3880,12 +3652,12 @@
 
 
 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
-echo "configure:3884: checking for sin in -lm" >&5
+echo "configure:3656: checking for sin in -lm" >&5
 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lm "
 cat > conftest.$ac_ext <<EOF
-#line 3889 "configure"
+#line 3661 "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
@@ -3896,7 +3668,7 @@
 sin()
 ; return 0; }
 EOF
-if { (eval echo configure:3900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3672: \"$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
@@ -3938,7 +3710,7 @@
 
 
 echo "checking type of mail spool file locking" 1>&6
-echo "configure:3942: checking type of mail spool file locking" >&5
+echo "configure:3714: checking type of mail spool file locking" >&5
 test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock
 test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf
 if   test "$mail_locking" = "lockf"; then { test "$extra_verbose" = "yes" && cat << \EOF
@@ -3962,12 +3734,12 @@
 
 
 echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6
-echo "configure:3966: checking for kstat_open in -lkstat" >&5
+echo "configure:3738: checking for kstat_open in -lkstat" >&5
 ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lkstat "
 cat > conftest.$ac_ext <<EOF
-#line 3971 "configure"
+#line 3743 "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
@@ -3978,7 +3750,7 @@
 kstat_open()
 ; return 0; }
 EOF
-if { (eval echo configure:3982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3754: \"$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
@@ -4012,12 +3784,12 @@
 
 
 echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6
-echo "configure:4016: checking for kvm_read in -lkvm" >&5
+echo "configure:3788: checking for kvm_read in -lkvm" >&5
 ac_lib_var=`echo kvm'_'kvm_read | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lkvm "
 cat > conftest.$ac_ext <<EOF
-#line 4021 "configure"
+#line 3793 "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
@@ -4028,7 +3800,7 @@
 kvm_read()
 ; return 0; }
 EOF
-if { (eval echo configure:4032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3804: \"$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
@@ -4062,12 +3834,12 @@
 
 
 echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
-echo "configure:4066: checking for cma_open in -lpthreads" >&5
+echo "configure:3838: checking for cma_open in -lpthreads" >&5
 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lpthreads "
 cat > conftest.$ac_ext <<EOF
-#line 4071 "configure"
+#line 3843 "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
@@ -4078,7 +3850,7 @@
 cma_open()
 ; return 0; }
 EOF
-if { (eval echo configure:4082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3854: \"$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
@@ -4114,7 +3886,7 @@
 fi
 
 echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6
-echo "configure:4118: checking whether the -xildoff compiler flag is required" >&5
+echo "configure:3890: checking whether the -xildoff compiler flag is required" >&5
 if   ${CC-cc} '-###' -xildon  no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then
   if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ;
     then echo "$ac_t""no" 1>&6;
@@ -4125,7 +3897,7 @@
 
 if test "$opsys" = "sol2" && test "$OS_RELEASE" -ge 56; then
   echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6
-echo "configure:4129: checking for \"-z ignore\" linker flag" >&5
+echo "configure:3901: checking for \"-z ignore\" linker flag" >&5
   case "`ld -h 2>&1`" in
     *-z\ ignore\|record* ) echo "$ac_t""yes" 1>&6
       ld_switch_site="-z ignore $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z ignore\" to \$ld_switch_site"; fi ;;
@@ -4135,7 +3907,7 @@
 
 
 echo "checking "for specified window system"" 1>&6
-echo "configure:4139: checking "for specified window system"" >&5
+echo "configure:3911: checking "for specified window system"" >&5
 
 if test "$with_x11" != "no"; then
     test "$x_includes $x_libraries" != "NONE NONE" && \
@@ -4165,7 +3937,7 @@
 # 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:4169: checking for X" >&5
+echo "configure:3941: checking for X" >&5
 
 # Check whether --with-x or --without-x was given.
 if test "${with_x+set}" = set; then
@@ -4225,12 +3997,12 @@
 
   # First, try using that file with no special directory specified.
 cat > conftest.$ac_ext <<EOF
-#line 4229 "configure"
+#line 4001 "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:4234: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4006: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4299,14 +4071,14 @@
   ac_save_LIBS="$LIBS"
   LIBS="-l$x_direct_test_library $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4303 "configure"
+#line 4075 "configure"
 #include "confdefs.h"
 
 int main() {
 ${x_direct_test_function}()
 ; return 0; }
 EOF
-if { (eval echo configure:4310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4082: \"$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.
@@ -4415,17 +4187,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:4419: checking whether -R must be followed by a space" >&5
+echo "configure:4191: 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 4422 "configure"
+#line 4194 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:4429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   ac_R_nospace=yes
 else
@@ -4441,14 +4213,14 @@
       else
 	LIBS="$ac_xsave_LIBS -R $x_libraries"
 	cat > conftest.$ac_ext <<EOF
-#line 4445 "configure"
+#line 4217 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; 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:4224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   ac_R_space=yes
 else
@@ -4484,12 +4256,12 @@
 else
 
 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
-echo "configure:4488: checking for dnet_ntoa in -ldnet" >&5
+echo "configure:4260: 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 4493 "configure"
+#line 4265 "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
@@ -4500,7 +4272,7 @@
 dnet_ntoa()
 ; return 0; }
 EOF
-if { (eval echo configure:4504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4276: \"$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
@@ -4524,12 +4296,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:4528: checking for dnet_ntoa in -ldnet_stub" >&5
+echo "configure:4300: 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 4533 "configure"
+#line 4305 "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
@@ -4540,7 +4312,7 @@
 dnet_ntoa()
 ; return 0; }
 EOF
-if { (eval echo configure:4544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4316: \"$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
@@ -4569,10 +4341,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:4573: checking for gethostbyname" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 4576 "configure"
+echo "configure:4345: checking for gethostbyname" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 4348 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char gethostbyname(); below.  */
@@ -4595,7 +4367,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:4599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_gethostbyname=yes"
 else
@@ -4616,12 +4388,12 @@
     if test $ac_cv_func_gethostbyname = no; then
       
 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
-echo "configure:4620: checking for gethostbyname in -lnsl" >&5
+echo "configure:4392: 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 4625 "configure"
+#line 4397 "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
@@ -4632,7 +4404,7 @@
 gethostbyname()
 ; return 0; }
 EOF
-if { (eval echo configure:4636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4408: \"$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
@@ -4662,10 +4434,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:4666: checking for connect" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 4669 "configure"
+echo "configure:4438: checking for connect" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 4441 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char connect(); below.  */
@@ -4688,7 +4460,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:4692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_connect=yes"
 else
@@ -4711,12 +4483,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:4715: checking "$xe_msg_checking"" >&5
+echo "configure:4487: 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 4720 "configure"
+#line 4492 "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
@@ -4727,7 +4499,7 @@
 connect()
 ; return 0; }
 EOF
-if { (eval echo configure:4731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4503: \"$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
@@ -4751,10 +4523,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:4755: checking for remove" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 4758 "configure"
+echo "configure:4527: checking for remove" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 4530 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char remove(); below.  */
@@ -4777,7 +4549,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:4781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_remove=yes"
 else
@@ -4798,12 +4570,12 @@
     if test $ac_cv_func_remove = no; then
       
 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
-echo "configure:4802: checking for remove in -lposix" >&5
+echo "configure:4574: 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 4807 "configure"
+#line 4579 "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
@@ -4814,7 +4586,7 @@
 remove()
 ; return 0; }
 EOF
-if { (eval echo configure:4818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4590: \"$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
@@ -4838,10 +4610,10 @@
 
     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
     echo $ac_n "checking for shmat""... $ac_c" 1>&6
-echo "configure:4842: checking for shmat" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 4845 "configure"
+echo "configure:4614: checking for shmat" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 4617 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char shmat(); below.  */
@@ -4864,7 +4636,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:4868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_shmat=yes"
 else
@@ -4885,12 +4657,12 @@
     if test $ac_cv_func_shmat = no; then
       
 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
-echo "configure:4889: checking for shmat in -lipc" >&5
+echo "configure:4661: 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 4894 "configure"
+#line 4666 "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
@@ -4901,7 +4673,7 @@
 shmat()
 ; return 0; }
 EOF
-if { (eval echo configure:4905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4677: \"$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
@@ -4935,12 +4707,12 @@
   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
   
 echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
-echo "configure:4939: checking for IceConnectionNumber in -lICE" >&5
+echo "configure:4711: 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 4944 "configure"
+#line 4716 "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
@@ -4951,7 +4723,7 @@
 IceConnectionNumber()
 ; return 0; }
 EOF
-if { (eval echo configure:4955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4727: \"$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
@@ -5084,7 +4856,7 @@
   fi
 
     echo "checking for X defines extracted by xmkmf" 1>&6
-echo "configure:5088: checking for X defines extracted by xmkmf" >&5
+echo "configure:4860: checking for X defines extracted by xmkmf" >&5
   rm -fr conftestdir
   if mkdir conftestdir; then
     cd conftestdir
@@ -5116,15 +4888,15 @@
 
     ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6
-echo "configure:5120: checking for X11/Intrinsic.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 5123 "configure"
+echo "configure:4892: checking for X11/Intrinsic.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 4895 "configure"
 #include "confdefs.h"
 #include <X11/Intrinsic.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5128: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4900: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -5148,12 +4920,12 @@
 
       
 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
-echo "configure:5152: checking for XOpenDisplay in -lX11" >&5
+echo "configure:4924: 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 5157 "configure"
+#line 4929 "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
@@ -5164,7 +4936,7 @@
 XOpenDisplay()
 ; return 0; }
 EOF
-if { (eval echo configure:5168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4940: \"$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
@@ -5189,12 +4961,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:5193: checking "$xe_msg_checking"" >&5
+echo "configure:4965: 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 5198 "configure"
+#line 4970 "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
@@ -5205,7 +4977,7 @@
 XGetFontProperty()
 ; return 0; }
 EOF
-if { (eval echo configure:5209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4981: \"$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
@@ -5232,12 +5004,12 @@
 
     
 echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6
-echo "configure:5236: checking for XShapeSelectInput in -lXext" >&5
+echo "configure:5008: 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 5241 "configure"
+#line 5013 "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
@@ -5248,7 +5020,7 @@
 XShapeSelectInput()
 ; return 0; }
 EOF
-if { (eval echo configure:5252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5024: \"$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
@@ -5271,12 +5043,12 @@
 
     
 echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6
-echo "configure:5275: checking for XtOpenDisplay in -lXt" >&5
+echo "configure:5047: 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 5280 "configure"
+#line 5052 "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
@@ -5287,7 +5059,7 @@
 XtOpenDisplay()
 ; return 0; }
 EOF
-if { (eval echo configure:5291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5063: \"$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
@@ -5310,14 +5082,14 @@
 
 
   echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6
-echo "configure:5314: checking the version of X11 being used" >&5
+echo "configure:5086: checking the version of X11 being used" >&5
   cat > conftest.$ac_ext <<EOF
-#line 5316 "configure"
+#line 5088 "configure"
 #include "confdefs.h"
 #include <X11/Intrinsic.h>
     main(int c, char* v[]) { return c>1 ? XlibSpecificationRelease : 0; }
 EOF
-if { (eval echo configure:5321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+if { (eval echo configure:5093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
 then
   ./conftest foobar; x11_release=$?
 else
@@ -5341,15 +5113,15 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5345: checking for $ac_hdr" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 5348 "configure"
+echo "configure:5117: checking for $ac_hdr" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 5120 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5353: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5125: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -5380,7 +5152,7 @@
 
 
     echo $ac_n "checking for XFree86""... $ac_c" 1>&6
-echo "configure:5384: checking for XFree86" >&5
+echo "configure:5156: checking for XFree86" >&5
   if test -d "/usr/X386/include" -o \
           -f "/etc/XF86Config"    -o \
 	  -f "/etc/X11/XF86Config" -o \
@@ -5400,12 +5172,12 @@
 
     test -z "$with_xmu" && { 
 echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6
-echo "configure:5404: checking for XmuReadBitmapDataFromFile in -lXmu" >&5
+echo "configure:5176: 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 5409 "configure"
+#line 5181 "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
@@ -5416,7 +5188,7 @@
 XmuReadBitmapDataFromFile()
 ; return 0; }
 EOF
-if { (eval echo configure:5420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5192: \"$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
@@ -5455,19 +5227,19 @@
 
       
 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
-echo "configure:5459: checking for main in -lXbsd" >&5
+echo "configure:5231: 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 5464 "configure"
+#line 5236 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:5471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5243: \"$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
@@ -5521,8 +5293,8 @@
 esac
 
 echo "checking for session-management option" 1>&6
-echo "configure:5525: checking for session-management option" >&5;
-if test "$with_session" != "no"; then
+echo "configure:5297: checking for session-management option" >&5;
+if test "$with_session" = "yes"; then
   { test "$extra_verbose" = "yes" && cat << \EOF
     Defining HAVE_SESSION
 EOF
@@ -5536,15 +5308,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:5540: checking for X11/Xauth.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 5543 "configure"
+echo "configure:5312: checking for X11/Xauth.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 5315 "configure"
 #include "confdefs.h"
 #include <X11/Xauth.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5548: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5320: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -5567,12 +5339,12 @@
  }
 test -z "$with_xauth" && { 
 echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6
-echo "configure:5571: checking for XauGetAuthByAddr in -lXau" >&5
+echo "configure:5343: 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 5576 "configure"
+#line 5348 "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
@@ -5583,7 +5355,7 @@
 XauGetAuthByAddr()
 ; return 0; }
 EOF
-if { (eval echo configure:5587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5359: \"$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
@@ -5643,15 +5415,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:5647: checking for ${dir}tt_c.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 5650 "configure"
+echo "configure:5419: checking for ${dir}tt_c.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 5422 "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:5655: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5427: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -5680,12 +5452,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:5684: checking "$xe_msg_checking"" >&5
+echo "configure:5456: 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 5689 "configure"
+#line 5461 "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
@@ -5696,7 +5468,7 @@
 tt_message_create()
 ; return 0; }
 EOF
-if { (eval echo configure:5700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5472: \"$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
@@ -5745,15 +5517,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:5749: checking for Dt/Dt.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 5752 "configure"
+echo "configure:5521: checking for Dt/Dt.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 5524 "configure"
 #include "confdefs.h"
 #include <Dt/Dt.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5757: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5529: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -5776,12 +5548,12 @@
  }
 test -z "$with_cde" && { 
 echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6
-echo "configure:5780: checking for DtDndDragStart in -lDtSvc" >&5
+echo "configure:5552: 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 5785 "configure"
+#line 5557 "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
@@ -5792,7 +5564,7 @@
 DtDndDragStart()
 ; return 0; }
 EOF
-if { (eval echo configure:5796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5568: \"$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
@@ -5839,19 +5611,19 @@
 
   
 echo $ac_n "checking for main in -lenergize""... $ac_c" 1>&6
-echo "configure:5843: checking for main in -lenergize" >&5
+echo "configure:5615: 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 5848 "configure"
+#line 5620 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:5855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5627: \"$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
@@ -5883,19 +5655,19 @@
   if test -z "$energize_version"; then
     
 echo $ac_n "checking for main in -lconn""... $ac_c" 1>&6
-echo "configure:5887: checking for main in -lconn" >&5
+echo "configure:5659: 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 5892 "configure"
+#line 5664 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:5899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5671: \"$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,15 +5700,15 @@
   fi
   ac_safe=`echo "editorconn.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for editorconn.h""... $ac_c" 1>&6
-echo "configure:5932: checking for editorconn.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 5935 "configure"
+echo "configure:5704: checking for editorconn.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 5707 "configure"
 #include "confdefs.h"
 #include <editorconn.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5940: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5712: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -5980,12 +5752,12 @@
 if test "$with_x11" = "yes"; then
 
   echo "checking for X11 graphics libraries" 1>&6
-echo "configure:5984: checking for X11 graphics libraries" >&5
+echo "configure:5756: checking for X11 graphics libraries" >&5
     echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c" 1>&6
-echo "configure:5986: checking for Xpm - no older than 3.4f" >&5
+echo "configure:5758: checking for Xpm - no older than 3.4f" >&5
   xe_check_libs=-lXpm
   test -z "$with_xpm" && { cat > conftest.$ac_ext <<EOF
-#line 5989 "configure"
+#line 5761 "configure"
 #include "confdefs.h"
 #include <X11/xpm.h>
   int main(int c, char **v) {
@@ -5995,7 +5767,7 @@
 		  0 ;
   }
 EOF
-if { (eval echo configure:5999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+if { (eval echo configure:5771: \"$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;
@@ -6033,15 +5805,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:6037: checking for compface.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 6040 "configure"
+echo "configure:5809: checking for compface.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 5812 "configure"
 #include "confdefs.h"
 #include <compface.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6045: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5817: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -6064,12 +5836,12 @@
  }
   test -z "$with_xface" && { 
 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
-echo "configure:6068: checking for UnGenFace in -lcompface" >&5
+echo "configure:5840: 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 6073 "configure"
+#line 5845 "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
@@ -6080,7 +5852,7 @@
 UnGenFace()
 ; return 0; }
 EOF
-if { (eval echo configure:6084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5856: \"$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
@@ -6116,15 +5888,15 @@
 
     test -z "$with_imagick" && { ac_safe=`echo "magick/magick.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for magick/magick.h""... $ac_c" 1>&6
-echo "configure:6120: checking for magick/magick.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 6123 "configure"
+echo "configure:5892: checking for magick/magick.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 5895 "configure"
 #include "confdefs.h"
 #include <magick/magick.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6128: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5900: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -6147,12 +5919,12 @@
  }
   test -z "$with_imagick" && { 
 echo $ac_n "checking for MogrifyImage in -lMagick""... $ac_c" 1>&6
-echo "configure:6151: checking for MogrifyImage in -lMagick" >&5
+echo "configure:5923: checking for MogrifyImage in -lMagick" >&5
 ac_lib_var=`echo Magick'_'MogrifyImage | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lMagick "
 cat > conftest.$ac_ext <<EOF
-#line 6156 "configure"
+#line 5928 "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
@@ -6163,7 +5935,7 @@
 MogrifyImage()
 ; return 0; }
 EOF
-if { (eval echo configure:6167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5939: \"$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
@@ -6199,12 +5971,12 @@
 
     
 echo $ac_n "checking for XawScrollbarSetThumb in -lXaw""... $ac_c" 1>&6
-echo "configure:6203: checking for XawScrollbarSetThumb in -lXaw" >&5
+echo "configure:5975: 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 6208 "configure"
+#line 5980 "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
@@ -6215,7 +5987,7 @@
 XawScrollbarSetThumb()
 ; return 0; }
 EOF
-if { (eval echo configure:6219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5991: \"$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
@@ -6239,15 +6011,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:6243: checking for X11/Xaw/Reports.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 6246 "configure"
+echo "configure:6015: checking for X11/Xaw/Reports.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 6018 "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:6251: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6023: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -6273,15 +6045,15 @@
 
     ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
-echo "configure:6277: checking for Xm/Xm.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 6280 "configure"
+echo "configure:6049: checking for Xm/Xm.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 6052 "configure"
 #include "confdefs.h"
 #include <Xm/Xm.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6285: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6057: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -6298,12 +6070,12 @@
   echo "$ac_t""yes" 1>&6
   
 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
-echo "configure:6302: checking for XmStringFree in -lXm" >&5
+echo "configure:6074: 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 6307 "configure"
+#line 6079 "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
@@ -6314,7 +6086,7 @@
 XmStringFree()
 ; return 0; }
 EOF
-if { (eval echo configure:6318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6090: \"$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
@@ -6576,7 +6348,7 @@
 
 if test "$with_mule" = "yes" ; then
   echo "checking for Mule-related features" 1>&6
-echo "configure:6580: checking for Mule-related features" >&5
+echo "configure:6352: checking for Mule-related features" >&5
   { test "$extra_verbose" = "yes" && cat << \EOF
     Defining MULE
 EOF
@@ -6593,15 +6365,15 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:6597: checking for $ac_hdr" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 6600 "configure"
+echo "configure:6369: checking for $ac_hdr" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 6372 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6605: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6377: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -6632,12 +6404,12 @@
 
   
 echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6
-echo "configure:6636: checking for strerror in -lintl" >&5
+echo "configure:6408: 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 6641 "configure"
+#line 6413 "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
@@ -6648,7 +6420,7 @@
 strerror()
 ; return 0; }
 EOF
-if { (eval echo configure:6652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6424: \"$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
@@ -6681,19 +6453,19 @@
 
 
   echo "checking for Mule input methods" 1>&6
-echo "configure:6685: checking for Mule input methods" >&5
+echo "configure:6457: 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:6689: checking for XIM" >&5
+echo "configure:6461: checking for XIM" >&5
     
 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
-echo "configure:6692: checking for XmImMbLookupString in -lXm" >&5
+echo "configure:6464: 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 6697 "configure"
+#line 6469 "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
@@ -6704,7 +6476,7 @@
 XmImMbLookupString()
 ; return 0; }
 EOF
-if { (eval echo configure:6708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6480: \"$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
@@ -6762,20 +6534,22 @@
    echo "    xemacs will be linked with \"input-method-motif.o\""
  fi
     fi
-    if test "$with_xfs" = "yes"; then
+    if test "$with_xim" = "motif"; then
       with_xfs=no
     fi
-  else     case "$with_xfs" in  "yes" )
-      echo "checking for XFontSet" 1>&6
-echo "configure:6771: checking for XFontSet" >&5
-      
+  fi
+
+    if test "$with_xfs" = "yes" ; then
+    echo "checking for XFontSet" 1>&6
+echo "configure:6545: checking for XFontSet" >&5
+    
 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6
-echo "configure:6774: checking for XmbDrawString in -lX11" >&5
+echo "configure:6548: 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 6779 "configure"
+#line 6553 "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
@@ -6786,7 +6560,7 @@
 XmbDrawString()
 ; return 0; }
 EOF
-if { (eval echo configure:6790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6564: \"$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
@@ -6807,7 +6581,6 @@
 fi
 
 
-    esac
     if test "$with_xfs" = "yes" && test "$with_menubars" = "lucid"; then
       { test "$extra_verbose" = "yes" && cat << \EOF
     Defining USE_XFONTSET
@@ -6817,23 +6590,25 @@
 EOF
 }
 
-      extra_objs="$extra_objs input-method-xfs.o" &&  if test "$extra_verbose" = "yes"; then
+      if test "$with_xim" = "no" ; then
+        extra_objs="$extra_objs input-method-xfs.o" &&  if test "$extra_verbose" = "yes"; then
    echo "    xemacs will be linked with \"input-method-xfs.o\""
  fi
+      fi
     fi
   fi 
     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:6829: checking for wnn/jllib.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 6832 "configure"
+echo "configure:6604: checking for wnn/jllib.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 6607 "configure"
 #include "confdefs.h"
 #include <wnn/jllib.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6837: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6612: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -6858,10 +6633,10 @@
     for ac_func in crypt
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6862: checking for $ac_func" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 6865 "configure"
+echo "configure:6637: checking for $ac_func" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 6640 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -6884,7 +6659,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:6888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -6913,12 +6688,12 @@
 
     test "$ac_cv_func_crypt" != "yes" && { 
 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
-echo "configure:6917: checking for crypt in -lcrypt" >&5
+echo "configure:6692: 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 6922 "configure"
+#line 6697 "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
@@ -6929,7 +6704,7 @@
 crypt()
 ; return 0; }
 EOF
-if { (eval echo configure:6933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6708: \"$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
@@ -6963,12 +6738,12 @@
   fi
     test -z "$with_wnn" && { 
 echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6
-echo "configure:6967: checking for jl_dic_list_e in -lwnn" >&5
+echo "configure:6742: 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 6972 "configure"
+#line 6747 "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
@@ -6979,7 +6754,7 @@
 jl_dic_list_e()
 ; return 0; }
 EOF
-if { (eval echo configure:6983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6758: \"$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
@@ -7016,12 +6791,12 @@
  fi
     
 echo $ac_n "checking for jl_fi_dic_list in -lwnn""... $ac_c" 1>&6
-echo "configure:7020: checking for jl_fi_dic_list in -lwnn" >&5
+echo "configure:6795: 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 7025 "configure"
+#line 6800 "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
@@ -7032,7 +6807,7 @@
 jl_fi_dic_list()
 ; return 0; }
 EOF
-if { (eval echo configure:7036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6811: \"$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
@@ -7064,15 +6839,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:7068: checking for canna/RK.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 7071 "configure"
+echo "configure:6843: checking for canna/RK.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 6846 "configure"
 #include "confdefs.h"
 #include <canna/RK.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7076: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6851: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -7095,12 +6870,12 @@
  }
   test -z "$with_canna" && { 
 echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6
-echo "configure:7099: checking for RkBgnBun in -lRKC" >&5
+echo "configure:6874: 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 7104 "configure"
+#line 6879 "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
@@ -7111,7 +6886,7 @@
 RkBgnBun()
 ; return 0; }
 EOF
-if { (eval echo configure:7115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6890: \"$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
@@ -7134,12 +6909,12 @@
  }
   test -z "$with_canna" && { 
 echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6
-echo "configure:7138: checking for jrKanjiControl in -lcanna" >&5
+echo "configure:6913: 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 7143 "configure"
+#line 6918 "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
@@ -7150,7 +6925,7 @@
 jrKanjiControl()
 ; return 0; }
 EOF
-if { (eval echo configure:7154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6929: \"$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
@@ -7199,12 +6974,12 @@
   libs_x="-lXm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXm\" to \$libs_x"; fi
     
 echo $ac_n "checking for layout_object_getvalue in -li18n""... $ac_c" 1>&6
-echo "configure:7203: checking for layout_object_getvalue in -li18n" >&5
+echo "configure:6978: checking for layout_object_getvalue in -li18n" >&5
 ac_lib_var=`echo i18n'_'layout_object_getvalue | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -li18n "
 cat > conftest.$ac_ext <<EOF
-#line 7208 "configure"
+#line 6983 "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
@@ -7215,7 +6990,7 @@
 layout_object_getvalue()
 ; return 0; }
 EOF
-if { (eval echo configure:7219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6994: \"$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
@@ -7288,10 +7063,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:7292: checking for $ac_func" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 7295 "configure"
+echo "configure:7067: checking for $ac_func" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7070 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -7314,7 +7089,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:7318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -7351,10 +7126,10 @@
     for ac_func in realpath
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:7355: checking for $ac_func" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 7358 "configure"
+echo "configure:7130: checking for $ac_func" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7133 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -7377,7 +7152,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:7381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -7410,16 +7185,16 @@
 esac
 
 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
-echo "configure:7414: checking whether netdb declares h_errno" >&5
-cat > conftest.$ac_ext <<EOF
-#line 7416 "configure"
+echo "configure:7189: checking whether netdb declares h_errno" >&5
+cat > conftest.$ac_ext <<EOF
+#line 7191 "configure"
 #include "confdefs.h"
 #include <netdb.h>
 int main() {
 return h_errno;
 ; return 0; }
 EOF
-if { (eval echo configure:7423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7198: \"$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
@@ -7439,16 +7214,16 @@
 rm -f conftest*
 
 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
-echo "configure:7443: checking for sigsetjmp" >&5
-cat > conftest.$ac_ext <<EOF
-#line 7445 "configure"
+echo "configure:7218: checking for sigsetjmp" >&5
+cat > conftest.$ac_ext <<EOF
+#line 7220 "configure"
 #include "confdefs.h"
 #include <setjmp.h>
 int main() {
 sigjmp_buf bar; sigsetjmp (bar, 0);
 ; return 0; }
 EOF
-if { (eval echo configure:7452: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7227: \"$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
@@ -7468,11 +7243,11 @@
 rm -f conftest*
 
 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
-echo "configure:7472: checking whether localtime caches TZ" >&5
+echo "configure:7247: checking whether localtime caches TZ" >&5
 
 if test "$ac_cv_func_tzset" = "yes"; then
 cat > conftest.$ac_ext <<EOF
-#line 7476 "configure"
+#line 7251 "configure"
 #include "confdefs.h"
 #include <time.h>
 #if STDC_HEADERS
@@ -7507,7 +7282,7 @@
   exit (0);
 }
 EOF
-if { (eval echo configure:7511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+if { (eval echo configure:7286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
 then
   emacs_cv_localtime_cache=no
 else
@@ -7536,9 +7311,9 @@
 
 if test "$HAVE_TIMEVAL" = "yes"; then
 echo $ac_n "checking whether gettimeofday cannot accept two arguments""... $ac_c" 1>&6
-echo "configure:7540: checking whether gettimeofday cannot accept two arguments" >&5
-cat > conftest.$ac_ext <<EOF
-#line 7542 "configure"
+echo "configure:7315: checking whether gettimeofday cannot accept two arguments" >&5
+cat > conftest.$ac_ext <<EOF
+#line 7317 "configure"
 #include "confdefs.h"
 
 #ifdef TIME_WITH_SYS_TIME
@@ -7560,7 +7335,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:7564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   echo "$ac_t""no" 1>&6
 else
@@ -7582,19 +7357,19 @@
 
 
 echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:7586: checking for inline" >&5
+echo "configure:7361: checking for inline" >&5
 
 ac_cv_c_inline=no
 for ac_kw in inline __inline__ __inline; do
   cat > conftest.$ac_ext <<EOF
-#line 7591 "configure"
+#line 7366 "configure"
 #include "confdefs.h"
 
 int main() {
 } $ac_kw foo() {
 ; return 0; }
 EOF
-if { (eval echo configure:7598: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7373: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_inline=$ac_kw; break
 else
@@ -7644,17 +7419,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:7648: checking for working alloca.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 7651 "configure"
+echo "configure:7423: checking for working alloca.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7426 "configure"
 #include "confdefs.h"
 #include <alloca.h>
 int main() {
 char *p = alloca(2 * sizeof(int));
 ; return 0; }
 EOF
-if { (eval echo configure:7658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   ac_cv_header_alloca_h=yes
 else
@@ -7678,10 +7453,10 @@
 fi
 
 echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:7682: checking for alloca" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 7685 "configure"
+echo "configure:7457: checking for alloca" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7460 "configure"
 #include "confdefs.h"
 
 #ifdef __GNUC__
@@ -7704,7 +7479,7 @@
 char *p = (char *) alloca(1);
 ; return 0; }
 EOF
-if { (eval echo configure:7708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   ac_cv_func_alloca_works=yes
 else
@@ -7743,10 +7518,10 @@
 
 
 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:7747: checking whether alloca needs Cray hooks" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 7750 "configure"
+echo "configure:7522: checking whether alloca needs Cray hooks" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7525 "configure"
 #include "confdefs.h"
 #if defined(CRAY) && ! defined(CRAY2)
 webecray
@@ -7770,10 +7545,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:7774: checking for $ac_func" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 7777 "configure"
+echo "configure:7549: checking for $ac_func" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7552 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -7796,7 +7571,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:7800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -7826,10 +7601,10 @@
 fi
 
 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:7830: checking stack direction for C alloca" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 7833 "configure"
+echo "configure:7605: checking stack direction for C alloca" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7608 "configure"
 #include "confdefs.h"
 find_stack_direction ()
 {
@@ -7848,7 +7623,7 @@
   exit (find_stack_direction() < 0);
 }
 EOF
-if { (eval echo configure:7852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+if { (eval echo configure:7627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
 then
   ac_cv_c_stack_direction=1
 else
@@ -7876,15 +7651,15 @@
 
 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
-echo "configure:7880: checking for vfork.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 7883 "configure"
+echo "configure:7655: checking for vfork.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7658 "configure"
 #include "confdefs.h"
 #include <vfork.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7888: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7663: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -7912,10 +7687,10 @@
 fi
 
 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
-echo "configure:7916: checking for working vfork" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 7919 "configure"
+echo "configure:7691: checking for working vfork" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7694 "configure"
 #include "confdefs.h"
 /* Thanks to Paul Eggert for this test.  */
 #include <stdio.h>
@@ -8010,7 +7785,7 @@
   }
 }
 EOF
-if { (eval echo configure:8014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+if { (eval echo configure:7789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
 then
   ac_cv_func_vfork_works=yes
 else
@@ -8035,10 +7810,10 @@
 
 
 echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
-echo "configure:8039: checking for working strcoll" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8042 "configure"
+echo "configure:7814: checking for working strcoll" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7817 "configure"
 #include "confdefs.h"
 #include <string.h>
 main ()
@@ -8048,7 +7823,7 @@
 	strcoll ("123", "456") >= 0);
 }
 EOF
-if { (eval echo configure:8052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+if { (eval echo configure:7827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
 then
   ac_cv_func_strcoll_works=yes
 else
@@ -8075,10 +7850,10 @@
 for ac_func in getpgrp
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:8079: checking for $ac_func" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8082 "configure"
+echo "configure:7854: checking for $ac_func" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7857 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -8101,7 +7876,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:8105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -8129,10 +7904,10 @@
 done
 
 echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
-echo "configure:8133: checking whether getpgrp takes no argument" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8136 "configure"
+echo "configure:7908: checking whether getpgrp takes no argument" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7911 "configure"
 #include "confdefs.h"
 
 /*
@@ -8187,7 +7962,7 @@
 }
 
 EOF
-if { (eval echo configure:8191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+if { (eval echo configure:7966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
 then
   ac_cv_func_getpgrp_void=yes
 else
@@ -8213,10 +7988,10 @@
 
 
 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:8217: checking for working mmap" >&5
+echo "configure:7992: checking for working mmap" >&5
 case "$opsys" in ultrix* ) have_mmap=no ;; *)
 cat > conftest.$ac_ext <<EOF
-#line 8220 "configure"
+#line 7995 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 #include <unistd.h>
@@ -8249,7 +8024,7 @@
   return 1;
 }
 EOF
-if { (eval echo configure:8253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+if { (eval echo configure:8028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
 then
   have_mmap=yes
 else
@@ -8283,15 +8058,15 @@
 
 ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for termios.h""... $ac_c" 1>&6
-echo "configure:8287: checking for termios.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8290 "configure"
+echo "configure:8062: checking for termios.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8065 "configure"
 #include "confdefs.h"
 #include <termios.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8295: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8070: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -8334,15 +8109,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:8338: checking for termio.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8341 "configure"
+echo "configure:8113: checking for termio.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8116 "configure"
 #include "confdefs.h"
 #include <termio.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8346: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8121: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -8374,10 +8149,10 @@
 
 
 echo $ac_n "checking for socket""... $ac_c" 1>&6
-echo "configure:8378: checking for socket" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8381 "configure"
+echo "configure:8153: checking for socket" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8156 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char socket(); below.  */
@@ -8400,7 +8175,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:8404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:8179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_socket=yes"
 else
@@ -8415,15 +8190,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:8419: checking for netinet/in.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8422 "configure"
+echo "configure:8194: checking for netinet/in.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8197 "configure"
 #include "confdefs.h"
 #include <netinet/in.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8427: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8202: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -8440,15 +8215,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:8444: checking for arpa/inet.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8447 "configure"
+echo "configure:8219: checking for arpa/inet.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8222 "configure"
 #include "confdefs.h"
 #include <arpa/inet.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8452: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8227: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -8473,9 +8248,9 @@
 }
 
       echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6
-echo "configure:8477: checking "for sun_len member in struct sockaddr_un"" >&5
+echo "configure:8252: checking "for sun_len member in struct sockaddr_un"" >&5
       cat > conftest.$ac_ext <<EOF
-#line 8479 "configure"
+#line 8254 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -8486,7 +8261,7 @@
 static struct sockaddr_un x; x.sun_len = 1;
 ; return 0; }
 EOF
-if { (eval echo configure:8490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:8265: \"$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
@@ -8517,10 +8292,10 @@
 
 
 echo $ac_n "checking for msgget""... $ac_c" 1>&6
-echo "configure:8521: checking for msgget" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8524 "configure"
+echo "configure:8296: checking for msgget" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8299 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char msgget(); below.  */
@@ -8543,7 +8318,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:8547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:8322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_msgget=yes"
 else
@@ -8558,15 +8333,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:8562: checking for sys/ipc.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8565 "configure"
+echo "configure:8337: checking for sys/ipc.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8340 "configure"
 #include "confdefs.h"
 #include <sys/ipc.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8570: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8345: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -8583,15 +8358,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:8587: checking for sys/msg.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8590 "configure"
+echo "configure:8362: checking for sys/msg.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8365 "configure"
 #include "confdefs.h"
 #include <sys/msg.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8595: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8370: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -8629,15 +8404,15 @@
 
 ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for dirent.h""... $ac_c" 1>&6
-echo "configure:8633: checking for dirent.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8636 "configure"
+echo "configure:8408: checking for dirent.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8411 "configure"
 #include "confdefs.h"
 #include <dirent.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8641: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8416: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -8664,15 +8439,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:8668: checking for sys/dir.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8671 "configure"
+echo "configure:8443: checking for sys/dir.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8446 "configure"
 #include "confdefs.h"
 #include <sys/dir.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8676: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8451: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -8705,15 +8480,15 @@
 
 ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
-echo "configure:8709: checking for nlist.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8712 "configure"
+echo "configure:8484: checking for nlist.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8487 "configure"
 #include "confdefs.h"
 #include <nlist.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8717: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8492: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -8743,7 +8518,7 @@
 
 
 echo "checking "for sound support"" 1>&6
-echo "configure:8747: checking "for sound support"" >&5
+echo "configure:8522: checking "for sound support"" >&5
 case "$with_sound" in
   native | both ) with_native_sound=yes;;
   nas    | no   ) with_native_sound=no;;
@@ -8754,15 +8529,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:8758: checking for multimedia/audio_device.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8761 "configure"
+echo "configure:8533: checking for multimedia/audio_device.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8536 "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:8766: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8541: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -8810,12 +8585,12 @@
       if test -z "$native_sound_lib"; then
         
 echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6
-echo "configure:8814: checking for ALopenport in -laudio" >&5
+echo "configure:8589: 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 8819 "configure"
+#line 8594 "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
@@ -8826,7 +8601,7 @@
 ALopenport()
 ; return 0; }
 EOF
-if { (eval echo configure:8830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:8605: \"$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
@@ -8857,12 +8632,12 @@
       if test -z "$native_sound_lib"; then
 	
 echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6
-echo "configure:8861: checking for AOpenAudio in -lAlib" >&5
+echo "configure:8636: 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 8866 "configure"
+#line 8641 "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
@@ -8873,7 +8648,7 @@
 AOpenAudio()
 ; return 0; }
 EOF
-if { (eval echo configure:8877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:8652: \"$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
@@ -8911,15 +8686,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:8915: checking for ${dir}/soundcard.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8918 "configure"
+echo "configure:8690: checking for ${dir}/soundcard.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8693 "configure"
 #include "confdefs.h"
 #include <${dir}/soundcard.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8923: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8698: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -8989,7 +8764,7 @@
  fi
   libs_x="-laudio $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-laudio\" to \$libs_x"; fi
       cat > conftest.$ac_ext <<EOF
-#line 8993 "configure"
+#line 8768 "configure"
 #include "confdefs.h"
 #include <audio/Xtutil.h>
 EOF
@@ -9016,7 +8791,7 @@
 
 if test "$with_tty" = "yes"  ; then
   echo "checking for TTY-related features" 1>&6
-echo "configure:9020: checking for TTY-related features" >&5
+echo "configure:8795: checking for TTY-related features" >&5
   { test "$extra_verbose" = "yes" && cat << \EOF
     Defining HAVE_TTY
 EOF
@@ -9032,12 +8807,12 @@
     if test -z "$with_ncurses"; then
     
 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
-echo "configure:9036: checking for tgetent in -lncurses" >&5
+echo "configure:8811: 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 9041 "configure"
+#line 8816 "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
@@ -9048,7 +8823,7 @@
 tgetent()
 ; return 0; }
 EOF
-if { (eval echo configure:9052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:8827: \"$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
@@ -9081,15 +8856,15 @@
 
     ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
-echo "configure:9085: checking for ncurses/curses.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 9088 "configure"
+echo "configure:8860: checking for ncurses/curses.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8863 "configure"
 #include "confdefs.h"
 #include <ncurses/curses.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9093: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8868: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -9111,15 +8886,15 @@
 
     ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6
-echo "configure:9115: checking for ncurses/term.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 9118 "configure"
+echo "configure:8890: checking for ncurses/term.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8893 "configure"
 #include "confdefs.h"
 #include <ncurses/term.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9123: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8898: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -9149,15 +8924,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:9153: checking for ncurses/curses.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 9156 "configure"
+echo "configure:8928: checking for ncurses/curses.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8931 "configure"
 #include "confdefs.h"
 #include <ncurses/curses.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9161: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8936: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -9192,12 +8967,12 @@
 	for lib in curses termlib termcap; do
 	  
 echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6
-echo "configure:9196: checking for tgetent in -l$lib" >&5
+echo "configure:8971: 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 9201 "configure"
+#line 8976 "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
@@ -9208,7 +8983,7 @@
 tgetent()
 ; return 0; }
 EOF
-if { (eval echo configure:9212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:8987: \"$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
@@ -9239,12 +9014,12 @@
       else
 	
 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
-echo "configure:9243: checking for tgetent in -lcurses" >&5
+echo "configure:9018: 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 9248 "configure"
+#line 9023 "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
@@ -9255,7 +9030,7 @@
 tgetent()
 ; return 0; }
 EOF
-if { (eval echo configure:9259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:9034: \"$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
@@ -9273,12 +9048,12 @@
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
-echo "configure:9277: checking for tgetent in -ltermcap" >&5
+echo "configure:9052: 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 9282 "configure"
+#line 9057 "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
@@ -9289,7 +9064,7 @@
 tgetent()
 ; return 0; }
 EOF
-if { (eval echo configure:9293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:9068: \"$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
@@ -9337,15 +9112,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:9341: checking for gpm.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 9344 "configure"
+echo "configure:9116: checking for gpm.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 9119 "configure"
 #include "confdefs.h"
 #include <gpm.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9349: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:9124: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -9368,12 +9143,12 @@
  }
   test -z "$with_gpm" && { 
 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
-echo "configure:9372: checking for Gpm_Open in -lgpm" >&5
+echo "configure:9147: 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 9377 "configure"
+#line 9152 "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
@@ -9384,7 +9159,7 @@
 Gpm_Open()
 ; return 0; }
 EOF
-if { (eval echo configure:9388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:9163: \"$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
@@ -9433,17 +9208,17 @@
 
 
 echo "checking for database support" 1>&6
-echo "configure:9437: checking for database support" >&5
+echo "configure:9212: 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:9442: checking for dbm_open in -lgdbm" >&5
+echo "configure:9217: 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 9447 "configure"
+#line 9222 "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
@@ -9454,7 +9229,7 @@
 dbm_open()
 ; return 0; }
 EOF
-if { (eval echo configure:9458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:9233: \"$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
@@ -9476,10 +9251,10 @@
 
   if test "$with_database_gnudbm" != "yes"; then
     echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
-echo "configure:9480: checking for dbm_open" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 9483 "configure"
+echo "configure:9255: checking for dbm_open" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 9258 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char dbm_open(); below.  */
@@ -9502,7 +9277,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:9506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:9281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_dbm_open=yes"
 else
@@ -9538,10 +9313,10 @@
 
 if test "$with_database_dbm" != "no"; then
   echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
-echo "configure:9542: checking for dbm_open" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 9545 "configure"
+echo "configure:9317: checking for dbm_open" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 9320 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char dbm_open(); below.  */
@@ -9564,7 +9339,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:9568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:9343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_dbm_open=yes"
 else
@@ -9585,12 +9360,12 @@
   if test "$need_libdbm" != "no"; then
     
 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
-echo "configure:9589: checking for dbm_open in -ldbm" >&5
+echo "configure:9364: 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 9594 "configure"
+#line 9369 "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
@@ -9601,7 +9376,7 @@
 dbm_open()
 ; return 0; }
 EOF
-if { (eval echo configure:9605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:9380: \"$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
@@ -9638,10 +9413,10 @@
 
 if test "$with_database_berkdb" != "no"; then
   echo $ac_n "checking for dbopen""... $ac_c" 1>&6
-echo "configure:9642: checking for dbopen" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 9645 "configure"
+echo "configure:9417: checking for dbopen" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 9420 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char dbopen(); below.  */
@@ -9664,7 +9439,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:9668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:9443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_dbopen=yes"
 else
@@ -9685,12 +9460,12 @@
   if test "$need_libdb" != "no"; then
     
 echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
-echo "configure:9689: checking for dbopen in -ldb" >&5
+echo "configure:9464: 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 9694 "configure"
+#line 9469 "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
@@ -9701,7 +9476,7 @@
 dbopen()
 ; return 0; }
 EOF
-if { (eval echo configure:9705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:9480: \"$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
@@ -9725,7 +9500,7 @@
   if test "$with_database_berkdb" = "yes"; then
     for path in "db/db.h" "db.h"; do
 cat > conftest.$ac_ext <<EOF
-#line 9729 "configure"
+#line 9504 "configure"
 #include "confdefs.h"
 #ifdef HAVE_INTTYPES_H
 #define __BIT_TYPES_DEFINED__
@@ -9743,7 +9518,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:9747: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9522: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   db_h_path="$path"; break
 else
@@ -9795,12 +9570,12 @@
 if test "$with_socks" = "yes"; then
   
 echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6
-echo "configure:9799: checking for SOCKSinit in -lsocks" >&5
+echo "configure:9574: 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 9804 "configure"
+#line 9579 "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
@@ -9811,7 +9586,7 @@
 SOCKSinit()
 ; return 0; }
 EOF
-if { (eval echo configure:9815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:9590: \"$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
--- a/configure.in	Mon Aug 13 10:06:48 2007 +0200
+++ b/configure.in	Mon Aug 13 10:07:35 2007 +0200
@@ -325,12 +325,12 @@
 statedir='${prefix}/lib'
 libdir='${exec_prefix}/lib'
 mandir='${prefix}/man/man1'
-infodir='${prefix}/lib/xemacs-${version}/info'
+infodir='${datadir}/xemacs-${version}/info'
 infodir_user_defined='no'
 dnl BETA NOTE: ! Will you please add to this list?  Nonexistent dirs
 dnl are dropped from the list at runtime, so it is safe to add
 dnl directories to this list that you don't have at home.
-infopath='/usr/info:/usr/local/info:/usr/lib/texmf/doc/info:/usr/local/lib/texmf/doc/info'
+infopath='/usr/local/info:/usr/info:/usr/local/lib/texmf/doc/info:/usr/lib/texmf/doc/info'
 infopath_user_defined='no'
 lispdir='${datadir}/xemacs-${version}/lisp'
 lispdir_user_defined='no'
@@ -364,236 +364,6 @@
 use_union_type="no"
 with_dnet=""
 
-dnl Usage message (get it via -help)
-usage="Usage: $progname CONFIGURATION [[-OPTION[=VALUE] ...]]
-
-Set compilation and installation parameters for XEmacs, and report.
-CONFIGURATION specifies the machine and operating system to build for.
-
-Note that for most of the following options, you can explicitly enable
-them using \`--OPTION=yes' and explicitly disable them using \`--OPTION=no'.
-This is especially useful for auto-detected options.
-
-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:
-
---help			Issue this usage message.
---verbose		Display the results of configure tests.
---extra-verbose		Display even more information, useful for debugging.
-
-
-Compilation options:
-
---compiler=XXXX		Specify compiler.  Overrides environment variable CC.
---with-gcc (*)		Use GCC to compile XEmacs.
---with-gcc=no		Don't use GCC to compile XEmacs.
---with-gnu-make		Write the Makefiles to take advantage of
-			special features of GNU Make. (GNU Make
-			works fine on the Makefiles even without this
-			option.  This just allows for simultaneous
-			in-place and --srcdir building.)
---cflags=FLAGS		Compiler flags. Overrides environment variable CFLAGS.
---site-includes=PATH	List of directories to search first for header files.
---site-libraries=PATH	List of directories to search first for libraries.
---site-prefixes=PATH    List of directories to search for include/ and lib/ 
-                        subdirectories, just after 'site-includes' and 
-                        'site-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.
---srcdir=DIR		Look for the XEmacs source files in DIR.
-			See also --with-gnu-make.
---const-is-losing=no	Allow the use of const in the source code.
-
-
-Installation options:
-
---prefix=DIR		Install files below DIR.  Defaults to \`$prefix'.
-
-
-Window-system options:
-
---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.
---with-session=no	Compile without realized leader window which will
-			keep the WM_COMMAND property. Required for proper
-			session-management.
---with-menubars=TYPE	Use TYPE menubars (lucid, motif, or no).  The Lucid
-			widgets emulate Motif (mostly) but are faster.
-			*WARNING*  The Motif menubar is currently broken.
---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.
---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.
---external-widget	Compile with external widget support.
---with-gif		Compile with support for GIF image conversion.
-			This support is built-in and defaults to \`yes'.
---with-xpm (*)		Compile with support for XPM files.
-			It is highly recommended that you obtain XPM
-			(version 3.4h or better) if you don't already
-			have it.  Get it from the XEmacs FTP site.
---with-xface (*)	Compile with support for X-Face mail header
-	  		conversion.  Requires the compface library.
-			Get it from the XEmacs FTP site.
---with-imagick (*)	Compile with support for ImageMagick image conversion.
-			Requires ImageMagick from wizards.dupont.com and
-			libraries for whatever image types you wish to have
-			supported.
-			Get it from the XEmacs FTP site.
-
-
-TTY options:
-
---with-tty=no		Don't support TTY-s.
---with-ncurses (*)	Use the ncurses library for tty support.
---with-gpm (*) 		Compile in support for General Purpose Mouse.
-
-
-Additional features:
-
---with-tooltalk (*)	Support the ToolTalk IPC protocol.
---with-workshop		Support the Sun WorkShop (formerly Sparcworks)
-			development environment.
---with-energize		Support the Lucid Energize development environment.
-			This doesn't currently work.
---with-socks		Compile with support for SOCKS (an Internet proxy).
---with-term		Compile with support for TERM (a way to multiplex
-			serial lines and provide vaguely Internet-like
-			functionality over a simple dialup connection,
-			used on Linux and other systems.  NOTE: We can't
-			guarantee that our TERM support coexists well
-			with standard Internet connections).
---with-database=type (*) Compile with database support.  Valid types are
-			\`no' or a comma-separated list of one or more
-			of \`dbm', \`gnudbm', or \`berkdb'.
---with-sound=native (*)	Compile with native sound support.
---with-sound=nas	Compile with network sound support.
---with-sound=both	Compile with native and network sound support.
---native-sound-lib=LIB	Native sound support library.  Needed on Suns
-			with --with-sound=both because both sound libraries
-			are called libaudio.
---with-pop		support POP for mail retrieval
---with-kerberos		support Kerberos-authenticated POP
---with-hesiod		support Hesiod to get the POP server host
---with-dnet (*)		Compile with support for DECnet.
---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     Directories to search for packages to dump with xemacs.
-                        Defaults to \`$prefix/lib/xemacs/packages:~/.xemacs'.
---infodir=dir		Directory to install the XEmacs Info manuals and dir in.
-    Defaults to: \`$info_dir'.
---infopath=PATH		Directories to search for Info documents, info dir
-			and localdir files.  This is used to initialize
-			\`Info-default-directory-list' at dump time.
-			Directories on this path that do not exist in the
-			filesystem will be dropped by the startup code at
-			runtime, so it is safe to specify directories that do
-			not exist in the compilation environment, or that won't
-			exist in the runtime environment. The \"dir\"
-			file in the first existing directory in this list will
-			become the (dir)Top node of the Info tree.
-    Defaults to the value of \`INFOPATH', or:
-    \`$infopath'.
-
-Internationalization options:
-
---with-mule		Compile with Mule (MUlti-Lingual Emacs) support,
-			needed to suport non-Latin-1 (including Asian) languages.
---with-xim=xlib		Compile with support for X input methods,
---with-xim=motif (*)	Used in conjunction with Mule support.
-			Use either raw Xlib to provide XIM support, or
-			the Motif XmIm* routines (when available).
-			NOTE:  On some systems bugs in X11's XIM support
-			will cause XEmacs to crash, so by default,
-			no XIM support is compiled in, unless running
-			on Solaris and the XmIm* routines are detected.
---with-canna (*)	Compile with support for Canna (a Japanese input method
-			used in conjunction with Mule support).
---with-wnn (*)		Compile with support for WNN (a multi-language input method
-			used in conjunction with Mule support).
-			This is beta level code.
---with-wnn6 (*)		Compile with support for WNN version 6
-			This is alpha level code.
---with-i18n3		Compile with I18N level 3 (support for message
-			translation).  This doesn't currently work.
---with-xfs		Compile with XFontSet support for bilingual menubar.
-			Can't use this option with --with-xim=motif or xlib.
-			And should have --with-menubars=lucid.
-
-
-Debugging options:
-
---debug			Compile with support for debugging XEmacs.
-			(Causes code-size increase and little loss of speed.)
---error-checking=TYPE[[,TYPE]]...
-			Compile with internal error-checking added.
-			Causes noticeable loss of speed.  Valid types
-			are extents, bufpos, malloc, gc, typecheck.
---error-checking=none	Disable all internal error-checking (the default).
---error-checking=all	Enable all internal error-checking.
---memory-usage-stats 	Compile with additional code to allow you to
-			determine what XEmacs's memory is being used
-		        for.  Causes a small code increase but no loss
-			of speed.  Normally enabled when --debug is given.
---no-doc-file		Don't rebuild the DOC file unless it's explicitly
-			deleted.  Only use during development. (It speeds
-			up the compile-run-test cycle.)
---use-union-type	Enable or disable use of a union, instead of an
-			int, for the fundamental Lisp_Object type; this
-			provides stricter type-checking.  Only works with
-			some systems and compilers.
-
-
-Other options:
-
---puresize=VALUE	Override default amount of space for pure Lisp code.
---rel-alloc		Use the relocating allocator (default for this option
-  			is system-dependent).
---with-clash-detection	Use lock files to detect multiple edits of the same file.
-			The default is to not do clash detection.
---lockdir=dir		The directory to put clash detection files in, such as
-			\`/var/lock/emacs'.
-    Defaults to \`$lockdir'.
---with-system-malloc	Force use of the system malloc, rather than GNU malloc.
---with-debug-malloc	Use the debugging malloc package.
-
-You may also specify any of the \`path' variables found in
-Makefile.in, including --bindir, --libdir, --lispdir, --datadir, and
-so on.  Note that we recommend against explicitly setting any of these
-variables.  See the INSTALL file for a complete list plus the reasons
-we advise not changing them.
-
-If successful, $progname leaves its status in config.status.  If
-unsuccessful after disturbing the status quo, it removes config.status.
-
-The configure build process also used the following environment variables:
-CC        C compiler to use (but configure flags take precedence)
-CPP       C preprocessor to use (such as /usr/ccs/lib/cpp or cc -E)
-CFLAGS    C compiler compilation flags (such as -O)
-CPPFLAGS  Additional compilation flags (such as -I/foo) used only by the preprocessor
-LDFLAGS   Additional linker flags (such as -L/foo)
-LIBS      Additional libraries (such as -lfoo)
-
-INFOPATH  Path to search for Info documentation.
-
-For more details on the install process, consult the INSTALL file.
-"
-
 dnl ------------------
 dnl Options Processing
 dnl ------------------
@@ -688,6 +458,7 @@
 	with_quantify	| \
 	with_toolbars	| \
 	with_tty	| \
+	with_xfs	| \
 	with_i18n3	| \
 	with_mule	| \
 	with_canna	| \
@@ -924,7 +695,7 @@
 	"no_create" ) ;;
 
 	dnl Has the user asked for some help?
-	"usage" | "help" ) echo "$usage" | ${PAGER-more}; exit 0 ;;
+	"usage" | "help" ) ${PAGER-more} ${srcdir}/configure.usage; exit 0 ;;
 
 	dnl Has the user specified what toolkit to use for the menubars,
 	dnl scrollbar or dialogs?
@@ -2483,7 +2254,7 @@
 
 dnl Enable or disable proper session-management
 AC_CHECKING(for session-management option);
-if test "$with_session" != "no"; then
+if test "$with_session" = "yes"; then
   AC_DEFINE(HAVE_SESSION)
 fi
 
@@ -2756,17 +2527,20 @@
       need_motif=yes
       XE_ADD_OBJS(input-method-motif.o)
     fi
-    if test "$with_xfs" = "yes"; then
+    if test "$with_xim" = "motif"; then
       with_xfs=no
     fi
-  else dnl "with_xim" = "no"
-    case "$with_xfs" in  "yes" )
-      AC_CHECKING(for XFontSet)
-      AC_CHECK_LIB(X11, XmbDrawString, [:], with_xfs=no)
-    esac
+  fi
+
+  dnl "with_xim" = "yes"
+  if test "$with_xfs" = "yes" ; then
+    AC_CHECKING(for XFontSet)
+    AC_CHECK_LIB(X11, XmbDrawString, [:], with_xfs=no)
     if test "$with_xfs" = "yes" && test "$with_menubars" = "lucid"; then
       AC_DEFINE(USE_XFONTSET)
-      XE_ADD_OBJS(input-method-xfs.o)
+      if test "$with_xim" = "no" ; then
+        XE_ADD_OBJS(input-method-xfs.o)
+      fi
     fi
   fi dnl with_xim
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/configure.usage	Mon Aug 13 10:07:35 2007 +0200
@@ -0,0 +1,228 @@
+Usage: configure CONFIGURATION [[--OPTION[=VALUE] ...]]
+
+Set compilation and installation parameters for XEmacs, and report.
+CONFIGURATION specifies the machine and operating system to build for.
+
+Note that for most of the following options, you can explicitly enable
+them using `--OPTION=yes' and explicitly disable them using `--OPTION=no'.
+This is especially useful for auto-detected options.
+
+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:
+
+--help			Issue this usage message.
+--verbose		Display the results of configure tests.
+--extra-verbose		Display even more information, useful for debugging.
+
+
+Compilation options:
+
+--compiler=XXXX		Specify compiler.  Overrides environment variable CC.
+--with-gcc (*)		Use GCC to compile XEmacs.
+--with-gcc=no		Don't use GCC to compile XEmacs.
+--with-gnu-make		Write the Makefiles to take advantage of
+			special features of GNU Make. (GNU Make
+			works fine on the Makefiles even without this
+			option.  This just allows for simultaneous
+			in-place and --srcdir building.)
+--cflags=FLAGS		Compiler flags. Overrides environment variable CFLAGS.
+--site-includes=PATH	List of directories to search first for header files.
+--site-libraries=PATH	List of directories to search first for libraries.
+--site-prefixes=PATH    List of directories to search for include/ and lib/ 
+                        subdirectories, just after 'site-includes' and 
+                        'site-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.
+--srcdir=DIR		Look for the XEmacs source files in DIR.
+			See also --with-gnu-make.
+--const-is-losing=no	Allow the use of const in the source code.
+
+
+Installation options:
+
+--prefix=DIR		Install files below DIR.  Defaults to `/usr/local'.
+
+
+Window-system options:
+
+--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.
+--with-session=no	Compile without realized leader window which will
+			keep the WM_COMMAND property. Required for proper
+			session-management.
+--with-menubars=TYPE	Use TYPE menubars (lucid, motif, or no).  The Lucid
+			widgets emulate Motif (mostly) but are faster.
+			*WARNING*  The Motif menubar is currently broken.
+--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.
+--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.
+--external-widget	Compile with external widget support.
+--with-gif		Compile with support for GIF image conversion.
+			This support is built-in and defaults to `yes'.
+--with-xpm (*)		Compile with support for XPM files.
+			It is highly recommended that you obtain XPM
+			(version 3.4h or better) if you don't already
+			have it.  Get it from the XEmacs FTP site.
+--with-xface (*)	Compile with support for X-Face mail header
+	  		conversion.  Requires the compface library.
+			Get it from the XEmacs FTP site.
+--with-imagick (*)	Compile with support for ImageMagick image conversion.
+			Requires ImageMagick from wizards.dupont.com and
+			libraries for whatever image types you wish to have
+			supported.
+			Get it from the XEmacs FTP site.
+
+
+TTY options:
+
+--with-tty=no		Don't support TTY-s.
+--with-ncurses (*)	Use the ncurses library for tty support.
+--with-gpm (*) 		Compile in support for General Purpose Mouse.
+
+
+Additional features:
+
+--with-tooltalk (*)	Support the ToolTalk IPC protocol.
+--with-workshop		Support the Sun WorkShop (formerly Sparcworks)
+			development environment.
+--with-energize		Support the Lucid Energize development environment.
+			This doesn't currently work.
+--with-socks		Compile with support for SOCKS (an Internet proxy).
+--with-term		Compile with support for TERM (a way to multiplex
+			serial lines and provide vaguely Internet-like
+			functionality over a simple dialup connection,
+			used on Linux and other systems.  NOTE: We can't
+			guarantee that our TERM support coexists well
+			with standard Internet connections).
+--with-database=type (*) Compile with database support.  Valid types are
+			`no' or a comma-separated list of one or more
+			of `dbm', `gnudbm', or `berkdb'.
+--with-sound=native (*)	Compile with native sound support.
+--with-sound=nas	Compile with network sound support.
+--with-sound=both	Compile with native and network sound support.
+--native-sound-lib=LIB	Native sound support library.  Needed on Suns
+			with --with-sound=both because both sound libraries
+			are called libaudio.
+--with-pop		support POP for mail retrieval
+--with-kerberos		support Kerberos-authenticated POP
+--with-hesiod		support Hesiod to get the POP server host
+--with-dnet (*)		Compile with support for DECnet.
+--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     Directories to search for packages to dump with xemacs.
+                        Defaults to `/usr/local/lib/xemacs/packages:~/.xemacs'.
+--infodir=dir		Directory to install the XEmacs Info manuals and dir in.
+    Defaults to: `'.
+--infopath=PATH		Directories to search for Info documents, info dir
+			and localdir files.  This is used to initialize
+			`Info-default-directory-list' at dump time.
+			Directories on this path that do not exist in the
+			filesystem will be dropped by the startup code at
+			runtime, so it is safe to specify directories that do
+			not exist in the compilation environment, or that won't
+			exist in the runtime environment. The "dir"
+			file in the first existing directory in this list will
+			become the (dir)Top node of the Info tree.
+    Defaults to the value of `INFOPATH', or:
+    `/usr/local/info:/usr/info:/usr/local/lib/texmf/doc/info:/usr/lib/texmf/doc/
+info'.
+
+Internationalization options:
+
+--with-mule		Compile with Mule (MUlti-Lingual Emacs) support,
+			needed to suport non-Latin-1 (including Asian) languages.
+--with-xim=xlib		Compile with support for X input methods,
+--with-xim=motif (*)	Used in conjunction with Mule support.
+			Use either raw Xlib to provide XIM support, or
+			the Motif XmIm* routines (when available).
+			NOTE:  On some systems bugs in X11's XIM support
+			will cause XEmacs to crash, so by default,
+			no XIM support is compiled in, unless running
+			on Solaris and the XmIm* routines are detected.
+--with-canna (*)	Compile with support for Canna (a Japanese input method
+			used in conjunction with Mule support).
+--with-wnn (*)		Compile with support for WNN (a multi-language input method
+			used in conjunction with Mule support).
+			This is beta level code.
+--with-wnn6 (*)		Compile with support for WNN version 6
+			This is alpha level code.
+--with-i18n3		Compile with I18N level 3 (support for message
+			translation).  This doesn't currently work.
+--with-xfs		Compile with XFontSet support for bilingual menubar.
+			Can't use this option with --with-xim=motif or xlib.
+			And should have --with-menubars=lucid.
+
+
+Debugging options:
+
+--debug			Compile with support for debugging XEmacs.
+			(Causes code-size increase and little loss of speed.)
+--error-checking=TYPE[[,TYPE]]...
+			Compile with internal error-checking added.
+			Causes noticeable loss of speed.  Valid types
+			are extents, bufpos, malloc, gc, typecheck.
+--error-checking=none	Disable all internal error-checking (the default).
+--error-checking=all	Enable all internal error-checking.
+--memory-usage-stats 	Compile with additional code to allow you to
+			determine what XEmacs's memory is being used
+		        for.  Causes a small code increase but no loss
+			of speed.  Normally enabled when --debug is given.
+--no-doc-file		Don't rebuild the DOC file unless it's explicitly
+			deleted.  Only use during development. (It speeds
+			up the compile-run-test cycle.)
+--use-union-type	Enable or disable use of a union, instead of an
+			int, for the fundamental Lisp_Object type; this
+			provides stricter type-checking.  Only works with
+			some systems and compilers.
+
+
+Other options:
+
+--puresize=VALUE	Override default amount of space for pure Lisp code.
+--rel-alloc		Use the relocating allocator (default for this option
+  			is system-dependent).
+--with-clash-detection	Use lock files to detect multiple edits of the same file.
+			The default is to not do clash detection.
+--lockdir=dir		The directory to put clash detection files in, such as
+			`/var/lock/emacs'.
+    Defaults to `${statedir}/xemacs/lock'.
+--with-system-malloc	Force use of the system malloc, rather than GNU malloc.
+--with-debug-malloc	Use the debugging malloc package.
+
+You may also specify any of the `path' variables found in
+Makefile.in, including --bindir, --libdir, --lispdir, --datadir, and
+so on.  Note that we recommend against explicitly setting any of these
+variables.  See the INSTALL file for a complete list plus the reasons
+we advise not changing them.
+
+If successful, configure leaves its status in config.status.  If
+unsuccessful after disturbing the status quo, it removes config.status.
+
+The configure build process also used the following environment variables:
+CC        C compiler to use (but configure flags take precedence)
+CPP       C preprocessor to use (such as /usr/ccs/lib/cpp or cc -E)
+CFLAGS    C compiler compilation flags (such as -O)
+CPPFLAGS  Additional compilation flags (such as -I/foo) used only by the preprocessor
+LDFLAGS   Additional linker flags (such as -L/foo)
+LIBS      Additional libraries (such as -lfoo)
+
+INFOPATH  Path to search for Info documentation.
+
+For more details on the install process, consult the INSTALL file.
--- a/etc/DISTRIB	Mon Aug 13 10:06:48 2007 +0200
+++ b/etc/DISTRIB	Mon Aug 13 10:07:35 2007 +0200
@@ -9,7 +9,6 @@
 copies of it at other sites as well.  Some sites to try include:
 
 	ftp://ftp2.xemacs.org/pub/xemacs/
-	ftp://ftp.ai.mit.edu/pub/xemacs/
 	ftp://ftp.uu.net/systems/gnu/xemacs/
 	ftp://ftp.sunet.se/pub/gnu/xemacs/
 	ftp://ftp.cenatls.cena.dgac.fr/pub/Emacs/xemacs/
--- a/etc/Emacs.ad	Mon Aug 13 10:06:48 2007 +0200
+++ b/etc/Emacs.ad	Mon Aug 13 10:07:35 2007 +0200
@@ -31,8 +31,8 @@
 ! `rgb.txt', usually found in /usr/lib/X11/ or /usr/openwin/lib/X11/.
 
 ! Set the modeline colors.
-Emacs.modeline*attributeForeground:	Black
-Emacs.modeline*attributeBackground:	Gray75
+!Emacs.modeline*attributeForeground:	Black
+!Emacs.modeline*attributeBackground:	Gray75
 
 ! Set the color of the text cursor.
 Emacs.text-cursor*attributeBackground:	Red3
@@ -47,7 +47,7 @@
 ! Set the menubar colors.  This overrides the default foreground and
 ! background colors specified above.
 *menubar*Foreground:			Gray30
-*menubar*Background:			Gray75
+*menubar*Background:			Gray80
 ! This is for buttons in the menubar.  
 ! Yellow would be better, but that would map to white on monochrome.
 *menubar*buttonForeground:		Blue
@@ -58,7 +58,7 @@
 
 ! Specify the colors of popup menus.
 *popup*Foreground:			Black
-*popup*Background:			Gray75
+*popup*Background:			Gray80
 
 ! Specify the colors of the various sub-widgets of the dialog boxes.
 *dialog*Foreground:			Black
@@ -73,9 +73,9 @@
 
 ! Xlw Scrollbar colors
 *XlwScrollBar*Foreground:		Gray30
-*XlwScrollBar*Background:		Gray75
+*XlwScrollBar*Background:		Gray80
 *XmScrollBar*Foreground:		Gray30
-*XmScrollBar*Background:		Gray75
+*XmScrollBar*Background:		Gray80
 
 !
 ! The Lucid Scrollbar supports two added resources, SliderStyle is either
@@ -103,7 +103,7 @@
 
 !*topToolBarShadowColor:			Gray90
 !*bottomToolBarShadowColor:		Gray40
-*backgroundToolBarColor:		Gray75
+*backgroundToolBarColor:		Gray80
 *toolBarShadowThickness:		2
 
 
--- a/etc/FTP	Mon Aug 13 10:06:48 2007 +0200
+++ b/etc/FTP	Mon Aug 13 10:07:35 2007 +0200
@@ -8,8 +8,7 @@
 ftp.xemacs.org is the primary distribution point, but you may find
 copies of it at other sites as well.  Some sites to try include:
 
-	ftp://ftp.ai.mit.edu:/pub/xemacs/
-	ftp://ftp-digital.cern.ch:/pub/beta/xemacs-20.0/
+	ftp://ftp.jaist.ac.jp/pub/GNU/xemacs/
 	ftp://ftp.uu.net:/systems/gnu/xemacs/
 	ftp://ftp.sunet.se:/pub/gnu/xemacs/
 	ftp://ftp.cenatls.cena.dgac.fr:/pub/Emacs/xemacs/
--- a/etc/NEWS	Mon Aug 13 10:06:48 2007 +0200
+++ b/etc/NEWS	Mon Aug 13 10:07:35 2007 +0200
@@ -138,13 +138,18 @@
 any multilingual text from normal ASCII keyboard.  This means that
 XEmacs with Mule now supports a number of European languages.
 
-** XEmacs runs on Windows NT.
-
-Thanks to David Hobley <davidh@wr.com.au> and Marc Paquette
-<marcpa@cam.org>, XEmacs now runs on Windows NT.
-
-There are plans to hire contractors to do a native, professional
-port.  This might be over for the 20.3 final release.
+** More Windows NT support.
+
+Thanks to efforts of many people, coordinated by David Hobley
+<davidh@wr.com.au> and Marc Paquette <marcpa@cam.org>, beta versions
+of XEmacs now run on 32-bit Windows platforms (Windows NT and Windows
+95).  The current betas require having an X server to run XEmacs;
+however, a native NT/95 port is in alpha, thanks to Jonathan Harris
+<jhar@tardis.ed.ac.uk>.
+
+The NT development is now coordinated by a mailing list at
+<xemacs-nt@xemacs.org>.  Mail to <xemacs-nt-request@xemacs.org> to
+subscribe.
 
 ** Multiple TTY frames are now available.
 
--- a/etc/TUTORIAL.no	Mon Aug 13 10:06:48 2007 +0200
+++ b/etc/TUTORIAL.no	Mon Aug 13 10:07:35 2007 +0200
@@ -9,10 +9,10 @@
 
 Emacs-kommandoer inkluderer ofte bruk av CONTROL-tasten (noen ganger
 merket CTRL eller CTL) eller META-tasten.  På noen tastaturer er
-META-tasten merket ALT eller EDIT eller noe annet (på Sun-tastaturer 
+META-tasten merket ALT eller EDIT eller noe annet (på Sun-tastaturer
 for eksempel, er det "ruter"-tasten til venstre for mellomromstasten).
-Hvis du ikke har noen META-tast kan du bruke ESC.  Istedenfor å skrive META
-eller CONTROL vil vi her bruke følgende forkortelser:
+Hvis du ikke har noen META-tast kan du bruke ESC.  Istedenfor å skrive
+META eller CONTROL vil vi her bruke følgende forkortelser:
 
  C-<chr>  betyr at du skal holde nede CONTROL-tasten mens du trykker
 	  bokstaven <chr>.  Dermed vil C-f bety: hold nede
@@ -86,7 +86,7 @@
 Dette er sikkert litt enklere å huske hvis du tenker på disse
 forkortelsene: P (engelsk previous) for forrige, N for neste, B for
 bakover og F for framover.  Dette er de grunnleggende kommandoene for
-å flytte markøren, og du kommer sikkert til å bruke dem hele tiden, så 
+å flytte markøren, og du kommer sikkert til å bruke dem hele tiden, så
 det vil være en stor fordel om du lærer dem nå.
 
 >> Gjør noen C-n slik at du kommer ned til denne linjen.
@@ -124,7 +124,7 @@
 >> Utfør noen M-f og M-b.
 
 Hvis markøren står midt i et ord vil M-f flytte markøren til slutten
-av ordet.  Hvis du står midt mellom to ord vil M-f flytte markøren til 
+av ordet.  Hvis du står midt mellom to ord vil M-f flytte markøren til
 slutten av det kommende ordet.  M-b fungerer på samme måte, bare i
 motsatt retning.
 
@@ -132,7 +132,7 @@
    og C-b slik at du ser hvordan M-f og M-b oppfører seg ved
    forskjellig plassering av markøren både i og mellom ord.
 
-Legg merke til parallellen mellom C-f og C-b på en side, og M-f og M-b 
+Legg merke til parallellen mellom C-f og C-b på en side, og M-f og M-b
 på den andre.  Ofte er Meta-kommandoer brukt til operasjoner relatert
 til enheter definert av språket (ord, setninger, avsnitt), mens
 Control-kommandoer blir brukt på grunnleggende enheter som er
@@ -171,12 +171,12 @@
 >> Prøv ut alle disse kommandoene noen ganger, bare for trening.
    Dette er de mest brukte kommandoene.
 
-To andre viktige markørbevegelses-kommandoer er M-< (Meta Mindre-enn), 
+To andre viktige markørbevegelses-kommandoer er M-< (Meta Mindre-enn),
 som flytter markøren til begynnelsen av teksten, og M-> (Meta
 større-enn), som flytter den til slutten av teksten.
 
 På noen tastaturer er ">" plassert over komma, så man må bruke shift
-for å få den fram.  På disse tastaturene må man også bruke shift for å 
+for å få den fram.  På disse tastaturene må man også bruke shift for å
 taste M-<.  Uten shift-tasten vil det bli M-komma.
 
 >> Prøv M-< nå for å flytte markøren til begynnelsen av veiledningen.
@@ -200,7 +200,7 @@
 gir en kommando et slikt argument er at du trykker C-u og deretter
 tallet, før du taster kommandoen.  Hvis du har en META- (eller EDIT-
 eller ALT-) tast så finnes det et annet alternativ for å gi numeriske
-argumenter:  Trykk ned tallet mens du holder META-tasten nede.  Vi
+argumenter: Trykk ned tallet mens du holder META-tasten nede.  Vi
 anbefaler at du bruker C-u fordi det fungerer på alle slags
 terminaler.
 
@@ -237,11 +237,11 @@
 ----------------------------------
 
 Hvis du sitter på en X-terminal vil du sansynligvis finne det mye
-enklere å bruke piltastene for å bevege markøren.  Venstre-, høyre-, opp-
-og ned-pilene beveger markøren i ønsket retning.  De fungerer på samme
-måte som C-b, C-f, C-p og C-n, men er enklere å taste og huske.  Du
-kan også bruke C-venstre og C-høyre for å bevege den innenfor ord, og
-C-opp og C-ned for å bevege den innenfor blokker (For eksempel
+enklere å bruke piltastene for å bevege markøren.  Venstre-, høyre-,
+opp- og ned-pilene beveger markøren i ønsket retning.  De fungerer på
+samme måte som C-b, C-f, C-p og C-n, men er enklere å taste og huske.
+Du kan også bruke C-venstre og C-høyre for å bevege den innenfor ord,
+og C-opp og C-ned for å bevege den innenfor blokker (For eksempel
 avsnitt hvis du redigerer tekst).  Hvis du har tastene merket HOME
 (eller BEGIN) og END kan du bruke disse for å gå til henholdsvis
 begynnelsen av linjen og slutten av linjen, og C-HOME og C-END vil gå
@@ -260,11 +260,11 @@
 * HVIS EMACS HENGER
 -------------------
 
-Hvis Emacs slutter å reagere på kommandoer kan du trygt stoppe den ved 
+Hvis Emacs slutter å reagere på kommandoer kan du trygt stoppe den ved
 å trykke C-g.  Du kan også bruke C-g for å stoppe en kommando som tar
 for lang tid å utføre.
 
-Det er også mulig å bruke C-g for å avbryte et numerisk argument eller 
+Det er også mulig å bruke C-g for å avbryte et numerisk argument eller
 begynnelsen på en kommando du ikke ønsker å utføre.
 
 >> Tast C-u 100 for å lage et numerisk argument på 100 og trykk C-g.
@@ -282,12 +282,12 @@
 ikke kan bruke dem uten at de ønsker det.
 
 Hvis du prøver en av disse utilgjengelige kommandoene vil Emacs komme
-med en melding som forteller hvilken kommando det er, og vil spørre om 
+med en melding som forteller hvilken kommando det er, og vil spørre om
 du virkelig vil fortsette å utføre denne kommandoen.
 
-Hvis du virkelig ønsker å prøve denne kommandoen trykker du mellomromstast
-som svar på spørsmålet.  Normalt, hvis du ikke ønsker å kjøre denne
-kommandoen, svarer du "n" på spørsmålet.
+Hvis du virkelig ønsker å prøve denne kommandoen trykker du
+mellomromstast som svar på spørsmålet.  Normalt, hvis du ikke ønsker å
+kjøre denne kommandoen, svarer du "n" på spørsmålet.
 
 >> Tast `C-x n p' (som er en utilgjengelig kommando),
    tast n som svar på spørsmålet.
@@ -299,12 +299,12 @@
 Emacs kan ha flere vinduer, og hver av dem kan vise sin egen tekst.
 Legg merke til at "vinduer" i Emacs ikke refererer til separate
 overlappende vinduer i vindus-systemet, men til separate buffer
-innenfor et enkelt X-vindu.  (Emacs kan også ha flere X-vinduer, eller 
+innenfor et enkelt X-vindu.  (Emacs kan også ha flere X-vinduer, eller
 "rammer" i Emacs-terminologi.  Dette blir beskrevet senere.)
 
 Akkurat nå er det best at vi ikke går inn på teknikker for å bruke
 flere vinduer, men du trenger å vite hvordan du blir kvitt ekstra
-vinduer som kan dukke opp for å vise hjelp, eller utskrift fra enkelte 
+vinduer som kan dukke opp for å vise hjelp, eller utskrift fra enkelte
 kommandoer.  Det er enkelt:
 
 	C-x 1	Ett vindu (dvs. gjem alle andre vinduer).
@@ -315,11 +315,11 @@
 
 >> Flytt markøren til denne linjen og trykk C-u 0 C-l.
 
-(Husk at C-l renser skjermen og midtstiller linjen der markøren
-står.  Hvis du gir et numerisk argument til denne kommandoen betyr det 
-"rensk skjermen og legg linjen der markøren står på linjen angitt av
-argumentet"  Derfor betyr C-u 0 C-l at skjermen skal renskes og
-linjen der markøren står plasseres øverst.)
+(Husk at C-l renser skjermen og midtstiller linjen der markøren står.
+Hvis du gir et numerisk argument til denne kommandoen betyr det "rensk
+skjermen og legg linjen der markøren står på linjen angitt av
+argumentet" Derfor betyr C-u 0 C-l at skjermen skal renskes og linjen
+der markøren står plasseres øverst.)
 
 >> Tast Control-x 2.
    Se hvordan vinduet krympes og et nytt dukker opp med samme
@@ -464,14 +464,14 @@
 
 Men det er to unntak her.  Kommandoer som ikke forandrer i teksten
 teller ikke (dette inkluderer markørbevegelser og flytte-kommandoer),
-og inntastede enkeltbokstaver blir vanligvis gruppert i grupper på opp 
+og inntastede enkeltbokstaver blir vanligvis gruppert i grupper på opp
 til 20 tegn.  (Dette er for å redusere antall C-x u'er som trengs for
 å angre inntastet tekst.)
 
 >> "Kill" denne linjen med C-k.  C-x u vil få den tilbake igjen.
 
 C-_ er en alternativ angre-kommando.  Den fungerer på samme måte som
-C-x u, men er enklere å taste flere ganger på rad.  Ulempen med C-_ er 
+C-x u, men er enklere å taste flere ganger på rad.  Ulempen med C-_ er
 at den er vanskelig å finne fram til på enkelte tastaturer.  Det er
 derfor vi i tillegg har C-x u.  På enkelte terminaler kan du få fram
 C-_ ved å trykke / mens CTRL er holdt nede.
@@ -532,7 +532,7 @@
 fullføre kommandoen.  Da vil C-x C-f kommandoen begynne å lete fram
 filen.  Minibuffret forsvinner når C-x C-f kommandoen er ferdig.
 
-Om en liten stund vil filen komme inn i skjermbildet og du kan begynne 
+Om en liten stund vil filen komme inn i skjermbildet og du kan begynne
 å redigere innholdet.  Når du ønsker å lagre filen kan du bruke denne
 kommandoen
 
@@ -544,7 +544,7 @@
 det blir lagt til en "~" i slutten av det originale filnavnet.
 
 Når lagringen er utført vil Emacs skrive ut navnet på filen som ble
-lagret.  Du bør lagre ofte slik at du ikke mister så mye om det skulle 
+lagret.  Du bør lagre ofte slik at du ikke mister så mye om det skulle
 oppstå en system-krasj.
 
 >> Trykk C-x C-s for å lagre en kopi av denne veiledningen.
@@ -553,18 +553,18 @@
 
 NB: På noen systemer vil C-x C-s føre til at skjermen "fryses" og du
 vil ikke være istand til å utføre noen flere kommandoer.  Dette
-indikerer at en operativsystem-egenskap kalt "flytkontroll" har
-fanget opp C-s'en og ikke sendt den videre til Emacs.  For å fortsette
-må du trykke C-q.  Se da i avsnittet "Spontaneous Entry to Incremental
+indikerer at en operativsystem-egenskap kalt "flytkontroll" har fanget
+opp C-s'en og ikke sendt den videre til Emacs.  For å fortsette må du
+trykke C-q.  Se da i avsnittet "Spontaneous Entry to Incremental
 Search" i Emacs-manualen for råd om hvordan dette kan avverges.
 
-Du kan finne en eksisterende fil, enten for å forandre den eller for å 
+Du kan finne en eksisterende fil, enten for å forandre den eller for å
 se på den.  Du kan også finne en fil som ikke eksisterer.  Dette er
-måten du lager nye filer med Emacs: finn filen, som er tom til å begynne
-med, og start å skrive teksten som skal inn i denne filen.  Først når du
-lagrer filen vil Emacs virkelig opprette filen med den teksten du har
-skrevet.  Fra nå av kan du betrakte deg selv som om du skriver i en
-fil som allerede eksisterer.
+måten du lager nye filer med Emacs: finn filen, som er tom til å
+begynne med, og start å skrive teksten som skal inn i denne filen.
+Først når du lagrer filen vil Emacs virkelig opprette filen med den
+teksten du har skrevet.  Fra nå av kan du betrakte deg selv som om du
+skriver i en fil som allerede eksisterer.
 
 
 * BUFFER
@@ -596,13 +596,13 @@
 
 >> Tast C-x 1 for å bli kvitt buffer-listen.
 
-Hvis du gjør forandringer i en av filene og åpner en ny fil så vil ikke
-den første filen bli lagret, men forandringene vil fortsatt være i
-buffret.  Oppretting eller redigering av en ny fil vil ikke påvirke den 
-første filens buffer.  Dette er nyttig, men betyr også at du trenger
-en passende måte å lagre den første filens buffer.  Det vil bli alt
-for omstendig å skifte tilbake til det forrige buffret med C-x C-f for 
-så å lagre filen med C-x C-s.  Derfor har vi kommandoen
+Hvis du gjør forandringer i en av filene og åpner en ny fil så vil
+ikke den første filen bli lagret, men forandringene vil fortsatt være
+i buffret.  Oppretting eller redigering av en ny fil vil ikke påvirke
+den første filens buffer.  Dette er nyttig, men betyr også at du
+trenger en passende måte å lagre den første filens buffer.  Det vil
+bli alt for omstendig å skifte tilbake til det forrige buffret med C-x
+C-f for så å lagre filen med C-x C-s.  Derfor har vi kommandoen
 
 	C-x s   Lagre noen buffer
 
@@ -657,10 +657,10 @@
 (on-line dokumentasjonen til Emacs) ved å bruke C-h i, eller "Help"-
 menyen, kan du følge linkene ved å trykke den midterste musknappen.
 Og hvis du skriver inn et filnavn (For eksempel "Find File"), og
-trykker TAB for å få fram en fillisting, så kan du komplettere filnavnet
-ved å trykke den midterste musknappen på filnavnet.
+trykker TAB for å få fram en fillisting, så kan du komplettere
+filnavnet ved å trykke den midterste musknappen på filnavnet.
 
-Ved å trykke høyre musknapp vil du få fram en popup-meny.  Innholdet i 
+Ved å trykke høyre musknapp vil du få fram en popup-meny.  Innholdet i
 denne menyen er avhengig av hvilken modus du er inne i, og vanligvis
 inneholder den et par av de mest brukte kommandoene slik at de blir
 lett tilgjengelige.
@@ -673,7 +673,7 @@
 * UTVIDING AV KOMMANDOSETTET
 ----------------------------
 
-Det finnes mange flere Emacs-kommandoer enn det som er mulig å tilegne 
+Det finnes mange flere Emacs-kommandoer enn det som er mulig å tilegne
 control- eller meta-taster.  For å komme rundt dette har Emacs en "X"-
 (eXtend) kommando.  Denne kommer i to utgaver:
 
@@ -698,8 +698,8 @@
 
 På systemer som ikke har implementert denne egenskapen vil C-z
 opprette et skall som kjører under Emacs, og som gir deg sjansen til å
-kjøre andre programmer og så returnere til Emacs etterpå.  Den gir ingen
-eksakt avslutning av Emacs.  I slike tilfeller vil vanligvis
+kjøre andre programmer og så returnere til Emacs etterpå.  Den gir
+ingen eksakt avslutning av Emacs.  I slike tilfeller vil vanligvis
 kommandoen `exit' returnere fra skallet og tilbake til Emacs.
 
 C-x C-c benyttes når du skal avslutte Emacs.  Det er også fornuftig å
@@ -745,22 +745,22 @@
 Når du har gjort forandringer i en fil, men ikke lagret den, vil det
 gå tapt hvis maskinen krasjer.  Som en beskyttelse mot dette vil Emacs
 periodisk lagre en "autosave"-fil for hver av filene du redigerer.
-Denne filen har en # i begynnelsen og slutten av filnavnet.  Hvis du 
+Denne filen har en # i begynnelsen og slutten av filnavnet.  Hvis du
 for eksempel har en fil med navnet "hallo.c" så vil navnet på
 "autosave"-filen bli "#hallo.c#".  Når du lagrer filen på vanlig måte
 vil Emacs slette unna "autosave"-filen.
 
-Hvis maskinen krasjer kan du gjenvinne "autosave"-filene ved å
-finne filen på vanlig måte (filen du redigerte på, ikke "auto-save"-
-filen) og trykke M-x recover file<Return>.  Når Emacs vil ha
-bekreftelse svarer du  yes<Return> for å gjenvinne "autosave"-filen.
+Hvis maskinen krasjer kan du gjenvinne "autosave"-filene ved å finne
+filen på vanlig måte (filen du redigerte på, ikke "auto-save"- filen)
+og trykke M-x recover file<Return>.  Når Emacs vil ha bekreftelse
+svarer du yes<Return> for å gjenvinne "autosave"-filen.
 
 
 * ECHO-OMRÅDE
 -------------
 
-Hvis Emacs ser at du skriver kommandoene langsomt så vil den vise dem på
-den nederste linjen i skjermbildet i et område som blir kalt "echo
+Hvis Emacs ser at du skriver kommandoene langsomt så vil den vise dem
+på den nederste linjen i skjermbildet i et område som blir kalt "echo
 area".  Dette området inneholder den nederste linjen i skjermbildet.
 
 
@@ -784,7 +784,7 @@
 --All--.
 
 Stjernene i begynnelsen av linjen forteller at det er blitt foretatt
-endringer i filen siden den sist ble lagret.  Når du nettopp har åpnet 
+endringer i filen siden den sist ble lagret.  Når du nettopp har åpnet
 en fil vil det ikke stå noe her, bare minustegn.
 
 Den delen av moduslinjen som står inne i parenteser forteller hvilken
@@ -797,8 +797,8 @@
 hovedmodus om gangen, og modusnavnet vil alltid stå der det står
 Fundamental nå.
 
-Hver hovedmodus gjør at endel kommandoer oppfører seg annerledes.
-Det finnes for eksempel kommandoer for å sette inn kommentarer i
+Hver hovedmodus gjør at endel kommandoer oppfører seg annerledes.  Det
+finnes for eksempel kommandoer for å sette inn kommentarer i
 programkode, og siden hvert programmeringsspråk har forskjellige måter
 å angi kommentarer på må de ulike hovedmodusene sette inn disse
 kommentarene på forskjellige måter.  Hver hovedmodus har en kommando
@@ -815,8 +815,8 @@
 apostrofer som en del av ordet.  Tidligere, i Fundamental mode,
 behandlet M-f og M-b apostrofene som ordskillere.
 
-Hver hovedmodus gjør vanligvis små forandringer slik som denne, og de 
-fleste kommandoene gjør det samme i hver hovedmodus, de fungerer bare 
+Hver hovedmodus gjør vanligvis små forandringer slik som denne, og de
+fleste kommandoene gjør det samme i hver hovedmodus, de fungerer bare
 litt annerledes.
 
 For å få fram dokumentasjonen på den hovedmodusen du er inne i nå kan
@@ -839,9 +839,9 @@
 hvis linjen blir for lang for å passe inn på ett skjermbilde.
 
 Du kan slå på Auto Fill mode ved å utføre en M-x
-auto-fill-mode<Return>.   Når denne modusen er på kan du slå den av
-igjen ved å utføre en ny M-x auto-fill-mode<Return>.  Denne 
-kommandoen bytter mellom av og på, også kalt "toggle the mode".
+auto-fill-mode<Return>.  Når denne modusen er på kan du slå den av
+igjen ved å utføre en ny M-x auto-fill-mode<Return>.  Denne kommandoen
+bytter mellom av og på, også kalt "toggle the mode".
 
 >> Trykk M-x auto-fill-mode<Return> nå.  Skriv så inn en linje med
    "aoeu " inntil linjen deler seg.  Du er nødt til å putte inn
@@ -873,8 +873,8 @@
 
 Søkemetoden til Emacs er litt forskjellig fra andre søkemetoder
 implementert i de fleste andre redigeringsprogrammer på den måten at
-den er inkrementell.  Dette betyr at søket foregår mens du taster
-inn tekststrengen du skal søke etter.
+den er inkrementell.  Dette betyr at søket foregår mens du taster inn
+tekststrengen du skal søke etter.
 
 Kommandoen for å innlede et søk er C-s for å søke framover, og C-r for 
 å søke bakover.  MEN VENT!  Ikke prøv dem enda.
@@ -900,29 +900,29 @@
 forekomster vil Emacs komme med et pip og en melding om at søket
 midlertidig har feilet.  C-g vil også avbryte søket.
 
-NB:  På noen systemer vil C-s føre til at skjermen "fryses" og du
-vil ikke være istand til å utføre noen flere kommandoer.  Dette
-indikerer at en operativsystem-egenskap kalt "flytkontroll" har
-fanget opp C-s'en og ikke sendt den videre til Emacs.  For å fortsette 
-må trykke C-q.  Se da i avsnittet "Spontaneous Entry to Incremental
-Search" i Emacs-manualen for råd om hvordan dette kan avverges.
+NB: På noen systemer vil C-s føre til at skjermen "fryses" og du vil
+ikke være istand til å utføre noen flere kommandoer.  Dette indikerer
+at en operativsystem-egenskap kalt "flytkontroll" har fanget opp
+C-s'en og ikke sendt den videre til Emacs.  For å fortsette må trykke
+C-q.  Se da i avsnittet "Spontaneous Entry to Incremental Search" i
+Emacs-manualen for råd om hvordan dette kan avverges.
 
-Hvis du er inne i et inkrementellt søk og trykker <Delete> vil du legge
-merke til at den siste bokstaven i søkestrengen blir slettet og søket
-hopper tilbake til den forrige forekomsten fra søket.  Hvis du for 
-eksempel taster "m" for å søke etter den første forekomsten av "m", og
-så trykker "a" så vil markøren bevege seg til første forekomst av "ma".
-Trykk nå <Delete>.  Dette fjerner "a" fra søkestrengen, og markøren
-beveger seg tilbake til den første forekomsten av "m".
+Hvis du er inne i et inkrementellt søk og trykker <Delete> vil du
+legge merke til at den siste bokstaven i søkestrengen blir slettet og
+søket hopper tilbake til den forrige forekomsten fra søket.  Hvis du
+for eksempel taster "m" for å søke etter den første forekomsten av
+"m", og så trykker "a" så vil markøren bevege seg til første forekomst
+av "ma".  Trykk nå <Delete>.  Dette fjerner "a" fra søkestrengen, og
+markøren beveger seg tilbake til den første forekomsten av "m".
 
-Hvis du er midt i et søk og trykker en control- eller meta-kombinasjon 
+Hvis du er midt i et søk og trykker en control- eller meta-kombinasjon
 (med et par unntak: tegn som blir brukt under søkingen, slik som C-s
 og C-r), vil søket avbrytes.
 
 C-s starter et søk som leter etter enhver forekomst av søkestrengen
-ETTER markørposisjonen.  Hvis du skal søke etter en streng tidligere
-i teksten må du bruke C-r.  Alt vi har fortalt om C-s fungerer også
-for C-r, bortsett fra at retningen på søket er i motsatt retning.
+ETTER markørposisjonen.  Hvis du skal søke etter en streng tidligere i
+teksten må du bruke C-r.  Alt vi har fortalt om C-s fungerer også for
+C-r, bortsett fra at retningen på søket er i motsatt retning.
 
 
 * FLERE VINDUER
@@ -962,14 +962,13 @@
 andre vinduet.
 
 C-M-v er et eksempel på en CONTROL-META-kombinasjon.  Hvis du har
-META-tast holder du både CTRL og META nedtrykt mens du trykker v.
-Det er ikke nøye hvilken av tastene CTRL og META som trykkes først,
-fordi begge fungerer slik at de "modifiserer" de andre tastene du
-trykker.
+META-tast holder du både CTRL og META nedtrykt mens du trykker v.  Det
+er ikke nøye hvilken av tastene CTRL og META som trykkes først, fordi
+begge fungerer slik at de "modifiserer" de andre tastene du trykker.
 
 Hvis du ikke har META-tasten, og bruker ESC isteden, er rekkefølgen
 viktig.  Du må trykke ESC etterfulgt av CTRL-v, CTRL-ESC v vil ikke
-fungere.  Dette er fordi ESC er et tegn for seg selv, og fungerer ikke 
+fungere.  Dette er fordi ESC er et tegn for seg selv, og fungerer ikke
 som "modifikator".
 
 >> Tast C-x 1 (i det øverste vinduet) for å bli kvitt det nederste
@@ -990,7 +989,7 @@
    Den nye filen vil da dukke opp i det nederste vinduet.  Markøren
    blir også flyttet dit.
 
->> Tast C-x o for å gå tilbake til det øverste vinduet, og C-x 1 for å 
+>> Tast C-x o for å gå tilbake til det øverste vinduet, og C-x 1 for å
    bli kvitt det nederste igjen.
 
 
@@ -1026,7 +1025,7 @@
 som blir kalt "the Help character".
 
 For å bruke denne hjelpen taster du C-h etterfulgt av et tegn som
-forklarer hva du vil ha hjelp om.  Hvis du virkelig har rotet deg bort 
+forklarer hva du vil ha hjelp om.  Hvis du virkelig har rotet deg bort
 kan du taste C-h ? for at Emacs skal vise hvilken hjelp som er
 tilgjengelig.  Hvis du har tastet C-h og bestemmer deg for at du ikke
 vil ha noen hjelp så kan du taste C-g for å avbryte.
@@ -1058,7 +1057,7 @@
 
 >> Tast C-h k Control-p.
 
-Dette vil komme med en dokumentasjon på funksjonen og navnet i et eget 
+Dette vil komme med en dokumentasjon på funksjonen og navnet i et eget
 vindu.  For å avslutte hjelpvinduet kan du trykke q.
 
 Her er flere nyttige C-h opsjoner:
@@ -1086,8 +1085,8 @@
 -----------
 
 Husk at C-x C-c vil avslutte Emacs permanent.  For å gå midlertidig
-til et skall, slik at du senere kan komme tilbake igjen, bruker du C-z.
-(Under X vil dette minimere Emacs.)
+til et skall, slik at du senere kan komme tilbake igjen, bruker du
+C-z.  (Under X vil dette minimere Emacs.)
 
 Denne veiledningen er laget for at den skal være forståelig for nye
 brukere, så hvis det er noe som er uklart holder det ikke å synes synd
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/etc/TUTORIAL.pl	Mon Aug 13 10:07:35 2007 +0200
@@ -0,0 +1,1170 @@
+Copyright (c) 1985, 1994 Free Software Foundation, Inc.  Szczegó³y na
+koñcu pliku.
+
+Czytasz w³a¶nie krótki podrêcznik Emacsa.
+
+Polecenia Emacsa ogólnie wymagaj± wci¶niêcia klawisza CONTROL (czasami
+oznaczanego CTRL lub CTL) lub klawisza META.  Na niektórych
+klawiaturach klawisz META jest oznaczany ALT lub EDIT, albo jeszcze
+inaczej (na przyk³ad na klawiaturach firmy SUN klawisz ze znakiem karo
+na lewo od klawisza odstêpu to jest w³a¶nie META).  Je¶li nie masz
+klawisza META, mo¿esz w jego zastêpstwie u¿ywaæ ESC.  Zamiast pisaæ
+META czy CONTROL za ka¿dym razem, gdy masz przycisn±æ ten klawisz,
+u¿ywaæ bêdziemy nastêpuj±cych skrótów:
+
+ C-<znak> oznacza trzymanie klawisza CONTROL podczas
+          wciskania klawisza <znak>.  Na przyk³ad C-f bêdzie odpowiada³o
+          naci¶niêciu f, podczas gdy klawisz CONTROL by³ wci¶niêty.
+
+ M-<znak> oznacza trzymanie klawisza META wci¶niêtego podczas
+          wciskania klawisza <znak>.  Je¶li nie masz klawisza META,
+          naci¶nij i pu¶æ klawisz ESC, a potem naci¶nij
+          klawisz <znak>.
+
+Uwaga: by zakoñczyæ sesje Emacsa naci¶nij C-x C-c (dwa znaki).
+
+Znaki ">>" na lewym marginesie w dalszej czê¶ci tego podrêcznika
+oznaczaj± æwiczenia dla Ciebie.  Na przyk³ad: 
+<<Blank lines inserted here by startup of help-with-tutorial>>
+
+>>  Teraz naci¶nij C-v (nastêpny ekran), by przej¶æ na nastêpny ekran
+    podrêcznika (zrób to naciskaj±c jednocze¶nie klawisz CONTROL
+    i v).  Od tego momentu powiniene¶ robiæ to zawsze, gdy dojdziesz
+    do koñca ekranu.
+
+Zwróæ uwagê na to, ze kilka linii powtarza siê, gdy przechodzisz z
+ekranu na ekran; zachowanie to ma zapewniæ pewna ci±g³o¶æ podczas
+przesuwania siê w obrêbie pliku.
+
+Pierwsza umiejêtno¶ci±, która powiniene¶ opanowaæ, jest sposób
+przesuwania siê z miejsca na miejsce.  Ju¿ wiesz, jak przesuwaæ siê o
+jeden ekran do przodu.  By przesun±æ siê o jeden ekran do tylu,
+wci¶nij M-v (wci¶nij META i naci¶nij v, lub naci¶nij <ESC>v je¶li nie
+masz klawisza META lub EDIT).
+
+>>  Spróbuj nacisn±æ M-v, a potem C-v by przesun±æ siê w przód i w ty³
+    kilka razy.
+
+
+PODSUMOWANIE
+------------
+
+Nastêpuj±ce polecenia s± u¿yteczne do przegl±dania po jednym ekranie:
+
+	C-v	Przesuñ siê o jeden ekran do przodu
+	M-v	Przesuñ siê o jeden ekran do tylu
+	C-l	Wyczy¶æ ekran i wy¶wietl go na nowo, umieszczaj±c
+                tekst z okolic kursora w ¶rodku ekranu.
+                (Ta kombinacja to CONTROL-L, a nie CONTROL-1.)
+
+>> ZnajdŒ kursor i zapamiêtaj, jaki tekst jest w jego okolicy.
+   Naci¶nij nastêpnie C-l.
+   ZnajdŒ kursor jeszcze raz i zwróæ uwagê, ¿e znajduje 
+   siê on w okolicy tego samego tekstu.
+
+
+PODSTAWY KIEROWANIA KURSOREM
+----------------------------
+
+Przesuwanie siê z ekranu na ekran jest u¿yteczne, ale jak przej¶æ do
+okre¶lonego miejsca w obrêbie jednego ekranu?
+
+Mo¿na to zrobiæ na kilka sposobów.  Najprostszym jest u¿ycie poleceñ
+C-p, C-b, C-f oraz C-n.  Ka¿de z tych poleceñ przesuwa kursor o jeden
+wiersz lub kolumnê w okre¶lonym kierunku.  Oto schemat, który to
+obrazuje:
+
+	           Poprzednia linia, C-p
+                   (ang. previous line)
+                            :
+                            :
+       Wstecz, C-b ....  Kursor ....  Do przodu, C-f
+       (ang. back)          :         (ang. forward)    
+                            :
+                            :
+                    Nastêpna linia, C-n
+                     (ang. next line)
+
+>> Przesuñ kursor na ¶rodek schematu za pomoc± C-n lub C-p.  Naci¶nij
+   potem C-l, by zobaczyæ ca³y diagram na ¶rodku ekranu.
+
+To s± podstawowe polecenia kieruj±ce po³o¿eniem kursora, których
+bêdziesz u¿ywaæ nieustannnie, warto wiêc je zapamiêtaæ.
+
+>> Naci¶nij kilka razy C-n, by przesun±æ kursor do tej linii.
+
+>> Przesuñ siê w g³±b linii za pomoc± C-f, a potem do góry za pomoc±
+   C-p.  Zwróæ uwagê na zachowanie siê C-p, gdy kursor jest w ¶rodku
+   linii.
+
+Ka¿da linia tekstu koñczy siê znakiem nowej linii, który oddziela ja
+od nastêpnej.  Ka¿dy Twój plik powinien koñczyæ siê znakiem nowej
+linii (ale Emacs nie zmusza Ciê do tego).
+
+>> Spróbuj nacisn±æ C-b na pocz±tku linii.  Powinno to Ciê przenie¶æ
+   na koniec poprzedniej linii.  Dzieje siê tak dlatego, ¿e kursor
+   przechodzi nad znakiem nowej linii.
+
+C-f przechodzi nad znakiem nowej linii tak samo jak C-b.
+
+>> Naci¶nij kilka razy C-b, by¶ dostrzeg³, gdzie jest kursor.
+   Naci¶nij potem C-f, by wróciæ na koniec linii.  W koñcu naci¶nij
+   jeszcze raz C-f, by przej¶æ do nastêpnej linii.
+
+Gdy przesuwasz kursor poza dolna krawêdŒ ekranu, tekst za krawêdzi±
+przesuwa siê na ekran (ang. scrolling).  Dziêki temu Emacs mo¿e
+przesun±æ kursor do okre¶lonego miejsca bez umieszczania go poza
+ekranem.
+
+>> Spróbuj przesun±æ kursor poza dolna granice ekranu za pomoc± C-n i
+   zobacz co siê stanie.
+
+Je¶li przesuwanie siê o jeden znak na raz jest dla Ciebie za wolne,
+spróbuj przesuwaæ siê o s³owa.  M-f (Meta-f) przesuwa kursor do przodu
+o s³owo, a M-b przesuwa go do tylu o jedno s³owo.
+
+>> Spróbuj nacisn±æ kilka M-f i M-b.
+
+Gdy jeste¶ w ¶rodku s³owa, M-f przesuwa kursor na koniec s³owa.  Je¶li
+natomiast jeste¶ w przerwie miedzy s³owami, M-f przesuwa kursor na
+koniec nastêpnego s³owa.  M-b zachowuje siê podobnie, jak chodzi o
+ruch do ty³u.
+
+>> Naci¶nij M-f i M-b kilka razy na przemian z C-f i C-b tak, by¶
+   móg³ zauwa¿yæ dzia³anie M-f i M-b naci¶nietych w ró¿nych miejscach
+   wewn±trz i pomiêdzy s³owami.
+
+Zauwa¿ podobieñstwo pomiêdzy C-f i C-b oraz M-f i M-b.  Bardzo czêsto
+kombinacje zawieraj±ce Meta opisuj± operacje zwi±zane z jednostkami
+jêzykowymi (s³owa, zdania, akapity), podczas gdy kombinacje oparte o
+Control dzia³aj± na podstawowych jednostkach niezale¿nych od tego, co
+edytujesz (znaki, linie, itd.).
+
+Ta zale¿no¶æ stosuje siê do linii i zdañ: C-a i C-e przesuwaj± kursor
+na pocz±tek i koniec linii, a M-a i M-e przesuwaj± go na pocz±tek i
+koniec zdania.
+
+>> Naci¶nij kilka razy C-a, a potem kilka razy C-e.
+   Powtórz to z M-a, a potem z M-e.
+
+Czy zauwa¿y³e¶, ze powtarzanie C-a nic nie zmienia, natomiast powtórne
+M-a przesuwa Ciê o jedno zdanie?  Chocia¿ nie jest to do koñca
+analogiczne, wydaje siê jednak naturalne.
+
+Po³o¿enie kursora w tek¶cie okre¶lane jest mianem "punktu".
+
+Oto podsumowanie prostych poleceñ s³u¿±cych do przesuwania kursora,
+w³±cznie z operacjami dotycz±cymi s³ów i zdañ:
+
+	C-f	Do przodu o jeden znak
+	C-b	W ty³ o jeden znak
+
+	M-f	Do przodu o s³owo
+	M-b	W ty³ o s³owo
+
+	C-n	Nastêpna linia
+	C-p	Poprzednia linia
+
+	C-a	Pocz±tek linii
+	C-e	Koniec linii
+
+	M-a	W ty³ na pocz±tek zdania
+	M-e	Do przodu na koniec zdania
+
+>> Przeæwicz kilka razy wszystkie powy¿sze polecenia dla wprawy.
+   S± one najczê¶ciej u¿ywanymi poleceniami.
+
+Dwa inne wa¿ne polecenia przesuwaj±ce kursor to M-< (Meta i znak
+mniejszo¶ci), które przesuwa kursor na pocz±tek ca³ego tekstu i M->
+(Meta i znak wiêkszo¶ci), które przesuwa kursor na koniec ca³ego
+tekstu.
+
+Na wiêkszo¶ci terminali "<" jest nad przecinkiem, tak wiec musisz u¿yæ
+klawisza Shift by nacisn±æ "<".  Musisz wiec tak¿e u¿yæ Shift by
+nacisn±æ M-<.  Bez Shift by³oby to M-przecinek.
+
+>> Naci¶nij M-< by przej¶æ na pocz±tek podrêcznika.  U¿yj potem C-v
+   kilkukrotnie, by wróciæ tutaj.
+
+>> Teraz naci¶nij M->, by przej¶æ na koniec podrêcznika.  Wróæ do tego
+   miejsca za pomoc± kilkukrotnego M-v.
+
+Je¶li Twój terminal ma klawisze strza³ek, to mo¿esz ich u¿yæ do
+przesuwania kursora.  Zalecamy Ci nauczenie siê kombinacji C-b, C-f,
+C-n i C-p z trzech powodów.  Po pierwsze, dzia³aj± one na wszystkich
+typach terminali.  Po drugie, gdy ju¿ zdobêdziesz pewna praktykê w
+pos³ugiwaniu siê Emacsem, bêdzie Ci szybciej nacisn±æ te kombinacje
+ni¿ klawisze strza³ek (poniewa¿ nie wymaga to przenoszenia d³oni z
+miejsca, które zajmuj± podczas szybkiego pisania za pomoc± 10 palców).
+Po trzecie wreszcie, gdy ju¿ wyrobisz sobie zwyczaj pos³ugiwania siê
+tymi poleceniami z klawiszem Control, bêdziesz móg³ ³atwo nauczyæ siê
+innych zaawansowanych poleceñ przesuwaj±cych kursor.
+
+Wiêkszo¶æ poleceñ Emacsa akceptuje argument liczbowy; dla wiêkszo¶ci
+poleceñ s³u¿y on jako liczba powtórzeñ.  Sposób, w jaki okre¶lasz
+liczbê powtórzeñ polecenia, to naci¶niecie C-u a potem cyfr, zanim
+naci¶niesz polecenie.  Je¶li masz klawisz META (lub EDIT lub ALT),
+alternatywnym sposobem jest wciskanie klawiszy cyfr podczas
+wprowadzania argumentu liczbowego.  Zalecamy nauczenie siê metody
+klawisza C-u, poniewa¿ dzia³a ona na wszystkich terminalach.
+
+Na przyk³ad C-u 8 C-f przesuwa kursor do przodu o osiem znaków.
+	
+>> Spróbuj u¿yæ C-n i C-p z argumentem liczbowym, by przesun±æ kursor
+   do jednej z linii w pobli¿u tego zdania za pomoc± tylko jednego
+   polecenia.
+
+Wiêkszo¶æ poleceñ u¿ywa argumentu liczbowego jako liczba powtórzeñ.
+Jest kilka poleceñ, które u¿ywaj± go w inny sposób.  C-v i M-v s±
+w¶ród tych wyj±tków.  Je¶li poda siê im argument, przesuwaj± zawarto¶æ
+ekranu w gore lub w dó³ o podana liczbê linii zamiast o tyle¿ ekranów.
+Na przyk³ad C-u 4 C-v przewija ekran o 4 linie.
+
+>> Spróbuj nacisn±æ C-u 8 C-v.
+
+To powinno by³o przewin±æ ekran do góry o 8 linii.  Je¶li chcia³by¶
+przewin±æ go w dó³, mo¿esz podaæ argument przed poleceniem M-v.
+
+Je¶li u¿ywasz systemu X-Windows, prawdopodobnie po prawej stronie okna
+Emacsa znajduje siê prostok±tny obszar, nazywany po angielsku
+"scrollbar".  Za jego pomoc± mo¿esz przewijaæ tekst, u¿ywaj±c do tego
+celu myszy.
+
+>> Spróbuj nacisn±æ ¶rodkowy klawisz myszy u góry pod¶wietlonego
+   obszaru na scrollbarze.  To powinno przewin±æ tekst do miejsca
+   okre¶lonego wysoko¶ci±, na której nacisn±³e¶ klawisz myszy.
+
+>> Przesuñ mysz do miejsca oddalonego od górnego koñca scrollbaru
+   mniej wiêcej o trzy linie i naci¶nij lewy klawisz myszy kilka razy.
+
+
+* KIEROWANIE KURSOREM Z X TERMINALA
+-----------------------------------
+
+Je¶li masz X terminal, prawdopodobnie ³atwiej Ci bêdzie u¿ywaæ
+klawiszy strza³ek po prawej stronie klawiatury do kierowania kursorem.
+Klawisze strza³ek w lewo, w prawo, w górê i w dó³ dzia³aj± zgodnie z
+oczekiwaniem; odpowiadaj± one dok³adnie C-b, C-f, C-p i C-n, ale s±
+³atwiejsze do zapamiêtania.  Mo¿esz tak¿e u¿ywaæ C-lewo i C-prawo by
+przesuwaæ siê o s³owa oraz C-góra i C-dó³, by przesuwaæ siê o bloki
+(np. akapity, je¶li edytujesz tekst).  Je¶li masz klawisze oznaczone
+HOME (lub BEGIN) oraz END, zanios± Ciê one na pocz±tek i koniec linii,
+a C-home i C-end na pocz±tek i koniec pliku.  Je¶li Twoja klawiatura
+ma klawisze PgUp i PgDn, mo¿esz ich u¿yæ do przesuwania siê o jeden
+ekran za jednym razem, tak jak M-v i C-v.
+
+Wszystkie te polecenia akceptuj± argument liczbowy, jak to jest
+opisane powy¿ej.  Mo¿esz stosowaæ pewne skróty w celu wpisania tych
+argumentów: naci¶nij i trzymaj CONTROL lub META i wpisz liczbê.  Na
+przyk³ad, by przesun±æ kursor o 12 s³ów w prawo naci¶nij C-1 C-2
+C-prawo.  Zwróæ uwagê, ze jest to ³atwe do wpisania, poniewa¿ nie
+musisz puszczaæ klawisza CONTROL podczas wciskania klawiszy.
+
+
+* GDY EMACS JEST ZABLOKOWANY
+----------------------------
+
+Je¶li Emacs przestaje odpowiadaæ na Twoje polecenia, mo¿esz go
+bezpiecznie zatrzymaæ przyciskaj±c C-g.  Mo¿esz u¿yæ C-g do przerwania
+polecenia, które zabiera zbyt wiele czasu.
+
+Mo¿esz u¿yæ C-g tak¿e, by anulowaæ argument liczbowy lub pocz±tek
+polecenia, którego nie chcesz dokañczaæ.
+
+>> Napisz C-u 100 jako argument liczbowy, po czym naci¶nij C-g.  
+   Teraz naci¶nij C-f.  Powinno przesun±æ to kursor o tylko jeden
+   znak, poniewa¿ anulowa³e¶ argument za pomoc± C-g.
+
+Je¶li nacisn±³e¶ <ESC> przez pomy³kê, mo¿esz tego siê pozbyæ za pomoc±
+C-g.
+
+
+* ZABLOKOWANE POLECENIA
+-----------------------
+
+Pewne polecenia Emacsa s± "zablokowane", tak by pocz±tkuj±cy
+u¿ytkownicy nie mogli ich wywo³aæ przez przypadek.
+
+Je¶li wywo³asz jedno z zablokowanych poleceñ, Emacs wypisze komunikat
+informuj±cy o tym, co to za polecenie, i zapyta Ciê, czy chcesz je
+wywo³aæ.
+
+Je¶li naprawdê chcesz wywo³aæ to polecenie, naci¶nij spacje w
+odpowiedzi na pytanie.  Je¶li nie chcesz wywo³aæ zablokowanego
+polecenia, odpowiedz na pytanie naciskaj±c "n".
+
+>> Napisz `C-x n p' (co jest zablokowanym poleceniem) i odpowiedz "n"
+   na zadane pytanie.
+
+
+* OKNA
+------
+
+Emacs mo¿e miêæ kilka okien, ka¿de wy¶wietlaj±ce w³asny tekst.  Zwróæ
+uwagê, ze "okno" je¶li chodzi o Emacsa, nie odnosi siê do osobnego
+okienka systemu okienkowego, ale do pojedynczego panelu wewn±trz
+okienka systemu X-Windows.  (Emacs mo¿e miêæ kilka X-okien, lub
+"ramek" w terminologii Emacsa.  Opisane jest to poni¿ej.)
+
+Na tym etapie lepiej jest siê nie zag³êbiaæ w techniki wykorzystuj±ce
+kilka okien.  Powiniene¶ jedynie wiedzieæ, w jaki sposób pozbyæ siê
+nadmiaru okien, które mog± pojawiæ siê jako sk³adniki systemu pomocy
+lub wynik pewnych poleceñ.  Robi siê to w prosty sposób:
+
+	C-x 1	Jedno okno (tzn. zabij wszystkie inne okna).
+
+Kombinacja ta to Control-x, po którym wystêpuje cyfra 1.  C-x 1
+powiêksza okno, w którym jest kursor tak, by zajê³o ca³y ekran.
+Kasuje to wszystkie inne okna Emacsa.
+
+>> Przesuñ kursor do tej linii i naci¶nij C-u 0 C-l.
+
+(C-l, jak pamiêtasz od¶wie¿a zawarto¶æ ekranu.  Je¶li poda siê temu
+poleceniu argument liczbowy, bêdzie to oznacza³o "od¶wie¿ zawarto¶æ
+ekranu i umie¶æ bie¿±ca linie o tyle linii od góry ekranu".  Tak wiec
+C-u 0 C-1 oznacza "od¶wie¿ ekran, umieszczaj±c bie¿±ca linie na samej
+górze".)
+
+>> Naci¶nij Control-x 2
+   Zauwa¿ jak okno siê kurczy, podczas gdy nowe okno pojawia siê,
+   wy¶wietlaj±c zawarto¶æ tego bufora.
+
+>> Naci¶nij C-x 1 i nowe okno zniknie.
+
+
+* WSTAWIANIE I USUWANIE
+-----------------------
+
+Je¶li chcesz wstawiaæ tekst, po prostu go napisz.  Znaki, które da siê
+wy¶wietliæ, takie jak A, 7, *, itd, Emacs traktuje jako tekst i
+wstawia natychmiast do bufora.  Naci¶nij <Return> (znak powrotu
+karetki), by wstawiæ znak nowej linii.
+
+Ostatni znak, który napisa³e¶ mo¿esz skasowaæ przez naci¶niecie
+klawisza <Delete>.  Klawisz ten mo¿e byæ oznaczony "Del".  W pewnych
+wypadkach klawisz "Backspace" mo¿e s³u¿yæ za <Delete>, ale nie jest to
+regu³±!
+
+Ogólniej, <Delete> usuwa znak bezpo¶rednio przed bie¿±ca pozycj±
+kursora.
+
+>> Zrób to teraz: wstaw kilka znaków, po czym usuñ je za pomaca
+   kilkukrotnego naci¶niêcia <Delete>.  Nie przejmuj siê tym, 
+   ¿e zmieniasz ten plik; nie zmienisz w ten sposób g³ównego pliku
+   podrêcznika.  To jest Twoja w³asna kopia.
+
+Gdy linia tekstu staje siê zbyt d³uga, by zmie¶ciæ siê w jednym
+wierszu na ekranie, jest ona "kontynuowana" w nastêpnym wierszu
+ekranu.  Znak "backslash" (`\') na prawym marginesie pozwala Ci
+rozpoznaæ takie linie.
+
+>> Wpisuj jaki¶ tekst tak d³ugo, a¿ dojdziesz do prawego marginesu, i
+   potem nie przestawaj.  Zauwa¿ysz, ze pojawi siê linia kontynuacji.
+
+>> U¿yj <Delete> by usun±æ tekst tak, by linia znowu
+   mie¶ci³a siê na ekranie.  Linia kontynuacji zniknie.
+
+Znak nowej linii mo¿e byæ kasowany tak, jak ka¿dy inny znak.
+Usuniecie znaku nowej linii ³±czy je w jedna.  Je¶li powsta³a w wyniku
+tego linia jest zbyt d³uga, by zmie¶ciæ siê na szeroko¶æ ekranu,
+zostanie ona wy¶wietlona z lini± kontynuacji.
+
+>> Przesuñ kursor na pocz±tek linii i naci¶nij <Delete>.  Bie¿±ca
+   linia zostanie po³±czona z poprzednia.
+
+>> Naci¶nij <Return>, by z powrotem wstawiæ znak nowej linii, który
+   skasowa³e¶.
+
+Pamiêtaj, ze wiêkszo¶æ poleceñ Emacsa mo¿e zostaæ wywo³anych z
+parametrem liczby powtórzeñ; dotyczy to tak¿e znaków tekstu.  Argument
+liczbowy powoduje wstawienie znaku kilkukrotnie.
+
+>>  Spróbuj zrobiæ to teraz -- naci¶nij C-u 8 * by uzyskaæ ********.
+
+Nauczy³e¶ siê ju¿ wiêkszej czê¶ci podstawowych sposobów pisania oraz
+poprawiania b³êdów.  W Emacsie mo¿esz usuwaæ równie¿ cale s³owa lub
+cale linie.  Oto podsumowanie operacji usuwania znaków:
+
+	<Delete>     usuñ znak bezpo¶rednio przed kursorem
+	C-d          usuñ znak bezpo¶rednio za kursorem
+
+	M-<Delete>   wytnij s³owo bezpo¶rednio przed kursorem
+	M-d          wytnij nastêpne s³owo bezpo¶rednio za kursorem
+
+	C-k          wytnij zawarto¶æ linii od kursora do jej koñca
+	M-k          wytnij wszystkie znaki od kursora do koñca zdania
+
+Zauwa¿, ze <Delete> i C-d w po³±czeniu z M-<Delete> i M-d rozszerzaj±
+regule rozpoczêt± przez C-f i M-f (Có¿, <Delete> tak naprawdê nie
+wymaga wci¶niêcia Control, ale pomiñmy to milczeniem).  C-k i M-k s±
+podobne do C-e i M-e w sensie, ¿e linie s± odpowiednikami zdañ.
+
+Gdy usuwasz wiêcej ni¿ jeden znak naraz, Emacs zachowuje usuniêty
+tekst tak, by¶ móg³ go gdzie¶ wstawiæ z powrotem.  Wstawianie
+usuniêtego tekstu to "wklejanie".  Mo¿esz wklejaæ usuniêty tekst b±dŒ
+to w to samo miejsce, z którego zosta³ usuniêty, b±dŒ to w inne
+miejsca.  Ten sam tekst mo¿esz wklejaæ kilkukrotnie, w celu uzyskania
+wielu kopii.  Poleceniem, które wkleja tekst jest C-y.
+
+Zauwa¿ ró¿nicê pomiêdzy "wycinaniem" i "usuwaniem", polegaj±c± na tym,
+ze wyciête rzeczy mog± byæ wklejone na nowo, natomiast usuniête nie.
+W ogólno¶ci, polecenia, które kasuj± du¿o tekstu zachowuj± go, podczas
+gdy polecenia, które usuwaj± po prostu jeden znak lub puste linie i
+przerwy, nie zachowuj± usuniêtego tekstu.
+
+>> Przesuñ kursor na pocz±tek linii, która nie jest pusta.  Naci¶nij
+   C-k, by wyci±æ tekst z tej linii.
+
+>> Naci¶nij C-k jeszcze raz.  Zauwa¿, ze wycina to znak nowej linii,
+   który znajduje siê za ta linia.
+
+Zwróæ uwagê, ze pojedyncze C-k wycina zawarto¶æ linii, a powtórne C-k
+wycina sam± linie tak, ¿e pozosta³e linie przesuwaj± siê do góry.  C-k
+traktuje argument liczbowy w specjalny sposób: wycina ono tyle linii
+ORAZ ich zawarto¶æ.  To nie jest samo powtarzanie kilka razy C-k.  C-u
+2 C-k wycina dwie linie i ich znaki nowej linii; dwukrotne naci¶niecie
+C-k nie zrobi³oby tego.
+
+By odzyskaæ ostatnio wyciêty tekst i wstawiæ go w miejsce kursora,
+naci¶nij C-y.
+
+>> Twoja kolej.  Naci¶nij C-y, by z powrotem wstawiæ tekst.
+
+Zwróæ uwagê, ze je¶li naci¶niesz C-k kilka razy pod rz±d, ca³y wyciêty
+tekst jest zachowywany w jednym kawa³ku tak, ¿e jedno C-y wklei
+wszystkie linie.
+
+>> Naci¶nij C-k kilka razy.
+
+By odzyskaæ ten wyciêty tekst...
+
+>> ...naci¶nij C-y.  Przesuñ potem kursor o kilka linii w dó³ i
+   naci¶nij C-y jeszcze raz.  Widzisz, ze wstawia to ten sam tekst.
+
+Co zrobiæ, je¶li chcesz wstawiæ tekst, który wcze¶niej wyci±³e¶, a
+potem wycinasz cos innego?  C-y wstawia tekst ostatnio wyciêty.
+Poprzedni fragment nie jest jednak stracony.  Mo¿esz wróciæ do niego,
+u¿ywaj±c polecenia M-y.  Po tym, jak naci¶niesz C-y, by wstawiæ
+ostatnio wyciêty tekst, naci¶niecie M-y zastêpuje wstawiony tekst
+poprzednio wyciêtym.  Dalsze naciskanie M-y przywo³uje coraz
+wcze¶niejsze fragmenty tekstu.  Gdy dojdziesz do tekstu, którego
+szuka³e¶, nie musisz robiæ nic, by zosta³ on we w³a¶ciwym miejscu.  Po
+prostu kontynuuj edycjê tekstu, pozostawiaj±c wklejony tekst tam,
+gdzie siê znajduje.
+
+Je¶li bêdziesz naciska³ M-y wystarczaj±co wiele razy, dojdziesz do
+punktu, z którego wystartowa³e¶ (tekst ostatnio wyciêty).
+
+>> Wytnij jak±¶ line, zmieñ pozycjê kursora i wytnij inna.  Naci¶nij
+   potem C-y by wstawiæ druga z wyciêtych linii.  Potem naci¶nij M-y,
+   i linia ta zostanie zast±piona przez ta pierwsza.  Naci¶nij M-y
+   jeszcze kilka razy, by zobaczyæ co siê dzieje.  Powtarzaj to tak
+   d³ugo, a¿ druga z linii pojawi siê z powrotem.  Je¶li chcesz,
+   mo¿esz pod±æ M-y dodatnie i ujemne argumenty.
+
+
+* COFNIJ
+--------
+
+Je¶li wprowadzisz zmiany do tekstu, a potem dojdziesz do wniosku, ¿e
+to by³a pomy³ka, mo¿esz cofn±æ te zmiany za pomoc± polecenia "cofnij"
+(ang. undo), C-x u.
+
+C-x u cofa zmiany wprowadzone przez jedno polecenie; je¶li powtórzysz
+C-x u kilka razy pod rz±d, ka¿de powtórzenie cofa koleje polecenie.
+
+Od tej regu³y s± dwa wyj±tki: polecenia, które nie zmieniaj± tekstu
+nie licz± siê jako polecenia, które mo¿na cofn±æ (zarówno przesuniêcia
+kursora, jak i przewijanie tekstu), oraz znaki wstawiane do tekstu
+(np.  litery) ³±czone s± w grupy do 20.  (Ma to na celu zredukowanie
+liczby naci¶niêæ C-x u, które musia³by¶ wykonaæ, by cofn±æ wstawianie
+tekstu.)
+
+>> Wytnij te linie za pomoc± C-k, a potem naci¶nij C-x u i linia
+   powinna pojawiæ siê tu z powrotem.
+
+C-_ jest innym sposobem wywo³ania polecenia "cofnij"; dzia³a to
+dok³adnie tak samo jak C-x u, jest jedynie ³atwiejsze do naci¶niêcia
+kilka razy pod rz±d.  Wada C-_ jest to, ze nie jest to oczywiste w
+jaki sposób nacisn±æ te kombinacje na niektórych klawiaturach.  To
+w³a¶nie dlatego C-x u jest tak¿e dostêpne.  Na niektórych terminalach
+mo¿esz nacisn±æ C-_ poprzez przytrzymanie CTRL i naci¶niecie /.
+
+Argument liczbowy podany przed C-_ lub C-x u okre¶la liczbê powtórzeñ
+tego polecenia.
+
+
+* PLIKI
+-------
+
+Aby edytowny przez Ciebie tekst zosta³ nma trwa³e zachowany, musisz
+umie¶ciæ go w pliku.  W przeciwnym wypadku zniknie on, gdy Emacs w
+którym go edytowa³e¶ zostanie zamkniêty.  Zachowywanie Twojego tekstu
+w pliku nazywane bywa "odwiedzaniem" lub "znajdywaniem" pliku (ang.
+"visiting" lub "finding").
+
+Odwiedzanie pliku oznacza, ¿e jego zawarto¶æ zostaje wy¶wietlona w
+Emacsie.  Bardzo czêsto sprowadza siê to do edycji samego pliku.
+Jednak¿e zmiany, które wprowadzasz nie s± trwa³e do momentu, w którym
+"zachowasz" plik (ang. save).  Zapobiega to sytuacji, w której
+zostawiasz w systemie plik, który zosta³ tylko w po³owie zmieniony, a
+tego nie chcesz zrobiæ.  Nawet wtedy, gdy zachowujesz plik, Emacs
+zostawia orygina³ zachowany pod inna nazwa na wypadek, gdyby¶ doszed³
+do wniosku, ¿e wprowadzone zmiany by³y b³êdne.
+
+Je¶li popatrzysz na dó³ ekranu, zauwa¿ysz linie, która zaczyna i
+koñczy siê my¶lnikami i zawiera tekst "XEmacs: TUTORIAL".  W tej
+czê¶ci ekranu zawsze mo¿esz znaleŒæ nazwê pliku, który w³a¶nie
+odwiedzasz.  W tej chwili odwiedzasz plik o nazwie "TUTORIAL", który
+jest Twoja w³asn± kopi± podrêcznika Emacsa.  Obojêtnie jaki plik
+odwiedzisz, jego nazwa pojawi siê dok³adnie w tym miejscu.
+
+Polecenia, które s³u¿± do odwiedzania i zachowywania plików ró¿ni± siê
+od innych poleceñ, które pozna³e¶ tym, ¿e sk³adaj± siê one z dwóch
+znaków.  Obydwa zaczynaj± siê od znaku Control-x.  Jest mnóstwo
+poleceñ, które zaczynaj± siê od tego w³a¶nie znaku; wiele z nich
+dotyczy plików, buforów i z tym zwi±zanych rzeczy.  Polecenia te maj±
+d³ugo¶æ dwóch, trzech lub czterech znaków.
+
+Kolejn± nowa rzecz± odno¶nie polecenia odwiedzania pliku jest to, ¿e
+musisz mu pod±æ nazwê pliku, który chcesz znaleŒæ.  Mówimy o tym, ¿e
+polecenie "czyta argument z terminala" (w tym wypadku argument jest
+nazwa pliku).  Po tym, gdy wpiszesz polecenie
+
+	C-x C-f   znajdŒ plik (ang. find a file)
+
+Emacs poprosi Ciê o wpisanie nazwy pliku.  Nazwa ta pojawia siê w
+dolnej linii ekranu.  Liniê tê nazywa siê "minibuforem" (ang.
+"minibuffer") wtedy, gdy jest u¿ywana do wprowadzania tego typu
+danych.  Do edycji nazwy pliku u¿ywasz zwyk³ych poleceñ Emacsa.
+
+Wprowadzanie nazwy pliku (lub jakichkolwiek innych danych w
+minibuforze) mo¿e zostaæ anulowane za pomoc± C-g.
+
+>> Naci¶nij C-x C-f, po czym naci¶nij C-g.  Na skutek tego zniknie
+   minibufor oraz przerwane zostanie polecenie C-x C-f, które tego
+   minibufora u¿ywa³o.  W rezultacie wiêc nie odwiedzisz ¿adnego
+   pliku.
+
+Gdy skoñczysz wpisywaæ nazwê pliku, naci¶nij <Return>, po czym
+polecenie C-x C-f zabierze siê do roboty i znajdzie plik, który
+wybra³e¶.  Minibufor znika z chwil± zakoñczenia wykonywania polecenia
+C-x C-f.
+
+Po chwili zawarto¶æ pliku pojawia siê na ekranie i mo¿esz j± edytowaæ.
+Gdy chcesz zachowaæ zmiany, tak by je utrwaliæ, wydaj polecenie
+
+	C-x C-s   zachowaj plik (ang. save).
+
+Kopiuje to tekst z Emacsa do pliku.  Za pierwszym razem gdy to robisz
+Emacs zmienia nazwê oryginalnego pliku poprzez dodanie "~" na koñcu
+jego nazwy.
+
+Gdy zachowywanie skoñczy siê, Emacs wypisuje nazwê zapisanego pliku.
+Pliki powiniene¶ zachowywaæ stosunkowo czêsto, tak by nie straciæ za
+du¿o w przypadku za³amania systemu.
+
+>> Naci¶nij C-x C-s by zachowaæ swoja kopie podrêcznika.  Emacs
+   powinien wypisaæ "Wrote ...TUTORIAL" na dole ekranu.
+
+UWAGA: W niektórych systemach naci¶niecie C-x C-s zamrozi ekran i nie
+zobaczysz ¿adnego tekstu z Emacsa.  Oznacza to, ¿e sk³adowa systemu
+operacyjnego, zwana kontrol± przep³ywu (ang. flow control)
+przechwyci³a C-s i nie pozwoli³a mu doj¶æ do Emacsa.  By odzyskaæ
+kontrole nad ekranem, naci¶nij C-q.  Dodatkowej pomocy poszukaj w
+rozdziale "Spontaneous Entry to Incremental Search" w podrêczniku
+Emacsa.
+
+Mo¿esz odwiedziæ istniej±ce pliki w celu ich edycji lub czytania.
+Mo¿esz tak¿e odwiedziæ plik, który jeszcze nie istnieje.  W ten
+w³a¶nie sposób tworzy siê w Emacsie nowe pliki: odwiedŒ plik, co da Ci
+nowe puste miejsce, a potem zacznij wstawiaæ tekst.  Gdy za¿±dasz
+zachowania pliku, wtedy Emacs naprawdê utworzy plik z tekstem, który
+wpisa³e¶.  Od tego momentu mo¿esz uwa¿aæ, ¿e edytujesz istniej±cy
+plik.
+
+
+* BUFORY
+--------
+
+Je¶li odwiedzisz inny plik za pomoc± C-x C-f, poprzedni plik pozostaje
+w Emacsie.  Mo¿esz prze³±czyæ siê do niego, odwiedzaj±c go jeszcze raz
+za pomoc± C-x C-f.  W ten sposób mo¿esz w Emacsie miêæ ca³kiem du¿o
+plików.
+
+>> Utwórz plik o nazwie "foo" za pomoc± C-x C-f foo <Return>.
+   Wpisz w niego jaki¶ tekst i zachowaj "foo" za pomoc± C-x C-s.
+   W koñcu napisz C-x C-f TUTORIAL <Return>, by wróciæ do podrêcznika.
+
+Emacs przechowuje tekst ka¿dego pliku w obiekcie, zwanym "buforem".
+Odwiedzenie pliku tworzy nowy bufor wewn±trz Emacsa.  By zobaczyæ
+listê buforów, które istniej± w Twoim Emacsie, naci¶nij
+
+	C-x C-b   lista buforów (ang. list buffers).
+
+>> Naci¶nij C-x C-b.
+
+Zwróæ uwagê, ze ka¿dy bufor ma w³asn± nazwê, mo¿e tak¿e mieæ
+skojarzon± z sob± nazwê pliku, który zawiera.  Pewne bufory nie
+odpowiadaj± ¿adnym plikom.  Na przyk³ad bufor "*Buffer List*" nie
+odwiedza ¿adnego pliku.  Jest to bufor, który zawiera listê buforów
+stworzona przez Twoje naci¶niecie C-x C-b.  DOWOLNY tekst, który
+ogl±dasz w oknie Emacsa jest zawsze czê¶ci± jakiego¶ bufora.
+
+>> Naci¶nij C-x 1 by pozbyæ siê listy buforów.
+
+Je¶li dokonujesz zmian tekstu w jakim¶ pliku, a potem odwiedzisz inny
+plik, zawarto¶æ tego pierwszego NIE jest automatycznie zachowywana.
+Zmiany, które wprowadzi³e¶ pozostaj± w Emacsie, w buforze tego¿ pliku.
+Tworzenie czy edytowanie innego bufora nie ma ¿adnego wp³ywu na ten
+pierwszy.  Jest to bardzo przydatne, ale oznacza tak¿e, ¿e potrzebny
+jest Ci wygodny sposób zachowywania zawarto¶ci Twoich buforów.
+Prze³±czanie siê z powrotem do pierwszego bufora zawsze przy
+wykonywaniu C-x C-f tylko po to, by nacisn±æ tam C-x C-s by³oby
+niewygodne.  Dlatego istnieje polecenie:
+
+	C-x s     Zachowaj bufory (ang. save some buffers)
+
+C-x s pyta Ciê, czy chcesz zachowaæ ka¿dy z buforów, w którym
+dokona³e¶ pewnych nie zachowanych jeszcze zmian.
+
+>> Wstaw jak±¶ liniê tekstu, a potem naci¶nij C-x s.
+   Powiniene¶ zostaæ zapytany o to, czy chcesz zachowaæ bufor
+   TUTORIAL.  Odpowiedz na to pytanie twierdz±co naciskaj±c "y".
+
+* U¯YWANIE MENU
+---------------
+
+Je¶li siedzisz przy X-terminalu zauwa¿ysz u góry okna Emacsa pasek
+menu.  Mo¿esz u¿ywaæ menu by dotrzeæ do najpopularniejszych poleceñ
+Emacsa, takich jak "find file".  Na pocz±tku bêdziesz s±dzi³, ze jest
+to ³atwiejsze ni¿ klawiatura, poniewa¿ nie musisz uczyæ siê na pamiêæ
+kombinacji klawiszy uruchamiaj±cych jakie¶ polecenie.  Gdy ju¿
+zaznajomisz siê z Emacsem, bêdziesz móg³ zacz±æ uczyæ siê klawiszy ---
+elementy menu pokazuj± kombinacje klawiszy, która wywo³uje dane
+polecenie.
+
+Zwróæ uwagê, ze pewne polecenia w menu nie maja jednoznacznych
+odpowiedników klawiszowych.  Na przyk³ad menu "Buffers" zawiera listê
+wszystkich dostêpnych buforów.  Mo¿esz prze³±czyæ siê do dowolnego z
+nich wybieraj±c jego nazwê z menu Buffers.
+
+
+* U¯YWANIE MYSZY
+----------------
+
+Emacs potrafi w pe³ni wykorzystywaæ mysz, je¶li tylko jest uruchomiony
+pod X-Windows.  Mo¿esz zmieniaæ pozycje kursora poprzez naci¶niecie
+lewego klawisza myszy w po¿±danym miejscu, mo¿esz tak¿e zaznaczaæ
+tekst przez przesuniecie myszy z wci¶niêtym lewym klawiszem nad
+tekstem, który chcesz zaznaczyæ.  (Innym sposobem jest klikniêcie na
+jednym z koñców obszaru, przesuniêcie myszy na drugi koniec i
+klikniêcie tam z jednoczesnym wci¶niêciem klawisza Shift.)
+
+By wyci±æ zaznaczony tekst mo¿esz nacisn±æ C-w lub wybraæ Cut z menu
+Edit.  Zwróæ uwagê na to, ze *nie* s± to równowa¿ne polecenia: C-w
+zapamiêtuje zaznaczony tekst tylko wewn±trz Emacsa (podobnie jak
+omówione powy¿ej C-k), natomiast Cut robi to oraz umieszcza ten tekst
+w schowku systemu X, sk±d mo¿e on zostaæ pobrany przez inne programy.
+
+By wkleiæ tekst ze schowka systemu X-Windows u¿yj polecenia Paste z
+menu Edit.
+
+Šrodkowy klawisz myszy jest czêsto u¿ywany do wybierania elementów,
+które s± wy¶wietlone na ekranie.  Na przyk³ad, je¶li uruchomisz Info
+(system dokumentacji Emacsa) naciskaj±c C-h i, lub wybieraj±c ten
+element z menu Help, przej¶cie pod¶wietlonym po³±czeniem (ang. link)
+odbywa siê poprzez naci¶niecie ¶rodkowego klawisza myszy.  Podobnie,
+je¶li wpisujesz nazwê pliku (np. podczas wykonywania "Find File") i
+naci¶niesz TAB, by zobaczyæ wszystkie mo¿liwe dokoñczenia nazwy,
+mo¿esz wybraæ jedno z nich z wy¶wietlonej listy, w³a¶nie naciskaj±c
+¶rodkowy klawisz myszy.
+
+Prawy klawisz myszy pokazuje lokalne menu.  Zawarto¶æ tego menu zale¿y
+od trybu pracy Emacsa, w którym aktualnie jeste¶, i zawiera kilka
+czêsto u¿ywanych poleceñ, tak by by³y one ³atwiejsze w dostêpie.
+
+>> Naci¶nij prawy klawisz myszy
+
+Prawy klawisz myszy musi byæ trzymany, by menu nie znik³o
+automatycznie.
+
+
+* ROZSZERZANIE ZESTAWU POLECEN
+------------------------------
+
+Poleceñ Emacsa jest du¿o du¿o wiêcej, ni¿ mo¿na by skojarzyæ
+kombinacjami zwyk³ych klawiszy oraz META czy CTRL.  Emacs radzi sobie
+z tym za pomoc± polecenia X (ang. eXtend).  Istniej± jego dwa rodzaje:
+
+	C-x	Rozszerzenie o znak.  Nastêpuje po nim jeden znak.
+	M-x	Rozszerzenie o nazwane polecenie.  Nastêpuje po nim
+                pe³na d³uga nazwa polecenia.  
+
+Polecenia te w ogólno¶ci s± u¿yteczne, ale s± u¿ywane nie tak czêsto
+jak polecenia, których ju¿ siê nauczy³e¶.  Mia³e¶ ju¿ okazje poznaæ
+dwa z nich: C-x C-f s³u¿±ce do odwiedzania plików oraz C-x C-s do ich
+zachowywania.  Innym przyk³adem mo¿e byæ polecenie, które koñczy sesje
+Emacsa C-x C-c.  (Nie martw siê, ze mo¿esz w ten sposób straciæ
+zmiany, które dokona³e¶; C-x C-c oferuje Ci mo¿liwo¶æ zachowania
+ka¿dego ze zmodyfikowanych plików przed zamkniêciem Emacsa.)
+
+C-z jest poleceniem, które wychodzi z Emacsa *na chwile*, tak by¶ móg³
+wróciæ do tej samej sesji Emacsa po jakim¶ czasie.
+
+W systemach, w których jest to mo¿liwe, C-z zawiesza proces Emacsa;
+powoduje to powrót do pow³oki (ang.  shell), ale nie niszczy Emacsa.
+W najpopularniejszych pow³okach mo¿esz wróciæ do Emacsa za pomoc±
+polecenia `fg' lub `%emacs'.
+
+W systemach, w których zawieszanie procesów nie dzia³a, C-z tworzy
+proces podpow³oki (ang. "subshell"), który dzia³a pod Emacsem i daje
+Ci szansê uruchamiania innych programów i powrotu do Emacsa po ich
+skoñczeniu; w tych systemach C-z nie wychodzi naprawdê z Emacsa.  W
+tych wypadkach normalnym poleceniem powrotu do Emacsa jest wyj¶cie z
+podpow³oki za pomoc± "exit".
+
+Polecenia C-x C-c powiniene¶ u¿ywaæ, gdy masz siê wylogowaæ.  Zalecane
+jest tak¿e wychodzenie z Emacsa wystartowanego przez np. programy
+obs³uguj±ce pocztê elektroniczna lub innego rodzaju narzêdzia,
+poniewa¿ mog± one nie wiedzieæ jak sobie poradziæ z zawieszeniem
+Emacsa.  Jednak¿e w zwyk³ych okoliczno¶ciach, je¶li nie musisz
+wylogowywaæ siê z systemu, lepiej jest zawiesiæ Emacsa za pomoc± C-z
+ni¿ z niego wyj¶æ.
+
+Istnieje wiele poleceñ zaczynaj±cych siê od C-x.  Oto lista tych,
+których siê ju¿ nauczy³e¶:
+
+	C-x C-f           odwiedŒ plik
+	C-x C-s           zachowaj plik
+	C-x C-b           wy¶wietl listê buforów
+	C-x C-c           wyjdŒ z Emacsa
+	C-x u             cofnij
+
+Poleceñ podawanych za pomoc± nazwy u¿ywa siê jeszcze rzadziej lub
+u¿ywa siê tylko w pewnych trybach.  Przyk³adem mo¿e byæ polecenie
+replace-string, które globalnie zastêpuje jeden ³añcuch innym.  Gdy
+naciskasz M-x, Emacs czeka na ci±g dalszy, wy¶wietlaj±c "M-x" na dole
+ekranu.  Powiniene¶ po tym wpisaæ nazwê polecenia, w tym wypadku
+"replace-string".  Napisz tylko "repl s<TAB>", a Emacs dokoñczy nazwê.
+Zakoñcz wprowadzanie nazwy przez naci¶niecie klawisza <Return>.
+
+Polecenie replace-string wymaga dwóch argumentów: ³añcucha, który ma
+zostaæ zastêpowany i ³añcucha, który ma byæ wstawiony w miejsce tego¿.
+Obydwa ³añcuchy musza byæ zakoñczone przyci¶niêciem <Return>.
+
+>> Przesuñ kursor do czystej linii, dwie linie poni¿ej tej.
+   Naci¶nij M-x repl s<Return>zmieni<Return>zmodyfikuje<Return>.
+
+Zwróæ uwagê na to, jak ta linia siê zmieni: zast±pi³e¶ s³owem
+"zmodyfikuje" ka¿de wyst±pienie s³owa z-m-i-e-n-i poni¿ej pocz±tkowej
+pozycji kursora.
+
+
+* AUTOMATYCZNE ZACHOWYWANIE
+---------------------------
+
+Gdy wprowadzisz zmiany do pliku i ich nie zachowasz, mog± one zostaæ
+stracone, je¶li Twój komputer przestanie dzia³aæ.  By uchroniæ Ciê
+przed tym, Emacs okresowo zapisuje specjalny plik z wprowadzonymi
+zmianami.  Plik ten ma znak # na pocz±tku i na koñcu swojej nazwy.  Na
+przyk³ad, za³ó¿my, ze Twój plik nazywa siê "hello.c".  Odpowiadaj±cy
+mu plik automatycznie zachowywany bêdzie nosi³ nazwê "#hello.c#".  Gdy
+zachowujesz plik w zwyk³y sposób, Emacs kasuje plik automatycznie
+zachowany.
+
+Je¶li Twój komputer przestanie dzia³aæ, mo¿esz odzyskaæ Twoje dane z
+pliku automatycznie zachowanego przez zwykle odwiedzenie pliku (tego,
+który edytowa³e¶, a nie pliku automatycznie zachowanego) i napisanie
+M-x recover file<return>.  Gdy Emacs zapyta o potwierdzenie, napisz
+yes<return> by odzyskaæ dane, które zosta³y automatycznie zachowane.
+
+
+* OBSZAR ECHA
+-------------
+
+Je¶li polecenia dla Emacsa wpisujesz dostatecznie wolno, zostan± one
+pokazywane w specjalnym obszarze na dole ekranu, zwanym obszarem echa
+(ang. echo area).  Obszar echa zawiera ostatnia dolna linie ekranu.
+
+
+* LINIA STANU
+-------------
+
+Linia, która znajduje siê bezpo¶rednio nad obszarem echa, zwana jest
+"lini± trybu" (ang. modeline).  Pokazuje ona tekst podobny do
+nastêpuj±cego:
+
+--**-XEmacs: TUTORIAL         (Fundamental)--L670--58%----------------
+
+Linia ta podaje u¿yteczne informacje o stanie Emacsa i tekstu, który
+edytujesz.  Wiesz ju¿, jakie jest znaczenie nazwy pliku: jest to plik,
+który odwiedzi³e¶.  --NN%-- opisuje Twoja bie¿±c± pozycje wewn±trz
+tekstu; oznacza to, ¿e NN procent tekstu znajduje siê ponad górnym
+brzegiem ekranu.  Je¶li pocz±tek pliku znajduje siê na pocz±tku
+ekranu, zamiast liczby --00%-- zobaczysz w tym miejscu --Top--.
+Podobnie dla koñca tekstu pojawi siê tam napis --Bot-- (od
+ang. bottom).  Je¶li wy¶wietlasz tekst na tyle krótki, ze mie¶ci siê w
+ca³o¶ci na ekranie, linia stanu poka¿e --All--.
+
+Gwiazdki blisko pocz±tku linii trybu oznaczaj±, ze wprowadzi³e¶ do
+tekstu jakie¶ zmiany.  Bezpo¶rednio po odwiedzeniu lub po zachowaniu
+pliku nie bêdzie w tym miejscu ¿adnych gwiazdek, a tylko my¶lniki.
+
+Wewn±trz nawiasów znajdziesz informacje na temat trybu edycji, w
+którym w³a¶nie jest Emacs.  Domy¶lnym trybem edycji jest tryb
+podstawowy (ang. fundamental), który jest trybem (w³a¶nie w tej chwili
+u¿ywanym--) u¿ywanym w³a¶nie w tej chwili.  Jest to przyk³ad "trybu
+g³ównego" (ang. major mode).
+
+Emacs mo¿e dzia³aæ w wielu trybach g³ównych.  Pewne z nich zosta³y
+zaprojektowane do edycji rozmaitych jêzyków i/lub rodzajów tekstu,
+takie jak tryb Lispu, tryb tekstowy, itd.  W danej chwili mo¿e byæ
+aktywny tylko jeden g³ówny tryb pracy, i to jego nazwa jest
+wy¶wietlana w linii trybu w miejscu, w którym teraz jest
+"Fundamental".
+
+Ka¿dy z g³ównych trybów edycyjnych mo¿e zmieniæ zachowanie niektórych
+poleceñ.  Na przyk³ad, w Emacsie istniej± polecenia s³u¿±ce do
+tworzenia komentarzy w programach.  Ka¿dy jêzyk programowania na swój
+sposób okre¶la, jak powinien wygl±daæ komentarz, tak wiec ka¿dy z
+g³ównych trybów edycyjnych musi wstawiaæ komentarze w specyficzny
+sposób.  Ka¿dy tryb edycyjny jest nazw± polecenia, które mo¿esz
+wykonaæ, by prze³±czyæ siê w ten tryb lub wy³±czyæ ten tryb.
+Przyk³adem mo¿e byæ M-x fundamental-mode, które jest poleceniem
+prze³±czaj±cym tryb podstawowy.
+
+Je¶li zamierzasz edytowaæ tekst w jêzyku angielskim, taki jak na
+przyk³ad oryginalna wersja tego podrêcznika, prawdopodobnie powiniene¶
+u¿ywaæ trybu tekstowego (ang. text mode).
+
+>> Napisz M-x text-mode<Return>.
+
+Nie musisz siê martwiæ, ¿adne z poleceñ, które do tej pory pozna³e¶,
+nie zmienia Emacsa w powa¿ny sposób.  Mo¿esz jednak zauwa¿yæ, ze teraz
+M-f i M-b traktuj± apostrofy jako czê¶ci s³ów.  Poprzednio, w trybie
+podstawowym, polecenia te traktowa³y apostrofy jako separatory s³ów.
+
+G³ówne tryby edycji wprowadzaj± zwykle subtelne zmiany, takie jak
+opisana powy¿ej: wiêkszo¶æ poleceñ robi dalej "to samo", robi to
+jednak w sposób troszeczkê inny.
+
+By zobaczyæ dokumentacjê na temat bie¿±cego g³ównego trybu edycji,
+naci¶nij C-h m.
+
+>> Naci¶nij C-u C-v raz lub wiêcej razy tak, by ta linia znalaz³a siê
+   blisko góry ekranu.
+
+>> Naci¶nij C-h m, by zobaczyæ jak tryb tekstowy ró¿ni siê od trybu
+   podstawowego. 
+
+>> Naci¶nij q, by usun±æ dokumentacje z ekranu.
+
+G³ówne tryby edycji nazywaj± siê "g³ównymi", poniewa¿ s± tak¿e
+podrzêdne tryby edycji (ang. minor modes).  Podrzêdne tryby edycji nie
+s± alternatyw± dla g³ównych trybów edycji, a jedynie ich niewielk±
+modyfikacj±.  Ka¿dy podrzêdny tryb edycji mo¿e zostaæ w³±czony lub
+wy³±czony niezale¿nie od pozosta³ych podrzêdnych trybów edycji oraz
+niezale¿nie od g³ównego trybu edycji.  Mo¿esz wiec u¿ywaæ jednego,
+kombinacji dowolnych, lub nie u¿ywaæ ¿adnego trybu podrzêdnego.
+
+Jednym z podrzêdnych trybów edycji, który jest bardzo u¿yteczny
+szczególnie do edycji tekstu angielskiego, jest tryb automatycznego
+wype³niania (ang. auto fill mode).  Je¶li ten tryb jest w³±czony,
+Emacs lamie linie pomiêdzy s³owami automatycznie, gdy wstawiasz tekst
+i linia robi siê za szeroka.
+
+Tryb automatycznego wstawiania w³±cza siê na przyk³ad poprzez
+wywo³anie polecenia M-x auto-fill-mode<Return>.  Je¶li ten tryb jest
+w³±czony to samo polecenie wy³±cza go, i vice versa.  Mówimy, ze
+polecenie to "prze³±cza ten tryb".
+
+>> Napisz M-x auto-fill-mode<Return>.  Wstawiaj potem liniê pe³n±
+   "asdf " tak d³ugo, a¿ zobaczysz, ¿e siê podzieli na dwie linie.
+   Musisz wstawiæ spacje pomiêdzy znaki, poniewa¿ tryb automatycznego
+   wype³niania ³amie linie tylko tam, gdzie s± spacje.
+
+Margines jest zazwyczaj ustawiony na 70 znaków, ale mo¿esz go zmieniæ
+za pomoc± polecenia C-x f.  Powiniene¶ podaæ mu argument liczbowy
+mówi±cy, w której kolumnie ma zostaæ ustawiony margines.
+
+>> Wywo³aj C-x f z argumentem równym 20. (C-u 2 0 C-x f).
+   Napisz potem jaki¶ tekst i zauwa¿, ze Emacs wype³nia linie do
+   d³ugo¶ci co najwy¿ej 20 znaków.  Ustaw margines z powrotem na
+   70 znaków, wywo³uj±c jeszcze raz C-x f.
+
+Je¶li dokonujesz zmian wewn±trz akapitu, tryb 
+automatycznego wype³niania nie wyrówna marginesu
+sam z siebie.  By wywo³aæ polecenie
+wyrównania marginesu, naci¶nij M-q (Meta-q), 
+podczas gdy kursor znajduje siê wewn±trz akapitu.
+
+>> Przesuñ kursor do poprzedniego akapitu i naci¶nij M-q.
+
+
+* SZUKANIE
+----------
+
+Emacs potrafi szukaæ ³añcuchów (zwartych ci±gów znaków lub s³ów)
+zarówno wstecz jaki i do przodu.  Szukanie ³añcucha jest poleceniem,
+które przesuwa kursor; przesuwa ono kursor do nastêpnego miejsca, w
+którym dany ³añcuch wystêpuje.
+
+Polecenie Emacsa "search" ró¿ni siê od podobnych poleceñ innych
+edytorów w tym sensie, ze jest ono przyrostowe.  Znaczy to, ze
+szukanie odbywa siê w trakcie, gdy Ty wpisujesz kolejne znaki
+³añcucha, który ma zostaæ odnaleziony.
+
+Poleceniami zapocz±tkowuj±cymi szukanie s±: C-s dla szukania w przód
+oraz C-r dla szukania wstecz.  POCZEKAJ PROSZÊ!  Nie próbuj ich w tej
+chwili.
+
+Gdy naci¶niesz C-s zauwa¿ysz, ze tekst "I-search" pojawi siê w
+obszarze echa.  Informuje Ciê to, ¿e Emacs znajduje siê w trybie
+"incremental search", czekaj±c by¶ napisa³ tekst, który ma on znaleŒæ.
+Naci¶niecie <Return> koñczy proces szukania.
+
+>> Teraz naci¶nij C-s, by rozpocz±æ szukanie.  POWOLI, litera po
+   literze, napisz s³owo "kursor", zatrzymuj±c siê po ka¿dym znaku i
+   obserwuj±c, gdzie zatrzymuje siê kursor.  Gdy naci¶niesz drugie
+   "r", bêdzie mo¿na powiedzieæ, ¿e szuka³e¶ s³owa "kursor"
+   jednokrotnie.  Naci¶nij C-s jeszcze raz, by znaleŒæ nastêpne
+   wyst±pienie s³owa "kursor".  Naci¶nij teraz <Delete> cztery
+   razy i zobacz, co siê dzieje z kursorem.  Naci¶nij <RET>, by skoñczyæ
+   szukanie.
+
+Widzia³e¶, co siê dzia³o? Emacs podczas szukania przyrostowego próbuje
+przej¶æ do miejsca wyst±pienia ³añcucha, który do tej pory wpisa³e¶,
+pod¶wietlaj±c go dla Twojej wygody.  By znaleŒæ nastêpne wyst±pienie
+s³owa "kursor", po prostu naci¶nij C-s jeszcze raz.  Je¶li takiego nie
+ma, Emacs zapiszczy i powie Ci, ze szukanie "skoñczy³o siê pora¿k±".
+Naci¶niecie C-g tak¿e przerywa proces szukania.
+
+UWAGA: W niektórych systemach naci¶niecie C-s zamrozi ekran i nie
+zobaczysz ¿adnego tekstu z Emacsa.  Oznacza to, ¿e sk³adowa systemu
+operacyjnego, zwana kontrol± przep³ywu (ang. "flow control")
+przechwyci³a C-s i nie pozwoli³a mu dojsæ do Emacsa.  By odzyskaæ
+kontrole nad ekranem, nacisnij C-q.  Dodatkowej pomocy poszukaj w
+rozdziale "Spontaneous Entry to Incremental Search" w podrêczniku
+Emacsa.
+
+Jesli podczas szukania przyrostowego naci¶niesz <Delete> zauwa¿ysz, ze
+ostatni znak, który wcisn±³es znika i kursor wraca do poprzedniego
+miejsca.  Na przyk³ad, za³ó¿my, ze nacisn±³es "k" i znalaz³es pierwsze
+wyst±pienie tej litery.  Jesli teraz naci¶niesz "u", kursor przesunie
+siê do pierwszego wyst±pienia "ku".  Teraz nacisnij <Delete>.  Skasuje
+to "u" z ³añcucha, którego poszukujesz, a kursor wróci do pierwszego
+wyst±pienia "k".
+
+Je¶li podczas szukania nacisniesz jaki¶ klawisz razem z META lub CTRL
+(z nielicznymi wyj±tkami --- znakami, które maj± specjalne znaczenie
+podczas szukania, takimi jak C-s i C-r) szukanie zostanie przerwane.
+
+C-s rozpoczyna proces szukania, który poszukuje ³añcucha, który
+znajduje siê ZA bie¿±c± pozycja kursora.  Je¶li chcesz szukaæ czego¶
+wcze¶niej w tek¶cie, naci¶nij C-r.  Wszystko, co powiedzieli¶my o C-s
+stosuje siê do C-r, oczywi¶cie ze zmian± kierunku szukania na wstecz.
+
+
+* WIELE OKIEN
+-------------
+
+Jedn± z przyjemnych cech Emacsa jest mo¿liwo¶æ wy¶wietlania wiêcej ni¿
+jednego okna na raz.
+
+>> Przesuñ kursor do tej linii i naci¶nij C-u 0 C-l.
+
+>> Naci¶nij teraz C-x 2, co podzieli ekran na dwa okna.  Obydwa okna
+   wy¶wietlaj± ten podrêcznik.  Kursor pozostaje w górnym oknie.
+
+>> Naci¶nij C-M-v by przewin±æ dolne okno.  (Je¶li nie masz
+   prawdziwego klawisza Meta, naci¶nij ESC C-v.)
+
+>> Naci¶nij C-x o ("o" jak angielskie "other") by przesun±æ kursor do
+   dolnego okna.  U¿yj C-v i M-v w dolnym oknie by przewin±æ jego
+   zawarto¶æ.  Polecenia, które masz wykonaæ czytaj w górnym oknie.
+
+>> Naci¶nij C-x o jeszcze raz tak, by kursor wróci³ do górnego okna.
+   Kursor w górnym oknie nie zmieni³ po³o¿enia.
+
+Ka¿de okno pamiêta po³o¿enie swojego w³asnego kursora, lecz tylko
+jedno okno w danej chwili wy¶wietla kursor.  Wszystkie polecenia
+edycyjne stosuj± siê do okna, w którym jest kursor.  To okno nazywane
+jest "wybranym oknem".
+
+Polecenie C-M-v jest bardzo u¿yteczne gdy edytujesz tekst w jednym
+oknie, a drugiego u¿ywasz tylko jako punkt odniesienia.  Dziêki temu
+kursor mo¿e zawsze znajdowaæ siê w oknie, zawarto¶æ którego edytujesz,
+a Ty mo¿esz przesuwaæ drugie okno za pomoc± C-M-v.
+
+C-M-v to przyk³ad znaku, który uzyskuje siê za pomoc± CONTROL-META.
+Je¶li masz prawdziwy klawisz META, C-M-v mo¿esz uzyskaæ przytrzymuj±c
+jednocze¶nie CTRL oraz META i naciskaj±c v.  Nie jest wa¿ne, co
+zosta³o naci¶niete wcze¶niej, CTRL czy META, poniewa¿ obydwa te
+klawisze dzia³aj± jako modyfikatory znaczenia klawiszy, które
+naciskasz.
+
+Je¶li nie masz klawisza META i u¿ywasz w jego zastêpstwie ESC,
+kolejno¶æ naciskania klawiszy jest znacz±ca: musisz najpierw nacisn±æ
+i pu¶ciæ ESC, po czym nacisn±æ CTRL-v; CTRL-ESC v nie bêdzie dzia³aæ.
+Dzieje siê tak dlatego, ze ESC jest znakiem, a nie modyfikatorem.
+
+>> Naci¶nij C-x 1 (w górnym oknie), by pozbyæ siê dolnego okna.
+
+(Je¶li nacisn±³by¶ C-x 1 w dolnym oknie, to znik³oby górne.  Mo¿esz
+sobie t³umaczyæ to polecenie jako "zatrzymaj tylko jedno okno --- to w
+którym w³a¶nie jestem".)
+
+Nie musisz wy¶wietlaæ tego samego bufora w obydwu oknach.  Je¶li
+u¿yjesz C-x C-f by wy¶wietliæ plik w jednym z okien, zawarto¶æ
+drugiego nie zmieni siê.  W ka¿dym oknie mo¿esz wy¶wietlaæ ró¿ne pliki
+niezale¿nie.
+
+Oto inny sposób u¿ywania dwóch okien do wy¶wietlania dwóch ró¿nych
+rzeczy:
+
+>> Naci¶nij C-x 4 C-f i nazwê jednego z Twoich plików.  Zakoñcz
+   wprowadzanie klawiszem <Return>.  Podany plik pojawi siê w dolnym
+   oknie razem z kursorem, który tam przeskakuje.
+
+>> Naci¶nij C-x o, by wróciæ do górnego okna, oraz C-x 1 by
+   usun±æ dolne okno.
+
+
+* REKURSYWNE POZIOMY EDYCJI
+---------------------------
+
+Czasami mo¿esz znaleŒæ siê w czym¶, co nazywa siê "rekursywnym
+poziomem edycji".  Mo¿esz to rozpoznaæ po nawiasach kwadratowych w
+linii trybu, obejmuj±cych nawiasy okr±g³e zawieraj±ce nazwê g³ównego
+trybu edycji.  Na przyk³ad, móg³by¶ widzieæ [(Fundamental)] zamiast
+(Fundamental).
+
+By wyj¶æ z rekursywnego poziomu edycji naci¶nij ESC ESC ESC.  Jest to
+ogólnego przeznaczenia "wychodzimy".  Mo¿esz go u¿yæ tak¿e by pozbyæ
+siê nadmiaru okien lub wyj¶æ z minibufora.
+
+>> Naci¶nij M-x by wej¶æ do minibufora; naci¶nij potem ESC ESC ESC, by
+   z niego wyj¶æ.
+
+Nie mo¿esz u¿yæ C-g, by wyj¶æ z rekursywnego poziomu edycji.  Dzieje
+siê tak dlatego, ze C-g jest u¿ywane do anulowania poleceñ i
+argumentów WEWN¡TRZ rekursywnego poziomu edycji.
+
+
+SZUKANIE DODATKOWEJ POMOCY
+--------------------------
+
+W tym podrêczniku spróbowali¶my dostarczyæ tylko tyle informacji, ile
+jest niezbêdne, by¶ móg³ zacz±æ u¿ywaæ Emacsa.  Emacs jest istn±
+kopalni± najró¿niejszych rzeczy, których nie sposób tutaj opisaæ.
+Zapewne bêdziesz chcia³ dowiedzieæ siê wiêcej o Emacsie, poniewa¿
+posiada on wiele po¿±danych cech, o których na razie nic nie wiesz.
+Jest w nim zaszyte mnóstwo wewnêtrznej dokumentacji, która mo¿e byæ
+osi±gniêta za pomoc± Control-h, które okre¶lamy mianem "znaku pomocy"
+z powodu spe³nianej przez niego roli.
+
+By uzyskaæ pomoc, naci¶nij C-h a potem znak, który okre¶la jakiego
+typu pomocy oczekujesz.  Je¶li poczujesz siê NAPRAWDÊ zagubiony,
+napisz C-h ? i Emacs spróbuje powiedzieæ Ci, jakiego typu pomocy mo¿e
+Ci dostarczyæ.  Je¶li naci¶niesz C-h a potem zadecydujesz, ¿e pomoc
+nie jest Ci jednak potrzebna, po prostu wci¶nij C-g by anulowaæ C-h.
+
+Najprostsz± pomoc mo¿esz uzyskaæ naciskaj±c C-h c.  Naci¶nij C-h a
+potem c, po czym kombinacje klawiszy polecenia, i Emacs wy¶wietli
+bardzo krótki opis polecenia.
+
+>> Naci¶nij C-h c Control-p.
+   Powinno to przywo³aæ komunikat, o tre¶ci podobnej do
+
+	C-p runs the command previous-line
+
+W ten sposób mo¿esz uzyskaæ "nazwê funkcji".  Przydaje siê to podczas
+pisania kodu w Lispie, który rozszerza Emacsa; wystarcza to tak¿e do
+przypomnienia Ci, co dane polecenie robi, je¶li widzia³e¶ je ju¿
+wcze¶niej, ale nie zapamiêta³e¶ go.
+
+Polecenia wywo³ywane za pomoc± wieloznakowej kombinacji klawiszy, na
+przyk³ad C-x C-s oraz (je¶li nie masz klawisza META lub EDIT) <ESC>v,
+s± tak¿e dopuszczalne po C-h c.
+
+By uzyskaæ wiêcej informacji na temat polecenia, naci¶nij C-h k
+zamiast C-h c.
+
+>> Naci¶nij C-h k Control-p.
+
+To polecenie wy¶wietla dokumentacjê na temat danej funkcji oraz jej
+nazwê w oknie Emacsa.  Gdy skoñczysz ¶ledziæ wynik tego polecenia
+naci¶nij C-x 1, by pozbyæ siê tekstu pomocy.  Nie musisz tego robiæ od
+razu.  Mo¿esz wykonaæ pewne operacje w oparciu o tekst pomocy zanim
+naci¶niesz C-x 1.
+
+Oto kilka innych u¿ytecznych wariantów C-h:
+
+   C-h f	Opisz funkcje o podanej nazwie.
+
+>> Napisz C-h f previous-line<Return>.  Wypisze to na ekranie ca³±
+   informacje, jak± Emacs ma na temat funkcji, która implementuje
+   polecenie C-p.
+
+   C-h a	Apropos.   Wpisz s³owo kluczowe, a Emacs wypisze listê
+                wszystkich poleceñ, których nazwa zawiera to s³owo.
+                Polecenia te mog± zostaæ wywo³ane za pomoc± Meta-x.
+                Dla niektórych poleceñ Apropos wypisze jedno- lub
+                dwuznakowe sekwencje, które wywo³uj± dane polecenie.
+
+>> Napisz C-h a file<Return>.  Zobaczysz listê wszystkich poleceñ,
+   dostêpnych za pomoc± M-x, które maja s³owo "file" w swojej nazwie.
+   Zauwa¿ysz tam tak¿e polecenia takie, jak C-x C-f oraz C-x C-w,
+   umieszczone obok nazw poleceñ "find-file" i "write-file".
+
+
+PODSUMOWANIE
+------------
+
+Pamiêtaj, ¿e by wyj¶æ z Emacsa na sta³e, u¿ywaj C-x C-c.  By wyj¶æ do
+pow³oki na chwilê tak, by¶ móg³ wróciæ, u¿yj C-z. (To nie dzia³a pod
+X-Windows, poniewa¿ tam nie ma prawdziwego konceptu przej¶cia na
+chwile do pow³oki.  Zamiast tego C-z ikonizuje okno Emacsa.)
+
+Ten podrêcznik by³ pisany tak, by wszyscy nowi u¿ytkownicy mogli go
+zrozumieæ.  Je¶li co¶ pozostawi³ niejasnym, nie siedŒ cicho i nie
+obwiniaj siebie, tylko daj nam znaæ!
+
+
+KOPIOWANIE
+----------
+
+Niniejszy podrêcznik jest potomkiem w d³ugiej linii podrêczników
+Emacsa, która rozpoczyna siê od tego, który zosta³ napisany przez
+Stuarta Cracrafta dla oryginalnego Emacsa.  Zosta³ on zmodyfikowany we
+wrze¶niu 1994 przez Bena Winga, który zaktualizowa³ go, je¶li chodzi o
+X-Windows.
+
+T³umaczenia na jêzyk polski dokona³ Remek Trzaska z pomoc± Ryszarda
+Kubiaka.  Jesli polskie znaki nie byly poprawnie wyswietlane w tym
+buforze, oznacza to, ze nie masz zainstalowanych polskich fontow. 
+Pomoc w tym zakresie mozesz znalezc pod adresem: 
+               <URL:http://www.agh.edu.pl/ogonki>
+
+Ta wersja podrêcznika, podobnie jak GNU Emacs, jest zastrze¿ona, a
+pozwolenie na kopiowanie udzielone jest pod nastêpuj±cymi warunkami:
+
+Copyright (c) 1985, 1994 Free Software Foundation
+
+   Permission is granted to anyone to make or distribute verbatim
+   copies of this document as received, in any medium, provided that
+   the copyright notice and permission notice are preserved,
+   and that the distributor grants the recipient permission
+   for further redistribution as permitted by this notice.
+
+   Permission is granted to distribute modified versions
+   of this document, or of portions of it,
+   under the above conditions, provided also that they
+   carry prominent notices stating who last altered them.
+
+Warunki kopiowania samego Emacsa s± w pewnym stopniu inne, aczkolwiek
+zachowuj± te sama idee.  Proszê, przeczytaj plik COPYING, po czym
+rozdaj swoim znajomym kopie Emacsa.  Pomó¿ zwalczyæ przeszkody w
+rozpowszechnianiu oprogramowania przez tworzenie i dzielenie siê
+oprogramowaniem.
--- a/etc/xemacs-beta.xpm	Mon Aug 13 10:06:48 2007 +0200
+++ b/etc/xemacs-beta.xpm	Mon Aug 13 10:07:35 2007 +0200
@@ -17,7 +17,7 @@
 "= c #d23a00000000",
 "- c #f5e900000000",
 "; c #912a912a922b",
-": c None",
+": s None c None",
 "> c #8d5e9162eb8a",
 ", c #b3c7b7cbf93d",
 "< c #d6dbd706d9dc",
--- a/etc/xemacs.1	Mon Aug 13 10:06:48 2007 +0200
+++ b/etc/xemacs.1	Mon Aug 13 10:07:35 2007 +0200
@@ -1,4 +1,4 @@
-.TH XEMACS 1 "1997 January 1"
+.TH XEMACS 1 "1997 November 19"
 .UC 4
 .SH NAME
 xemacs \- Emacs: The Next Generation
@@ -142,6 +142,18 @@
 .B \-q, \-no\-init\-file
 Do not load an init file.
 .TP
+.B \-no-packages
+Do not process the package path.
+.TP
+.B \-vanilla
+Load no extra files at startup.  Equivalent to the combination of
+.B \-q
+,
+.B \-no-site-file
+, and
+.B \-no-packages
+\.
+.TP
 .BI \-u " user, " \-user " user"
 Load
 .IR user 's
@@ -156,7 +168,7 @@
 .I number
 (do not insert a space between the "+" sign and the number).
 .TP
-.B \-help, \-flags, \-?
+.B \-help
 Print a help message and exit.
 .TP
 .B \-V, \-version,
--- a/lib-src/ChangeLog	Mon Aug 13 10:06:48 2007 +0200
+++ b/lib-src/ChangeLog	Mon Aug 13 10:07:35 2007 +0200
@@ -1,3 +1,15 @@
+1997-11-18  Colin Rafferty  <craffert@ml.com>
+
+	* update-elc.sh (prune_vc): Made it ignore any directory that
+	starts with a period.
+
+1997-11-16  SL Baur  <steve@altair.xemacs.org>
+
+	* gnuserv.c (main): make return type int.
+	Suggested by Andreas Jaeger <aj@arthur.rhein-neckar.de>
+
+	* fakemail.c (main): Ditto.
+
 1997-11-13  SL Baur  <steve@altair.xemacs.org>
 
 	* pop.c: Add includes from movemail.c so standard functions get
--- a/lib-src/fakemail.c	Mon Aug 13 10:06:48 2007 +0200
+++ b/lib-src/fakemail.c	Mon Aug 13 10:07:35 2007 +0200
@@ -25,14 +25,15 @@
 
 #if defined (BSD) && !defined (BSD4_1) && !defined (USE_FAKEMAIL)
 /* This program isnot used in BSD, so just avoid loader complaints.  */
-void
+int
 main ()
 {
+  return 0;
 }
 #elif defined (LINUX)
 #include <stdio.h>
 #include <stdlib.h>
-void
+int
 main ()
 {
   /* Linux /bin/mail, if it exists, is NOT the Unix v7 mail that
@@ -42,12 +43,14 @@
   fprintf (stderr, "Make sure you have the sendmail program, and\n");
   fprintf (stderr, "set the Lisp variable `sendmail-program' to point\n");
   fprintf (stderr, "to the path of the sendmail binary.\n");
-  exit (1);
+  return 1;
 }
 #else /* not BSD 4.2 (or newer) */
 #ifdef MSDOS
+int
 main ()
 {
+  return 0;
 }
 #else /* not MSDOS */
 /* This conditional contains all the rest of the file.  */
@@ -620,7 +623,7 @@
   return;
 }
 
-void
+int
 main (argc, argv)
      int argc;
      char **argv;
@@ -670,7 +673,7 @@
       put_string (buf);
     }
 
-  exit (close_the_streams ());
+  return close_the_streams ();
 }
 
 #endif /* not MSDOS */
--- a/lib-src/gnuserv.c	Mon Aug 13 10:06:48 2007 +0200
+++ b/lib-src/gnuserv.c	Mon Aug 13 10:07:35 2007 +0200
@@ -831,7 +831,7 @@
 #endif /* UNIX_DOMAIN_SOCKETS */
 
 
-void
+int
 main(argc,argv)
      int argc;
      char *argv[];
@@ -907,6 +907,7 @@
 #endif /* NOT SYSV_IPC */
   } /* while */
 
+  return 0;
 } /* main */
 
 #endif /* SYSV_IPC || UNIX_DOMAIN_SOCKETS || INTERNET_DOMAIN_SOCKETS */
--- a/lib-src/update-elc.sh	Mon Aug 13 10:06:48 2007 +0200
+++ b/lib-src/update-elc.sh	Mon Aug 13 10:07:35 2007 +0200
@@ -67,7 +67,7 @@
 
 $EMACS -batch -vanilla -l `pwd`/lisp/prim/cleantree -f batch-remove-old-elc lisp
 
-prune_vc="( -name SCCS -o -name RCS -o -name CVS ) -prune -o"
+prune_vc="( -name '.*' -o -name SCCS -o -name RCS -o -name CVS ) -prune -o"
 
 # $els  is a list of all .el  files
 # $elcs is a list of all .elc files
--- a/lisp/ChangeLog	Mon Aug 13 10:06:48 2007 +0200
+++ b/lisp/ChangeLog	Mon Aug 13 10:07:35 2007 +0200
@@ -1,6 +1,98 @@
+1997-11-18  Colin Rafferty  <craffert@ml.com>
+
+	* packages.el (packages-find-packages): Modified to allow `nil'
+ 	entry in the `package-path'.  All entries before the nil will be
+ 	prepended to the paths (as before).  All entries after nil will be
+ 	appended.
+
+	* packages.el (locate-data-file): Implemented similar to
+ 	locate-data-directory.
+
+1997-11-20  Kyle Jones  <kyle_jones@wonderworks.com>
+
+	* lisp/x-faces.el: Add expression to xpm-color-symbols to
+	  look for the global background resource when supporting
+	  the backgroundToolBarColor XPM symbolic name.
+
+1997-11-17 Marc Paquette   <marcpa@cam.org>
+
+	* efs/dired.el: Removed special case for windows-nt in
+	dired-get-filename(); no longer needed because we now do 
+	CRLF->LF conversion upstream.
+
+1997-11-18  Jonathan Harris <jhar@tardis.ed.ac.uk>
+
+	* msw-faces.el: Actually does something.
+
+1997-11-18  Christoph Wedler  <wedler@fmi.uni-passau.de>
+
+	* packages/font-lock.el (font-lock-fontify-anchored-keywords):
+	Sync'd with FSF 20.2.
+	(font-lock-keywords): Docstring partly sync'd with FSF 20.2.
+
+1997-11-18  SL Baur  <steve@altair.xemacs.org>
+
+	* egg/egg-leim.el (egg-activate): Call normal language setup
+	function.
+	- Call egg-mode
+	- require egg-wnn
+
+	* egg/egg-wnn.el (set-wnn-host-name): Use localhost as a fallback.
+	(set-cwnn-host-name): Ditto.
+	(set-kwnn-host-name): Ditto.
+	(open-wnn-if-disconnected): Ditto.
+
+1997-11-18  Hrvoje Niksic  <hniksic@srce.hr>
+
+	* prim/about.el (about-maintainer-info): Corrected typo.
+
+	* x-toolbar.el (toolbar-mail): Use `eval' to evaluate forms.
+
+	* cus-edit.el (customize-browse): Call `widget-add-change'.
+
+1997-11-18  SL Baur  <steve@altair.xemacs.org>
+
+	* utils/uniquify.el (uniquify-buffer-name-style): Fix typo.
+	Suggested by: Michael Sperber <sperber@informatik.uni-tuebingen.de>
+
+1997-11-18  Hrvoje Niksic  <hniksic@srce.hr>
+
+	* prim/about.el (about-news): Announce a way to leave the buffer.
+
+1997-11-17  Kyle Jones  <kyle_jones@wonderworks.com>
+
+	* lisp/x-toolbar.el (x-init-toolbar-from-resources):
+	  Initialize the toolbar border width specifiers.
+
+1997-11-17  SL Baur  <steve@altair.xemacs.org>
+
+	* lisp/mule/mule-files.el: Add TUTORIAL.pl to
+	`file-coding-system-alist'.
+	* lisp/language/european.el: Add Polish language environment.
+
+	* lisp/loadup.el: set inhibit-package-init when running from temacs.
+
+1997-11-16  SL Baur  <steve@altair.xemacs.org>
+
+	* lisp/prim/options.el: Fix comment typo.
+	From Peter Pezaris <pez@dwwc.com>
+
+1997-11-16  Kyle Jones  <kyle_jones@wonderworks.com>
+
+	* lisp/prim/minibuf.el (reset-buffer): Make inhibit-read-only
+	  local to the current buffer and set it to t to prevent
+	  read-only text from permanently wedging the minibuffer.
+
+1997-11-16  SL Baur  <steve@altair.xemacs.org>
+
+	* packages/emacsbug.el (report-xemacs-bug): Handle case where
+	` *Message-Log*' buffer has not already been created.
+	* prim/help.el (view-lossage): Ditto.
+	* prim/simple.el (show-message-log): Ditto.
+
 1997-11-15  SL Baur  <steve@altair.xemacs.org>
 
-	* packages.el (list-autoloads): Fix typo (I hope). [Doesn't work]
+	* packages.el (list-autoloads): Fix doubleslash problem.
 
 1997-11-14  Hrvoje Niksic  <hniksic@srce.hr>
 
--- a/lisp/cmdloop.el	Mon Aug 13 10:06:48 2007 +0200
+++ b/lisp/cmdloop.el	Mon Aug 13 10:07:35 2007 +0200
@@ -110,7 +110,6 @@
 (defvar last-error nil
   "#### Document me.")
 
-;; #### Provisionally turned on for XEmacs 20.3beta.
 (defcustom errors-deactivate-region nil
   "*Non-nil means that errors will cause the region to be deactivated."
   :type 'boolean
--- a/lisp/cus-edit.el	Mon Aug 13 10:06:48 2007 +0200
+++ b/lisp/cus-edit.el	Mon Aug 13 10:07:35 2007 +0200
@@ -1164,6 +1164,7 @@
 		   :custom-state 'unknown
 		   :tag (custom-unlispify-tag-name group)
 		   :value group))
+  (widget-add-change)
   (goto-char (point-min)))
 
 (define-widget 'custom-browse-visibility 'item
--- a/lisp/egg/egg-leim.el	Mon Aug 13 10:06:48 2007 +0200
+++ b/lisp/egg/egg-leim.el	Mon Aug 13 10:07:35 2007 +0200
@@ -37,6 +37,11 @@
       (require 'egg)
     (error "Wnn is not built into this XEmacs"))
   (setq inactivate-current-input-method-function 'egg-inactivate)
+  (require 'egg-wnn)
+  (let ((func (get 'japanese 'set-egg-environ)))
+    (when func
+      (funcall func)))
+  (egg-mode)
   (toggle-egg-mode))
 
 (defun egg-inactivate ()
--- a/lisp/egg/egg-wnn.el	Mon Aug 13 10:06:48 2007 +0200
+++ b/lisp/egg/egg-wnn.el	Mon Aug 13 10:07:35 2007 +0200
@@ -22,6 +22,7 @@
 
 ;;; Commentary:
 
+;;;  Modified to provide english strings as well by Jareth Hein (jareth@camelot-soft.com)
 ;;;  Modified for Wnn V4 and Wnn6 by Satoru Tomura(tomura@etl.go.jp)
 ;;;  Modified for Wnn6 by OMRON
 ;;;  Written by Toshiaki Shingu (shingu@cpr.canon.co.jp)
@@ -35,7 +36,8 @@
 
 ;;;  $B=$@5%a%b(B
 
-;;;  97/2/4   Modified for use with XEmacs by J.Hein <jhod@po.iijnet.or.jp>
+;;;  97/10/27 Help system modification by J.Hein
+;;;  97/2/4   Modified for use with XEmacs by J.Hein <jareth@camelot-soft.com>
 ;;;           (mostly changes regarding extents and markers)
 ;;;  94/2/3   kWnn support by H.Kuribayashi
 ;;;  93/11/24 henkan-select-kouho: bug fixed
@@ -324,14 +326,14 @@
   \\[henkan-first-bunsetu]\t$B@hF,J8@a(B\t\\[henkan-last-bunsetu]\t$B8eHxJ8@a(B  
   \\[henkan-backward-bunsetu]\t$BD>A0J8@a(B\t\\[henkan-forward-bunsetu]\t$BD>8eJ8@a(B
 $BJQ49JQ99(B
-  $BBgJ8@a<!8uJd(B    \\[henkan-next-kouho-dai]\t$B>.J8@a<!8uJd(B    \\[henkan-next-kouho-sho]
-  $BA08uJd(B    \\[henkan-previous-kouho]  \t$B<!8uJd(B    \\[henkan-next-kouho]
-  $BBgJ8@a?-$7(B  \\[henkan-bunsetu-nobasi-dai]  \t$BBgJ8@a=L$a(B  \\[henkan-bunsetu-chijime-dai]
-  $B>.J8@a?-$7(B  \\[henkan-bunsetu-nobasi-sho]  \t$B>.J8@a=L$a(B  \\[henkan-bunsetu-chijime-sho]
-  $BBgJ8@aJQ498uJdA*Br(B  \\[henkan-select-kouho-dai]  \t$B>.J8@aJQ498uJdA*Br(B  \\[henkan-select-kouho-sho]
+  \\[henkan-next-kouho-dai]\t$BBgJ8@a<!8uJd(B\t\\[henkan-next-kouho-sho]\t$B>.J8@a<!8uJd(B
+  \\[henkan-previous-kouho]\t$BA08uJd(B\t\\[henkan-next-kouho]\t$B<!8uJd(B    
+  \\[henkan-bunsetu-nobasi-dai]\t$BBgJ8@a?-$7(B\t\\[henkan-bunsetu-chijime-dai]\t$BBgJ8@a=L$a(B  
+  \\[henkan-bunsetu-nobasi-sho]\t$B>.J8@a?-$7(B\t\\[henkan-bunsetu-chijime-sho]\t$B>.J8@a=L$a(B  
+  \\[henkan-select-kouho-dai]\t$BBgJ8@aJQ498uJdA*Br(B\t\\[henkan-select-kouho-sho]\t$B>.J8@aJQ498uJdA*Br(B  
 $BJQ493NDj(B
-  $BA4J8@a3NDj(B  \\[henkan-kakutei]  \t$BD>A0J8@a$^$G3NDj(B  \\[henkan-kakutei-before-point]
-$BJQ49Cf;_(B    \\[henkan-quit]
+  \\[henkan-kakutei]\t$BA4J8@a3NDj(B\t\\[henkan-kakutei-before-point]\t$BD>A0J8@a$^$G3NDj(B  
+  \\[henkan-quit]\t$BJQ49Cf;_(B    
 ")
       (hinsimei "$BIJ;lL>(B:")
       (jishotouroku-yomi "$B<-=qEPO?!X(B%s$B!Y(B  $BFI$_(B :")
@@ -388,15 +390,15 @@
   \\[henkan-first-bunsetu]\t$AOHM74JWi(B\t\\[henkan-last-bunsetu]\t$A=aN24JWi(B
   \\[henkan-backward-bunsetu]\t$AG0R;8v4JWi(B\t\\[henkan-forward-bunsetu]\t$AOBR;8v4JWi(B
 $A1d;;1d8|(B
-  $A4JWi4N:nQ!(B    \\[henkan-next-kouho-dai]\t$A5%4J4N:nQ!(B    \\[henkan-next-kouho-sho]
-  $AG0:nQ!(B    \\[henkan-previous-kouho]  \t$A4N:nQ!(B    \\[henkan-next-kouho]
-  $A4JWi@)U9(B  \\[henkan-bunsetu-nobasi-dai]  \t$A4JWiJUKu(B  \\[henkan-bunsetu-chijime-dai]
-  $A5%4J@)U9(B  \\[henkan-bunsetu-nobasi-sho]  \t$A5%4JJUKu(B   \\[henkan-bunsetu-chijime-sho]
-  $A4JWi1d;;:r295DQ!Tq(B  \\[henkan-select-kouho-dai]  \t$A5%4J1d;;:r295DQ!Tq(B  \\[henkan-select-kouho-sho]
-  $A1d;;:r295DQ!Tq(B  \\[henkan-select-kouho-dai]
+  \\[henkan-next-kouho-dai]\t$A4JWi4N:nQ!(B\t\\[henkan-next-kouho-sho]\t$A5%4J4N:nQ!(B
+  \\[henkan-previous-kouho]\t$AG0:nQ!(B\t\\[henkan-next-kouho]\t$A4N:nQ!(B
+  \\[henkan-bunsetu-nobasi-dai]\t$A4JWi@)U9(B\t\\[henkan-bunsetu-chijime-dai]\t$A4JWiJUKu(B
+  \\[henkan-bunsetu-nobasi-sho]\t$A5%4J@)U9(B\t\\[henkan-bunsetu-chijime-sho]\t$A5%4JJUKu(B
+  \\[henkan-select-kouho-dai]\t$A4JWi1d;;:r295DQ!Tq(B\t\\[henkan-select-kouho-sho]\t$A5%4J1d;;:r295DQ!Tq(B
+  \\[henkan-select-kouho-dai]\t$A1d;;:r295DQ!Tq(B
 $A1d;;H76((B
-  $AH+NDH76((B  \\[henkan-kakutei]  \t$AIOR;4JWiN*V95DH76((B  \\[henkan-kakutei-before-point]
-$AM#V91d;;(B    \\[henkan-quit]
+  \\[henkan-kakutei]\t$AH+NDH76((B\t\\[henkan-kakutei-before-point]\t$AIOR;4JWiN*V95DH76((B
+  \\[henkan-quit]\t$AM#V91d;;(B
 ")
       (hinsimei "$A4JPTC{(B:")
       (jishotouroku-yomi "$A4G5d5GB<!:(B%s$A!;F47((B :")
@@ -454,14 +456,14 @@
   \\[henkan-first-bunsetu]\t$(C`;Ti(B $(CY~o=(B\t\\[henkan-last-bunsetu]\t$(C}-Z-(B $(CY~o=(B  
   \\[henkan-backward-bunsetu]\t$(CrAnq(B $(CY~o=(B\t\\[henkan-forward-bunsetu]\t$(CrA}-(B $(CY~o=(B
 $(C\(|5(B $(C\(LZ(B
-  $(CS^Y~o=(B $(C4Y@=(B $(C}&\M(B    \\[henkan-next-kouho-dai]\t$(Ca3Y~o=(B $(C4Y@=(B $(C}&\M(B    \\[henkan-next-kouho-sho]
-  $(Cnq(B $(C}&\M(B    \\[henkan-previous-kouho]  \t$(C4Y@=(B $(C}&\M(B    \\[henkan-next-kouho]
-  $(CS^Y~o=(B $(C|*S^(B  \\[henkan-bunsetu-nobasi-dai]  \t$(CS^Y~o=(B $(Cuja3(B  \\[henkan-bunsetu-chijime-dai]
-  $(Ca3Y~o=(B $(C|*S^(B  \\[henkan-bunsetu-nobasi-sho]  \t$(Ca3Y~o=(B $(Cuja3(B  \\[henkan-bunsetu-chijime-sho]
-  $(CS^Y~o=(B $(C\(|5(B $(C4Y@=(B $(C}&\M(B  \\[henkan-select-kouho-dai]  \t$(Ca3Y~o=(B $(C\(|5(B $(C4Y@=(B $(C}&\M(B  \\[henkan-select-kouho-sho]
+  \\[henkan-next-kouho-dai]\t$(CS^Y~o=(B $(C4Y@=(B $(C}&\M(B\t\\[henkan-next-kouho-sho]\t$(Ca3Y~o=(B $(C4Y@=(B $(C}&\M(B    
+  \\[henkan-previous-kouho]\t$(Cnq(B $(C}&\M(B\t\\[henkan-next-kouho]\t$(C4Y@=(B $(C}&\M(B
+  \\[henkan-bunsetu-nobasi-dai]\t$(CS^Y~o=(B $(C|*S^(B\t\\[henkan-bunsetu-chijime-dai]\t$(CS^Y~o=(B $(Cuja3(B
+  \\[henkan-bunsetu-nobasi-sho]\t$(Ca3Y~o=(B $(C|*S^(B\t\\[henkan-bunsetu-chijime-sho]\t$(Ca3Y~o=(B $(Cuja3(B
+  \\[henkan-select-kouho-dai]\t$(CS^Y~o=(B $(C\(|5(B $(C4Y@=(B $(C}&\M(B\t\\[henkan-select-kouho-sho]\t$(Ca3Y~o=(B $(C\(|5(B $(C4Y@=(B $(C}&\M(B
 $(C\(|5(B $(C|,oR(B
-  $(CnoY~o=(B $(C|,oR(B  \\[henkan-kakutei]  \t$(CrAnq(B $(CY~o=1nAv(B $(C|,oR(B  \\[henkan-kakutei-before-point]
-$(C\(|5(B $(Cqir-(B    \\[henkan-quit]
+  \\[henkan-kakutei]\t$(CnoY~o=(B $(C|,oR(B\t\\[henkan-kakutei-before-point]\t$(CrAnq(B $(CY~o=1nAv(B $(C|,oR(B
+  \\[henkan-quit]\t$(C\(|5(B $(Cqir-(B
 ")
       (hinsimei "$(Cy!^rY#(B: ")
       (jishotouroku-yomi "$(C^vnp(B $(CTtVb!:(B%s$(C!;(B $(CGQ1[(B: ")
@@ -692,7 +694,7 @@
   (let ((wnn-server-type 'jserver)) (close-wnn))
   (setq jserver-list
 	(make-host-list
-	 name (or jserver-list (list (or wnn-host-name (getenv "JSERVER")))))))
+	 name (or jserver-list (list (or wnn-host-name (getenv "JSERVER") "localhost"))))))
 
 (fset 'set-jserver-host-name (symbol-function 'set-wnn-host-name))
 
@@ -702,7 +704,7 @@
   (let ((wnn-server-type 'cserver)) (close-wnn))
   (setq cserver-list
 	(make-host-list
-	 name (or cserver-list (list (or cwnn-host-name (getenv "CSERVER")))))))
+	 name (or cserver-list (list (or cwnn-host-name (getenv "CSERVER") "localhost"))))))
 
 (fset 'set-cserver-host-name (symbol-function 'set-cwnn-host-name))
 
@@ -712,7 +714,7 @@
   (let ((wnn-server-type 'kserver)) (close-wnn))
   (setq kserver-list
 	(make-host-list
-	 name (or kserver-list (list (or kwnn-host-name (getenv "KSERVER")))))))
+	 name (or kserver-list (list (or kwnn-host-name (getenv "KSERVER") "localhost"))))))
 
 (fset 'set-kserver-host-name (symbol-function 'set-kwnn-host-name))
 
@@ -721,13 +723,13 @@
       (let ((hostlist
 	     (cond ((eq wnn-server-type 'jserver)
 		    (or jserver-list
-			(list (or wnn-host-name (getenv "JSERVER")))))
+			(list (or wnn-host-name (getenv "JSERVER") "localhost"))))
 		   ((eq wnn-server-type 'cserver)
 		    (or cserver-list
-			(list (or cwnn-host-name (getenv "CSERVER")))))
+			(list (or cwnn-host-name (getenv "CSERVER") "localhost"))))
 		   ((eq wnn-server-type 'kserver)
 		    (or kserver-list
-			(list (or kwnn-host-name (getenv "KSERVER")))))))
+			(list (or kwnn-host-name (getenv "KSERVER") "localhost"))))))
 	    (loginname (user-login-name)))
 	(catch 'succ
 	  (while hostlist
@@ -1560,7 +1562,6 @@
 (define-key henkan-mode-map "\C-e" 'henkan-last-bunsetu)
 (define-key henkan-mode-map "\C-f" 'henkan-forward-bunsetu)
 (define-key henkan-mode-map "\C-g" 'henkan-quit)
-(define-key henkan-mode-map "\C-h" 'henkan-help-command)
 (define-key henkan-mode-map "\C-i" 'henkan-bunsetu-chijime-dai)
 (define-key henkan-mode-map "\C-k" 'henkan-kakutei-before-point)
 (define-key henkan-mode-map "\C-l" 'henkan-kakutei)
@@ -1576,7 +1577,8 @@
 (define-key henkan-mode-map "\C-z" 'henkan-next-kouho-sho)
 (define-key henkan-mode-map "\177" 'henkan-quit)
 (define-key henkan-mode-map [delete] 'henkan-quit)
-(define-key henkan-mode-map [backspace] 'henkan-quit)
+(define-key henkan-mode-map 'backspace 'henkan-quit)
+(define-key henkan-mode-map '(control h) 'henkan-help-command)
 (define-key henkan-mode-map [right] 'henkan-forward-bunsetu)
 (define-key henkan-mode-map [left] 'henkan-backward-bunsetu)
 (define-key henkan-mode-map [down] 'henkan-next-kouho)
--- a/lisp/egg/egg.el	Mon Aug 13 10:06:48 2007 +0200
+++ b/lisp/egg/egg.el	Mon Aug 13 10:07:35 2007 +0200
@@ -64,8 +64,8 @@
 ; last master version
 ;;; (defvar egg-version "3.09" "Version number of this version of Egg. ")
 ;;; Last modified date: Fri Sep 25 12:59:00 1992
-(defvar egg-version "3.09 xemacs" "Version number of this version of Egg. ")
-;;; Last modified date: Wed Feb 05 20:45:00 1997
+(defvar egg-version "3.10 xemacs" "Version number of this version of Egg. ")
+;;; Last modified date: Wed Nov 29 20:45:00 1997
 
 ;;;;  $B=$@5MW5a%j%9%H(B
 
@@ -73,6 +73,13 @@
 
 ;;;;  $B=$@5%a%b(B
 
+;;; 97.10.29 modified by J.Hein <jareth@camelot-soft.com>
+;;; fix to get rid of problem with C-h/backspace fuckage when in fence mode. Note
+;;; that the entire egg-read-event thing is a hack and really needs to be re-implemented.
+;;; I REALLY don't like the bandaids there...
+;;; Also added the egg-mode function, and modified the behavior so that just loading
+;;; egg will not change the user's state.
+
 ;;; 97.2.05 modified by J.Hein <jhod@po.iijnet.or.jp>
 ;;; Lots of mods to make it XEmacs workable. Most fixes revolve around the fact that
 ;;; Mule/et al assumes that all events are keypress events unless specified otherwise.
@@ -406,7 +413,8 @@
 	ch key)
     (next-command-event event)
     (setq key (event-key event))
-    (if (key-press-event-p event)
+    (if (and (key-press-event-p event) 
+	     (not (event-matches-key-specifier-p event 'backspace)))
 	(if (eq 0 (event-modifier-bits event))
 	    (setq ch (or (event-to-character event) key))
 	  (if (eq 1 (event-modifier-bits event))
@@ -2177,10 +2185,6 @@
 	  egg:*input-mode* (default-value 'egg:*input-mode*)
 	  egg:*in-fence-mode* (default-value 'egg:*in-fence-mode*))))
   
-(if (boundp 'select-window-hook)
-    (add-hook 'select-window-hook 'egg:select-window-hook)
-  (add-hook 'minibuffer-exit-hook 'egg:minibuffer-exit-hook)
-  (add-hook 'minibuffer-entry-hook 'egg:minibuffer-entry-hook))
 
 ;;;
 ;;;
@@ -2188,36 +2192,7 @@
 
 (defvar its:*reset-modeline-format* nil)
 
-(if its:*reset-modeline-format*
-    (setq-default modeline-format
-		  (cdr modeline-format)))
-
-(if (not (egg:find-symbol-in-tree 'mode-line-egg-mode modeline-format))
-    (setq-default 
-     modeline-format
-     (cons (list 'display-minibuffer-mode-in-minibuffer
-		 ;;; minibuffer mode in minibuffer
-		 (list 
-		  (list 'its:*previous-map* "<" "[")
-		  'mode-line-egg-mode
-		  (list 'its:*previous-map* ">" "]")
-		  )
-		       ;;;; minibuffer mode in mode line
-		 (list 
-		  (list 'minibuffer-window-selected
-			(list 'display-minibuffer-mode
-			      "m"
-			      " ")
-			" ")
-		  (list 'its:*previous-map* "<" "[")
-		  (list 'minibuffer-window-selected
-			(list 'display-minibuffer-mode
-			      'mode-line-egg-mode-in-minibuffer
-			      'mode-line-egg-mode)
-			'mode-line-egg-mode)
-		  (list 'its:*previous-map* ">" "]")
-		  ))
-	   modeline-format)))
+
 
 ;;;
 ;;; minibuffer $B$G$N%b!<%II=<($r$9$k$?$a$K(B nemacs 4 $B$GDj5A$5$l$?(B 
@@ -2246,7 +2221,6 @@
 	  mode-line-egg-mode str))
   (redraw-modeline t))
 
-(mode-line-egg-mode-update mode-line-egg-mode)
 
 ;;;
 ;;; egg mode line display
@@ -2583,6 +2557,7 @@
        (detach-extent egg:*fence-extent*) ))
 
 (defun enter-fence-mode ()
+
   ;; XEmacs change:
 ;  (buffer-disable-undo (current-buffer))
   (undo-boundary)
@@ -2704,8 +2679,9 @@
 ;; jhod: This seems bogus to me, as it should be called either after each
 ;; egg-self-insert, or after accepting input, but not both. Otherwise, I can't
 ;; really think of a use for it.
-(defvar egg-insert-after-hook nil "Hook to run when egg inserts a character
-in the buffer")
+(defvar egg-insert-after-hook nil
+  "Hook to run when egg inserts a character in the buffer")
+
 (make-variable-buffer-local 'egg-insert-after-hook)
 
 (defvar egg-exit-hook nil
@@ -2780,14 +2756,12 @@
   (egg:mode-line-display))
 
 (defun fence-mode-help-command ()
-  "Display documentation for fence-mode."
-  (interactive)
-  (let ((buf "*Help*"))
-    (if (eq (get-buffer buf) (current-buffer))
-	(henkan-quit)
-      (with-output-to-temp-buffer buf
-	(princ (substitute-command-keys "The keys that are defined for the fence mode here are:\\{fence-mode-map}"))
-	(print-help-return-message)))))
+  "Display fence mode help"
+  (interactive "_")
+  (let ((w (selected-window)))
+    (describe-function 'egg-mode)
+    (ding)
+    (select-window w)))
 
 (defvar fence-mode-map (make-keymap))
 
@@ -2815,7 +2789,6 @@
 (define-key fence-mode-map "\C-e" 'fence-end-of-line)
 (define-key fence-mode-map "\C-f" 'fence-forward-char)
 (define-key fence-mode-map "\C-g" 'fence-cancel-input)
-(define-key fence-mode-map "\C-h" 'fence-mode-help-command)
 (define-key fence-mode-map "\C-k" 'fence-kill-line)
 (define-key fence-mode-map "\C-l" 'fence-exit-mode)
 (define-key fence-mode-map "\C-m" 'fence-exit-mode)  ;;; RET
@@ -2828,7 +2801,8 @@
 (define-key fence-mode-map "\C-_" 'jis-code-input)
 (define-key fence-mode-map "\177" 'fence-backward-delete-char)
 (define-key fence-mode-map [delete] 'fence-backward-delete-char)
-(define-key fence-mode-map [backspace] 'fence-backward-delete-char)
+(define-key fence-mode-map 'backspace 'fence-backward-delete-char)
+(define-key fence-mode-map '(control h) 'fence-mode-help-command)
 (define-key fence-mode-map [right] 'fence-forward-char)
 (define-key fence-mode-map [left] 'fence-backward-char)
 
@@ -2886,46 +2860,85 @@
 	 ((consp code) (eval code))
 	 )))
 
-(define-key global-map "\C-^"  'special-symbol-input)
 
 (autoload 'busyu-input "egg-busyu" nil t)
 (autoload 'kakusuu-input "egg-busyu" nil t)
 
-;; put us into all existing buffer's modelines
-(if (not (featurep 'egg))
-    (mapc-internal
-     (lambda (buf) 
-       (save-excursion
-	 (set-buffer buf)
-	 (setq modeline-format (cons (list 'display-minibuffer-mode-in-minibuffer
+(defun egg-mode ()
+  "The keys that are defined for the fence mode in egg are:\\{fence-mode-map}"
+  (interactive)
+  (define-key global-map "\C-^"  'special-symbol-input)
+  (if (not (egg:find-symbol-in-tree 'mode-line-egg-mode modeline-format))
+      (setq-default 
+       modeline-format
+       (cons (list 'display-minibuffer-mode-in-minibuffer
 		 ;;; minibuffer mode in minibuffer
-					   (list 
-					    (list 'its:*previous-map* "<" "[")
-					    'mode-line-egg-mode
-					    (list 'its:*previous-map* ">" "]")
-					    )
+		   (list 
+		    (list 'its:*previous-map* "<" "[")
+		    'mode-line-egg-mode
+		    (list 'its:*previous-map* ">" "]")
+		    )
 		       ;;;; minibuffer mode in mode line
-					   (list 
-					    (list 'minibuffer-window-selected
-						  (list 'display-minibuffer-mode
-							"m"
-							" ")
-						  " ")
-					    (list 'its:*previous-map* "<" "[")
-					    (list 'minibuffer-window-selected
-						  (list 'display-minibuffer-mode
-							'mode-line-egg-mode-in-minibuffer
-							'mode-line-egg-mode)
-						  'mode-line-egg-mode)
-					    (list 'its:*previous-map* ">" "]")
-					    ))
-				     modeline-format))))
-     (buffer-list)))
+		   (list 
+		    (list 'minibuffer-window-selected
+			  (list 'display-minibuffer-mode
+				"m"
+				" ")
+			  " ")
+		    (list 'its:*previous-map* "<" "[")
+		    (list 'minibuffer-window-selected
+			  (list 'display-minibuffer-mode
+				'mode-line-egg-mode-in-minibuffer
+				'mode-line-egg-mode)
+			  'mode-line-egg-mode)
+		    (list 'its:*previous-map* ">" "]")
+		    ))
+	     modeline-format)))
+  ;; put us into the modeline of all existing buffers
+  (mapc (lambda (buf)
+	  (save-excursion
+	    (set-buffer buf)
+	    (if (not (egg:find-symbol-in-tree 'mode-line-egg-mode modeline-format))
+		(setq modeline-format
+		      (cons (list 'display-minibuffer-mode-in-minibuffer
+		 ;;; minibuffer mode in minibuffer
+				  (list 
+				   (list 'its:*previous-map* "<" "[")
+				   'mode-line-egg-mode
+				   (list 'its:*previous-map* ">" "]")
+				   )
+		       ;;;; minibuffer mode in mode line
+				  (list 
+				   (list 'minibuffer-window-selected
+					 (list 'display-minibuffer-mode
+					       "m"
+					       " ")
+					 " ")
+				   (list 'its:*previous-map* "<" "[")
+				   (list 'minibuffer-window-selected
+					 (list 'display-minibuffer-mode
+					       'mode-line-egg-mode-in-minibuffer
+					       'mode-line-egg-mode)
+					 'mode-line-egg-mode)
+				   (list 'its:*previous-map* ">" "]")
+				   ))
+			    modeline-format)))))
+	(buffer-list))
+  (if (boundp 'select-window-hook)
+      (add-hook 'select-window-hook 'egg:select-window-hook)
+    (add-hook 'minibuffer-exit-hook 'egg:minibuffer-exit-hook)
+    (add-hook 'minibuffer-entry-hook 'egg:minibuffer-entry-hook))
+  (mode-line-egg-mode-update mode-line-egg-mode)
+  (if its:*reset-modeline-format*
+      (setq-default modeline-format
+		    (cdr modeline-format)))
+
+  ;; if set-lang-environment has already been called,
+  ;; call egg-lang-switch-callback
+  (if (not (null current-language-environment))
+      (egg-lang-switch-callback))
+  )
 
 (provide 'egg)
 
-;; if set-lang-environment has already been called, call egg-lang-switch-callback
-(if (not (null current-language-environment))
-    (egg-lang-switch-callback))
-
 ;;; egg.el ends here
--- a/lisp/emulators/crisp.el	Mon Aug 13 10:06:48 2007 +0200
+++ b/lisp/emulators/crisp.el	Mon Aug 13 10:07:35 2007 +0200
@@ -2,13 +2,34 @@
 
 ;; Author: Gary D. Foster <Gary.Foster@corp.sun.com>
 ;; Created: 01 Mar 1996
-;; Version: $Revision: 1.7 $
+;; Version: 1.26
 ;; Keywords: emulations brief crisp
 ;; X-Modified-by:
-;;	$Log: crisp.el,v $
-;;	Revision 1.7  1997/11/12 07:09:59  steve
-;;	Patches to beta4
-;;	
+;;	crisp.el,v
+;;	Revision 1.26  1997/11/18 05:41:02  gfoster
+;;	Added several new keybindings:
+;;		C-home	top of window
+;;		C-end	bottom of window
+;;		M-home	beginning of line
+;;		M-end	end-of-line
+;;		C-F	format region
+;;		M-l	mark line
+;;		M-m	set mark
+;;	Added crisp-version function
+;;
+;;	Revision 1.25  1997/11/18 04:19:09  gfoster
+;;	Shortened the version numbering, removed the release-version tracking
+;;
+;;	Revision 1.24  1997/11/18 04:15:54  gfoster
+;;	Added `crisp-submit-bug-report' (shamelessly cribbed from Barry's
+;;	cc-mode.  Thanks Barry!)
+;;
+;;	Bound the above to C-c b
+;;
+;;	Changed the behavior of `crisp-(kill|copy)-line' so (kill|copy)ing
+;;	works on the region from point to eol instead of the entire line, when
+;;	a region is not highlighted.
+;;
 ;;	Revision 1.23  1997/11/11 19:47:02  gfoster
 ;;	Merged changes suggested by Hrvoje Niksic
 ;;	   make crisp-mode-map a sparse keymap parented from current-global-map
@@ -131,8 +152,11 @@
 (defvar crisp-load-hook nil
   "Hooks to run after loading the CRiSP emulator package.")
 
-(defconst crisp-version "crisp.el release 1.1/$Revision: 1.7 $"
-  "The release number and RCS version for the CRiSP emulator.")
+(defconst crisp-version "1.26"
+  "The version of the CRiSP emulator.")
+
+(defconst crisp-mode-help-address "gfoster@suzieq.ragesoft.com, Gary.Foster@corp.Sun.COM"
+  "The email address of the CRiSP mode author/maintainer.")
 
 ;; Silence the byte-compiler.
 (defvar last-last-command)
@@ -153,23 +177,23 @@
 
 (define-key crisp-mode-map [(f5)]           'search-forward-regexp)
 (define-key crisp-mode-map [(f19)]          'search-forward-regexp)
-(define-key crisp-mode-map [(meta f5)]       'search-backward-regexp)
+(define-key crisp-mode-map [(meta f5)]      'search-backward-regexp)
 
 (define-key crisp-mode-map [(f6)]           'query-replace)
 
 (define-key crisp-mode-map [(f7)]           'start-kbd-macro)
-(define-key crisp-mode-map [(meta f7)]       'end-kbd-macro)
+(define-key crisp-mode-map [(meta f7)]      'end-kbd-macro)
 
 (define-key crisp-mode-map [(f8)]           'call-last-kbd-macro)
 (define-key crisp-mode-map [(meta f8)]      'save-kbd-macro)
 
 (define-key crisp-mode-map [(f9)]           'find-file)
-(define-key crisp-mode-map [(meta f9)]       'load-library)
+(define-key crisp-mode-map [(meta f9)]      'load-library)
 
 (define-key crisp-mode-map [(f10)]          'execute-extended-command)
-(define-key crisp-mode-map [(meta f10)]      'compile)
+(define-key crisp-mode-map [(meta f10)]     'compile)
 
-(define-key crisp-mode-map [(SunF37)]          'kill-buffer)
+(define-key crisp-mode-map [(SunF37)]       'kill-buffer)
 (define-key crisp-mode-map [(kp-add)]       'crisp-copy-line)
 (define-key crisp-mode-map [(kp-subtract)]  'crisp-kill-line)
 (define-key crisp-mode-map [(insert)]       'x-yank-clipboard-selection)
@@ -177,38 +201,82 @@
 (define-key crisp-mode-map [(f20)]          'x-kill-primary-selection) ; cut on Sun5 kbd 
 (define-key crisp-mode-map [(f18)]          'x-yank-clipboard-selection) ; paste on Sun5 kbd
 
-(define-key crisp-mode-map [(meta d)]       (lambda () (interactive) (beginning-of-line) (kill-line)))
+(define-key crisp-mode-map [(control f)]    'fill-paragraph-or-region)
+(define-key crisp-mode-map [(meta d)]       (lambda ()
+					      (interactive)
+					      (beginning-of-line) (kill-line)))
 (define-key crisp-mode-map [(meta e)]       'find-file)
 (define-key crisp-mode-map [(meta g)]       'goto-line)
 (define-key crisp-mode-map [(meta h)]       'help)
 (define-key crisp-mode-map [(meta i)]       'overwrite-mode)
 (define-key crisp-mode-map [(meta j)]       'bookmark-jump)
+(define-key crisp-mode-map [(meta l)]       'crisp-mark-line)
+(define-key crisp-mode-map [(meta m)]       'set-mark-command)
 (define-key crisp-mode-map [(meta n)]       'bury-buffer)
 (define-key crisp-mode-map [(meta p)]       'crisp-unbury-buffer)
 (define-key crisp-mode-map [(meta u)]       'advertised-undo)
 (define-key crisp-mode-map [(f14)]          'advertised-undo)
 (define-key crisp-mode-map [(meta w)]       'save-buffer)
 (define-key crisp-mode-map [(meta x)]       'crisp-meta-x-wrapper)
-(define-key crisp-mode-map [(meta ?0)]      (lambda () (interactive) (bookmark-set "0")))
-(define-key crisp-mode-map [(meta ?1)]      (lambda () (interactive) (bookmark-set "1")))
-(define-key crisp-mode-map [(meta ?2)]      (lambda () (interactive) (bookmark-set "2")))
-(define-key crisp-mode-map [(meta ?3)]      (lambda () (interactive) (bookmark-set "3")))
-(define-key crisp-mode-map [(meta ?4)]      (lambda () (interactive) (bookmark-set "4")))
-(define-key crisp-mode-map [(meta ?5)]      (lambda () (interactive) (bookmark-set "5")))
-(define-key crisp-mode-map [(meta ?6)]      (lambda () (interactive) (bookmark-set "6")))
-(define-key crisp-mode-map [(meta ?7)]      (lambda () (interactive) (bookmark-set "7")))
-(define-key crisp-mode-map [(meta ?8)]      (lambda () (interactive) (bookmark-set "8")))
-(define-key crisp-mode-map [(meta ?9)]      (lambda () (interactive) (bookmark-set "9")))
+(define-key crisp-mode-map [(meta ?0)]      (lambda ()
+					      (interactive)
+					      (bookmark-set "0")))
+(define-key crisp-mode-map [(meta ?1)]      (lambda ()
+					      (interactive)
+					      (bookmark-set "1")))
+(define-key crisp-mode-map [(meta ?2)]      (lambda ()
+					      (interactive)
+					      (bookmark-set "2")))
+(define-key crisp-mode-map [(meta ?3)]      (lambda ()
+					      (interactive)
+					      (bookmark-set "3")))
+(define-key crisp-mode-map [(meta ?4)]      (lambda ()
+					      (interactive)
+					      (bookmark-set "4")))
+(define-key crisp-mode-map [(meta ?5)]      (lambda ()
+					      (interactive)
+					      (bookmark-set "5")))
+(define-key crisp-mode-map [(meta ?6)]      (lambda ()
+					      (interactive)
+					      (bookmark-set "6")))
+(define-key crisp-mode-map [(meta ?7)]      (lambda ()
+					      (interactive)
+					      (bookmark-set "7")))
+(define-key crisp-mode-map [(meta ?8)]      (lambda ()
+					      (interactive)
+					      (bookmark-set "8")))
+(define-key crisp-mode-map [(meta ?9)]      (lambda ()
+					      (interactive)
+					      (bookmark-set "9")))
 
-(define-key crisp-mode-map [(shift right)]  'fkey-forward-word)
-(define-key crisp-mode-map [(shift left)]   'fkey-backward-word)
-(define-key crisp-mode-map [(shift delete)] 'kill-word)
+(define-key crisp-mode-map [(shift right)]     'fkey-forward-word)
+(define-key crisp-mode-map [(shift left)]      'fkey-backward-word)
+(define-key crisp-mode-map [(shift delete)]    'kill-word)
 (define-key crisp-mode-map [(shift backspace)] 'backward-kill-word)
-(define-key crisp-mode-map [(control left)] 'backward-word)
-(define-key crisp-mode-map [(control right)] 'forward-word)
+(define-key crisp-mode-map [(control left)]    'backward-word)
+(define-key crisp-mode-map [(control right)]   'forward-word)
 
-(define-key crisp-mode-map [(home)] 'crisp-home)
-(define-key crisp-mode-map [(end)] 'crisp-end)
+(define-key crisp-mode-map [(home)]            'crisp-home)
+(define-key crisp-mode-map [(control home)]    (lambda ()
+						 (interactive)
+						 (move-to-window-line 0)))
+(define-key crisp-mode-map [(meta home)]       'beginning-of-line)
+(define-key crisp-mode-map [(end)]             'crisp-end)
+(define-key crisp-mode-map [(control end)]     (lambda ()
+						 (interactive)
+						 (move-to-window-line -1)))
+(define-key crisp-mode-map [(meta end)]        'end-of-line)
+
+(define-key crisp-mode-map [(control c) (b)]   'crisp-submit-bug-report)
+
+(defun crisp-version (&optional arg)
+  "Version number of the CRiSP emulator package.
+If ARG, insert results at point."
+  (interactive "P")
+  (let ((foo (concat "CRiSP version " crisp-version)))
+    (if arg
+	(insert (message foo))
+      (message foo))))
 
 (defun crisp-mark-line (arg)
   "Put mark at the end of line.  Arg works as in `end-of-line'."
@@ -217,23 +285,23 @@
 
 (defun crisp-kill-line (arg)
   "Mark and kill line(s).
-Marks the entire current line (honoring prefix arguments), copies the
-region to the kill ring and clipboard, and then deletes it."
+Marks from point to end of the current line (honoring prefix arguments),
+copies the region to the kill ring and clipboard, and then deletes it."
   (interactive "*p")
   (if zmacs-region-active-p
       (x-kill-primary-selection)
-    (beginning-of-line)
     (crisp-mark-line arg)
     (x-kill-primary-selection)))
 
 (defun crisp-copy-line (arg)
-  "Mark and copy entire current line (honoring prefix arguments), copies the
-region to the kill ring and clipboard, and then deactivates the region."
+  "Mark and copy line(s).
+Marks from point to end of the current line (honoring prefix arguments),
+copies the region to the kill ring and clipboard, and then deactivates
+the region."
   (interactive "*p")
   (let ((curpos (point)))
     (if zmacs-region-active-p
 	(x-copy-primary-selection)
-      (beginning-of-line)
       (crisp-mark-line arg)
       (x-copy-primary-selection)
       (goto-char curpos))))
@@ -284,6 +352,31 @@
       (save-buffers-kill-emacs)
     (call-interactively 'execute-extended-command)))
 
+;; bug reporter
+
+(defun crisp-submit-bug-report ()
+  "Submit via mail a bug report on CC Mode."
+  (interactive)
+  (require 'cc-vars)
+  ;; load in reporter
+  (let ((reporter-prompt-for-summary-p t)
+	(reporter-dont-compact-list '(c-offsets-alist))
+	(style c-indentation-style)
+	(hook c-special-indent-hook)
+	(c-features c-emacs-features))
+    (and
+     (if (y-or-n-p "Do you want to submit a report on CRiSP Mode? ")
+	 t (message "") nil)
+     (require 'reporter)
+     (reporter-submit-bug-report
+      crisp-mode-help-address
+      (concat "CRiSP Mode [" crisp-version "]")
+      nil
+      nil
+      nil
+      "Dear Gary,"
+      ))))
+
 ;; Now enable the mode
 
 (defun crisp-mode (&optional arg)
--- a/lisp/format.el	Mon Aug 13 10:06:48 2007 +0200
+++ b/lisp/format.el	Mon Aug 13 10:07:35 2007 +0200
@@ -22,7 +22,7 @@
 ;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 ;; 02111-1307, USA.
 
-;;; Synched up with: Emacs/Mule zeta.
+;;; Synched up with: Emacs 20.2.
 
 ;;; Commentary:
 
@@ -83,40 +83,110 @@
     (text/richtext "Extended MIME obsolete text/richtext format."
 		   "Content-[Tt]ype:[ \t]*text/richtext"
 		   richtext-decode richtext-encode t enriched-mode)
-    (plain "Standard ASCII format, no text properties."
+    (plain "ISO 8859-1 standard format, no text properties."
 	   ;; Plain only exists so that there is an obvious neutral choice in
 	   ;; the completion list.
-	   nil nil nil nil nil))
+	   nil nil nil nil nil)
+    ;; (ibm   "IBM Code Page 850 (DOS)" 
+    ;;        "1\\(^\\)"
+    ;;        "recode ibm-pc:latin1" "recode latin1:ibm-pc" t nil)
+    ;; (mac   "Apple Macintosh" 
+    ;;        "1\\(^\\)"
+    ;;        "recode mac:latin1" "recode latin1:mac" t nil)
+    ;; (hp    "HP Roman8" 
+    ;;        "1\\(^\\)"
+    ;;        "recode roman8:latin1" "recode latin1:roman8" t nil)
+    ;; (TeX   "TeX (encoding)"  
+    ;;        "1\\(^\\)"
+    ;;        iso-tex2iso iso-iso2tex t nil)
+    ;; (gtex  "German TeX (encoding)" 
+    ;;        "1\\(^\\)"
+    ;;        iso-gtex2iso iso-iso2gtex t nil)
+    ;; (html  "HTML (encoding)" 
+    ;;        "1\\(^\\)"
+    ;;        "recode html:latin1" "recode latin1:html" t nil)
+    ;; (rot13 "rot13" 
+    ;;        "1\\(^\\)"
+    ;;        "tr a-mn-z n-za-m" "tr a-mn-z n-za-m" t nil)
+    ;; (duden "Duden Ersatzdarstellung" 
+    ;;        "1\\(^\\)"
+    ;;        "diac" iso-iso2duden t nil) 
+    ;; (de646 "German ASCII (ISO 646)" 
+    ;;        "1\\(^\\)"
+    ;;        "recode iso646-ge:latin1" "recode latin1:iso646-ge" t nil)
+    ;; (denet "net German" 
+    ;;        "1\\(^\\)"
+    ;;        iso-german iso-cvt-read-only t nil)
+    ;; (esnet "net Spanish" 
+    ;;        "1\\(^\\)"
+    ;;        iso-spanish iso-cvt-read-only t nil)
+    )
   "List of information about understood file formats.
 Elements are of the form \(NAME DOC-STR REGEXP FROM-FN TO-FN MODIFY MODE-FN).
+
 NAME    is a symbol, which is stored in `buffer-file-format'.
+
 DOC-STR should be a single line providing more information about the
         format.  It is currently unused, but in the future will be shown to
         the user if they ask for more information.
+
 REGEXP  is a regular expression to match against the beginning of the file;
         it should match only files in that format.
+
 FROM-FN is called to decode files in that format; it gets two args, BEGIN 
         and END, and can make any modifications it likes, returning the new
         end.  It must make sure that the beginning of the file no longer
         matches REGEXP, or else it will get called again.
+	Alternatively, FROM-FN can be a string, which specifies a shell command
+	(including options) to be used as a filter to perform the conversion.
+
 TO-FN   is called to encode a region into that format; it is passed three
         arguments: BEGIN, END, and BUFFER.  BUFFER is the original buffer that
         the data being written came from, which the function could use, for
         example, to find the values of local variables.  TO-FN should either
         return a list of annotations like `write-region-annotate-functions',
         or modify the region and return the new end.
+	Alternatively, TO-FN can be a string, which specifies a shell command
+	(including options) to be used as a filter to perform the conversion.
+
 MODIFY, if non-nil, means the TO-FN wants to modify the region.  If nil,
         TO-FN will not make any changes but will instead return a list of
         annotations. 
+
 MODE-FN, if specified, is called when visiting a file with that format.")
 
 ;;; Basic Functions (called from Lisp)
 
-(defun format-annotate-function (format from to)
+(defun format-encode-run-method (method from to &optional buffer)
+  "Translate using function or shell script METHOD the text from FROM to TO.
+If METHOD is a string, it is a shell command;
+otherwise, it should be a Lisp function.
+BUFFER should be the buffer that the output originally came from."
+  (if (stringp method)
+      (save-current-buffer
+	(set-buffer buffer)
+	(with-output-to-temp-buffer "*Format Errors*"
+	  (shell-command-on-region from to method t nil standard-output))
+	(point))
+    (funcall method from to buffer)))
+
+(defun format-decode-run-method (method from to &optional buffer)
+  "Decode using function or shell script METHOD the text from FROM to TO.
+If METHOD is a string, it is a shell command;
+otherwise, it should be a Lisp function."
+  (if (stringp method)
+      (progn
+	(with-output-to-temp-buffer "*Format Errors*"
+	  (shell-command-on-region from to method t nil standard-output))
+	(point))
+    (funcall method from to)))
+
+(defun format-annotate-function (format from to orig-buf)
   "Returns annotations for writing region as FORMAT.
 FORMAT is a symbol naming one of the formats defined in `format-alist',
 it must be a single symbol, not a list like `buffer-file-format'.
 FROM and TO delimit the region to be operated on in the current buffer.
+ORIG-BUF is the original buffer that the data came from.
 This function works like a function on `write-region-annotate-functions':
 it either returns a list of annotations, or returns with a different buffer
 current, which contains the modified text to write.
@@ -134,10 +204,10 @@
 	      (copy-to-buffer copy-buf from to)
 	      (set-buffer copy-buf)
 	      (format-insert-annotations write-region-annotations-so-far from)
-	      (funcall to-fn (point-min) (point-max))
+	      (format-encode-run-method to-fn (point-min) (point-max) orig-buf)
 	      nil)
 	  ;; Otherwise just call function, it will return annotations.
-	  (funcall to-fn from to)))))
+	  (funcall to-fn from to orig-buf)))))
 
 (defun format-decode (format length &optional visit-flag)
   ;; This function is called by insert-file-contents whenever a file is read.
@@ -171,7 +241,8 @@
 		  (progn
 		    (setq format (cons (car f) format))
 		    ;; Decode it
-		    (if (nth 3 f) (setq end (funcall (nth 3 f) begin end)))
+		    (if (nth 3 f)
+			(setq end (format-decode-run-method (nth 3 f) begin end)))
 		    ;; Call visit function if required
 		    (if (and visit-flag (nth 6 f)) (funcall (nth 6 f) 1))
 		    ;; Safeguard against either of the functions changing pt.
@@ -186,7 +257,8 @@
 	  (or (setq f (assq (car do) format-alist))
 	      (error "Unknown format" (car do)))
 	  ;; Decode:
-	  (if (nth 3 f) (setq end (funcall (nth 3 f) begin end)))
+	  (if (nth 3 f)
+	      (setq end (format-decode-run-method (nth 3 f) begin end)))
 	  ;; Call visit function if required
 	  (if (and visit-flag (nth 6 f)) (funcall (nth 6 f) 1))
 	  (setq do (cdr do)))))
@@ -253,7 +325,8 @@
 	      )
 	 (if to-fn
 	     (if modify
-		 (setq end (funcall to-fn beg end (current-buffer)))
+		 (setq end (format-encode-run-method to-fn beg end
+						     (current-buffer)))
 	       (format-insert-annotations
 		(funcall to-fn beg end (current-buffer)))))
 	 (setq format (cdr format)))))))
@@ -485,97 +558,113 @@
 
 	    ;; Delete the annotation
 	    (delete-region loc end)
-	    (if positive
-		;; Positive annotations are stacked, remembering location
-		(setq open-ans (cons (list name loc) open-ans))
-	      ;; It is a negative annotation:
-	      ;; Close the top annotation & add its text property.
-	      ;; If the file's nesting is messed up, the close might not match
-	      ;; the top thing on the open-annotations stack.
-	      ;; If no matching annotation is open, just ignore the close.
-	      (if (not (assoc name open-ans))
-		  (message "Extra closing annotation (%s) in file" name)
-	      ;; If one is open, but not on the top of the stack, close
-	      ;; the things in between as well.  Set `found' when the real
-	      ;; one is closed.
-		(while (not found)
-		  (let* ((top (car open-ans)) ; first on stack: should match.
-			 (top-name (car top))
-			 (start (car (cdr top))) ; location of start
-			 (params (cdr (cdr top))) ; parameters
-			 (aalist translations)
-			 (matched nil))
-		    (if (equal name top-name)
-			(setq found t)
-		      (message "Improper nesting in file."))
-		    ;; Look through property names in TRANSLATIONS
-		    (while aalist
-		      (let ((prop (car (car aalist)))
-			    (alist (cdr (car aalist))))
-			;; And look through values for each property
-			(while alist
-			  (let ((value (car (car alist)))
-				(ans (cdr (car alist))))
-			    (if (member top-name ans)
-				;; This annotation is listed, but still have to
-				;; check if multiple annotations are satisfied
-				(if (member 'nil (mapcar 
-						  (lambda (r)
-						    (assoc r open-ans))
-						  ans))
-				    nil	; multiple ans not satisfied
-				  ;; Yes, all set.
-				  ;; If there are multiple annotations going
-				  ;; into one text property, adjust the 
-				  ;; begin points of the other annotations
-				  ;; so that we don't get double marking.
-				  (let ((to-reset ans)
-					this-one)
-				    (while to-reset
-				      (setq this-one
-					    (assoc (car to-reset) 
-						   (cdr open-ans)))
-				      (if this-one
-					  (setcar (cdr this-one) loc))
-				      (setq to-reset (cdr to-reset))))
-				  ;; Set loop variables to nil so loop
-				  ;; will exit.
-				  (setq alist nil aalist nil matched t
-					;; pop annotation off stack.
-					open-ans (cdr open-ans))
-				  (cond 
-				   ;; Check for pseudo-properties
-				   ((eq prop 'PARAMETER)
-				    ;; This is a parameter of the top open ann:
-				    ;; delete text and use as arg.
-				    (if open-ans
-					;; (If nothing open, discard).
-					(setq open-ans
-					      (cons (append (car open-ans)
-							    (list
-							     (buffer-substring
-							      start loc)))
-						    (cdr open-ans))))
-				    (delete-region start loc))
-				   ((eq prop 'FUNCTION)
-				    ;; Not a property, but a function to call.
-				    (let ((rtn (apply value start loc params)))
-				      (if rtn (setq todo (cons rtn todo)))))
-				   (t 
-				    ;; Normal property/value pair
-				    (setq todo 
-					  (cons (list start loc prop value)
-						todo)))))))
-			  (setq alist (cdr alist))))
-		      (setq aalist (cdr aalist)))
-		    (if matched
-			nil
+	    (cond
+	     ;; Positive annotations are stacked, remembering location
+	     (positive (setq open-ans (cons `(,name ((,loc . nil))) open-ans)))
+	     ;; It is a negative annotation:
+	     ;; Close the top annotation & add its text property.
+	     ;; If the file's nesting is messed up, the close might not match
+	     ;; the top thing on the open-annotations stack.
+	     ;; If no matching annotation is open, just ignore the close.
+	     ((not (assoc name open-ans))
+	      (message "Extra closing annotation (%s) in file" name))
+	     ;; If one is open, but not on the top of the stack, close
+	     ;; the things in between as well.  Set `found' when the real
+	     ;; one is closed.
+	     (t
+	      (while (not found)
+		(let* ((top (car open-ans))	; first on stack: should match.
+		       (top-name (car top))	; text property name
+		       (top-extents (nth 1 top)) ; property regions
+		       (params (cdr (cdr top)))	; parameters
+		       (aalist translations)
+		       (matched nil))
+		  (if (equal name top-name)
+		      (setq found t)
+		    (message "Improper nesting in file."))
+		  ;; Look through property names in TRANSLATIONS
+		  (while aalist
+		    (let ((prop (car (car aalist)))
+			  (alist (cdr (car aalist))))
+		      ;; And look through values for each property
+		      (while alist
+			(let ((value (car (car alist)))
+			      (ans (cdr (car alist))))
+			  (if (member top-name ans)
+			      ;; This annotation is listed, but still have to
+			      ;; check if multiple annotations are satisfied
+			      (if (member nil (mapcar (lambda (r)
+							(assoc r open-ans))
+						      ans))
+				  nil	; multiple ans not satisfied
+				;; If there are multiple annotations going
+				;; into one text property, split up the other
+				;; annotations so they apply individually to
+				;; the other regions.
+				(setcdr (car top-extents) loc)
+				(let ((to-split ans) this-one extents)
+				  (while to-split
+				    (setq this-one
+					  (assoc (car to-split) open-ans)
+					  extents (nth 1 this-one))
+				    (if (not (eq this-one top))
+					(setcar (cdr this-one)
+						(format-subtract-regions
+						 extents top-extents)))
+				    (setq to-split (cdr to-split))))
+				;; Set loop variables to nil so loop
+				;; will exit.
+				(setq alist nil aalist nil matched t
+				      ;; pop annotation off stack.
+				      open-ans (cdr open-ans))
+				(let ((extents top-extents)
+				      (start (car (car top-extents)))
+				      (loc (cdr (car top-extents))))
+				  (while extents
+				    (cond
+				     ;; Check for pseudo-properties
+				     ((eq prop 'PARAMETER)
+				      ;; A parameter of the top open ann:
+				      ;; delete text and use as arg.
+				      (if open-ans
+					  ;; (If nothing open, discard).
+					  (setq open-ans
+						(cons
+						 (append (car open-ans)
+							 (list
+							  (buffer-substring
+							   start loc)))
+						 (cdr open-ans))))
+				      (delete-region start loc))
+				     ((eq prop 'FUNCTION)
+				      ;; Not a property, but a function.
+				      (let ((rtn
+					     (apply value start loc params)))
+					(if rtn (setq todo (cons rtn todo)))))
+				     (t
+				      ;; Normal property/value pair
+				      (setq todo
+					    (cons (list start loc prop value)
+						  todo))))
+				    (setq extents (cdr extents)
+					  start (car (car extents))
+					  loc (cdr (car extents))))))))
+			(setq alist (cdr alist))))
+		    (setq aalist (cdr aalist)))
+		  (if (not matched)
 		      ;; Didn't find any match for the annotation:
 		      ;; Store as value of text-property `unknown'.
-		      (setq open-ans (cdr open-ans))
-		      (setq todo (cons (list start loc 'unknown top-name)
-				       todo))
-		      (setq unknown-ans (cons name unknown-ans)))))))))
+		      (let ((extents top-extents)
+			    (start (car (car top-extents)))
+			    (loc (cdr (car top-extents))))
+			(while extents
+			  (setq open-ans (cdr open-ans)
+				todo (cons (list start loc 'unknown top-name)
+					   todo)
+				unknown-ans (cons name unknown-ans)
+				extents (cdr extents)
+				start (car (car extents))
+				loc (cdr (car extents))))))))))))
 
 	;; Once entire file has been scanned, add the properties.
 	(while todo
@@ -584,21 +673,71 @@
 		 (to   (nth 1 item))
 		 (prop (nth 2 item))
 		 (val  (nth 3 item)))
-	
-	    (put-text-property 
+
+	    (if (numberp val)	; add to ambient value if numeric
+		(format-property-increment-region from to prop val 0)
+	      (put-text-property
 	       from to prop
-	       (cond ((numberp val) ; add to ambient value if numeric
-		      (+ val (or (get-text-property from prop) 0)))
-		     ((get prop 'format-list-valued) ; value gets consed onto
+	       (cond ((get prop 'format-list-valued) ; value gets consed onto
 						     ; list-valued properties
 		      (let ((prev (get-text-property from prop)))
 			(cons val (if (listp prev) prev (list prev)))))
-		     (t val)))) ; normally, just set to val.
+		     (t val))))) ; normally, just set to val.
 	  (setq todo (cdr todo)))
-    
+
 	(if unknown-ans
 	    (message "Unknown annotations: %s" unknown-ans))))))
 
+(defun format-subtract-regions (minu subtra)
+  "Remove the regions in SUBTRAHEND from the regions in MINUEND.  A region
+is a dotted pair (from . to).  Both parameters are lists of regions.  Each
+list must contain nonoverlapping, noncontiguous regions, in descending
+order.  The result is also nonoverlapping, noncontiguous, and in descending
+order.  The first element of MINUEND can have a cdr of nil, indicating that
+the end of that region is not yet known."
+  (let* ((minuend (copy-alist minu))
+	 (subtrahend (copy-alist subtra))
+	 (m (car minuend))
+	 (s (car subtrahend))
+	 results)
+    (while (and minuend subtrahend)
+      (cond 
+       ;; The minuend starts after the subtrahend ends; keep it.
+       ((> (car m) (cdr s))
+	(setq results (cons m results)
+	      minuend (cdr minuend)
+	      m (car minuend)))
+       ;; The minuend extends beyond the end of the subtrahend.  Chop it off.
+       ((or (null (cdr m)) (> (cdr m) (cdr s)))
+	(setq results (cons (cons (1+ (cdr s)) (cdr m)) results))
+	(setcdr m (cdr s)))
+       ;; The subtrahend starts after the minuend ends; throw it away.
+       ((< (cdr m) (car s))
+	(setq subtrahend (cdr subtrahend) s (car subtrahend)))
+       ;; The subtrahend extends beyond the end of the minuend.  Chop it off.
+       (t	;(<= (cdr m) (cdr s)))
+	(if (>= (car m) (car s))
+	    (setq minuend (cdr minuend) m (car minuend))
+	  (setcdr m (1- (car s)))
+	  (setq subtrahend (cdr subtrahend) s (car subtrahend))))))
+    (nconc (nreverse results) minuend)))
+
+;; This should probably go somewhere other than format.el.  Then again,
+;; indent.el has alter-text-property.  NOTE: We can also use
+;; next-single-property-change instead of text-property-not-all, but then
+;; we have to see if we passed TO.
+(defun format-property-increment-region (from to prop delta default)
+  "Increment property PROP over the region between FROM and TO by the
+amount DELTA (which may be negative).  If property PROP is nil anywhere
+in the region, it is treated as though it were DEFAULT."
+  (let ((cur from) val newval next)
+    (while cur
+      (setq val    (get-text-property cur prop)
+	    newval (+ (or val default) delta)
+	    next   (text-property-not-all cur to prop val))
+      (put-text-property cur (or next to) prop newval)
+      (setq cur next))))
+
 ;;;
 ;;; Encoding
 ;;;
@@ -775,11 +914,6 @@
 	)
     (if (not prop-alist)
 	nil
-      ;; If property is numeric, nil means 0
-      (cond ((and (numberp old) (null new))
-	     (setq new 0))
-	    ((and (numberp new) (null old))
-	     (setq old 0)))
       ;; If either old or new is a list, have to treat both that way.
       (if (or (consp old) (consp new))
 	  (let* ((old (if (listp old) old (list old)))
@@ -805,23 +939,34 @@
   "Internal function annotate a single property change.
 PROP-ALIST is the relevant segment of a TRANSLATIONS list.
 OLD and NEW are the values."
-  (cond
-   ;; Numerical annotation - use difference
-   ((and (numberp old) (numberp new))
-    (let* ((entry (progn
-		    (while (and (car (car prop-alist))
-				(not (numberp (car (car prop-alist)))))
-		      (setq prop-alist (cdr prop-alist)))
-		    (car prop-alist)))
-	   (increment (car (car prop-alist)))
-	   (n (ceiling (/ (float (- new old)) (float increment))))
-	   (anno (car (cdr (car prop-alist)))))
-      (if (> n 0)
-	  (cons nil (make-list n anno))
-	(cons (make-list (- n) anno) nil))))
+  (let (num-ann)
+    ;; If old and new values are numbers,
+    ;; look for a number in PROP-ALIST.
+    (if (and (or (null old) (numberp old))
+	     (or (null new) (numberp new)))
+	(progn
+	  (setq num-ann prop-alist)
+	  (while (and num-ann (not (numberp (car (car num-ann)))))
+	    (setq num-ann (cdr num-ann)))))
+    (if num-ann
+	;; Numerical annotation - use difference
+	(progn
+	  ;; If property is numeric, nil means 0
+	  (cond ((and (numberp old) (null new))
+		 (setq new 0))
+		((and (numberp new) (null old))
+		 (setq old 0)))
 
-   ;; Standard annotation
-   (t (let ((close (and old (cdr (assoc old prop-alist))))
+	  (let* ((entry (car num-ann))
+		 (increment (car entry))
+		 (n (ceiling (/ (float (- new old)) (float increment))))
+		 (anno (car (cdr entry))))
+	    (if (> n 0)
+		(cons nil (make-list n anno))
+	      (cons (make-list (- n) anno) nil))))
+
+      ;; Standard annotation
+      (let ((close (and old (cdr (assoc old prop-alist))))
 	    (open  (and new (cdr (assoc new prop-alist)))))
 	(if (or close open)
 	    (format-make-relatively-unique close open)
--- a/lisp/help-nomule.el	Mon Aug 13 10:06:48 2007 +0200
+++ b/lisp/help-nomule.el	Mon Aug 13 10:07:35 2007 +0200
@@ -34,7 +34,8 @@
   '(("French" fr iso-8859-1)
     ("German" de iso-8859-1)
     ("Norwegian" no iso-8859-1)
-    ("Croatian" hr iso-8859-2))
+    ("Croatian" hr iso-8859-2)
+    ("Polish" pl iso-8859-2))
   "Alist of supported languages in TUTORIAL files.
 Add languages here, as more are translated.")
 
--- a/lisp/help.el	Mon Aug 13 10:06:48 2007 +0200
+++ b/lisp/help.el	Mon Aug 13 10:07:35 2007 +0200
@@ -669,7 +669,7 @@
      ;; XEmacs addition
      (princ "\n\n\nRecent minibuffer messages (most recent first):\n\n")
      (save-excursion
-       (let ((buffer (get-buffer " *Message-Log*"))
+       (let ((buffer (get-buffer-create " *Message-Log*"))
 	     (count 0)
 	     oldpoint)
 	 (set-buffer buffer)
--- a/lisp/language/european.el	Mon Aug 13 10:06:48 2007 +0200
+++ b/lisp/language/european.el	Mon Aug 13 10:07:35 2007 +0200
@@ -215,6 +215,19 @@
  Serbian or Croatian, Slovak, Slovene, and Swedish.
 " . describe-european-environment-map))
 	      ))
+
+(set-language-info-alist
+ "Polish" '((setup-function . (setup-latin2-environment
+				. setup-european-environment-map))
+	      (charset . (ascii latin-iso8859-2))
+	      (tutorial . "TUTORIAL.pl")
+	      (coding-system . (iso-8859-2))
+	      (documentation . ("\
+These languages are supported with the Latin-2 (ISO-8859-2) character set:
+ Albanian, Czech, English, German, Hungarian, Polish, Romanian,
+ Serbian or Croatian, Slovak, Slovene, and Swedish.
+" . describe-european-environment-map))
+	      ))
 
 ;; Latin-3 (ISO-8859-3)
 
--- a/lisp/leim/auto-autoloads.el	Mon Aug 13 10:06:48 2007 +0200
+++ b/lisp/leim/auto-autoloads.el	Mon Aug 13 10:07:35 2007 +0200
@@ -97,7 +97,7 @@
 Each argument is a list of KEY and TRANSLATION.
 KEY is a string meaning a sequence of keystrokes to be translated.
 TRANSLATION is a character, a string, a vector, a Quail map, or a function.
-It it is a character, it is the sole translation of KEY.
+If it is a character, it is the sole translation of KEY.
 If it is a string, each character is a candidate for the translation.
 If it is a vector, each element (string or character) is a candidate
   for the translation.
--- a/lisp/leim/quail.el	Mon Aug 13 10:06:48 2007 +0200
+++ b/lisp/leim/quail.el	Mon Aug 13 10:07:35 2007 +0200
@@ -794,7 +794,7 @@
 Each argument is a list of KEY and TRANSLATION.
 KEY is a string meaning a sequence of keystrokes to be translated.
 TRANSLATION is a character, a string, a vector, a Quail map, or a function.
-It it is a character, it is the sole translation of KEY.
+If it is a character, it is the sole translation of KEY.
 If it is a string, each character is a candidate for the translation.
 If it is a vector, each element (string or character) is a candidate
   for the translation.
@@ -1514,7 +1514,7 @@
 	    win)
 	(while win-list
 	  (setq win (car win-list) win-list (cdr win-list))
-	  (if (eq win (minibuffer-window))
+	  (if (window-minibuffer-p win)
 	      ;; We are using echo area for the guidance buffer.
 	      ;; Vacate it to the deepest minibuffer.
 	      (set-window-buffer win
--- a/lisp/leim/quail/latin-pre.el	Mon Aug 13 10:06:48 2007 +0200
+++ b/lisp/leim/quail/latin-pre.el	Mon Aug 13 10:07:35 2007 +0200
@@ -249,10 +249,10 @@
  ("~>" ?\,A;(B)
  ("~C" ?,AG(B)
  ("~c" ?,Ag(B)
- ("~," ?,)
+ ("~ " ?~)
  (",C" ?,AG(B)
  (",c" ?,Ag(B)
- (", " ?~)
+ (", " ?,)
 )
 
 (quail-define-package
--- a/lisp/loadup.el	Mon Aug 13 10:06:48 2007 +0200
+++ b/lisp/loadup.el	Mon Aug 13 10:07:35 2007 +0200
@@ -185,6 +185,7 @@
 (when (member "run-temacs" command-line-args)
   (message "\nBootstrapping from temacs...")
   (setq purify-flag nil)
+  (setq inhibit-package-init t)
   ;; Remove all args up to and including "run-temacs"
   (apply #'run-emacs-from-temacs (cdr (member "run-temacs" command-line-args)))
   ;; run-emacs-from-temacs doesn't actually return anyway.
--- a/lisp/minibuf.el	Mon Aug 13 10:06:48 2007 +0200
+++ b/lisp/minibuf.el	Mon Aug 13 10:07:35 2007 +0200
@@ -285,6 +285,10 @@
     ;(if (fboundp 'unlock-buffer) (unlock-buffer))
     (kill-all-local-variables)
     (setq buffer-read-only nil)
+    ;; don't let read only text yanked into the minibuffer
+    ;; permanently wedge it.
+    (make-local-variable 'inhibit-read-only)
+    (setq inhibit-read-only t)
     (erase-buffer)
     ;(setq default-directory nil)
     (setq buffer-file-name nil)
--- a/lisp/modes/enriched.el	Mon Aug 13 10:06:48 2007 +0200
+++ b/lisp/modes/enriched.el	Mon Aug 13 10:07:35 2007 +0200
@@ -1,5 +1,6 @@
 ;;; enriched.el --- read and save files in text/enriched format
-;; Copyright (c) 1994, 1995 Free Software Foundation, Inc.
+
+;; Copyright (c) 1994, 1995, 1996 Free Software Foundation, Inc.
 
 ;; XEmacs version: Mike Sperber <sperber@informatik.uni-tuebingen.de>
 ;; Original author: Boris Goldowsky <boris@gnu.ai.mit.edu>
@@ -22,24 +23,24 @@
 ;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 ;; 02111-1307, USA.
 
-;;; Synched up with: FSF 19.34.
+;;; Synched up with: FSF 20.2.
 
 ;;; Commentary:
-;;
+
 ;; This file implements reading, editing, and saving files with
 ;; text-properties such as faces, levels of indentation, and true line
-;; breaks distinguished from newlines just used to fit text into the
-;; window.
-;;
+;; breaks distinguished from newlines just used to fit text into the window.
+
 ;; The file format used is the MIME text/enriched format, which is a
-;; standard format defined in internet RFC 1563.  All standard
-;; annotations are supported.
-;; 
-;; A separate file, enriched.doc, contains further documentation and
-;; other important information about this code.  It also serves as an
-;; example file in text/enriched format.  It should be in the etc
-;; directory of your emacs distribution.
-;;
+;; standard format defined in internet RFC 1563.  All standard annotations
+;; are supported except for <smaller> and <bigger>, which are currently not
+;; possible to display.
+
+;; A separate file, enriched.doc, contains further documentation and other
+;; important information about this code.  It also serves as an example
+;; file in text/enriched format.  It should be in the etc directory of your
+;; emacs distribution.
+
 ;;; TODO for the XEmacs port:
 ;;
 ;; Currently XEmacs does not support default-text-properties.  The
@@ -48,8 +49,9 @@
 ;; If you know the Right Way to fix this, contact
 ;; Mike Sperber <sperber@informatik.uni-tuebingen.de>.
 
+;;; Code:
+
 (provide 'enriched)
-(if window-system (require 'facemenu))
 
 ;;;
 ;;; Variables controlling the display
@@ -59,42 +61,38 @@
   "Read and save files in text/enriched format"
   :group 'wp)
 
-
 (defcustom enriched-verbose t
   "*If non-nil, give status messages when reading and writing files."
   :type 'boolean
   :group 'enriched)
 
-(defcustom enriched-default-right-margin 10
-  "*Default amount of space to leave on the right edge of the screen.
-This can be increased inside text by changing the 'right-margin text property.
-Measured in character widths.  If the screen is narrower than this, it is
-assumed to be 0."
-  :type 'integer
-  :group 'enriched)
-
-(defcustom enriched-fill-after-visiting t
-  "If t, fills paragraphs when reading in enriched documents.
-If nil, only fills when you explicitly request it.  If the value is 'ask, then
-it will query you whether to fill.
-Filling is never done if the current text-width is the same as the value
-stored in the file."
-  :type '(choice (const nil) (const t) (const ask))
-  :group 'enriched)
-
 ;;;
 ;;; Set up faces & display table
 ;;;
 
-;; XEmacs change (Can't cheat, we have variable width fonts)
-(if (not (find-face 'fixed))
-    (copy-face 'default 'fixed))
-			      
-(if (not (find-face 'excerpt))
-    (copy-face 'italic 'excerpt))
+;; Emacs doesn't have a "fixed" face by default, since all faces currently
+;; have to be fixed-width.  So we just pick one that looks different from the
+;; default.
+(defface fixed
+  '((t (:bold t)))
+  "Face used for text that must be shown in fixed width.
+Currently, emacs can only display fixed-width fonts, but this may change.
+This face is used for text specifically marked as fixed-width, for example
+in text/enriched files."
+  :group 'enriched)
 
-(defconst enriched-display-table (make-display-table))
-(aset enriched-display-table ?\f (make-string (1- (frame-width)) ?-))
+(defface excerpt
+  '((t (:italic t)))
+  "Face used for text that is an excerpt from another document.
+This is used in enriched-mode for text explicitly marked as an excerpt."
+  :group 'enriched)
+
+(defconst enriched-display-table
+  ;; XEmacs change
+  ;; (or (copy-sequence standard-display-table)
+  ;;     (make-display-table)))
+  (make-display-table))
+(aset enriched-display-table ?\f (make-vector (1- (frame-width)) ?-))
 
 (defconst enriched-par-props '(left-margin right-margin justification)
   "Text-properties that usually apply to whole paragraphs.
@@ -107,7 +105,7 @@
 (defconst enriched-initial-annotation
   (lambda ()
     (format "Content-Type: text/enriched\nText-Width: %d\n\n"
-	    (enriched-text-width)))
+	    fill-column))
   "What to insert at the start of a text/enriched file.
 If this is a string, it is inserted.  If it is a list, it should be a lambda
 expression, which is evaluated to get the string to insert.")
@@ -180,9 +178,6 @@
 The value is a list of \(VAR VALUE VAR VALUE...).")
 (make-variable-buffer-local 'enriched-old-bindings)
 
-(defvar enriched-text-width nil)
-(make-variable-buffer-local 'enriched-text-width)
-
 ;;;
 ;;; Define the mode
 ;;;
@@ -216,29 +211,25 @@
 	  (enriched-mode nil)		; Mode already on; do nothing.
 
 	  (t (setq enriched-mode t)	; Turn mode on
-	     (if (not (memq 'text/enriched buffer-file-format))
-		 (setq buffer-file-format 
-		       (cons 'text/enriched buffer-file-format)))
+	     (add-to-list 'buffer-file-format 'text/enriched)
 	     ;; Save old variable values before we change them.
 	     ;; These will be restored if we exit Enriched mode.
 	     (setq enriched-old-bindings
 		   ;; XEmacs change
 		   (list ; 'buffer-display-table buffer-display-table
 			 'indent-line-function indent-line-function
-			 'use-hard-newlines    use-hard-newlines
 			 'default-text-properties default-text-properties))
 	     (make-local-variable 'indent-line-function)
-	     (make-local-variable 'use-hard-newlines)
 	     (make-local-variable 'default-text-properties)
 	     (setq indent-line-function 'indent-to-left-margin
-		   ;; XEmacs change
-		   ;; buffer-display-table  enriched-display-table
-		   use-hard-newlines     t)
+ 		   ;; XEmacs change
+ 		   ;; buffer-display-table  enriched-display-table
+		   )
+	     (use-hard-newlines 1 nil)
 	     (let ((sticky (plist-get default-text-properties 'front-sticky))
 		   (p enriched-par-props))
 	       (while p
-		 (if (not (memq (car p) sticky))
-		     (setq sticky (cons (car p) sticky)))
+		 (add-to-list 'sticky (car p))
 		 (setq p (cdr p)))
 	       (if sticky
 		   (setq default-text-properties
@@ -317,22 +308,12 @@
 	  (justify-current-line t nil t))
 	(forward-line 1)))))
 
-(defun enriched-text-width ()
-  "The width of unindented text in this window, in characters.
-This is the width of the window minus `enriched-default-right-margin'."
-  (or enriched-text-width
-      (let ((ww (window-width)))
-	(setq enriched-text-width
-	      (if (> ww enriched-default-right-margin)
-		  (- ww enriched-default-right-margin)
-		ww)))))
-
 ;;;
 ;;; Encoding Files
 ;;;
 
 ;;;###autoload
-(defun enriched-encode (from to)
+(defun enriched-encode (from to &optional orig-buf)
   (if enriched-verbose (message "Enriched: encoding document..."))
   (save-restriction
     (narrow-to-region from to)
@@ -346,7 +327,13 @@
     (goto-char from)
     (insert (if (stringp enriched-initial-annotation)
 		enriched-initial-annotation
-	      (funcall enriched-initial-annotation)))
+	      (save-excursion
+		;; Eval this in the buffer we are annotating.  This
+		;; fixes a bug which was saving incorrect File-Width
+		;; information, since we were looking at local
+		;; variables in the wrong buffer.
+		(if orig-buf (set-buffer orig-buf))
+		(funcall enriched-initial-annotation))))
     (enriched-map-property-regions 'hard
       (lambda (v b e)
 	(if (and v (= ?\n (char-after b)))
@@ -456,37 +443,35 @@
 ;;;###autoload
 (defun enriched-decode (from to)
   (if enriched-verbose (message "Enriched: decoding document..."))
+  (use-hard-newlines 1 'never)
   (save-excursion
     (save-restriction
       (narrow-to-region from to)
       (goto-char from)
-      (let ((file-width (enriched-get-file-width))
-	    (use-hard-newlines t))
+
+      ;; Deal with header
+      (let ((file-width (enriched-get-file-width)))
 	(enriched-remove-header)
 
 	;; Deal with newlines
-	(goto-char from)
 	(while (search-forward-regexp "\n\n+" nil t)
 	  (if (current-justification)
 	      (delete-char -1))
-	  (put-text-property (match-beginning 0) (point) 'hard t)
-	  (put-text-property (match-beginning 0) (point) 'front-sticky nil))
+	  (set-hard-newline-properties (match-beginning 0) (point)))
 
 	;; Translate annotations
 	(format-deannotate-region from (point-max) enriched-translations
 				  'enriched-next-annotation)
 
-	;; Fill paragraphs
-	(if (or (and file-width		; possible reasons not to fill:
-		     (= file-width (enriched-text-width))) ; correct wd.
-		(null enriched-fill-after-visiting) ; never fill
-		(and (eq 'ask enriched-fill-after-visiting) ; asked & declined
-		     (not (y-or-n-p "Re-fill for current display width? "))))
-	    ;; Minimally, we have to insert indentation and justification.
-	    (enriched-insert-indentation)
-	  (if enriched-verbose (message "Filling paragraphs..."))
-	  (fill-region (point-min) (point-max))))
-      (if enriched-verbose (message nil))
+	;; Indent or fill the buffer
+	(cond (file-width		; File was filled to this width
+	       (setq fill-column file-width)
+	       (if enriched-verbose (message "Indenting..."))
+	       (enriched-insert-indentation))
+	      (t			; File was not filled.
+	       (if enriched-verbose (message "Filling paragraphs..."))
+	       (fill-region (point-min) (point-max))))
+	(if enriched-verbose (message nil)))
       (point-max))))
 
 (defun enriched-next-annotation ()
@@ -524,7 +509,7 @@
   (if (looking-at "^\n")
       (delete-char 1)))
 
-(defun enriched-decode-foreground (from to color)
+(defun enriched-decode-foreground (from to &optional color)
   ;; XEmacs change
   (let ((face (facemenu-get-face (intern (concat "fg:" color)))))
     (if (not face)
@@ -533,7 +518,7 @@
 	  (message "Warning: Color \"%s\" can't be displayed." color)))
     (list from to 'face face)))
 
-(defun enriched-decode-background (from to color)
+(defun enriched-decode-background (from to &optional color)
   ;; XEmacs change
   (let ((face (facemenu-get-face (intern (concat "bg:" color)))))
     (if (not face)
--- a/lisp/msw-faces.el	Mon Aug 13 10:06:48 2007 +0200
+++ b/lisp/msw-faces.el	Mon Aug 13 10:07:35 2007 +0200
@@ -54,52 +54,116 @@
 ;;; Fill in missing parts of a font spec. This is primarily intended as a
 ;;; helper function for the functions below.
 ;;; mswindows fonts look like:
-;;;	fontname[:[weight ][style][:pointsize[:effects[:charset]]]]
+;;;	fontname[:[weight][ style][:pointsize[:effects[:charset]]]]
 ;;; A minimal mswindows font spec looks like:
 ;;;	Courier New
 ;;; A maximal mswindows font spec looks like:
 ;;;	Courier New:Bold Italic:10:underline strikeout:ansi
 ;;; Missing parts of the font spec should be filled in with these values:
 ;;;	Courier New:Normal:10::ansi
-(defun mswindows-canicolize-font (font &optional device)
-  "Given a mswindows font specification, this converts it to canonical form."
-  nil)
+(defun mswindows-font-canicolize-name (font)
+  "Given a mswindows font specification, this returns its name in canonical
+form."
+  (cond ((font-instance-p font)
+	 (let ((name (font-instance-name font)))
+	   (cond ((string-match
+		   "^[a-zA-Z ]+:[a-zA-Z ]*:[0-9]+:[a-zA-Z ]*:[a-zA-Z 0-9]*$"
+		   name) name)
+		 ((string-match "^[a-zA-Z ]+:[a-zA-Z ]*:[0-9]+:[a-zA-Z ]*$"
+				name) (concat name ":ansi"))
+		 ((string-match "^[a-zA-Z ]+:[a-zA-Z ]*:[0-9]+$" name)
+		  (concat name "::ansi"))
+		 ((string-match "^[a-zA-Z ]+:[a-zA-Z ]*$" name)
+		  (concat name "10::ansi"))
+		 ((string-match "^[a-zA-Z ]+$" name)
+		  (concat name ":Normal:10::ansi"))
+		 (t "Courier New:Normal:10::ansi"))))
+	(t "Courier New:Normal:10::ansi")))
 
 (defun mswindows-make-font-bold (font &optional device)
   "Given a mswindows font specification, this attempts to make a bold font.
 If it fails, it returns nil."
-  nil)
+  (if (font-instance-p font)
+      (let ((name (mswindows-font-canicolize-name font)))
+	(string-match "^[a-zA-Z ]+:\\([a-zA-Z ]*\\):" name)
+	(make-font-instance (concat
+			     (substring name 0 (match-beginning 1))
+			     "Bold" (substring name (match-end 1)))
+			    device t))))
 
 (defun mswindows-make-font-unbold (font &optional device)
   "Given a mswindows font specification, this attempts to make a non-bold font.
 If it fails, it returns nil."
-  nil)
+  (if (font-instance-p font)
+      (let ((name (mswindows-font-canicolize-name font)))
+	(string-match "^[a-zA-Z ]+:\\([a-zA-Z ]*\\):" name)
+	(make-font-instance (concat
+			     (substring name 0 (match-beginning 1))
+			     "Normal" (substring name (match-end 1)))
+			    device t))))
 
 (defun mswindows-make-font-italic (font &optional device)
-  "Given a mswindows font specification, this attempts to make an `italic' font.
-If it fails, it returns nil."
-  nil)
+  "Given a mswindows font specification, this attempts to make an `italic'
+font. If it fails, it returns nil."
+  (if (font-instance-p font)
+      (let ((name (mswindows-font-canicolize-name font)))
+	(string-match "^[a-zA-Z ]+:\\([a-zA-Z ]*\\):" name)
+	(make-font-instance (concat
+			     (substring name 0 (match-beginning 1))
+			     "Italic" (substring name (match-end 1)))
+			    device t))))
 
 (defun mswindows-make-font-unitalic (font &optional device)
-  "Given a mswindows font specification, this attempts to make a non-italic font.
-If it fails, it returns nil."
-  nil)
+  "Given a mswindows font specification, this attempts to make a non-italic
+font. If it fails, it returns nil."
+  (if (font-instance-p font)
+      (let ((name (mswindows-font-canicolize-name font)))
+	(string-match "^[a-zA-Z ]+:\\([a-zA-Z ]*\\):" name)
+	(make-font-instance (concat
+			     (substring name 0 (match-beginning 1))
+			     "Normal" (substring name (match-end 1)))
+			    device t))))
 
 (defun mswindows-make-font-bold-italic (font &optional device)
   "Given a mswindows font specification, this attempts to make a `bold-italic'
 font. If it fails, it returns nil."
-  nil)
+  (if (font-instance-p font)
+      (let ((name (mswindows-font-canicolize-name font)))
+	(string-match "^[a-zA-Z ]+:\\([a-zA-Z ]*\\):" name)
+	(make-font-instance (concat
+			     (substring name 0 (match-beginning 1))
+			     "Bold Italic" (substring name (match-end 1)))
+			    device t))))
 
 (defun mswindows-find-smaller-font (font &optional device)
   "Loads a new, version of the given font (or font name).
 Returns the font if it succeeds, nil otherwise.
 If scalable fonts are available, this returns a font which is 1 point smaller.
 Otherwise, it returns the next smaller version of this font that is defined."
-  nil)
+  (if (font-instance-p font)
+      (let (old-size (name (mswindows-font-canicolize-name font)))
+	(string-match "^[a-zA-Z ]+:[a-zA-Z ]*:\\([0-9]+\\):" name)
+	(setq old-size (string-to-int
+			(substring name (match-beginning 1) (match-end 1))))
+	(if (> old-size 0)
+	    (make-font-instance (concat
+				 (substring name 0 (match-beginning 1))
+				 (int-to-string (- old-size 1))
+				 (substring name (match-end 1)))
+				device t)))))
 
 (defun mswindows-find-larger-font (font &optional device)
   "Loads a new, slightly larger version of the given font (or font name).
 Returns the font if it succeeds, nil otherwise.
 If scalable fonts are available, this returns a font which is 1 point larger.
 Otherwise, it returns the next larger version of this font that is defined."
-  nil)
+  (if (font-instance-p font)
+      (let (old-size (name (mswindows-font-canicolize-name font)))
+	(string-match "^[a-zA-Z ]+:[a-zA-Z ]*:\\([0-9]+\\):" name)
+	(setq old-size (string-to-int
+			(substring name (match-beginning 1) (match-end 1))))
+	(make-font-instance (concat
+			     (substring name 0 (match-beginning 1))
+			     (int-to-string (+ old-size 1))
+			     (substring name (match-end 1)))
+			    device t))))
--- a/lisp/mule/mule-coding.el	Mon Aug 13 10:06:48 2007 +0200
+++ b/lisp/mule/mule-coding.el	Mon Aug 13 10:07:35 2007 +0200
@@ -228,6 +228,8 @@
 ;; compatibility for old XEmacsen (don't use it)
 (copy-coding-system 'undecided 'automatic-conversion)
 
+(copy-coding-system 'no-conversion 'raw-text)
+
 (make-coding-system
  'ctext 'iso2022
  "Coding-system used in X as Compound Text Encoding."
--- a/lisp/mule/mule-files.el	Mon Aug 13 10:06:48 2007 +0200
+++ b/lisp/mule/mule-files.el	Mon Aug 13 10:07:35 2007 +0200
@@ -59,6 +59,7 @@
     ("loaddefs.el$" . (binary . binary))
     ("\\.tar$" . (binary . binary))
     ("TUTORIAL\\.hr$" . iso-8859-2)
+    ("TUTORIAL\\.pl$" . iso-8859-2)
     ;; ("\\.\\(el\\|emacs\\|info\\(-[0-9]+\\)?\\|texi\\)$" . iso-2022-8)
     ;; ("\\(ChangeLog\\|CHANGES-beta\\)$" . iso-2022-8)
     ("\\.\\(gz\\|Z\\)$" . binary)
--- a/lisp/packages.el	Mon Aug 13 10:06:48 2007 +0200
+++ b/lisp/packages.el	Mon Aug 13 10:07:35 2007 +0200
@@ -137,9 +137,11 @@
   ;; Source directory may not be initialized yet.
   ;; (print (prin1-to-string load-path))
   (if (null source-directory)
-      (setq source-directory (concat (car load-path) "/./")))
+      (setq source-directory (concat (car load-path) "./")))
   (let ((files (directory-files (file-name-as-directory source-directory) t ".*"))
 	file autolist)
+    ;; (print (prin1-to-string source-directory))
+    ;; (print (prin1-to-string files))
     (while (setq file (car-safe files))
       (if (and (file-directory-p file)
 	       (file-exists-p (concat file "/" autoload-file-name)))
@@ -149,7 +151,7 @@
     autolist))
 
 ;; The following function is called from temacs
-(defun packages-find-packages-1 (package path-only user-package)
+(defun packages-find-packages-1 (package path-only append-p user-package)
   "Search the supplied directory for associated directories.
 The top level is assumed to look like:
 info/           Contain texinfo files for lisp installed in this hierarchy
@@ -157,6 +159,9 @@
 lisp/           Contain directories which either have straight lisp code
                 or are self-contained packages of their own.
 
+If the argument `append-p' is non-nil, the found directories will be
+appended to the paths, otherwise, they will be prepended.
+
 This is an internal function.  Do not call it after startup."
   ;; Info files
   (if (and (null path-only) (file-directory-p (concat package "/info")))
@@ -166,7 +171,9 @@
   ;; Data files
   (if (and (null path-only) (file-directory-p (concat package "/etc")))
       (setq data-directory-list
-	    (cons (concat package "/etc/") data-directory-list)))
+	    (if append-p
+		(append data-directory-list (list (concat package "/etc/")))
+	      (cons (concat package "/etc/") data-directory-list))))
   ;; Lisp files
   (if (file-directory-p (concat package "/lisp"))
       (progn
@@ -174,7 +181,10 @@
 ;		       (if user-package "[USER]" "")
 ;		       package
 ;		       "/lisp/"))
-	(setq load-path (cons (concat package "/lisp/") load-path))
+	(setq load-path
+	      (if append-p
+		  (append load-path (list (concat package "/lisp/")))
+		(cons (concat package "/lisp/") load-path)))
 	(if user-package
 	    (condition-case nil
 		(load (concat package "/lisp/"
@@ -186,7 +196,10 @@
 	  (while dirs
 	    (setq dir (car dirs))
 ;	    (print (concat "DIR: " dir "/"))
-	    (setq load-path (cons (concat dir "/") load-path))
+	    (setq load-path
+		  (if append-p
+		      (append load-path (list (concat dir "/")))
+		    (cons (concat dir "/") load-path)))
 	    (if user-package
 		(condition-case nil
 		    (progn
@@ -197,10 +210,31 @@
 		       (concat dir "/"
 			       (file-name-sans-extension autoload-file-name))))
 		  (t nil)))
-	    (packages-find-packages-1 dir path-only user-package)
+	    (packages-find-packages-1 dir path-only append-p user-package)
 	    (setq dirs (cdr dirs)))))))
 
 ;; The following function is called from temacs
+(defun packages-find-packages-2 (path path-only append-p suppress-user)
+  "Search the supplied path for associated directories.
+If the argument `append-p' is non-nil, the found directories will be
+appended to the paths, otherwise, they will be prepended.
+
+This is an internal function.  Do not call it after startup."
+  (let (dir)
+    (while path
+      (setq dir (car path))
+      ;; (prin1 (concat "Find: " (expand-file-name dir) "\n"))
+      (if (null (and (or suppress-user inhibit-package-init)
+		     (string-match "^~" dir)))
+	  (progn
+	    ;; (print dir)
+	    (packages-find-packages-1 (expand-file-name dir)
+				      path-only
+				      append-p
+				      (string-match "^~" dir))))
+      (setq path (cdr path)))))
+
+;; The following function is called from temacs
 (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
@@ -210,19 +244,13 @@
 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"))
-      (if (null (and (or suppress-user inhibit-package-init)
-		     (string-match "^~" dir)))
-	  (progn
-	    ;; (print dir)
-	    (packages-find-packages-1 (expand-file-name dir)
-				      path-only
-				      (string-match "^~" dir))))
-      (setq path (cdr path)))))
+  (let ((prefix-path nil))
+    (while (and pkg-path (car pkg-path))
+      (setq prefix-path (cons (car pkg-path) prefix-path)
+	    pkg-path (cdr pkg-path)))
+    (packages-find-packages-2 (cdr pkg-path) path-only t suppress-user)
+    (packages-find-packages-2 prefix-path path-only nil suppress-user)))
+
 
 ;; Data-directory is really a list now.  Provide something to search it for
 ;; directories.
@@ -241,6 +269,24 @@
       (setq dir-list (cdr dir-list)))
     found))
 
+;; Data-directory is really a list now.  Provide something to search it for
+;; files.
+
+(defun locate-data-file (name &optional dir-list)
+  "Locate a file in a search path DIR-LIST (a list of directories).
+If no DIR-LIST is supplied, it defaults to `data-directory-list'."
+  (unless dir-list
+    (setq dir-list data-directory-list))
+  (let (found found-file)
+    (while (and (null found-file) dir-list)
+      (setq found (concat (car dir-list) name)
+	    found-file (and (file-exists-p found)
+			    (not (file-directory-p found))))
+      (or found-file
+	  (setq found nil))
+      (setq dir-list (cdr dir-list)))
+    found))
+
 ;; If we are being loaded as part of being dumped, bootstrap the rest of the
 ;; load-path for loaddefs.
 (if (fboundp 'load-gc)
--- a/lisp/packages/emacsbug.el	Mon Aug 13 10:06:48 2007 +0200
+++ b/lisp/packages/emacsbug.el	Mon Aug 13 10:07:35 2007 +0200
@@ -95,7 +95,7 @@
 	    (while (progn (move-to-column 50) (not (eobp)))
 	      (search-forward " " nil t)
 	      (insert "\n"))))
-	(let ((message-buf (get-buffer " *Message-Log*")))
+	(let ((message-buf (get-buffer-create " *Message-Log*")))
 	  (if message-buf
 	      (progn
 		(insert "\n\nRecent messages:\n")
--- a/lisp/packages/font-lock.el	Mon Aug 13 10:06:48 2007 +0200
+++ b/lisp/packages/font-lock.el	Mon Aug 13 10:07:35 2007 +0200
@@ -309,8 +309,7 @@
 
  (MATCHER PRE-MATCH-FORM POST-MATCH-FORM MATCH-HIGHLIGHT ...)
 
-Where MATCHER is as for MATCH-HIGHLIGHT with one exception.  The limit of the
-search is currently guaranteed to be (no greater than) the end of the line.
+Where MATCHER is as for MATCH-HIGHLIGHT with one exception; see below.
 PRE-MATCH-FORM and POST-MATCH-FORM are evaluated before the first, and after
 the last, instance MATCH-ANCHORED's MATCHER is used.  Therefore they can be
 used to initialise before, and cleanup after, MATCHER is used.  Typically,
@@ -329,6 +328,13 @@
  searching for subsequent instance of \"anchor\" resumes from where searching
  for \"item\" concluded.)
 
+The above-mentioned exception is as follows.  The limit of the MATCHER search
+defaults to the end of the line after PRE-MATCH-FORM is evaluated.
+However, if PRE-MATCH-FORM returns a position greater than the position after
+PRE-MATCH-FORM is evaluated, that position is used as the limit of the search.
+It is generally a bad idea to return a position greater than the end of the
+line, i.e., cause the MATCHER search to span lines.
+
 Note that the MATCH-ANCHORED feature is experimental; in the future, we may
 replace it with other ways of providing this functionality.
 
@@ -1135,12 +1141,15 @@
 
 (defsubst font-lock-fontify-anchored-keywords (keywords limit)
   "Fontify according to KEYWORDS until LIMIT.
-KEYWORDS should be of the form MATCH-ANCHORED, see `font-lock-keywords'."
-  (let ((matcher (nth 0 keywords)) (lowdarks (nthcdr 3 keywords)) highlights)
-    ;; Until we come up with a cleaner solution, we make LIMIT the end of line.
-    (save-excursion (end-of-line) (setq limit (min limit (point))))
-    ;; Evaluate PRE-MATCH-FORM.
-    (eval (nth 1 keywords))
+KEYWORDS should be of the form MATCH-ANCHORED, see `font-lock-keywords',
+LIMIT can be modified by the value of its PRE-MATCH-FORM."
+  (let ((matcher (nth 0 keywords)) (lowdarks (nthcdr 3 keywords)) highlights
+	;; Evaluate PRE-MATCH-FORM.
+	(pre-match-value (eval (nth 1 keywords))))
+    ;; Set LIMIT to value of PRE-MATCH-FORM or the end of line.
+    (if (and (numberp pre-match-value) (> pre-match-value (point)))
+	(setq limit pre-match-value)
+      (save-excursion (end-of-line) (setq limit (point))))
     (save-match-data
       ;; Find an occurrence of `matcher' before `limit'.
       (while (if (stringp matcher)
--- a/lisp/packages/gnuserv.el	Mon Aug 13 10:06:48 2007 +0200
+++ b/lisp/packages/gnuserv.el	Mon Aug 13 10:07:35 2007 +0200
@@ -459,7 +459,7 @@
 	    (pushnew (current-buffer) (gnuclient-buffers client))
 	    (setq gnuserv-minor-mode t)
 	    ;; Add the "Done" button to the menubar, only in this buffer.
-	    (if (boundp 'current-menubar)
+	    (if (and (featurep 'menubar) current-menubar)
 	      (progn (set-buffer-menubar current-menubar)
 	      (add-menu-button nil ["Done" gnuserv-edit t]))
 	      ))
@@ -619,7 +619,7 @@
     (run-hooks 'gnuserv-done-hook)
     (setq gnuserv-minor-mode nil)
     ;; Delete the menu button.
-    (if (boundp 'current-menubar)
+    (if (and (featurep 'menubar) current-menubar)
       (delete-menu-item '("Done")))
     (funcall (if (gnuserv-temp-file-p buffer)
 		 gnuserv-done-temp-file-function
--- a/lisp/paragraphs.el	Mon Aug 13 10:06:48 2007 +0200
+++ b/lisp/paragraphs.el	Mon Aug 13 10:07:35 2007 +0200
@@ -48,6 +48,57 @@
 Each buffer has its own value of this variable.")
 (make-variable-buffer-local 'use-hard-newlines)
 
+(defun use-hard-newlines (&optional arg insert)
+  "Minor mode to distinguish hard and soft newlines.
+When active, the functions `newline' and `open-line' add the
+text-property `hard' to newlines that they insert, and a line is
+only considered as a candidate to match `paragraph-start' or
+`paragraph-separate' if it follows a hard newline.
+
+Prefix argument says to turn mode on if positive, off if negative.
+When the mode is turned on, if there are newlines in the buffer but no hard
+newlines, ask the user whether to mark as hard any newlines preceeding a 
+`paragraph-start' line.  From a program, second arg INSERT specifies whether
+to do this; it can be `never' to change nothing, t or `always' to force
+marking, `guess' to try to do the right thing with no questions, nil 
+or anything else to ask the user.
+
+Newlines not marked hard are called \"soft\", and are always internal
+to paragraphs.  The fill functions insert and delete only soft newlines."
+  (interactive (list current-prefix-arg nil))
+  (if (or (<= (prefix-numeric-value arg) 0)
+	  (and use-hard-newlines (null arg)))
+      ;; Turn mode off
+      (setq use-hard-newlines nil)
+    ;; Turn mode on
+    ;; Intuit hard newlines --
+    ;;   mark as hard any newlines preceding a paragraph-start line.
+    (if (or (eq insert t) (eq insert 'always)
+	    (and (not (eq 'never insert))
+		 (not use-hard-newlines)
+		 (not (text-property-any (point-min) (point-max) 'hard t))
+		 (save-excursion
+		   (goto-char (point-min))
+		   (search-forward "\n" nil t))
+		 (or (eq insert 'guess)
+		     (y-or-n-p "Make newlines between paragraphs hard? "))))
+	(save-excursion
+	  (goto-char (point-min))
+	  (while (search-forward "\n" nil t)
+	    (let ((pos (point)))
+	      (move-to-left-margin)
+	      (if (looking-at paragraph-start)
+		  (progn
+		    (set-hard-newline-properties (1- pos) pos)
+		    ;; If paragraph-separate, newline after it is hard too.
+		    (if (looking-at paragraph-separate)
+			(progn
+			  (end-of-line)
+			  (if (not (eobp))
+			      (set-hard-newline-properties
+			       (point) (1+ (point))))))))))))
+    (setq use-hard-newlines t)))
+
 ;; XEmacs - use purecopy
 (defconst paragraph-start (purecopy "[ \t\n\f]") "\
 *Regexp for beginning of a line that starts OR separates paragraphs.
--- a/lisp/prim/about.el	Mon Aug 13 10:06:48 2007 +0200
+++ b/lisp/prim/about.el	Mon Aug 13 10:07:35 2007 +0200
@@ -295,7 +295,9 @@
 
 ;; View news
 (defun about-news (&rest ignore)
-  (view-emacs-news))
+  (view-emacs-news)
+  (message "%s" (substitute-command-keys
+		 "Press \\[kill-buffer] to exit this buffer")))
 
 (defun about-collaboration (&rest ignore)
   (unless (about-get-buffer "*About Collaboration*")
@@ -657,7 +659,7 @@
 Jamie Zawinski was primarily to blame for Lucid Emacs from its
 inception in 1991, to 1994 when Lucid Inc. finally died.  He is now to
 be found at Netscape Communications, hacking on Netscape Navigator (he
-did the first Unix version and the mail and new reader).  Thankfully
+did the first Unix version and the mail and news reader).  Thankfully
 his extensive sleep deprivation experiments conducted during 1994 and
 1995 are now a thing of the past, but his predilection for dark,
 Gothic music remains unabated.
@@ -1221,6 +1223,7 @@
        (print-short "Mike Battaglia" "mbattagl@dsccc.com")
        (print-short "Neal Becker" "neal@ctd.comsat.com")
        (print-short "Paul Bibilo" "peb@delcam.com")
+       (print-short "Leonard Blanks" "ltb@haruspex.demon.co.uk")
        (print-short "Jan Borchers" "job@tk.uni-linz.ac.at")
        (print-short "Mark Borges" "mdb@cdc.noaa.gov")
        (print-short "David P. Boswell" "daveb@tau.space.thiokol.com")
@@ -1265,6 +1268,7 @@
        (print-short "Noah Friedman" "friedman@splode.com")
        (print-short "Kazuyoshi Furutaka" "furutaka@Flux.tokai.jaeri.go.jp")
        (print-short "Lew Gaiter III" "lew@StarFire.com")
+       (print-short "Olivier Galibert" "Olivier.Galibert@mines.u-nancy.fr")
        (print-short "Itay Gat" "itay@cs.huji.ac.il")
        (print-short "Tim Geisler" "Tim.Geisler@informatik.uni-muenchen.de")
        (print-short "Dave Gillespie" "daveg@synaptics.com")
@@ -1400,6 +1404,7 @@
        (print-short "Stephen Turnbull" "turnbull@sk.tsukuba.ac.jp")
        (print-short "John Turner" "turner@xdiv.lanl.gov")
        (print-short "UENO Fumihiro" "7m2vej@ritp.ye.IHI.CO.JP")
+       (print-short "Aki Vehtari" "Aki.Vehtari@hut.fi")
        (print-short "Juan E. Villacis" "jvillaci@cs.indiana.edu")
        (print-short "Jan Vroonhof" "vroonhof@math.ethz.ch")
        (print-short "Vladimir Vukicevic" "vladimir@intrepid.com")
--- a/lisp/prim/options.el	Mon Aug 13 10:06:48 2007 +0200
+++ b/lisp/prim/options.el	Mon Aug 13 10:07:35 2007 +0200
@@ -27,7 +27,7 @@
 
 ;; This code provides functions to list and edit the values of all global
 ;; option variables known to loaded Emacs Lisp code.  There are two entry
-;; points, `list-options' and `edit' options'.  The latter enters a major
+;; points, `list-options' and `edit-options'.  The latter enters a major
 ;; mode specifically for editing option values.  Do `M-x describe-mode' in
 ;; that context for more details.
 
--- a/lisp/simple.el	Mon Aug 13 10:06:48 2007 +0200
+++ b/lisp/simple.el	Mon Aug 13 10:07:35 2007 +0200
@@ -163,6 +163,14 @@
 	(move-to-left-margin nil t)))
   nil)
 
+(defun set-hard-newline-properties (from to)
+  (let ((sticky (get-text-property from 'rear-nonsticky)))
+    (put-text-property from to 'hard 't)
+    ;; If rear-nonsticky is not "t", add 'hard to rear-nonsticky list
+    (if (and (listp sticky) (not (memq 'hard sticky)))
+	(put-text-property from (point) 'rear-nonsticky
+			   (cons 'hard sticky)))))
+
 (defun open-line (arg)
   "Insert a newline and leave point before it.
 If there is a fill prefix and/or a left-margin, insert them on the new line
@@ -3478,7 +3486,7 @@
 (defun show-message-log ()
   "Show the \" *Message-Log*\" buffer, which contains old messages and errors."
   (interactive)
-  (pop-to-buffer " *Message-Log*"))
+  (pop-to-buffer (get-buffer-create " *Message-Log*")))
 
 (defvar log-message-filter-function 'log-message-filter
   "Value must be a function of two arguments: a symbol (label) and 
--- a/lisp/startup.el	Mon Aug 13 10:06:48 2007 +0200
+++ b/lisp/startup.el	Mon Aug 13 10:07:35 2007 +0200
@@ -167,9 +167,6 @@
 (defvar command-switch-alist
   (purecopy
    '(("-help"	. command-line-do-help)
-     ("-flags"	. command-line-do-help)
-     ("-h"	. command-line-do-help)
-     ("-?"	. command-line-do-help)
      ("-version". command-line-do-version)
      ("-V"	. command-line-do-version)
      ("-funcall". command-line-do-funcall)
--- a/lisp/utils/uniquify.el	Mon Aug 13 10:06:48 2007 +0200
+++ b/lisp/utils/uniquify.el	Mon Aug 13 10:07:35 2007 +0200
@@ -102,7 +102,7 @@
   :type '(radio (const forward)
 		(const reverse)
 		(const post-forward)
-		(const podt-forward-angle-brackets)
+		(const post-forward-angle-brackets)
 		(const nil))
   :require 'uniquify
   :group 'uniquify)
--- a/lisp/x-faces.el	Mon Aug 13 10:06:48 2007 +0200
+++ b/lisp/x-faces.el	Mon Aug 13 10:07:35 2007 +0200
@@ -373,8 +373,10 @@
 	   (purecopy '("foreground" (face-foreground 'default)))
 	   (purecopy '("background" (face-background 'default)))
 	   (purecopy '("backgroundToolBarColor"
-		       (x-get-resource "backgroundToolBarColor"
-				       "BackgroundToolBarColor" 'string)))
+		       (or
+			(x-get-resource "background" "Background" 'string)
+			(x-get-resource "backgroundToolBarColor"
+					"BackgroundToolBarColor" 'string))))
 	   )))
 
 ;;; internal routines
--- a/lisp/x-toolbar.el	Mon Aug 13 10:06:48 2007 +0200
+++ b/lisp/x-toolbar.el	Mon Aug 13 10:07:35 2007 +0200
@@ -217,10 +217,12 @@
 (defun toolbar-mail ()
   "Run mail in a separate frame."
   (interactive)
-  (let ((command (assq toolbar-mail-reader toolbar-mail-commands-alist)))
+  (let ((command (cdr (assq toolbar-mail-reader toolbar-mail-commands-alist))))
     (if (not command)
 	(error "Uknown mail reader %s" toolbar-mail-reader))
-    (funcall (cdr command))))
+    (if (symbolp command)
+	(call-interactively command)
+      (eval command))))
 
 ;;
 ;; toolbar info variables and defuns
@@ -473,6 +475,18 @@
    '("leftToolBarWidth" . "LeftToolBarWidth"))
   (x-init-specifier-from-resources
    right-toolbar-width 'natnum locale
-   '("rightToolBarWidth" . "RightToolBarWidth")))
+   '("rightToolBarWidth" . "RightToolBarWidth"))
+  (x-init-specifier-from-resources
+   top-toolbar-border-width 'natnum locale
+   '("topToolBarBorderWidth" . "TopToolBarBorderWidth"))
+  (x-init-specifier-from-resources
+   bottom-toolbar-border-width 'natnum locale
+   '("bottomToolBarBorderWidth" . "BottomToolBarBorderWidth"))
+  (x-init-specifier-from-resources
+   left-toolbar-border-width 'natnum locale
+   '("leftToolBarBorderWidth" . "LeftToolBarBorderWidth"))
+  (x-init-specifier-from-resources
+   right-toolbar-border-width 'natnum locale
+   '("rightToolBarBorderWidth" . "RightToolBarBorderWidth")))
 
 ;;; x-toolbar.el ends here
--- a/man/xemacs-faq.texi	Mon Aug 13 10:06:48 2007 +0200
+++ b/man/xemacs-faq.texi	Mon Aug 13 10:07:35 2007 +0200
@@ -8,12 +8,12 @@
 @titlepage
 @title XEmacs FAQ
 @subtitle Frequently asked questions about XEmacs
-@subtitle Last Modified:  1997-11-10
+@subtitle Last Modified: 1997-11-18 23:08:35 EET
 @sp 1
 @author Tony Rossini <arossini@@stat.sc.edu>
 @author Ben Wing <wing@@666.com>
-@author Chuck Thompson <cthomp@@cs.uiuc.edu>
-@author Steve Baur <steve@@miranova.com>
+@author Chuck Thompson <cthomp@@xemacs.org>
+@author Steve Baur <steve@@xemacs.org>
 @author Andreas Kaempf <andreas@@sccon.com>
 @page
 @end titlepage
@@ -146,6 +146,7 @@
 * Q3.0.6::      Can I force the output of @code{(face-list)} to a buffer?
 * Q3.0.7::      Font selections don't get saved after @code{Save Options}. 
 * Q3.0.8::      How do I make a single minibuffer frame?
+* Q3.0.9::      @code{Customize}.
 
 X Window System & Resources:
 * Q3.1.1::      Where is a list of X resources?
@@ -420,22 +421,13 @@
 @node Q1.0.2, Q1.0.3, Q1.0.1, Introduction
 @section What is the current version of XEmacs?
 
-There are currently two released versions of XEmacs:
-
-The current stable International version of XEmacs is 20.2, released in
-May, 1997.  The next feature release will XEmacs 20.3.
-
-The current version of XEmacs without international language support is
-XEmacs 19.16 and is the last release of v19. This version was released
-in November, 1997.
-
-We also run a patch-page with official bugfixes for 19.15 at:
-
-@example
-<URL:http://www.xemacs.org/xemacs-19.15-patches/patch-page.html>
-@end example
-
-The page is maintained by Vinnie Shelton @code{<acs@@acm.org>}.  
+The current stable version of XEmacs is 20.3, released in November,
+1997.
+
+The next feature release will be XEmacs 20.4.
+
+XEmacs 19.16 was the last release of v19, released in November, 1997,
+which was also the last version without international language support.
 
 @node Q1.0.3, Q1.0.4, Q1.0.2, Introduction
 @section Where can I find it?
@@ -584,26 +576,26 @@
 @node Q1.0.10, Q1.0.11, Q1.0.9, Introduction
 @section Is there a port of XEmacs to Microsoft ('95 or NT)?
 
-Altrasoft is actively seeking corporate and government sponsors to help
-fund a fully native port of XEmacs to Windows 95 and NT using full-time,
-senior-level staff working under a professionally managed project
-structure.  See <URL:http://www.altrasoft.com/> for more details or
-contact Altrasoft directly at 1-888-ALTSOFT.
-
-A private effort is being put forth by David Hobley 
-<URL:http://www.angelfire.com/wa/hobley>. 
-
-He can be reached at the following email addresses: 
-@example
-<davidh@@wr.com.au> (home)
-@end example
-
-@example
-<david_hobley@@optusvision.com.au> (work)
-@end example
- 
-The closest is @dfn{Win-Emacs}, which is based on Lucid Emacs 19.6.
-Available from <URL:http://www.pearlsoft.com/>.
+Thanks to efforts of many people, coordinated by David Hobley
+<davidh@@wr.com.au> and Marc Paquette <marcpa@@cam.org>, beta versions
+of XEmacs now run on 32-bit Windows platforms (NT and 95).  The current
+betas require having an X server to run XEmacs; however, a native NT/95
+port is in alpha, thanks to Jonathan Harris <jhar@@tardis.ed.ac.uk>.
+
+The NT development is now coordinated by a mailing list at
+<xemacs-nt@@xemacs.org>.  If you are willing to contribute or want to
+follow the progress, mail to <xemacs-nt-request@@xemacs.org> to
+subscribe.
+
+Furthermore, Altrasoft is seeking corporate and government sponsors to
+help fund a fully native port of XEmacs to Windows 95 and NT using
+full-time, senior-level staff working under a professionally managed
+project structure.  See <URL:http://www.altrasoft.com/> for more details
+or contact Altrasoft directly at 1-888-ALTSOFT.
+
+
+The closest existing port is @dfn{Win-Emacs}, which is based on Lucid
+Emacs 19.6.  Available from <URL:http://www.pearlsoft.com/>.
 
 There's a port of GNU Emacs (not XEmacs) at
 @example
@@ -753,7 +745,7 @@
 version of the FAQ (listed in alphabetical order):
 
 @itemize @bullet
-@item Steven L Baur <steve@@miranova.com>
+@item SL Baur <steve@@xemacs.org>
 
 @item Hrvoje Niksic <hniksic@@srce.hr>
 
@@ -804,10 +796,71 @@
 
 XEmacs v20 is the version of XEmacs that includes MULE (Asian-language)
 support.  XEmacs 20.0 was released in February 1997, followed by XEmacs
-20.2 in May.  When compiled without MULE support 20.2 is currently very
-similar to 19.16 (except for some changes to the byte-code format, some
-new primitive types including @code{char}, @code{char-table}, and
-@code{range-table}) and equally stable.
+20.2 in May and XEmacs 20.3 in November.  When compiled without MULE
+support, 20.3 is approximately as stable as 19.16, and probably faster
+(due to additional optimization work.)
+
+As of XEmacs 20.3, version 20 is @emph{the} supported version of
+XEmacs.  This means that 19.16 will optionally receive stability fixes
+(if any), but that all the real development work will be done on the v20 
+tree.
+
+The incompatible changes in XEmacs 20 include the additional byte-codes,
+new primitive data types (@code{character}, @code{char-table}, and
+@code{range-table}).  This means that the character-integer equivalence
+inherent to all the previous Emacs and XEmacs releases no longer
+applies.
+
+However, to avoid breaking old code, many functions that should normally
+accept characters work with integers, and vice versa.  For more
+information, see the Lisp reference manual.  Here is a relevant excerpt, 
+for your convenience.
+
+@quotation
+  In XEmacs version 19, and in all versions of FSF GNU Emacs, a
+@dfn{character} in XEmacs Lisp is nothing more than an integer.
+This is yet another holdover from XEmacs Lisp's derivation from
+vintage-1980 Lisps; modern versions of Lisp consider this equivalence
+a bad idea, and have separate character types.  In XEmacs version 20,
+the modern convention is followed, and characters are their own
+primitive types. (This change was necessary in order for @sc{MULE},
+i.e. Asian-language, support to be correctly implemented.)
+
+  Even in XEmacs version 20, remnants of the equivalence between
+characters and integers still exist; this is termed the @dfn{char-int
+confoundance disease}.  In particular, many functions such as @code{eq},
+@code{equal}, and @code{memq} have equivalent functions (@code{old-eq},
+@code{old-equal}, @code{old-memq}, etc.) that pretend like characters
+are integers are the same.  Byte code compiled under any version 19
+Emacs will have all such functions mapped to their @code{old-} equivalents
+when the byte code is read into XEmacs 20.  This is to preserve
+compatibility -- Emacs 19 converts all constant characters to the equivalent
+integer during byte-compilation, and thus there is no other way to preserve
+byte-code compatibility even if the code has specifically been written
+with the distinction between characters and integers in mind.
+
+  Every character has an equivalent integer, called the @dfn{character
+code}.  For example, the character @kbd{A} is represented as the
+@w{integer 65}, following the standard @sc{ASCII} representation of
+characters.  If XEmacs was not compiled with @sc{MULE} support, the
+range of this integer will always be 0 to 255 -- eight bits, or one
+byte. (Integers outside this range are accepted but silently truncated;
+however, you should most decidedly @emph{not} rely on this, because it
+will not work under XEmacs with @sc{MULE} support.)  When @sc{MULE}
+support is present, the range of character codes is much
+larger. (Currently, 19 bits are used.)
+
+  FSF GNU Emacs uses kludgy character codes above 255 to represent
+keyboard input of @sc{ASCII} characters in combination with certain
+modifiers.  XEmacs does not use this (a more general mechanism is
+used that does not distinguish between @sc{ASCII} keys and other
+keys), so you will never find character codes above 255 in a
+non-@sc{MULE} XEmacs.
+
+  Individual characters are not often used in programs.  It is far more
+common to work with @emph{strings}, which are sequences composed of
+characters.  @xref{String Type}.
+@end quotation
 
 @node Q1.3.2, Q1.3.3, Q1.3.1, Introduction
 @section What is the status of Asian-language support, aka MULE?
@@ -1461,7 +1514,7 @@
 a symbolic link.
 @end quotation
 
-Steve L. Baur <steve@@miranova.com> writes:
+SL Baur <steve@@xemacs.org> writes:
 
 @quotation
 If you build against a recent libc-5.4 (late enough to have caused
@@ -2345,7 +2398,7 @@
 Movemail used to work fine in 19.14 but has stopped working in 19.15
 and 20.x.  I am using Linux.
 
-Steven L Baur <steve@@miranova.com> writes:
+SL Baur <steve@@xemacs.org> writes:
 
 @quotation
 Movemail on Linux used to default to using flock file locking.  With
@@ -2374,6 +2427,7 @@
 * Q3.0.6::      Can I force the output of @code{(face-list)} to a buffer?
 * Q3.0.7::      Font selections don't get saved after @code{Save Options}. 
 * Q3.0.8::      How do I make a single minibuffer frame?
+* Q3.0.9::      @code{Customize}.
 
 X Window System & Resources:
 * Q3.1.1::      Where is a list of X resources?
@@ -2578,7 +2632,7 @@
 (setq options-save-faces t)
 @end lisp
 
-@node Q3.0.8, Q3.1.1, Q3.0.7, Customization
+@node Q3.0.8, Q3.0.9, Q3.0.7, Customization
 @section How do I get a single minibuffer frame?
 
 Vin Shelton <acs@@acm.org> writes:
@@ -2604,7 +2658,21 @@
 taste, and there any number of other XEmacs options settings that may
 make it difficult or inconvenient to use.
 
-@node Q3.1.1, Q3.1.2, Q3.0.8, Customization
+@node Q3.0.9, Q3.1.1, Q3.0.8, Customization
+@section @code{Customize}.
+
+Strating with XEmacs 20.2 there is new system 'Customize' for customizing
+XEmacs options.
+
+You can access @code{Customize} from the @code{Options} menu
+or invoking one of customize commands byt typing eg.
+@kbd{M-x customize}, @kbd{M-x customize-face},
+@kbd{M-x customize-variable} or @kbd{M-x customize-apropos}.
+
+Strating with XEmacs 20.3 there is also new `browser' mode for Customize.
+Try it out with @kbd{M-x customize-browse}
+
+@node Q3.1.1, Q3.1.2, Q3.0.9, Customization
 @section Where is a list of X resources?
 
 Search through the @file{NEWS} file for @samp{X Resources}.  A fairly
@@ -2882,22 +2950,34 @@
 line number:
 
 @lisp
-(setq line-number-mode t)
+(line-number-mode 1)
 @end lisp
 
 Use the following to display the column number:
 
 @lisp
-(display-column-mode)
+(column-number-mode 1)
 @end lisp
 
+Or select from the @code{Options} menu
+ @code{Customize->Emacs->Editing->Basics->Line Number Mode}
+and/or
+ @code{Customize->Emacs->Editing->Basics->Column Number Mode}
+
+Or type @kbd{M-x customize RET editing-basics RET}.
+
 @node Q3.3.3, Q3.3.4, Q3.3.2, Customization
 @section How do I get XEmacs to put the time of day on the modeline?
 
+Add the following line to your @file{.emacs} file to display the
+time:
+
 @lisp
 (display-time)
 @end lisp
 
+See @code{Customize} from the @code{Options} menu for customization.
+
 @node Q3.3.4, Q3.3.5, Q3.3.3, Customization
 @section How do I turn off current chapter from AUC TeX modeline?
 
@@ -3083,14 +3163,16 @@
 @end lisp
 
 However, some modes explicitly bind @kbd{Delete}, so you would need to
-add a hook that does @code{local-set-key} for them.  If what you want to
+add a hook that does @code{local-set-key} for them. If what you want to
 do is make the Backspace and Delete keys work more PC/Motif-like, then
-take a look at the @file{delbackspace.el} package.
+take a look at the @file{delbs.el} package.
 
 New in XEmacs 19.14 is a variable called @code{key-translation-map}
-which makes it easier to bind @kbd{Delete}.  @file{delbackspace.el} is a
+which makes it easier to bind @kbd{Delete}. @file{delbs.el} is a
 good example of how to do this correctly.
 
+Also @xref{Q3.5.10}.
+
 @node Q3.5.5, Q3.5.6, Q3.5.4, Customization
 @section Scrolling one line at a time.
 
@@ -3121,6 +3203,11 @@
 (setq scroll-step 1)
 @end lisp
 
+You can change this also with Customize.
+Select from the @code{Options} menu
+@code{Customize->Emacs->Environment->Windows->Scroll Step...}
+or type @kbd{M-x customize RET windows RET}.
+
 @node Q3.5.6, Q3.5.7, Q3.5.5, Customization
 @section How to map @kbd{Help} key alone on Sun type4 keyboard?
 
@@ -3193,6 +3280,11 @@
 set things up, and @code{delbs-disable-delete-forward} to revert to
 ``normal'' behavior.
 
+You can change this also with Customize.
+Select from the @code{Options} menu
+@code{Customize->Emacs->Editing->Basics->Delete Key Deletes Forward}
+or type @kbd{M-x customize RET editing-basics RET}.
+
 Also @xref{Q3.5.4}.
 
 @node Q3.5.10, Q3.6.1, Q3.5.9, Customization
@@ -3228,6 +3320,11 @@
 (setq bar-cursor 'anything-else)
 @end lisp
 
+You can also change these with Customize.
+Select from the @code{Options} menu
+@code{Customize->Emacs->Environment->Display->Bar Cursor...}
+or type @kbd{M-x customize RET display RET}.
+
 You can use a color to make it stand out better:
 
 @example
@@ -3241,6 +3338,11 @@
 (setq bar-cursor nil)
 @end lisp
 
+You can also change this with Customize.
+Select from the @code{Options} menu
+@code{Customize->Emacs->Environment->Display->Bar Cursor...}
+or type @kbd{M-x customize RET display RET}.
+
 @node Q3.6.3, Q3.7.1, Q3.6.2, Customization
 @section Can I make the cursor blink?
 
@@ -3563,6 +3665,11 @@
 (setq zmacs-regions nil)
 @end lisp
 
+You can also change these with Customize.
+Select from the @code{Options} menu
+@code{Customize->Emacs->->Editing->Basics->Zmacs Regions}
+or type @kbd{M-x customize RET editing-basics RET}.
+
 To change the face for selection, look at @code{Options->Customize} on
 the menubar.
 
@@ -3580,7 +3687,7 @@
 To get this behavior, add the following line to your @file{.emacs}:
 
 @lisp
-(require 'pending-del)
+(turn-on-pending-delete)
 @end lisp
 
 Note that this will work with both Backspace and Delete.
@@ -3597,6 +3704,9 @@
 (setq isearch-highlight nil)
 @end lisp
 
+You can also change these with Customize.
+Type @kbd{M-x customize-variable RET isearch-highlight RET}.
+
 Note also that isearch-highlight affects query-replace and ispell.
 Instead of disabling isearch-highlight you may find that a better
 solution consists of customizing the @code{isearch} face.
@@ -3612,6 +3722,8 @@
 
 @strong{Warning: This command turns off all region highlighting.}
 
+Also @xref{Q3.10.1}.
+
 @node Q3.10.5,  , Q3.10.4, Customization
 @section The region disappears when I hit the end of buffer while scrolling.
 
@@ -3937,7 +4049,7 @@
 full-featured web browser.
 
 @node Q4.2.1, Q4.2.2, Q4.1.3, Subsystems
-@section GNUS, (ding) Gnus, Gnus 5, September Gnus, Red Gnus, Mamey Sapote Gnus, argh!
+@section GNUS, (ding) Gnus, Gnus 5, September Gnus, Red Gnus, Quassia Gnus, argh!
 
 The Gnus numbering issues are not meant for mere mortals to know them.
 If you feel you @emph{must} enter the muddy waters of Gnus, visit the
@@ -3947,6 +4059,11 @@
 <URL:http://www.ccs.neu.edu/software/gnus/>
 @end example
 
+See also Gnus home page
+@example
+<URL:http://www.gnus.org/>
+@end example
+
 @node Q4.2.2, Q4.2.3, Q4.2.1, Subsystems
 @section This question intentionally left blank.
 
@@ -4480,6 +4597,9 @@
 to your @file{.emacs}.  See the file @file{etc/sample.emacs} for more
 examples.
 
+See also @code{Syntax Highlighting} from the @code{Options} menu.
+Remember to save options.
+
 @node Q5.0.2, Q5.0.3, Q5.0.1, Miscellaneous
 @section I do not like cc-mode.  How do I use the old c-mode?
 
@@ -4523,6 +4643,9 @@
 
 It will work for C, C++ and Lisp.
 
+See also @code{Syntax Highlighting} from the @code{Options} menu.
+Remember to save options.
+
 @node Q5.0.4, Q5.0.5, Q5.0.3, Miscellaneous
 @section How can I enable auto-indent?
 
@@ -4541,6 +4664,11 @@
 ;;; and others ...
 @end lisp
 
+You can customize filling and adaptive filling with Customize.
+Select from the @code{Options} menu
+@code{Customize->Emacs->->Editing->Fill->Fill...}
+or type @kbd{M-x customize RET fill RET}.
+
 Note that well-behaving text-lookalike modes will run
 @code{text-mode-hook} by default (e.g. that's what Message does).  For
 the nasty ones, you'll have to provide the @code{add-hook}s yourself.
@@ -5596,11 +5724,14 @@
 @node Q6.0.2, Q6.0.3, Q6.0.1, Current Events
 @section What is new in 20.3?
 
-XEmacs release 20.3 is planned for november 1997.  It will contain many
+XEmacs 20.3 will be released in November 1997.  It will contain many
 bugfixes, and a number of new features, including Autoconf 2 based
 configuration, multiple TTY frames, further customizations, synches with
 GNU Emacs 20, advanced Perl-like regexp features, and more.
 
+XEmacs 20.3 will be the first non-beta v20 release, and will be the
+basis for all further development.
+
 @node Q6.0.3,  , Q6.0.2, Current Events
 @section Procedural changes in XEmacs development.
 
@@ -5613,13 +5744,17 @@
 the list.  Please note this is a developers mailing list for people who
 have an active interest in the development process.
 
+The discussion of NT XEmacs development is taking place on a separate
+mailing list.  Send mail to <xemacs-nt-request@@xemacs.org> to
+subscribe.
+
 @item
 Due to the long development cycle in between releases, it has been
 decided that intermediate versions will be made available in source only
 form for the truly interested.
 
-XEmacs 19.16 will be the last 19 release, basically consisting of 19.15
-plus the collected bugfixes.
+XEmacs 19.16 was the last 19 release, basically consisting of 19.15 plus
+the collected bugfixes.
 
 @item
 As of December 1996, Steve Baur <steve@@altair.xemacs.org> has become
--- a/nt/ChangeLog	Mon Aug 13 10:06:48 2007 +0200
+++ b/nt/ChangeLog	Mon Aug 13 10:07:35 2007 +0200
@@ -1,3 +1,8 @@
+Tue November 18 21:45:06 1997 davidh
+
+	* xemacs.mak updated to remove dependency on startup.elc
+	  HAVE_IMAGEMAGICK added for X build.
+
 Thu September 25 23:06:44 1997 davidh
 
 	* xemacs.mak updated to make the build as simple as typing
--- a/nt/README	Mon Aug 13 10:06:48 2007 +0200
+++ b/nt/README	Mon Aug 13 10:07:35 2007 +0200
@@ -2,7 +2,7 @@
 
 			     David Hobley
 			    Marc Paquette
-			   Jonathon Harris
+			   Jonathan Harris
 
 Currently XEmacs for Win32 is in an early stage of development. 
 
@@ -70,6 +70,6 @@
 David Hobley
 Marc Paquette
 August Hill
-Jonathon Harris
+Jonathan Harris
 
 and others.
--- a/nt/Todo	Mon Aug 13 10:06:48 2007 +0200
+++ b/nt/Todo	Mon Aug 13 10:07:35 2007 +0200
@@ -27,18 +27,15 @@
        implementation is broken and can cause the same timeout to go
        off twice (especially during mouse drags?), which makes XEmacs abort.
        Windows95 doesn't appear to provide any one-shot timers (NT does).
-    2. XEmacs starts-up with "Arithmetic error".
-    3. It might be a good idea if someone sanity-checked my (jhar) changes to
-       faces.el.
-    4. w32-make-font-foo in w32/w32-faces.el need to be written.
-    5. Calling mouse_[enter|leave]_frame_hook.
-    6. Eliminate resizing funnies
-    7. Scrollbar
-    8. Menubar
-    9. Palette handling
-   10. Middle mouse button emulation. Dragging off-frame.
-   11. Images
-   12. Toolbar
+    2. Random face colors.
+    3. Calling mouse_[enter|leave]_frame_hook.
+    4. Eliminate resizing funnies
+    5. Scrollbar
+    6. Menubar
+    7. Palette handling
+    8. Middle mouse button emulation. Dragging off-frame.
+    9. Images
+   10. Toolbar
 
 Old Issues. 
 
--- a/nt/xemacs.mak	Mon Aug 13 10:06:48 2007 +0200
+++ b/nt/xemacs.mak	Mon Aug 13 10:07:35 2007 +0200
@@ -6,6 +6,7 @@
 HAVE_MSW=1
 
 HAVE_MULE=0
+HAVE_IMAGEMAGICK=0
 
 OPT=-Od -Zi
 #OPT=-O2 -G5 -Zi
@@ -13,12 +14,19 @@
 #------------------------------------------------------------------------------
 
 !if $(HAVE_X)
+
+X11R6=h:\utils\X11R6
+
+!if $(HAVE_IMAGEMAGICK)
 MAGICK=e:\utils\ImageMagick
-X11R6=e:\utils\X11R6
+
+MAGICK_INCLUDES=-I$(MAGICK)\Magick
+MAGICK_LIBS=Magick.dll.lib
+!endif
 
 X_DEFINES=-DHAVE_X_WINDOWS
-X_INCLUDES=-I$(X11R6)\include -I$(MAGICK)\Magick
-X_LIBS=Magick.dll.lib Xaw.lib Xmu.lib Xt.lib SM.lib ICE.lib Xext.lib X11.lib
+X_INCLUDES=-I$(X11R6)\include $(MAGICK_INCLUDES)
+X_LIBS=$(MAGICK_LIBS) Xaw.lib Xmu.lib Xt.lib SM.lib ICE.lib Xext.lib X11.lib
 !endif
 
 !if $(HAVE_MSW)
@@ -31,6 +39,7 @@
 
 !include "..\version.sh"
 
+# Nothing should need to be edited below this point.
 #------------------------------------------------------------------------------
 
 # Generic variables
@@ -69,7 +78,7 @@
 LASTFILE_OBJS= \
 	$(OUTDIR)\lastfile.obj
 
-$(LASTFILE): $(LASTFILE_OBJS)
+$(LASTFILE): $(XEMACS_INCLUDES) $(LASTFILE_OBJS)
 	link.exe -lib -nologo -out:$@ $(LASTFILE_OBJS)
 
 $(OUTDIR)\lastfile.obj:	$(LASTFILE_SRC)\lastfile.c
@@ -96,7 +105,7 @@
 	$(OUTDIR)\xlwmenu.obj \
 	$(OUTDIR)\xlwscrollbar.obj
 
-$(LWLIB): $(XEMACS_INCLUDES) $(LWLIB_OBJS)
+$(LWLIB): $(LWLIB_OBJS)
 	link.exe -lib -nologo -debugtype:both -out:$@ $(LWLIB_OBJS)
 
 $(OUTDIR)\lwlib-config.obj:	$(LWLIB_SRC)\lwlib-config.c
@@ -485,6 +494,7 @@
 	link.exe @<<
   $(TEMACS_LFLAGS) $(TEMACS_OBJS) $(TEMACS_LIBS)
 <<
+	!$(TEMACS) -batch -l update-elc.el
 
 # MSDEV Source Broswer file. "*.sbr" is too inclusive but this is harmless
 $(TEMACS_BROWSE): $(TEMACS_OBJS)
@@ -499,7 +509,7 @@
 LOADPATH=$(LISP)
 
 $(DOC): $(LOADPATH)\startup.elc $(LIB_SRC)\make-docfile.exe
-	del $(DOC)
+	-del $(DOC)
 	!$(TEMACS) -batch -l make-docfile.el -- -o $(DOC) -i $(XEMACS)\site-packages
 	!$(LIB_SRC)\make-docfile.exe -a $(DOC) -d $(TEMACS_SRC) $(DOC_SRC1)
 	!$(LIB_SRC)\make-docfile.exe -a $(DOC) -d $(TEMACS_SRC) $(DOC_SRC2)
@@ -510,9 +520,6 @@
 	!$(LIB_SRC)\make-docfile.exe -a $(DOC) -d $(TEMACS_SRC) $(DOC_SRC7)
 	!$(LIB_SRC)\make-docfile.exe -a $(DOC) -d $(TEMACS_SRC) $(DOC_SRC8)
 
-$(LOADPATH)\startup.elc: $(LOADPATH)\startup.el
-	!$(TEMACS) -batch -l update-elc.el
-
 update-elc: $(LOADPATH)\startup.el
 	!$(TEMACS) -batch -l update-elc.el
 
@@ -544,6 +551,7 @@
 	cd ..\$(TEMACS_DIR)
 	del config.h
 	del paths.h
+	del Emacs.ad.h
 	del *.bak
 	del *.orig
 	del *.rej
--- a/src/ChangeLog	Mon Aug 13 10:06:48 2007 +0200
+++ b/src/ChangeLog	Mon Aug 13 10:07:35 2007 +0200
@@ -1,3 +1,177 @@
+1997-11-19  Kyle Jones  <kyle_jones@wonderworks.com>
+
+	* Emacs.ad: Change uses of Gray75 to Gray80.
+	  Don't set modeline colors here.
+
+	* EmacsFrame.c: Fetch "background" resource for use by
+	  the toolbar initialization code; default this fetched
+	  value to -1 if it is unspecified, which is different
+	  from what is found in ef->core.background_pixel in that
+	  case.
+
+	* EmacsFrame.h: Define macros for "Background" and
+	  "background" resource strings.
+
+	* EmacsFrameP.h: Added background_pixel field to
+	  EmascFrmaePart struct.
+
+	* toolbar-x.c (x_initialize_frame_toolbar_gcs): Added
+	  code to use the global background resource as the
+	  toolbar background color if it is sepcified. Otherwise
+	  fall back to the backgroundToolBarColor resource.
+
+1997-11-17  Marc Paquette  <marcpa@cam.org>
+
+	* callproc.c (Fcall_process_internal): Fix for bug in 
+	CRLF -> LF conversion.
+
+1997-11-19  Jonathan Harris <jhar@tardis.ed.ac.uk>
+
+	* redisplay-msw.c: Calls GdiFlush() in _ouput_end, _clear_frame and
+	_redraw_exposed_area
+
+	* frame-msw.c: mswindows_init_frame_2
+	  Sets frame's pixel width and height
+
+1997-11-19  Kyle Jones  <kyle_jones@wonderworks.com>
+
+	* callproc.c (call_process_cleanup): Actaully wait
+	  for the process, rather than not doing it and saying we
+	  did.
+
+1997-11-20  Hrvoje Niksic  <hniksic@srce.hr>
+
+	* callproc.c (Fcall_process_internal): Close fd_error.
+
+1997-11-19  Didier Verna  <verna@inf.enst.fr>
+
+	* emacs.c (main_1): Added the missing argmatch call to check
+ 	for the '-h' option.
+
+1997-11-18  SL Baur  <steve@altair.xemacs.org>
+
+	* mule-coding.h: Replace freshly broken ENCODE_SJIS and
+	DECODE_SJIS macros with working versions from beta4.
+
+1997-11-17  Kyle Jones  <kyle_jones@wonderworks.com>
+
+	* frame-x.c (x_init_frame_1): Set frame visibility
+	  flag to 1 immediately so that echo area message are
+	  displayed in it promptly.
+
+	* redisplay.c (Fredisplay_echo_area): If frame has
+	  changed, clear it to avoid garbled messages.
+
+	* window.c (set_window_pixsize): Restore the bail out
+	  if no size change, but do it after the loop that recomputers
+	  major child corner coordinates.
+
+	* keymap.c (describe_map_mapper): Recognize the
+	  buttonXup keysyms as mouse bindings.
+
+1997-11-17  Tor Arntsen <tor@spacetec.no>
+
+	* Makefile.in.in (update-elc.stamp): Add temacs to dependency.
+
+1997-11-16  Kyle Jones  <kyle_jones@wonderworks.com>
+
+	* Added suport for toolbar borders.
+
+	* EmacsFrame.c: Added X resources for new toolbar
+	   borders.
+
+	   (EmacsFrameSetValues): Added Fadd_spec_to_specifier
+	   calls to move resourced toolbar border width data
+	   into the speciifers.
+
+	* EmacsFrame.h: Defined X resource strings for
+	   toolbar border width resources.
+
+	* EmacsFrameP.h: Added toolbar border width fields
+	   to the EmacsFramePart struct.
+
+	* console.h: Added toolbar_border_width_changed_in_frame_method
+	   field to struct console.
+
+	* events.c (event_x_y_pixel_internal):  Factor the
+	   toolbar border into pixel offset.
+
+	* frame.c: Document new toolbar border width
+	   speciifer as being usable as frame properties.
+
+	   (frame_conversion_internal): Factor the toolbar border 
+	   widths into the geometry calculations.
+
+	   (change_frame_size_1): Ditto.
+
+	* frame.h: Added field to struct frame for toolbar
+	   border widths.  Modified geomtry macros and created
+	   others in support of the new toolbar border widths.
+
+	* frameslot.h: Added a default_toolbar_border_width
+	   slot.
+
+	* redisplay-x.c (x_clear_frame): Factor the toolbar
+	   border widths into the geometry calculations.
+
+	* toolbar-x.c (x_draw_blank_toolbar_button): Add
+	   support for drawing a border along with the blank
+	   button.  Accept border_width and vertical args.
+
+	   (x_output_toolbar_button): Added support for drawing a 
+	   border along with the button.
+
+	   (X_OUTPUT_BUTTONS_LOOP): Pass border_width and vert
+	   args to x_draw_blank_toolbar_button.  Set vertical and 
+	   border_width fields in toolbar button.
+
+	   (x_output_toolbar): Support toolbar border widths.
+
+	   (x_toolbar_size_changed_in_frame_1): Mark all toolbar
+	   buttons in the change toolbar as dirty so that they
+	   are refreshed if had been painted over.
+
+	   New function: x_toolbar_border_width_changed_in_frame.
+	   Used it as a console method.
+
+	* toolbar.c: New function: mark_frame_toolbar_buttons_dirty.
+
+	   New function: toolbar_border_width_changed_in_frame.
+	   Used it as a specifier frame slot change method.
+
+	   (get_toolbar_coords): Factor the toolbar border
+	   widths into the geometry calculations.
+
+	   (Fset_default_toolbar_position): Update the fallback
+	   border width specifiers for the affected toolbar
+	   positions.
+
+	   (specifier_vars_of_toolbar): Added specifiers for the
+	   toolbar border widths.
+
+	* toolbar.h: Added vertical and border_width field
+	   to the toolbar button struct.
+
+	* window.h: Added default_toolbar_border_width slot
+	   to window struct, along with four slots for the four
+	   window local toolbar border width values.
+
+1997-11-16  Kyle Jones  <kyle_jones@wonderworks.com>
+
+	* frame-x.c: Fixed typo in the documentation of the
+	  top-toolbar-shadow-color frame property.
+
+1997-11-16  Skip Montanaro  <skip@calendar.com>
+
+	* redisplay.c: suppress buffer computation in several places if
+	MULE is not defined.
+
+1997-11-16  Hrvoje Niksic  <hniksic@srce.hr>
+
+	* events.c (print_event): Use `event-x-pixel' and `event-y-pixel', 
+	to be consistent with `make-event' and `event-properties'.
+	(Fmake_event): Allow nil dnd-data.
+
 1997-11-15  Jonathan Harris  <jhar@tardis.ed.ac.uk>
 
 	* console.h
@@ -646,20 +820,20 @@
 
 1997-10-27  Martin Buchholz  <mrb@eng.sun.com>
 
-	* src/m/ibmrs6000.h:
-	* src/s/aix3-2.h: C_SWITCH_SYSTEM ==> configure.in
-	* src/s/aix4-1.h: -li18n ==> configure.in
-	* src/s/aix4.h: Always include strings.h
-	* src/config.h.in: Add AIXV3 define, suggested by xmkmf. Remove
+	* m/ibmrs6000.h:
+	* s/aix3-2.h: C_SWITCH_SYSTEM ==> configure.in
+	* s/aix4-1.h: -li18n ==> configure.in
+	* s/aix4.h: Always include strings.h
+	* config.h.in: Add AIXV3 define, suggested by xmkmf. Remove
 	AIX_SMT_EXP.
-	* src/unexaix.c: Fix nested comments compiler warning
+	* unexaix.c: Fix nested comments compiler warning
 
 1997-10-27  Kyle Jones  <kyle_jones@wonderworks.com>
 
-	* src/profile.c (sigprof_handler): Don't call XUNMARK on
+	* profile.c (sigprof_handler): Don't call XUNMARK on
 	  fun, it isn't needed.
 
-	* src/faces.c (face_property_matching_instance): Check
+	* faces.c (face_property_matching_instance): Check
 	  for charset == Qunbound, which it can be if the
 	  character set is unspecified.
 
@@ -1599,7 +1773,7 @@
 	* s/*.h:
 	* m/*.h:
 	* config.h.in:
-	* src/emacs.c:
+	* emacs.c:
 	* version.sh:
 	* configure.in: Another rewrite.
 	- support powerpcle (Solaris on ppc)
@@ -1679,10 +1853,10 @@
 
 Fri Jun 13 00:38:29 1997  Kyle Jones  <kyle_jones@wonderworks.com>
 
-	* src/console.c (Fsuspend_console):
+	* console.c (Fsuspend_console):
 	  Disable input on ttys.  Hide unhidden frames.
 
-	* src/console.c (Fresume_console):
+	* console.c (Fresume_console):
 	  Enable input on ttys.  Raise the device selected frame.
 
 Fri Jun 13 00:25:46 1997  Kyle Jones  <kyle_jones@wonderworks.com>
@@ -1792,7 +1966,7 @@
 	
 Sat Jun  7 22:00:54 1997  Kyle Jones  <kyle_jones@wonderworks.com>
 
-	* src/device-x.c (x_delete_device):
+	* device-x.c (x_delete_device):
 	  Add an EQ check so that we don't set Vdefault_x_device
 	  back to the device we're deleting.
 
@@ -1920,7 +2094,7 @@
 
 Wed May 21 11:58:17 1997  Kyle Jones  <kyle@crystal.wonderworks.com>
 
-	* src/insdel.c (signal_first_change):
+	* insdel.c (signal_first_change):
           record the current buffer for the unwind instead of the 
           buffer that's about to become the current buffer.
 
@@ -1930,17 +2104,17 @@
 
 Mon May 19 03:40:46 1997  Kyle Jones  <kyle@crystal.WonderWorks.COM>
 
-	* src/redisplay.c: (window_line_number)
+	* redisplay.c: (window_line_number)
 	  don't prefer buffer point value over window point
 	  value unless window, frame, device and console are
 	  all selected.
 
-	* src/redisplay.c: (redisplay_window)
+	* redisplay.c: (redisplay_window)
 	  don't prefer buffer point value over window point
 	  value unless window, frame, device and console are
 	  all selected.
 
-	* src/redisplay.c: (create_text_block)
+	* redisplay.c: (create_text_block)
 	  don't prefer buffer point value over window point
 	  value unless window, frame, device and console are
 	  all selected.
@@ -1951,7 +2125,7 @@
 
 Sun May 11 13:38:46 1997  Kyle Jones  <kyle@crystal.WonderWorks.COM>
 
-	* src/frame.c (change_frame_size_1):
+	* frame.c (change_frame_size_1):
 	  return without doing anything if the frame has benn
 	  initialized and the new frame size is same as the
 	  current frame size.
@@ -2037,15 +2211,15 @@
 
 Tue Apr 22 01:32:00 1997  Kyle Jones  <kyle@crystal.WonderWorks.COM>
 
-	* src/menubar-x.c (pre_activate_hook):
+	* menubar-x.c (pre_activate_hook):
 	  set in_menu_callback around call to call to
           menu_item_descriptor_to_widget_value.
 
-	* src/event-stream.c (Fnext_event):
+	* event-stream.c (Fnext_event):
 	  signal error if in_menu_callback non-nil to avoid
 	  reentering the menubar code and causing a crash later.
 
-	* src/cmdloop.c (command_loop_3):
+	* cmdloop.c (command_loop_3):
 	  signal error if in_menu_callback non-nil to avoid
 	  inflooping calling Fnext_event, which will signal an
 	  error if the situation is not caught earlier.
@@ -2728,7 +2902,7 @@
 
 Mon Jan 20 21:12:57 1997  Martin Buchholz  <mrb@eng.sun.com>
 
-	* src/event-Xt.c (emacs_Xt_handle_magic_event):
+	* event-Xt.c (emacs_Xt_handle_magic_event):
 	(frame-totally-visible-p) sometimes incorrectly returned nil.
 
 Thu Jan 16 17:24:29 1997  Joel Peterson  <tarzan@aosi.com>
--- a/src/EmacsFrame.c	Mon Aug 13 10:06:48 2007 +0200
+++ b/src/EmacsFrame.c	Mon Aug 13 10:07:35 2007 +0200
@@ -102,6 +102,18 @@
      offset (left_toolbar_width), XtRImmediate, (XtPointer)-1},
   {XtNrightToolBarWidth, XtCRightToolBarWidth, XtRInt, sizeof (int),
      offset (right_toolbar_width), XtRImmediate, (XtPointer)-1},
+  {XtNtopToolBarBorderWidth, XtCTopToolBarBorderWidth, XtRInt,
+     sizeof (int),
+     offset (top_toolbar_border_width), XtRImmediate, (XtPointer)-1},
+  {XtNbottomToolBarBorderWidth, XtCBottomToolBarBorderWidth, XtRInt,
+     sizeof (int),
+     offset (bottom_toolbar_border_width), XtRImmediate, (XtPointer)-1},
+  {XtNleftToolBarBorderWidth, XtCLeftToolBarBorderWidth, XtRInt,
+     sizeof (int),
+     offset (left_toolbar_border_width), XtRImmediate, (XtPointer)-1},
+  {XtNrightToolBarBorderWidth, XtCRightToolBarBorderWidth, XtRInt,
+     sizeof (int),
+     offset (right_toolbar_border_width), XtRImmediate, (XtPointer)-1},
   {XtNtopToolBarShadowColor, XtCTopToolBarShadowColor, XtRPixel, sizeof(Pixel),
      offset(top_toolbar_shadow_pixel), XtRString, "#000000"},
   {XtNbottomToolBarShadowColor, XtCBottomToolBarShadowColor, XtRPixel,
@@ -130,6 +142,8 @@
   },
   {XtNforeground, XtCForeground, XtRPixel, sizeof(Pixel),
      offset(foreground_pixel), XtRString, "XtDefaultForeground"},
+  {XtNbackground, XtCBackground, XtRPixel, sizeof(Pixel),
+     offset(background_pixel), XtRImmediate, (XtPointer)-1},
   {XtNcursorColor, XtCForeground, XtRPixel, sizeof(Pixel),
      offset(cursor_color), XtRString, "XtDefaultForeground"},
   {XtNbarCursor, XtCBarCursor, XtRBoolean, sizeof (Boolean),
@@ -425,6 +439,30 @@
 	  (Vtoolbar_size[RIGHT_TOOLBAR],
 	   make_int (new->emacs_frame.right_toolbar_width),
 	   frame, Qnil, Qnil);
+      if (cur->emacs_frame.top_toolbar_border_width !=
+	  new->emacs_frame.top_toolbar_border_width)
+	Fadd_spec_to_specifier
+	  (Vtoolbar_border_width[TOP_TOOLBAR],
+	   make_int (new->emacs_frame.top_toolbar_border_width),
+	   frame, Qnil, Qnil);
+      if (cur->emacs_frame.bottom_toolbar_border_width !=
+	  new->emacs_frame.bottom_toolbar_border_width)
+	Fadd_spec_to_specifier
+	  (Vtoolbar_border_width[BOTTOM_TOOLBAR],
+	   make_int (new->emacs_frame.bottom_toolbar_border_width),
+	   frame, Qnil, Qnil);
+      if (cur->emacs_frame.left_toolbar_border_width !=
+	  new->emacs_frame.left_toolbar_border_width)
+	Fadd_spec_to_specifier
+	  (Vtoolbar_border_width[LEFT_TOOLBAR],
+	   make_int (new->emacs_frame.left_toolbar_border_width),
+	   frame, Qnil, Qnil);
+      if (cur->emacs_frame.right_toolbar_border_width !=
+	  new->emacs_frame.right_toolbar_border_width)
+	Fadd_spec_to_specifier
+	  (Vtoolbar_border_width[RIGHT_TOOLBAR],
+	   make_int (new->emacs_frame.right_toolbar_border_width),
+	   frame, Qnil, Qnil);
 #endif /* HAVE_TOOLBARS */
     }
   in_resource_setting--;
--- a/src/EmacsFrame.h	Mon Aug 13 10:06:48 2007 +0200
+++ b/src/EmacsFrame.h	Mon Aug 13 10:07:35 2007 +0200
@@ -87,6 +87,34 @@
 #define XtCRightToolBarWidth "RightToolBarWidth"
 #endif
 
+#ifndef XtNtopToolBarBorderWidth
+#define XtNtopToolBarBorderWidth "topToolBarBorderWidth"
+#endif
+#ifndef XtCTopToolBarBorderWidth
+#define XtCTopToolBarBorderWidth "TopToolBarBorderWidth"
+#endif
+
+#ifndef XtNbottomToolBarBorderWidth
+#define XtNbottomToolBarBorderWidth "bottomToolBarBorderWidth"
+#endif
+#ifndef XtCBottomToolBarBorderWidth
+#define XtCBottomToolBarBorderWidth "BottomToolBarBorderWidth"
+#endif
+
+#ifndef XtNleftToolBarBorderWidth
+#define XtNleftToolBarBorderWidth "leftToolBarBorderWidth"
+#endif
+#ifndef XtCLeftToolBarBorderWidth
+#define XtCLeftToolBarBorderWidth "LeftToolBarBorderWidth"
+#endif
+
+#ifndef XtNrightToolBarBorderWidth
+#define XtNrightToolBarBorderWidth "rightToolBarBorderWidth"
+#endif
+#ifndef XtCRightToolBarBorderWidth
+#define XtCRightToolBarBorderWidth "RightToolBarBorderWidth"
+#endif
+
 #ifndef XtNtopToolBarShadowColor
 #define XtNtopToolBarShadowColor "topToolBarShadowColor"
 #endif
@@ -160,6 +188,13 @@
 #define XtCForeground "Foreground"
 #endif
 
+#ifndef XtNbackground
+#define XtNbackground "background"
+#endif
+#ifndef XtCBackground
+#define XtCBackground "Background"
+#endif
+
 #ifndef XtNiconic
 #define XtNiconic "iconic"
 #endif
--- a/src/EmacsFrameP.h	Mon Aug 13 10:06:48 2007 +0200
+++ b/src/EmacsFrameP.h	Mon Aug 13 10:07:35 2007 +0200
@@ -53,6 +53,10 @@
   int		bottom_toolbar_height;	/* height of bottom toolbar */
   int		left_toolbar_width;	/* width of left toolbar */
   int		right_toolbar_width;	/* width of right toolbar */
+  int		top_toolbar_border_width;	/* border width */
+  int		bottom_toolbar_border_width;	/* ... of bottom toolbar */
+  int		left_toolbar_border_width;	/* ... of left toolbar */
+  int		right_toolbar_border_width;	/* ... of right toolbar */
   Pixel		top_toolbar_shadow_pixel;
   Pixel		bottom_toolbar_shadow_pixel;
   Pixel		background_toolbar_pixel;
@@ -64,6 +68,7 @@
 
   XFontStruct*	font;			/* font */
   Pixel		foreground_pixel;	/* foreground */
+  Pixel		background_pixel;	/* background */
 
   Pixel		cursor_color;		/* text cursor color */
   Boolean	bar_cursor;		/* 1 if bar, 0 if block */
--- a/src/Makefile.in.in	Mon Aug 13 10:06:48 2007 +0200
+++ b/src/Makefile.in.in	Mon Aug 13 10:07:35 2007 +0200
@@ -307,7 +307,7 @@
 
 FRC.update-elc.stamp :
 
-update-elc.stamp : FRC.update-elc.stamp
+update-elc.stamp : temacs FRC.update-elc.stamp
 	@touch NOBYTECOMPILE
 	${DUMPENV} ./temacs -batch -l update-elc.el
 	@if test ! -f $@ -o -f NOBYTECOMPILE; then touch $@; fi; \
--- a/src/callproc.c	Mon Aug 13 10:06:48 2007 +0200
+++ b/src/callproc.c	Mon Aug 13 10:07:35 2007 +0200
@@ -131,6 +131,8 @@
     /* #### "c-G" -- need non-consing Single-key-description */
     message ("Waiting for process to die...(type C-g again to kill it instantly)");
 
+    wait_for_termination (pid);
+
     /* "Discard" the unwind protect.  */
     XCAR (fdpid) = Qnil;
     XCDR (fdpid) = Qnil;
@@ -486,6 +488,8 @@
     else if (logging_on)
       cadillac_start_logging ();
 #endif
+    if (fd_error >= 0)
+      close (fd_error);
 
 #endif /* not MSDOS */
 #endif /* not WINDOWSNT */
@@ -589,9 +593,9 @@
 	  make_decoding_input_stream(), we do the following which is
 	  less elegant. --marcpa */
        {
-	 int lf_count;
+	 int lf_count = 0;
 	 if (NILP (Vbinary_process_output)) {
-	   nread = nread - crlf_to_lf(nread, bufptr, &lf_count);
+	   nread = crlf_to_lf(nread, bufptr, &lf_count);
          }
        }
 #endif
--- a/src/console.h	Mon Aug 13 10:06:48 2007 +0200
+++ b/src/console.h	Mon Aug 13 10:07:35 2007 +0200
@@ -200,6 +200,9 @@
   void (*toolbar_size_changed_in_frame_method) (struct frame *f,
 						enum toolbar_pos pos,
 						Lisp_Object oldval);
+  void (*toolbar_border_width_changed_in_frame_method) (struct frame *f,
+							enum toolbar_pos pos,
+							Lisp_Object oldval);
   void (*toolbar_visible_p_changed_in_frame_method) (struct frame *f,
 						     enum toolbar_pos pos,
 						     Lisp_Object oldval);
--- a/src/emacs.c	Mon Aug 13 10:06:48 2007 +0200
+++ b/src/emacs.c	Mon Aug 13 10:07:35 2007 +0200
@@ -625,9 +625,7 @@
 
   /* Partially handle the -version and -help switches: they imply -batch,
      but are not removed from the list. */
-  if (argmatch (argv, argc, "-help", "--help",   3, NULL, &skip_args) ||
-      argmatch (argv, argc, "-?",     0,         2, NULL, &skip_args) ||
-      argmatch (argv, argc, "-flags", "--flags", 6, NULL, &skip_args))
+  if (argmatch (argv, argc, "-help", "--help",   3, NULL, &skip_args))
     noninteractive = 1, skip_args--;
 
   if (argmatch (argv, argc, "-version", "--version", 3, NULL, &skip_args) ||
@@ -1510,9 +1508,6 @@
   { "-nw", "--no-windows", 90, 0 },
   { "-batch", "--batch", 85, 0 },
   { "-help", "--help", 80, 0 },
-  { "-flags", "--flags", 80, 0 },
-  { "-h", 0, 80, 0 },
-  { "-?", 0, 80, 0 },
   { "-version", "--version", 75, 0 },
   { "-V", 0, 75, 0 },
   { "-d", "--display", 80, 1 },
--- a/src/events.c	Mon Aug 13 10:06:48 2007 +0200
+++ b/src/events.c	Mon Aug 13 10:07:35 2007 +0200
@@ -187,8 +187,12 @@
     case pointer_motion_event:
       {
 	char buf[64];
-	sprintf (buf, "#<motion-event %d, %d",
-		 XEVENT (obj)->event.motion.x, XEVENT (obj)->event.motion.y);
+	Lisp_Object Vx, Vy;
+	Vx = Fevent_x_pixel (obj);
+	assert (INTP (Vx));
+	Vy = Fevent_y_pixel (obj);
+	assert (INTP (Vy));
+	sprintf (buf, "#<motion-event %d, %d", XINT (Vx), XINT (Vy));
 	write_c_string (buf, printcharfun);
 	break;
       }
@@ -406,28 +410,30 @@
  allowed:
 
  channel	-- The event channel, a frame or a console.  For
-		   button-press, button-release and motion events, this
-		   must be a frame.  For key-press events, it must be a
-		   console.  If channel is unspecified, it will be set to
-		   the selected frame or selected console, as appropriate.
+		   button-press, button-release, motion and dnd-drop
+		   events, this must be a frame.  For key-press
+		   events, it must be a console.  If channel is
+		   unspecified, it will be set to the selected frame
+		   or selected console, as appropriate.
  key		-- The event key, a symbol or character.  Allowed only for
 		   keypress events.
- button		-- The event button, integer 1, 2 or 3.  Allowed only for
-		   button-press and button-release events.
+ button		-- The event button, integer 1, 2 or 3.  Allowed for
+		   button-press, button-release and dnd-drag events.
  modifiers	-- The event modifiers, a list of modifier symbols.  Allowed
-		   for key-press, button-press, button-release and motion
-		   events.
+		   for key-press, button-press, button-release, motion and
+		   dnd-drop events.
  x		-- The event X coordinate, an integer.  This is relative
 		   to the left of CHANNEL's root window.  Allowed for
-		   motion, button-press and button-release events.
+		   motion, button-press, button-release and dnd-drop events.
  y		-- The event Y coordinate, an integer.  This is relative
 		   to the top of CHANNEL's root window.  Allowed for
-		   motion, button-press and button-release events.
+		   motion, button-press, button-release and dnd-drop events.
  dnd-data	-- The event DND data, a list of (INTEGER DATA).  Allowed
 		   for dnd-drop events, if support for DND has been
 		   compiled into XEmacs.
  timestamp	-- The event timestamp, a non-negative integer.  Allowed for
-		   all types of events.
+		   all types of events.  If unspecified, it will be set to 0
+		   by default.
 
 For event type `empty', PLIST must be nil.
  `button-release', or `motion'.  If TYPE is left out, it defaults to
@@ -608,19 +614,26 @@
       else if (EQ (keyword, Qdnd_data))
 	{
 	  Lisp_Object dnd_tail;
-	  /* Value is a list of (INT DATA).  Data is a list. */
-	  CHECK_CONS (value);
-	  /* Oliver, change this to accept symbols, when the time is
-             ripe!  */
-	  CHECK_NATNUM (XCAR (value));
-	  CHECK_CONS (XCDR (value));
-	  if (!NILP (XCDR (XCDR (value))))
-	    wrong_type_argument (Qlistp, XCDR (value));
-	  /* Check the list validity. */
-	  EXTERNAL_LIST_LOOP (dnd_tail, XCAR (XCDR (value)))
-	    ;
-	  /* And now, copy it all. */
-	  e->event.dnd_drop.data = Fcopy_tree (value, Qnil);
+	  /* Value is either nil, or a list of (TYPE DATA).  TYPE is
+             an integer.  DATA is a list. */
+	  if (!NILP (value))
+	    {
+	      CHECK_CONS (value);
+	      /* To be changed to CHECK_SYMBOL. */
+	      CHECK_NATNUM (XCAR (value));
+	      CHECK_CONS (XCDR (value));
+	      if (XINT (Flength (value)) != 2)
+		signal_simple_error ("`dnd-data' should be a two-element list",
+				     XINT (Flength (value)));
+	      /* Check validity of DATA. */
+	      EXTERNAL_LIST_LOOP (dnd_tail, XCAR (XCDR (value)))
+		{
+		  /* Every element must be a string. */
+		  CHECK_STRING (XCAR (dnd_tail));
+		}
+	      /* And now, copy it all. */
+	      e->event.dnd_drop.data = Fcopy_tree (value, Qnil);
+	    }
 	}
 #endif /* HAVE_OFFIX_DND */
       else
@@ -691,12 +704,7 @@
 	       "button-release"
 #endif
 	       );
-#ifdef HAVE_OFFIX_DND
-      if ((e->event_type == dnd_drop_event) &&
-	  NILP (e->event.dnd_drop.data))
-	error ("Unspecified data for dnd-drop event");
       break;
-#endif
     default:
       break;
     }
@@ -1605,8 +1613,10 @@
     }
   else
     {
-      *y -= FRAME_REAL_TOP_TOOLBAR_HEIGHT (f);
-      *x -= FRAME_REAL_LEFT_TOOLBAR_WIDTH (f);
+      *y -= FRAME_REAL_TOP_TOOLBAR_HEIGHT (f) -
+	FRAME_REAL_TOP_TOOLBAR_BORDER_WIDTH (f);
+      *x -= FRAME_REAL_LEFT_TOOLBAR_WIDTH (f) -
+	FRAME_REAL_LEFT_TOOLBAR_BORDER_WIDTH (f);
     }
 
   return 1;
--- a/src/fileio.c	Mon Aug 13 10:06:48 2007 +0200
+++ b/src/fileio.c	Mon Aug 13 10:07:35 2007 +0200
@@ -3824,6 +3824,9 @@
   Lisp_Object annotations;
   Lisp_Object p, res;
   struct gcpro gcpro1, gcpro2;
+  Lisp_Object original_buffer;
+
+  XSETBUFFER (original_buffer, current_buffer);
 
   annotations = Qnil;
   p = Vwrite_region_annotate_functions;
@@ -3858,7 +3861,8 @@
     {
       struct buffer *given_buffer = current_buffer;
       Vwrite_region_annotations_so_far = annotations;
-      res = call3 (Qformat_annotate_function, Fcar (p), start, end);
+      res = call4 (Qformat_annotate_function, Fcar (p), start, end,
+		   original_buffer);
       if (current_buffer != given_buffer)
 	{
 	  start = make_int (BUF_BEGV (current_buffer));
--- a/src/frame-msw.c	Mon Aug 13 10:06:48 2007 +0200
+++ b/src/frame-msw.c	Mon Aug 13 10:07:35 2007 +0200
@@ -68,10 +68,17 @@
   update_frame_face_values (f);
 }
 
-/* Called just before frame's properties are set */
+/* Called just before frame's properties are set, size is 10x10 or something */
 static void
 mswindows_init_frame_2 (struct frame *f, Lisp_Object props)
 {
+  int x, y;
+  Lisp_Object frame, window;
+
+  XSETFRAME (frame, f);
+  default_face_height_and_width (frame, &x, &y);
+  FRAME_PIXWIDTH(f) = x * FRAME_WIDTH(f);
+  FRAME_PIXHEIGHT(f) = y * FRAME_HEIGHT(f);
 }
 
 /* Called after frame's properties are set */
--- a/src/frame-x.c	Mon Aug 13 10:06:48 2007 +0200
+++ b/src/frame-x.c	Mon Aug 13 10:07:35 2007 +0200
@@ -2036,14 +2036,17 @@
 			       device, popup);
     }
 
-  if (NILP (DEVICE_SELECTED_FRAME (d)))
-    {
-      /* This means that this is the first frame on the device.
-	 So short-ciruit the delay in processing the initial MapNotify
-	 event so that output on the first frame shows up right
-	 away... */
-      f->visible = 1;
-    }
+  /*
+   * Previously we set this only if NILP (DEVICE_SELECTED_FRAME (d))
+   * to make sure that messages were displayed as soon as possible
+   * if we're creating the first frame on a device.  But it is
+   * better to just set this all the time, so that when a new frame
+   * is created that covers the selected frame, echo area status
+   * messages can still be seen.  f->visible is reset later if the
+   * initially-unmapped property is found to be non-nil in the
+   * frame properties.
+   */
+  f->visible = 1;
 
   allocate_x_frame_struct (f);
   x_create_widgets (f, lisp_window_id, popup);
@@ -2646,7 +2649,7 @@
   bottom-toolbar-shadow-color	Color of bottom shadows on toolbars.
 				(*Not* specific to the bottom-toolbar.)
   top-toolbar-shadow-color	Color of top shadows on toolbars.
-				(*Not* specifier to the top-toolbar.)
+				(*Not* specific to the top-toolbar.)
   internal-border-width		Width of internal border around text area.
   border-width			Width of external border around text area.
   top				Y position (in pixels) of the upper-left
--- a/src/frame.c	Mon Aug 13 10:06:48 2007 +0200
+++ b/src/frame.c	Mon Aug 13 10:07:35 2007 +0200
@@ -2169,6 +2169,8 @@
  bottom-toolbar-height, left-toolbar-width, right-toolbar-width,
  default-toolbar-visible-p, top-toolbar-visible-p, bottom-toolbar-visible-p,
  left-toolbar-visible-p, right-toolbar-visible-p, toolbar-buttons-captioned-p,
+ top-toolbar-border-width, bottom-toolbar-border-width,
+ left-toolbar-border-width, right-toolbar-border-width,
  modeline-shadow-thickness, has-modeline-p
 		[Giving the name of any built-in specifier variable is
 		equivalent to calling `set-specifier' on the specifier,
@@ -2548,9 +2550,13 @@
   egw = max (egw, cpw);
   bdr = 2 * f->internal_border_width;
   obw = FRAME_SCROLLBAR_WIDTH (f) + FRAME_THEORETICAL_LEFT_TOOLBAR_WIDTH (f) +
-    FRAME_THEORETICAL_RIGHT_TOOLBAR_WIDTH (f);
+    FRAME_THEORETICAL_RIGHT_TOOLBAR_WIDTH (f) +
+    2 * FRAME_THEORETICAL_LEFT_TOOLBAR_BORDER_WIDTH (f) +
+    2 * FRAME_THEORETICAL_RIGHT_TOOLBAR_BORDER_WIDTH (f);
   obh = FRAME_SCROLLBAR_HEIGHT (f) + FRAME_THEORETICAL_TOP_TOOLBAR_HEIGHT (f) +
-    FRAME_THEORETICAL_BOTTOM_TOOLBAR_HEIGHT (f);
+    FRAME_THEORETICAL_BOTTOM_TOOLBAR_HEIGHT (f) +
+    2 * FRAME_THEORETICAL_TOP_TOOLBAR_BORDER_WIDTH (f) +
+    2 * FRAME_THEORETICAL_BOTTOM_TOOLBAR_BORDER_WIDTH (f);
 
   if (pixel_to_char)
     {
@@ -2654,13 +2660,17 @@
      selected window, then the extra space needs to be filled in
      with rows/cols. */
   if (!FRAME_REAL_TOP_TOOLBAR_VISIBLE (f))
-    new_pixheight += FRAME_THEORETICAL_TOP_TOOLBAR_HEIGHT (f);
+    new_pixheight += FRAME_THEORETICAL_TOP_TOOLBAR_HEIGHT (f) +
+      2 * FRAME_THEORETICAL_TOP_TOOLBAR_BORDER_WIDTH (f);
   if (!FRAME_REAL_BOTTOM_TOOLBAR_VISIBLE (f))
-    new_pixheight += FRAME_THEORETICAL_BOTTOM_TOOLBAR_HEIGHT (f);
+    new_pixheight += FRAME_THEORETICAL_BOTTOM_TOOLBAR_HEIGHT (f) +
+      2 * FRAME_THEORETICAL_BOTTOM_TOOLBAR_BORDER_WIDTH (f);
   if (!FRAME_REAL_LEFT_TOOLBAR_VISIBLE (f))
-    new_pixwidth += FRAME_THEORETICAL_LEFT_TOOLBAR_WIDTH (f);
+    new_pixwidth += FRAME_THEORETICAL_LEFT_TOOLBAR_WIDTH (f) +
+      2 * FRAME_THEORETICAL_LEFT_TOOLBAR_BORDER_WIDTH (f);
   if (!FRAME_REAL_RIGHT_TOOLBAR_VISIBLE (f))
-    new_pixwidth += FRAME_THEORETICAL_RIGHT_TOOLBAR_WIDTH (f);
+    new_pixwidth += FRAME_THEORETICAL_RIGHT_TOOLBAR_WIDTH (f) +
+      2 * FRAME_THEORETICAL_RIGHT_TOOLBAR_BORDER_WIDTH (f);
 
   /* Adjust the width for the end glyph which may be a different width
      than the default character width. */
--- a/src/frame.h	Mon Aug 13 10:06:48 2007 +0200
+++ b/src/frame.h	Mon Aug 13 10:07:35 2007 +0200
@@ -107,6 +107,8 @@
   Lisp_Object toolbar_size[4];
   /* Visibility of the toolbars.  This acts as a valve for toolbar_size. */
   Lisp_Object toolbar_visible_p[4];
+  /* Thickness of the border around the toolbar. */
+  Lisp_Object toolbar_border_width[4];
 #endif
 
   /* A structure of auxiliary data specific to the device type.
@@ -403,9 +405,12 @@
   (!NILP ((f)->toolbar_visible_p[pos]))
 #define FRAME_RAW_THEORETICAL_TOOLBAR_SIZE(f, pos) \
   (XINT ((f)->toolbar_size[pos]))
+#define FRAME_RAW_THEORETICAL_TOOLBAR_BORDER_WIDTH(f, pos) \
+  (XINT ((f)->toolbar_border_width[pos]))
 #else
 #define FRAME_RAW_THEORETICAL_TOOLBAR_VISIBLE(f, pos) 0
 #define FRAME_RAW_THEORETICAL_TOOLBAR_SIZE(f, pos) 0
+#define FRAME_RAW_THEORETICAL_TOOLBAR_BORDER_WIDTH(f, pos) 0
 #endif
 
 #define FRAME_THEORETICAL_TOOLBAR_SIZE(f, pos)		\
@@ -422,6 +427,20 @@
 #define FRAME_THEORETICAL_RIGHT_TOOLBAR_WIDTH(f) \
   FRAME_THEORETICAL_TOOLBAR_SIZE (f, RIGHT_TOOLBAR)
 
+#define FRAME_THEORETICAL_TOOLBAR_BORDER_WIDTH(f, pos)		\
+  (FRAME_RAW_THEORETICAL_TOOLBAR_VISIBLE (f, pos)	\
+   ? FRAME_RAW_THEORETICAL_TOOLBAR_BORDER_WIDTH (f, pos)	\
+   : 0)
+
+#define FRAME_THEORETICAL_TOP_TOOLBAR_BORDER_WIDTH(f) \
+  FRAME_THEORETICAL_TOOLBAR_BORDER_WIDTH (f, TOP_TOOLBAR)
+#define FRAME_THEORETICAL_BOTTOM_TOOLBAR_BORDER_WIDTH(f) \
+  FRAME_THEORETICAL_TOOLBAR_BORDER_WIDTH (f, BOTTOM_TOOLBAR)
+#define FRAME_THEORETICAL_LEFT_TOOLBAR_BORDER_WIDTH(f) \
+  FRAME_THEORETICAL_TOOLBAR_BORDER_WIDTH (f, LEFT_TOOLBAR)
+#define FRAME_THEORETICAL_RIGHT_TOOLBAR_BORDER_WIDTH(f) \
+  FRAME_THEORETICAL_TOOLBAR_BORDER_WIDTH (f, RIGHT_TOOLBAR)
+
 /* This returns the window-local value rather than the frame-local value;
    that tells you about what's actually visible rather than what should
    be used when computing the frame size. */
@@ -429,12 +448,15 @@
 #ifdef HAVE_TOOLBARS
 #define FRAME_RAW_REAL_TOOLBAR_VISIBLE(f, pos) \
   (!NILP (XWINDOW (FRAME_LAST_NONMINIBUF_WINDOW (f))->toolbar_visible_p[pos]))
+#define FRAME_RAW_REAL_TOOLBAR_BORDER_WIDTH(f, pos) \
+  (XINT (XWINDOW (FRAME_LAST_NONMINIBUF_WINDOW (f))->toolbar_border_width[pos]))
 #define FRAME_RAW_REAL_TOOLBAR_SIZE(f, pos) \
   (XINT (XWINDOW (FRAME_LAST_NONMINIBUF_WINDOW (f))->toolbar_size[pos]))
 #define FRAME_REAL_TOOLBAR(f, pos) \
   (XWINDOW (FRAME_LAST_NONMINIBUF_WINDOW (f))->toolbar[pos])
 #else
 #define FRAME_RAW_REAL_TOOLBAR_VISIBLE(f, pos) 0
+#define FRAME_RAW_REAL_TOOLBAR_BORDER_WIDTH(f, pos) 0
 #define FRAME_RAW_REAL_TOOLBAR_SIZE(f, pos) 0
 #define FRAME_REAL_TOOLBAR(f, pos) Qnil
 #endif
@@ -467,6 +489,11 @@
    && !NILP (FRAME_REAL_TOOLBAR (f, pos))	\
    ? FRAME_RAW_REAL_TOOLBAR_SIZE (f, pos)	\
    : 0)
+#define FRAME_REAL_TOOLBAR_BORDER_WIDTH(f, pos)		\
+  (FRAME_RAW_REAL_TOOLBAR_VISIBLE (f, pos)		\
+   && !NILP (FRAME_REAL_TOOLBAR (f, pos))		\
+   ? FRAME_RAW_REAL_TOOLBAR_BORDER_WIDTH (f, pos)	\
+   : 0)
 
 #define FRAME_REAL_TOP_TOOLBAR_HEIGHT(f) \
   FRAME_REAL_TOOLBAR_SIZE (f, TOP_TOOLBAR)
@@ -477,6 +504,15 @@
 #define FRAME_REAL_RIGHT_TOOLBAR_WIDTH(f) \
   FRAME_REAL_TOOLBAR_SIZE (f, RIGHT_TOOLBAR)
 
+#define FRAME_REAL_TOP_TOOLBAR_BORDER_WIDTH(f) \
+  FRAME_REAL_TOOLBAR_BORDER_WIDTH (f, TOP_TOOLBAR)
+#define FRAME_REAL_BOTTOM_TOOLBAR_BORDER_WIDTH(f) \
+  FRAME_REAL_TOOLBAR_BORDER_WIDTH (f, BOTTOM_TOOLBAR)
+#define FRAME_REAL_LEFT_TOOLBAR_BORDER_WIDTH(f) \
+  FRAME_REAL_TOOLBAR_BORDER_WIDTH (f, LEFT_TOOLBAR)
+#define FRAME_REAL_RIGHT_TOOLBAR_BORDER_WIDTH(f) \
+  FRAME_REAL_TOOLBAR_BORDER_WIDTH (f, RIGHT_TOOLBAR)
+
 #define FRAME_REAL_TOP_TOOLBAR_VISIBLE(f) \
   FRAME_REAL_TOOLBAR_VISIBLE (f, TOP_TOOLBAR)
 #define FRAME_REAL_BOTTOM_TOOLBAR_VISIBLE(f) \
@@ -486,25 +522,32 @@
 #define FRAME_REAL_RIGHT_TOOLBAR_VISIBLE(f) \
   FRAME_REAL_TOOLBAR_VISIBLE (f, RIGHT_TOOLBAR)
 
-#define FRAME_TOP_BORDER_START(f) (FRAME_REAL_TOP_TOOLBAR_HEIGHT (f))
+#define FRAME_TOP_BORDER_START(f)					\
+  (FRAME_REAL_TOP_TOOLBAR_HEIGHT (f) +					\
+   2 * FRAME_REAL_TOP_TOOLBAR_BORDER_WIDTH (f))
 #define FRAME_TOP_BORDER_END(f)						\
   (FRAME_TOP_BORDER_START (f) + FRAME_BORDER_HEIGHT (f))
 
 #define FRAME_BOTTOM_BORDER_START(f)					\
   (FRAME_PIXHEIGHT (f) - FRAME_BORDER_HEIGHT (f) -			\
-   FRAME_REAL_BOTTOM_TOOLBAR_HEIGHT (f))
+   FRAME_REAL_BOTTOM_TOOLBAR_HEIGHT (f) -				\
+   2 * FRAME_REAL_BOTTOM_TOOLBAR_BORDER_WIDTH (f))
 #define FRAME_BOTTOM_BORDER_END(f)					\
-  (FRAME_PIXHEIGHT (f) - FRAME_REAL_BOTTOM_TOOLBAR_HEIGHT (f))
+  (FRAME_PIXHEIGHT (f) - FRAME_REAL_BOTTOM_TOOLBAR_HEIGHT (f) -		\
+   2 * FRAME_REAL_BOTTOM_TOOLBAR_BORDER_WIDTH (f))
 
-#define FRAME_LEFT_BORDER_START(f) (FRAME_REAL_LEFT_TOOLBAR_WIDTH (f))
+#define FRAME_LEFT_BORDER_START(f)					\
+  (FRAME_REAL_LEFT_TOOLBAR_WIDTH (f) +					\
+   2 * FRAME_REAL_LEFT_TOOLBAR_BORDER_WIDTH (f))
 #define FRAME_LEFT_BORDER_END(f)					\
   (FRAME_LEFT_BORDER_START (f) + FRAME_BORDER_WIDTH (f))
 
 #define FRAME_RIGHT_BORDER_START(f)					\
   (FRAME_PIXWIDTH (f) - FRAME_BORDER_WIDTH (f) -			\
-   FRAME_REAL_RIGHT_TOOLBAR_WIDTH (f))
+   2 * FRAME_REAL_RIGHT_TOOLBAR_WIDTH (f))
 #define FRAME_RIGHT_BORDER_END(f)					\
-  (FRAME_PIXWIDTH (f) - FRAME_REAL_RIGHT_TOOLBAR_WIDTH (f))
+  (FRAME_PIXWIDTH (f) - FRAME_REAL_RIGHT_TOOLBAR_WIDTH (f) -		\
+   2 * FRAME_REAL_RIGHT_TOOLBAR_BORDER_WIDTH(f))
 
 /* Equivalent in FSF Emacs:
 
--- a/src/frameslots.h	Mon Aug 13 10:06:48 2007 +0200
+++ b/src/frameslots.h	Mon Aug 13 10:07:35 2007 +0200
@@ -110,6 +110,7 @@
   MARKED_SLOT (default_toolbar_width);
   MARKED_SLOT (default_toolbar_height);
   MARKED_SLOT (default_toolbar_visible_p);
+  MARKED_SLOT (default_toolbar_border_width);
 #endif
 
   /* Possible frame-local default for outside margin widths. */
--- a/src/glyphs-x.c	Mon Aug 13 10:06:48 2007 +0200
+++ b/src/glyphs-x.c	Mon Aug 13 10:07:35 2007 +0200
@@ -57,12 +57,8 @@
 #include "sysfile.h"
 
 #ifdef HAVE_IMAGEMAGICK
-#define HAVE_X11_MAGICK_IMAGE_H
-#endif /* HAVE_IMAGEMAGICK */
-
-#ifdef HAVE_X11_MAGICK_IMAGE_H
-#include <magick/magick.h>
-/* #include <image.h> */
+#include <magick.h>
+/*#include <image.h>*/
 #include <assert.h>
 #endif
 
@@ -1735,8 +1731,6 @@
 	return Qnil;
 }
 
-static void XDitherImage(Image *image,XImage *ximage);
-
 static void
 imagick_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
 					 Lisp_Object pointer_fg, Lisp_Object pointer_bg,
@@ -1789,6 +1783,10 @@
 		signal_simple_error ("Unable to read image.",instantiator);
 	}
 
+#if 1
+	DescribeImage(unwind.image,stderr,1);
+#endif
+
 	unwind.ximage = XCreateImage(dpy, DefaultVisualOfScreen (scr),
 								 depth,
 								 (depth == 1) ? XYPixmap : ZPixmap,
@@ -1819,9 +1817,83 @@
 	** WMP 10/30/97
 	*/
 
+	{
+		int i,j,x;
+		unsigned int bytes_per_pixel, scanline_pad;
+		unsigned char *q;
+		RunlengthPacket *p;
+		XColor color;
+
+		unwind.npixels = unwind.image->total_colors;
+		unwind.pixels = xmalloc(unwind.npixels * sizeof(unsigned long));
+		q = (unsigned char *) unwind.ximage->data;
+		x  = 0;
+		memset(unwind.pixels,0,unwind.npixels * sizeof(unsigned long));
+		p = unwind.image->pixels;
+		scanline_pad = unwind.ximage->bytes_per_line -
+			((unwind.ximage->width * unwind.ximage->bits_per_pixel) >> 3);
+
+		/* Convert to multi-byte color-mapped X image. */
+		bytes_per_pixel=unwind.ximage->bits_per_pixel >> 3;
+
+#if 1
+          for (i=0; i < unwind.image->packets; i++)
+          {
+			  color.red = p->red;
+			  color.green = p->green;
+			  color.blue = p->blue;
+			  color.flags = DoRed | DoGreen | DoBlue;
+			  allocate_nearest_color (dpy, DefaultColormapOfScreen (scr), &color);
+			  unwind.pixels[i] = color.pixel;
+
+			  for (j=0; j <= ((int) p->length); j++)
+			  {
+				  *q++=(unsigned char) color.pixel;
+				  x++;
+				  if (x == unwind.ximage->width)
+				  {
+					  x=0;
+					  q+=scanline_pad;
+				  }
+			  }
+			  p++;
+          }
+#else
+		for (i=0; i < unwind.image->packets; i++)
+		{
+			pixel = unwind.pixels[p->index];
+			for (k=0; k < bytes_per_pixel; k++)
+			{
+				channel[k]=(unsigned char) pixel;
+				pixel>>=8;
+			}
+			for (j=0; j <= ((int) p->length); j++)
+			{
+				for (k=0; k < bytes_per_pixel; k++)
+					*q++=channel[k];
+				x++;
+				if (x == unwind.ximage->width)
+				{
+					x=0;
+					q+=scanline_pad;
+				}
+			}
+			p++;
+		}
+#endif
+	}
+
 	init_image_instance_from_x_image (ii, unwind.ximage, dest_mask,
 									  unwind.pixels, unwind.npixels,
 									  instantiator);
+
+	/* And we are done!
+	** Now that we've succeeded, we don't want the pixels
+	** freed right now.  They're kept around in the image instance
+	** structure until it's destroyed.
+	*/
+	unwind.npixels = 0;
+	unbind_to (speccount, Qnil);
 }
 
 #endif /* HAVE_IMAGEMAGICK */
--- a/src/keymap.c	Mon Aug 13 10:06:48 2007 +0200
+++ b/src/keymap.c	Mon Aug 13 10:07:35 2007 +0200
@@ -3961,7 +3961,15 @@
 	  EQ (keysym, Qbutton4) ||
 	  EQ (keysym, Qbutton5) ||
 	  EQ (keysym, Qbutton6) ||
-	  EQ (keysym, Qbutton7))))
+	  EQ (keysym, Qbutton7) ||
+	  EQ (keysym, Qbutton0up) ||
+	  EQ (keysym, Qbutton1up) ||
+	  EQ (keysym, Qbutton2up) ||
+	  EQ (keysym, Qbutton3up) ||
+	  EQ (keysym, Qbutton4up) ||
+	  EQ (keysym, Qbutton5up) ||
+	  EQ (keysym, Qbutton6up) ||
+	  EQ (keysym, Qbutton7up))))
     return;
 
   /* If this command in this map is shadowed by some other map, ignore it. */
--- a/src/mule-coding.h	Mon Aug 13 10:06:48 2007 +0200
+++ b/src/mule-coding.h	Mon Aug 13 10:07:35 2007 +0200
@@ -408,31 +408,34 @@
 #define CODING_CATEGORY_NOT_FINISHED_MASK \
   (1 << 30)
 
-/* Macros to decode or encode a character of JISX0208 in SJIS.  S1 and
-   S2 are the 1st and 2nd position-codes of JISX0208 in SJIS coding
-   system.  C1 and C2 are the 1st and 2nd position codes of Emacs'
-   internal format.  */
+/* Convert shift-JIS code (sj1, sj2) into internal string
+   representation (c1, c2). (The leading byte is assumed.) */
+
+#define DECODE_SJIS(sj1, sj2, c1, c2)			\
+do {							\
+  int I1 = sj1, I2 = sj2;				\
+  if (I2 >= 0x9f)					\
+    c1 = (I1 << 1) - ((I1 >= 0xe0) ? 0xe0 : 0x60),	\
+    c2 = I2 + 2;					\
+  else							\
+    c1 = (I1 << 1) - ((I1 >= 0xe0) ? 0xe1 : 0x61),	\
+    c2 = I2 + ((I2 >= 0x7f) ? 0x60 : 0x61);		\
+} while (0)
 
-#define DECODE_SJIS(s1, s2, c1, c2)		  	\
-  do {						  	\
-    if (s2 >= 0x9F)				  	\
-      c1 = s1 * 2 - (s1 >= 0xE0 ? 0x160 : 0xE0),  	\
-      c2 = s2 - 0x7E;				  	\
-    else					  	\
-      c1 = s1 * 2 - ((s1 >= 0xE0) ? 0x161 : 0xE1),	\
-      c2 = s2 - ((s2 >= 0x7F) ? 0x20 : 0x1F);	  	\
-  } while (0)
+/* Convert the internal string representation of a Shift-JIS character
+   (c1, c2) into Shift-JIS code (sj1, sj2).  The leading byte is
+   assumed. */
 
-#define ENCODE_SJIS(c1, c2, s1, s2)			\
-  do {							\
-    if ((c1) & 1)						\
-      s1 = (c1) / 2 + (((c1) < 0x5F) ? 0x71 : 0xB1),	\
-      s2 = (c2) + (((c2) >= 0x60) ? 0x20 : 0x1F);		\
-    else						\
-      s1 = (c1) / 2 + (((c1) < 0x5F) ? 0x70 : 0xB0),	\
-      s2 = (c2) + 0x7E;					\
-  } while (0)
-
+#define ENCODE_SJIS(c1, c2, sj1, sj2)			\
+do {							\
+  int I1 = c1, I2 = c2;					\
+  if (I1 & 1)						\
+    sj1 = (I1 >> 1) + ((I1 < 0xdf) ? 0x31 : 0x71),	\
+    sj2 = I2 - ((I2 >= 0xe0) ? 0x60 : 0x61);		\
+  else							\
+    sj1 = (I1 >> 1) + ((I1 < 0xdf) ? 0x30 : 0x70),	\
+    sj2 = I2 - 2;					\
+} while (0)
 
 extern Lisp_Object make_decoding_input_stream (Lstream *stream,
 					       Lisp_Object codesys);
--- a/src/redisplay-msw.c	Mon Aug 13 10:06:48 2007 +0200
+++ b/src/redisplay-msw.c	Mon Aug 13 10:07:35 2007 +0200
@@ -597,7 +597,10 @@
      necessary but it can't hurt. */
 
   if (!f->window_face_cache_reset)
-    mswindows_redraw_exposed_windows (f->root_window, x, y, width, height);
+	{
+	  mswindows_redraw_exposed_windows (f->root_window, x, y, width, height);
+	  GdiFlush();
+	}
   else
     MARK_FRAME_CHANGED (f);
 }
@@ -694,6 +697,7 @@
 static void
 mswindows_output_end (struct device *d)
 {
+  GdiFlush();
 }
 
 static int
@@ -1155,9 +1159,11 @@
 }
 
 
+/* XXX Implement me! */
 static void
 mswindows_clear_frame (struct frame *f)
 {
+  GdiFlush();
 }
 
 
--- a/src/redisplay-x.c	Mon Aug 13 10:06:48 2007 +0200
+++ b/src/redisplay-x.c	Mon Aug 13 10:07:35 2007 +0200
@@ -2165,13 +2165,17 @@
 
   x = FRAME_LEFT_BORDER_START (f);
   width = (FRAME_PIXWIDTH (f) - FRAME_REAL_LEFT_TOOLBAR_WIDTH (f) -
-	   FRAME_REAL_RIGHT_TOOLBAR_WIDTH (f));
+	   FRAME_REAL_RIGHT_TOOLBAR_WIDTH (f) -
+	   2 * FRAME_REAL_LEFT_TOOLBAR_BORDER_WIDTH (f) -
+	   2 * FRAME_REAL_RIGHT_TOOLBAR_BORDER_WIDTH (f));
   /* #### This adjustment by 1 should be being done in the macros.
      There is some small differences between when the menubar is on
      and off that we still need to deal with. */
   y = FRAME_TOP_BORDER_START (f) - 1;
   height = (FRAME_PIXHEIGHT (f) - FRAME_REAL_TOP_TOOLBAR_HEIGHT (f) -
-	    FRAME_REAL_BOTTOM_TOOLBAR_HEIGHT (f)) + 1;
+	    FRAME_REAL_BOTTOM_TOOLBAR_HEIGHT (f) -
+	    2 * FRAME_REAL_TOP_TOOLBAR_BORDER_WIDTH (f) -
+	    2 * FRAME_REAL_BOTTOM_TOOLBAR_BORDER_WIDTH (f)) + 1;
 
   XClearArea (dpy, x_win, x, y, width, height, False);
 
--- a/src/redisplay.c	Mon Aug 13 10:06:48 2007 +0200
+++ b/src/redisplay.c	Mon Aug 13 10:07:35 2007 +0200
@@ -7809,6 +7809,18 @@
 	  if (FRAME_REPAINT_P (f) && FRAME_HAS_MINIBUF_P (f))
 	    {
 	      Lisp_Object window = FRAME_MINIBUF_WINDOW (f);
+	      /*
+	       * If the frame has changed, there may be random chud
+	       * on the screen left from previous messages because
+	       * redisplay_frame hasn't been called yet.  Clear the
+	       * screen to get rid of the potential mess.
+	       *
+	       * It would be nice if a way could be found not to
+	       * have to do this for every message until the next
+	       * full redisplay.
+	       */
+	      if (f->frame_changed)
+		DEVMETH (d, clear_frame, (f));
 	      redisplay_window (window, 0);
 	      call_redisplay_end_triggers (XWINDOW (window), 0);
 	    }
--- a/src/toolbar-x.c	Mon Aug 13 10:06:48 2007 +0200
+++ b/src/toolbar-x.c	Mon Aug 13 10:07:35 2007 +0200
@@ -41,11 +41,13 @@
 
 static void
 x_draw_blank_toolbar_button (struct frame *f, int x, int y, int width,
-			     int height, int threed)
+			     int height, int threed, int border_width,
+			     int vertical)
 {
   struct device *d = XDEVICE (f->device);
   EmacsFrame ef = (EmacsFrame) FRAME_X_TEXT_WIDGET (f);
   int shadow_thickness = ef->emacs_frame.toolbar_shadow_thickness;
+  int sx = x, sy = y, swidth = width, sheight = height;
 
   Display *dpy = DEVICE_X_DISPLAY (d);
   Window x_win = XtWindow (FRAME_X_TEXT_WIDGET (f));
@@ -64,14 +66,35 @@
       bottom_shadow_gc = background_gc;
     }
 
+  if (vertical)
+    {
+      sx += border_width;
+      swidth -= 2 * border_width;
+    }
+  else
+    {
+      sy += border_width;
+      sheight -= 2 * border_width;
+    }
+
   /* Draw the outline. */
-  x_output_shadows (f, x, y, width, height, top_shadow_gc,
+  x_output_shadows (f, sx, sy, swidth, sheight, top_shadow_gc,
 		    bottom_shadow_gc, background_gc, shadow_thickness);
 
   /* Blank the middle. */
-  XFillRectangle (dpy, x_win, background_gc, x + shadow_thickness,
-		  y + shadow_thickness, width - shadow_thickness * 2,
-		  height - shadow_thickness * 2);
+  XFillRectangle (dpy, x_win, background_gc, sx + shadow_thickness,
+		  sy + shadow_thickness, swidth - shadow_thickness * 2,
+		  sheight - shadow_thickness * 2);
+
+  /* Do the border */
+  XFillRectangle (dpy, x_win, background_gc, x, y,
+		  (vertical ? border_width : width),
+		  (vertical ? height : border_width));
+  XFillRectangle (dpy, x_win, background_gc,
+		  (vertical ? sx + swidth : x),
+		  (vertical ? y : sy + sheight),
+		  (vertical ? border_width : width),
+		  (vertical ? height : border_width));
 }
 
 static void
@@ -80,6 +103,7 @@
   struct device *d = XDEVICE (f->device);
   EmacsFrame ef = (EmacsFrame) FRAME_X_TEXT_WIDGET (f);
   int shadow_thickness = ef->emacs_frame.toolbar_shadow_thickness;
+  int x_adj, y_adj, width_adj, height_adj;
 
   Display *dpy = DEVICE_X_DISPLAY (d);
   Window x_win = XtWindow (FRAME_X_TEXT_WIDGET (f));
@@ -88,6 +112,23 @@
   struct toolbar_button *tb = XTOOLBAR_BUTTON (button);
   struct Lisp_Image_Instance *p;
   struct window *w;
+  int vertical = tb->vertical;
+  int border_width = tb->border_width;
+
+  if (vertical)
+    {
+      x_adj = border_width;
+      width_adj = - 2 * border_width;
+      y_adj = 0;
+      height_adj = 0;
+    }
+  else
+    {
+      x_adj = 0;
+      width_adj = 0;
+      y_adj = border_width;
+      height_adj = - 2 * border_width;
+    }
 
   XSETFRAME (frame, f);
   window = FRAME_LAST_NONMINIBUF_WINDOW (f);
@@ -116,13 +157,27 @@
   background_gc = FRAME_X_TOOLBAR_BLANK_BACKGROUND_GC (f);
 
   /* Draw the outline. */
-  x_output_shadows (f, tb->x, tb->y, tb->width, tb->height, top_shadow_gc,
+  x_output_shadows (f, tb->x + x_adj, tb->y + y_adj,
+		    tb->width + width_adj, tb->height + height_adj,
+		    top_shadow_gc,
 		    bottom_shadow_gc, background_gc, shadow_thickness);
 
   /* Clear the pixmap area. */
-  XFillRectangle (dpy, x_win, background_gc, tb->x + shadow_thickness,
-		  tb->y + shadow_thickness, tb->width - shadow_thickness * 2,
-		  tb->height - shadow_thickness * 2);
+  XFillRectangle (dpy, x_win, background_gc, tb->x + x_adj + shadow_thickness,
+		  tb->y + y_adj + shadow_thickness,
+		  tb->width + width_adj - shadow_thickness * 2,
+		  tb->height + height_adj - shadow_thickness * 2);
+
+  /* Do the border. */
+  XFillRectangle (dpy, x_win, background_gc, tb->x, tb->y,
+		  (vertical ? border_width : tb->width),
+		  (vertical ? tb->height : border_width));
+
+  XFillRectangle (dpy, x_win, background_gc,
+		  (vertical ? tb->x + tb->width - border_width : tb->x),
+		  (vertical ? tb->y : tb->y + tb->height - border_width),
+		  (vertical ? border_width : tb->width),
+		  (vertical ? tb->height : border_width));
 
   background_gc = FRAME_X_TOOLBAR_PIXMAP_BACKGROUND_GC (f);
 
@@ -135,10 +190,10 @@
 
   if (IMAGE_INSTANCEP (instance))
     {
-      int width = tb->width - shadow_thickness * 2;
-      int height = tb->height - shadow_thickness * 2;
-      int x_offset = shadow_thickness;
-      int y_offset = shadow_thickness;
+      int width = tb->width + width_adj - shadow_thickness * 2;
+      int height = tb->height + height_adj - shadow_thickness * 2;
+      int x_offset = x_adj + shadow_thickness;
+      int y_offset = y_adj + shadow_thickness;
 
       p = XIMAGE_INSTANCE (instance);
 
@@ -299,12 +354,15 @@
 		tb->y = y;						\
 		tb->width = width;					\
 		tb->height = height;					\
+	        tb->border_width = border_width;			\
+	        tb->vertical = vert;					\
 									\
                 if (tb->blank || NILP (tb->up_glyph))			\
 		  {							\
 		    int threed = (EQ (Qt, tb->up_glyph) ? 1 : 0);	\
 		    x_draw_blank_toolbar_button (f, x, y, width,	\
-						 height, threed);	\
+						 height, threed,	\
+						 border_width, vert);	\
 		  }							\
 	        else							\
 		  x_output_toolbar_button (f, button);			\
@@ -350,15 +408,35 @@
   struct device *d = XDEVICE (f->device);
   int x, y, bar_width, bar_height, vert;
   int max_pixpos, right_size, right_start, blank_size;
+  int border_width = FRAME_REAL_TOOLBAR_BORDER_WIDTH (f, pos);
   Lisp_Object button, window;
+  Display *dpy = DEVICE_X_DISPLAY (d);
+  Window x_win = XtWindow (FRAME_X_TEXT_WIDGET (f));
+  GC background_gc = FRAME_X_TOOLBAR_BLANK_BACKGROUND_GC (f);
 
   get_toolbar_coords (f, pos, &x, &y, &bar_width, &bar_height, &vert, 1);
   window = FRAME_LAST_NONMINIBUF_WINDOW (f);
 
+  /* Do the border */
+  XFillRectangle (dpy, x_win, background_gc, x, y,
+		  (vert ? bar_width : border_width),
+		  (vert ? border_width : bar_height));
+  XFillRectangle (dpy, x_win, background_gc,
+		  (vert ? x : x + bar_width - border_width),
+		  (vert ? y + bar_height - border_width : y),
+		  (vert ? bar_width : border_width),
+		  (vert ? border_width : bar_height));
+
   if (vert)
-    max_pixpos = y + bar_height;
+    {
+      max_pixpos = y + bar_height - border_width;
+      y += border_width;
+    }
   else
-    max_pixpos = x + bar_width;
+    {
+      max_pixpos = x + bar_width - border_width;
+      x += border_width;
+    }
 
   button = FRAME_TOOLBAR_DATA (f, pos)->toolbar_buttons;
   right_size = 0;
@@ -406,7 +484,13 @@
 	  height = bar_height;
 	}
 
-      x_draw_blank_toolbar_button (f, x, y, width, height, 1);
+      /*
+       * Use a 3D pushright separator only if there isn't a toolbar
+       * border.  A flat separator meshes with the border and looks
+       * better.
+       */
+      x_draw_blank_toolbar_button (f, x, y, width, height, !border_width,
+				   border_width, vert);
 
       if (vert)
 	y += height;
@@ -634,7 +718,10 @@
 	f->toolbar_visible_p[pos] = new_visibility;
 
       if (change < 0)
-	x_clear_toolbar (f, pos, change);
+	{
+	  x_clear_toolbar (f, pos, change);
+	  mark_frame_toolbar_buttons_dirty (f, pos);
+	}
       if (pos == LEFT_TOOLBAR || pos == RIGHT_TOOLBAR)
 	repl.width += change;
       else
@@ -664,12 +751,104 @@
 }
 
 static void
+x_toolbar_border_width_changed_in_frame (struct frame *f, enum toolbar_pos pos,
+					 Lisp_Object lispoldval)
+{
+  XtWidgetGeometry req, repl;
+  int newval, oldval;
+
+  if (NILP (f->toolbar_visible_p[pos]) || ZEROP (f->toolbar_size[pos]))
+    {
+      return;
+    }
+  else if (!f->init_finished && !INTP (f->toolbar_border_width[pos]))
+    /* the size might not be set at all if we're in the process of
+       creating the frame.  Otherwise it better be, and we'll crash
+       out if not. */
+    {
+      newval = 0;
+    }
+  else
+    {
+      Lisp_Object frame;
+
+      XSETFRAME (frame, f);
+      newval = XINT (Fspecifier_instance (Vtoolbar_border_width[pos],
+					  frame, Qzero, Qnil));
+    }
+
+  if (INTP (lispoldval))
+    oldval = XINT (lispoldval);
+  else
+    oldval = 0;
+
+  if (oldval == newval)
+    return;
+
+  /* We want the text area to stay the same size.  So, we query the
+     current size and then adjust it for the change in the toolbar
+     size. */
+
+  in_specifier_change_function++;
+  if (!in_resource_setting)
+    /* mirror the value in the frame resources, unless already done. */
+    {
+      Arg al [1];
+      XtSetArg (al [0],
+		pos ==    TOP_TOOLBAR ? XtNtopToolBarBorderWidth    :
+		pos == BOTTOM_TOOLBAR ? XtNbottomToolBarBorderWidth :
+		pos ==   LEFT_TOOLBAR ? XtNleftToolBarBorderWidth    :
+		XtNrightToolBarBorderWidth,
+		newval);
+      XtSetValues (FRAME_X_TEXT_WIDGET (f), al, 1);
+    }
+  if (XtIsRealized (FRAME_X_CONTAINER_WIDGET (f)))
+    {
+      int change = 2 * (newval - oldval);
+
+      req.request_mode = 0;
+
+      /*
+       * We want the current size, not the future size, so briefly
+       * reset the border width value so the query method returns
+       * the correct value.
+       */
+      f->toolbar_border_width[pos] = make_int (oldval);
+      XtQueryGeometry (FRAME_X_CONTAINER_WIDGET (f), &req, &repl);
+      f->toolbar_border_width[pos] = make_int (newval);
+
+      if (change < 0)
+	{
+	  x_clear_toolbar (f, pos, change);
+	  mark_frame_toolbar_buttons_dirty (f, pos);
+	}
+      if (pos == LEFT_TOOLBAR || pos == RIGHT_TOOLBAR)
+	repl.width += change;
+      else
+	repl.height += change;
+
+      MARK_FRAME_WINDOWS_STRUCTURE_CHANGED (f);
+      EmacsManagerChangeSize (FRAME_X_CONTAINER_WIDGET (f), repl.width,
+			      repl.height);
+    }
+  in_specifier_change_function--;
+}
+
+static void
 x_initialize_frame_toolbar_gcs (struct frame *f)
 {
   EmacsFrame ef = (EmacsFrame) FRAME_X_TEXT_WIDGET (f);
   XGCValues gcv;
   unsigned long flags = (GCForeground | GCBackground | GCGraphicsExposures);
 
+  /*
+   * If the user specified the global background resource, use it.
+   * Otherwise use the backgroundToolBarColor resource.
+   */
+  if (ef->emacs_frame.background_pixel != -1)
+    ef->emacs_frame.background_toolbar_pixel =
+      ef->emacs_frame.background_pixel;
+
   gcv.foreground = ef->emacs_frame.background_toolbar_pixel;
   gcv.background = ef->core.background_pixel;
   gcv.graphics_exposures = False;
@@ -791,5 +970,6 @@
   CONSOLE_HAS_METHOD (x, redraw_exposed_toolbars);
   CONSOLE_HAS_METHOD (x, redraw_frame_toolbars);
   CONSOLE_HAS_METHOD (x, toolbar_size_changed_in_frame);
+  CONSOLE_HAS_METHOD (x, toolbar_border_width_changed_in_frame);
   CONSOLE_HAS_METHOD (x, toolbar_visible_p_changed_in_frame);
 }
--- a/src/toolbar.c	Mon Aug 13 10:06:48 2007 +0200
+++ b/src/toolbar.c	Mon Aug 13 10:07:35 2007 +0200
@@ -40,9 +40,11 @@
 Lisp_Object Vtoolbar[4];
 Lisp_Object Vtoolbar_size[4];
 Lisp_Object Vtoolbar_visible_p[4];
+Lisp_Object Vtoolbar_border_width[4];
 
 Lisp_Object Vdefault_toolbar, Vdefault_toolbar_visible_p;
 Lisp_Object Vdefault_toolbar_width, Vdefault_toolbar_height;
+Lisp_Object Vdefault_toolbar_border_width;
 
 Lisp_Object Vdefault_toolbar_position;
 Lisp_Object Vtoolbar_buttons_captioned_p;
@@ -275,6 +277,10 @@
 			      new == TOP_TOOLBAR || new == BOTTOM_TOOLBAR
 			      ? Vdefault_toolbar_height
 			      : Vdefault_toolbar_width);
+      set_specifier_fallback (Vtoolbar_border_width[cur],
+			      list1 (Fcons (Qnil, Qzero)));
+      set_specifier_fallback (Vtoolbar_border_width[new],
+			      Vdefault_toolbar_border_width);
       set_specifier_fallback (Vtoolbar_visible_p[cur],
 			      list1 (Fcons (Qnil, Qt)));
       set_specifier_fallback (Vtoolbar_visible_p[new],
@@ -592,6 +598,20 @@
   return retval;
 }
 
+void
+mark_frame_toolbar_buttons_dirty (struct frame *f, enum toolbar_pos pos)
+{
+  Lisp_Object button = FRAME_TOOLBAR_DATA (f, pos)->toolbar_buttons;
+
+  while (!NILP (button))
+    {
+      struct toolbar_button *tb = XTOOLBAR_BUTTON (button);
+      tb->dirty = 1;
+      button = tb->next;
+    }
+  return;
+}
+
 static Lisp_Object
 compute_frame_toolbar_buttons (struct frame *f, enum toolbar_pos pos,
 			       Lisp_Object toolbar)
@@ -864,10 +884,13 @@
   /* The top and bottom toolbars take precedence over the left and
      right. */
   visible_top_toolbar_height = (FRAME_REAL_TOP_TOOLBAR_VISIBLE (f)
-				? FRAME_REAL_TOP_TOOLBAR_HEIGHT (f)
+				? FRAME_REAL_TOP_TOOLBAR_HEIGHT (f) +
+				  2 * FRAME_REAL_TOP_TOOLBAR_BORDER_WIDTH (f)
 				: 0);
   visible_bottom_toolbar_height = (FRAME_REAL_BOTTOM_TOOLBAR_VISIBLE (f)
-				? FRAME_REAL_BOTTOM_TOOLBAR_HEIGHT (f)
+				? FRAME_REAL_BOTTOM_TOOLBAR_HEIGHT (f) +
+				  2 *
+				   FRAME_REAL_BOTTOM_TOOLBAR_BORDER_WIDTH (f)
 				: 0);
 
   /* We adjust the width and height by one to give us a narrow border
@@ -880,28 +903,34 @@
       *x = 1;
       *y = 0;	/* #### should be 1 if no menubar */
       *width = FRAME_PIXWIDTH (f) - 2;
-      *height = FRAME_REAL_TOP_TOOLBAR_HEIGHT (f) - adjust;
+      *height = FRAME_REAL_TOP_TOOLBAR_HEIGHT (f) +
+	2 * FRAME_REAL_TOP_TOOLBAR_BORDER_WIDTH (f) - adjust;
       *vert = 0;
       break;
     case BOTTOM_TOOLBAR:
       *x = 1;
-      *y = FRAME_PIXHEIGHT (f) - FRAME_REAL_BOTTOM_TOOLBAR_HEIGHT (f);
+      *y = FRAME_PIXHEIGHT (f) - FRAME_REAL_BOTTOM_TOOLBAR_HEIGHT (f) -
+	2 * FRAME_REAL_BOTTOM_TOOLBAR_BORDER_WIDTH (f);
       *width = FRAME_PIXWIDTH (f) - 2;
-      *height = FRAME_REAL_BOTTOM_TOOLBAR_HEIGHT (f) - adjust;
+      *height = FRAME_REAL_BOTTOM_TOOLBAR_HEIGHT (f) +
+	2 * FRAME_REAL_BOTTOM_TOOLBAR_BORDER_WIDTH (f) - adjust;
       *vert = 0;
       break;
     case LEFT_TOOLBAR:
       *x = 1;
       *y = visible_top_toolbar_height;
-      *width = FRAME_REAL_LEFT_TOOLBAR_WIDTH (f) - adjust;
+      *width = FRAME_REAL_LEFT_TOOLBAR_WIDTH (f) +
+	2 * FRAME_REAL_LEFT_TOOLBAR_BORDER_WIDTH (f) - adjust;
       *height = (FRAME_PIXHEIGHT (f) - visible_top_toolbar_height -
 		 visible_bottom_toolbar_height - 1);
       *vert = 1;
       break;
     case RIGHT_TOOLBAR:
-      *x = FRAME_PIXWIDTH (f) - FRAME_REAL_RIGHT_TOOLBAR_WIDTH (f);
+      *x = FRAME_PIXWIDTH (f) - FRAME_REAL_RIGHT_TOOLBAR_WIDTH (f) -
+	2 * FRAME_REAL_RIGHT_TOOLBAR_BORDER_WIDTH (f);
       *y = visible_top_toolbar_height;
-      *width = FRAME_REAL_RIGHT_TOOLBAR_WIDTH (f) - adjust;
+      *width = FRAME_REAL_RIGHT_TOOLBAR_WIDTH (f) +
+	2 * FRAME_REAL_RIGHT_TOOLBAR_BORDER_WIDTH (f) - adjust;
       *height = (FRAME_PIXHEIGHT (f) - visible_top_toolbar_height -
 		 visible_bottom_toolbar_height);
       *vert = 1;
@@ -1241,6 +1270,27 @@
 }
 
 static void
+toolbar_border_width_changed_in_frame (Lisp_Object specifier, struct frame *f,
+				       Lisp_Object oldval)
+{
+  int pos;
+
+  for (pos = 0; pos < countof (Vtoolbar_border_width); pos++)
+    {
+      if (EQ (specifier, Vtoolbar_border_width[(enum toolbar_pos) pos]))
+	break;
+    }
+
+  assert (pos < countof (Vtoolbar_border_width));
+
+  MAYBE_FRAMEMETH (f, toolbar_border_width_changed_in_frame,
+		   (f, (enum toolbar_pos) pos, oldval));
+
+  /* Let redisplay know that something has possibly changed. */
+  MARK_TOOLBAR_CHANGED;
+}
+
+static void
 toolbar_visible_p_changed_in_frame (Lisp_Object specifier, struct frame *f,
 				    Lisp_Object oldval)
 {
@@ -1272,6 +1322,19 @@
 }
 
 static void
+default_toolbar_border_width_changed_in_frame (Lisp_Object specifier,
+					       struct frame *f,
+					       Lisp_Object oldval)
+{
+  enum toolbar_pos pos = decode_toolbar_position (Vdefault_toolbar_position);
+
+  Fset_specifier_dirty_flag (Vtoolbar_border_width[pos]);
+
+  /* Let redisplay know that something has possibly changed. */
+  MARK_TOOLBAR_CHANGED;
+}
+
+static void
 default_toolbar_visible_p_changed_in_frame (Lisp_Object specifier,
 					    struct frame *f,
 					    Lisp_Object oldval)
@@ -1697,6 +1760,123 @@
   set_specifier_fallback (Vtoolbar_size[LEFT_TOOLBAR], elt);
   set_specifier_fallback (Vtoolbar_size[RIGHT_TOOLBAR], elt);
 
+  DEFVAR_SPECIFIER ("default-toolbar-border-width",
+		    &Vdefault_toolbar_border_width /*
+*Width of the border around the default toolbar.
+This is a specifier; use `set-specifier' to change it.
+
+The position of the default toolbar is specified by the function
+`set-default-toolbar-position'.  If the corresponding position-specific
+toolbar border width specifier (e.g. `top-toolbar-border-width' if
+`default-toolbar-position' is 'top) does not specify a border width in a
+particular domain (a window or a frame), then the value of
+`default-toolbar-border-width' in that domain, if any, will be used
+instead.
+
+Internally, toolbar border width specifiers are instantiated in both
+window and frame domains, for different purposes.  The value in the
+domain of a frame's selected window specifies the actual toolbar border
+width that you will see in that frame.  The value in the domain of a
+frame itself specifies the toolbar border width that is used in frame
+geometry calculations.  Changing the border width value in the frame
+domain will result in a size change in the frame itself, while changing
+the value in a window domain will not.
+*/ );
+  Vdefault_toolbar_border_width = Fmake_specifier (Qnatnum);
+  set_specifier_caching (Vdefault_toolbar_border_width,
+			 slot_offset (struct window,
+				      default_toolbar_border_width),
+			 some_window_value_changed,
+			 slot_offset (struct frame,
+				      default_toolbar_border_width),
+			 default_toolbar_border_width_changed_in_frame);
+
+  DEFVAR_SPECIFIER ("top-toolbar-border-width",
+		    &Vtoolbar_border_width[TOP_TOOLBAR] /*
+*Border width of the top toolbar.
+This is a specifier; use `set-specifier' to change it.
+
+See `default-toolbar-height' for more information.
+*/ );
+  Vtoolbar_border_width[TOP_TOOLBAR] = Fmake_specifier (Qnatnum);
+  set_specifier_caching (Vtoolbar_border_width[TOP_TOOLBAR],
+			 slot_offset (struct window,
+				      toolbar_border_width[TOP_TOOLBAR]),
+			 some_window_value_changed,
+			 slot_offset (struct frame,
+				      toolbar_border_width[TOP_TOOLBAR]),
+			 toolbar_border_width_changed_in_frame);
+
+  DEFVAR_SPECIFIER ("bottom-toolbar-border-width",
+		    &Vtoolbar_border_width[BOTTOM_TOOLBAR] /*
+*Border width of the bottom toolbar.
+This is a specifier; use `set-specifier' to change it.
+
+See `default-toolbar-height' for more information.
+*/ );
+  Vtoolbar_border_width[BOTTOM_TOOLBAR] = Fmake_specifier (Qnatnum);
+  set_specifier_caching (Vtoolbar_border_width[BOTTOM_TOOLBAR],
+			 slot_offset (struct window,
+				      toolbar_border_width[BOTTOM_TOOLBAR]),
+			 some_window_value_changed,
+			 slot_offset (struct frame,
+				      toolbar_border_width[BOTTOM_TOOLBAR]),
+			 toolbar_border_width_changed_in_frame);
+
+  DEFVAR_SPECIFIER ("left-toolbar-border-width",
+		    &Vtoolbar_border_width[LEFT_TOOLBAR] /*
+*Border width of left toolbar.
+This is a specifier; use `set-specifier' to change it.
+
+See `default-toolbar-height' for more information.
+*/ );
+  Vtoolbar_border_width[LEFT_TOOLBAR] = Fmake_specifier (Qnatnum);
+  set_specifier_caching (Vtoolbar_border_width[LEFT_TOOLBAR],
+			 slot_offset (struct window,
+				      toolbar_border_width[LEFT_TOOLBAR]),
+			 some_window_value_changed,
+			 slot_offset (struct frame,
+				      toolbar_border_width[LEFT_TOOLBAR]),
+			 toolbar_border_width_changed_in_frame);
+
+  DEFVAR_SPECIFIER ("right-toolbar-border-width",
+		    &Vtoolbar_border_width[RIGHT_TOOLBAR] /*
+*Border width of right toolbar.
+This is a specifier; use `set-specifier' to change it.
+
+See `default-toolbar-height' for more information.
+*/ );
+  Vtoolbar_border_width[RIGHT_TOOLBAR] = Fmake_specifier (Qnatnum);
+  set_specifier_caching (Vtoolbar_border_width[RIGHT_TOOLBAR],
+			 slot_offset (struct window,
+				      toolbar_border_width[RIGHT_TOOLBAR]),
+			 some_window_value_changed,
+			 slot_offset (struct frame,
+				      toolbar_border_width[RIGHT_TOOLBAR]),
+			 toolbar_border_width_changed_in_frame);
+
+  /* #### this is ugly. */
+  /* sb - even uglier to make this work without console tty support, ugh. */
+  /* not if you get to copy it instead of writing it from scratch. --kyle */
+  elt = Qnil;
+#ifdef HAVE_TTY
+  elt = list1 (Fcons (list1 (Qtty), Qzero));
+#endif
+#ifdef HAVE_X_WINDOWS
+  if (!EQ(elt, Qnil))
+    elt = Fcons (Fcons (list1 (Qx), make_int (DEFAULT_TOOLBAR_BORDER_WIDTH)), elt);
+  else
+    elt = list1 (Fcons (list1 (Qx), make_int (DEFAULT_TOOLBAR_BORDER_WIDTH)));
+#endif
+  if (!EQ(elt, Qnil))
+    set_specifier_fallback (Vdefault_toolbar_border_width, elt);
+
+  set_specifier_fallback (Vtoolbar_border_width[TOP_TOOLBAR], Vdefault_toolbar_border_width);
+  elt = list1 (Fcons (Qnil, Qzero));
+  set_specifier_fallback (Vtoolbar_border_width[BOTTOM_TOOLBAR], elt);
+  set_specifier_fallback (Vtoolbar_border_width[LEFT_TOOLBAR], elt);
+  set_specifier_fallback (Vtoolbar_border_width[RIGHT_TOOLBAR], elt);
+
   DEFVAR_SPECIFIER ("default-toolbar-visible-p", &Vdefault_toolbar_visible_p /*
 *Whether the default toolbar is visible.
 This is a specifier; use `set-specifier' to change it.
--- a/src/toolbar.h	Mon Aug 13 10:06:48 2007 +0200
+++ b/src/toolbar.h	Mon Aug 13 10:07:35 2007 +0200
@@ -86,6 +86,10 @@
   int x, y;
   int width, height;
   int dirty;
+  /* is this button in a left or right toolbar? */
+  int vertical;
+  /* border_width when this button was layed out */
+  int border_width;
 };
 
 DECLARE_LRECORD (toolbar_button, struct toolbar_button);
@@ -111,9 +115,11 @@
 #define DEFAULT_TOOLBAR_HEIGHT	37
 #define DEFAULT_TOOLBAR_WIDTH	40
 #define DEFAULT_TOOLBAR_BLANK_SIZE	8
+#define DEFAULT_TOOLBAR_BORDER_WIDTH	0
 #define MINIMUM_SHADOW_THICKNESS	1
 
 extern Lisp_Object Vtoolbar_size[4];
+extern Lisp_Object Vtoolbar_border_width[4];
 void update_frame_toolbars (struct frame *f);
 void init_frame_toolbars (struct frame *f);
 void init_device_toolbars (struct device *d);
@@ -121,6 +127,7 @@
 void free_frame_toolbars (struct frame *f);
 Lisp_Object get_toolbar_button_glyph (struct window *w,
 				      struct toolbar_button *tb);
+void mark_frame_toolbar_buttons_dirty (struct frame *f, enum toolbar_pos pos);
 
 #endif /* HAVE_TOOLBARS */
 
--- a/src/window.c	Mon Aug 13 10:06:48 2007 +0200
+++ b/src/window.c	Mon Aug 13 10:07:35 2007 +0200
@@ -2926,16 +2926,16 @@
   else if (!NILP (major_kid))
     {
       int last_pos, last_old_pos, pos, old_pos, first;
+      int pixel_adj_left = new_pixsize - old_pixsize;
       int div_val = old_pixsize << 1;
 
       /*
        * Previously we bailed out here if there was no size change.
-       * But this broke toolbar updates.  If a toolbar appears or
-       * disappears, windows may not change size, but their top and
-       * left coordinates need to be updated.
+       * (pixel_adj_left == 0) But this broke toolbar updates.  If a
+       * toolbar appears or disappears, windows may not change size,
+       * but their top and left coordinates need to be updated.
        *
-       * if (!pixel_adj_left)
-       *   return;
+       * So we don't bail until after the loop below.
        */
 
       last_pos = first = (set_height ? WINDOW_TOP (w) : WINDOW_LEFT (w));
@@ -2969,6 +2969,11 @@
 	  last_old_pos = old_pos;
 	}
 
+      /* Sometimes we may get called with our old size.  In that case
+         we don't need to do anything else. */
+      if (!pixel_adj_left)
+	return;
+
       /* Now delete any children that became too small.  */
       if (!nodelete)
 	for (child = major_kid; !NILP (child); child = XWINDOW (child)->next)
--- a/src/window.h	Mon Aug 13 10:06:48 2007 +0200
+++ b/src/window.h	Mon Aug 13 10:07:35 2007 +0200
@@ -202,15 +202,18 @@
   Lisp_Object toolbar[4];
   /* Toolbar size for each of the four positions. */
   Lisp_Object toolbar_size[4];
+  /* Toolbar border width for each of the four positions. */
+  Lisp_Object toolbar_border_width[4];
   /* Toolbar visibility status for each of the four positions. */
   Lisp_Object toolbar_visible_p[4];
   /* Caption status of toolbar. */
   Lisp_Object toolbar_buttons_captioned_p;
-  /* The following four don't really need to be cached except
+  /* The following five don't really need to be cached except
      that we need to know when they've changed. */
   Lisp_Object default_toolbar;
   Lisp_Object default_toolbar_width, default_toolbar_height;
   Lisp_Object default_toolbar_visible_p;
+  Lisp_Object default_toolbar_border_width;
 #endif /* HAVE_TOOLBARS */
   Lisp_Object left_margin_width, right_margin_width;
   Lisp_Object minimum_line_ascent, minimum_line_descent;
--- a/version.sh	Mon Aug 13 10:06:48 2007 +0200
+++ b/version.sh	Mon Aug 13 10:07:35 2007 +0200
@@ -1,5 +1,5 @@
 #!/bin/sh
 emacs_major_version=20
 emacs_minor_version=4
-emacs_beta_version=5
-xemacs_codename="Anglo-Nubian"
+emacs_beta_version=6
+xemacs_codename="Angora"