changeset 173:8eaf7971accc r20-3b13

Import from CVS: tag r20-3b13
author cvs
date Mon, 13 Aug 2007 09:49:09 +0200
parents a38aed19690b
children bb3568571b84
files CHANGES-beta ChangeLog Makefile.in configure configure.in dynodump/Makefile.in.in dynodump/dynodump.c etc/NEWS etc/w3/stylesheet info/dir lib-src/Makefile.in.in lib-src/b2m.c lib-src/etags.c lib-src/gnuclient.c lib-src/make-docfile.c lib-src/movemail.c lisp/ChangeLog lisp/auctex/custom-load.el lisp/cc-mode/cc-cmds.el lisp/comint/custom-load.el lisp/custom/ChangeLog lisp/custom/auto-autoloads.el lisp/custom/cus-edit.el lisp/custom/cus-face.el lisp/custom/custom.el lisp/custom/wid-browse.el lisp/custom/wid-edit.el lisp/custom/widget-example.el lisp/custom/widget.el lisp/emulators/crisp.el lisp/emulators/custom-load.el lisp/gnus/ChangeLog lisp/gnus/custom-load.el lisp/gnus/gnus-art.el lisp/gnus/gnus-ems.el lisp/gnus/gnus-gl.el lisp/gnus/gnus-group.el lisp/gnus/gnus-move.el lisp/gnus/gnus-salt.el lisp/gnus/gnus-score.el lisp/gnus/gnus-start.el lisp/gnus/gnus-sum.el lisp/gnus/gnus-topic.el lisp/gnus/gnus-undo.el lisp/gnus/gnus-uu.el lisp/gnus/gnus-xmas.el lisp/gnus/gnus.el lisp/gnus/message.el lisp/gnus/nnweb.el lisp/mel/mel-u.el lisp/mh-e/custom-load.el lisp/modes/auto-autoloads.el lisp/modes/custom-load.el lisp/modes/follow.el lisp/modes/lisp-mode.el lisp/packages/add-log.el lisp/packages/auto-autoloads.el lisp/packages/blink-cursor.el lisp/packages/custom-load.el lisp/packages/emacsbug.el lisp/packages/gnuserv.el lisp/packages/hyper-apropos.el lisp/packages/igrep.el lisp/packages/info.el lisp/packages/man.el lisp/packages/pending-del.el lisp/packages/supercite.el lisp/prim/auto-autoloads.el lisp/prim/cmdloop.el lisp/prim/console.el lisp/prim/cus-start.el lisp/prim/custom-load.el lisp/prim/device.el lisp/prim/disp-table.el lisp/prim/dumped-lisp.el lisp/prim/featurep.el lisp/prim/files.el lisp/prim/gui.el lisp/prim/help.el lisp/prim/macros.el lisp/prim/minibuf.el lisp/prim/modeline.el lisp/prim/obsolete.el lisp/prim/profile.el lisp/prim/replace.el lisp/prim/simple.el lisp/prim/update-elc.el lisp/psgml/custom-load.el lisp/tm/tm-image.el lisp/utils/auto-autoloads.el lisp/utils/crontab.el lisp/utils/custom-load.el lisp/utils/edit-toolbar.el lisp/utils/edmacro.el lisp/utils/highlight-headers.el lisp/utils/ph.el lisp/utils/savehist.el lisp/utils/toolbar-utils.el lisp/utils/uniquify.el lisp/w3/ChangeLog lisp/w3/custom-load.el lisp/w3/url-news.el lisp/w3/url-vars.el lisp/w3/w3-cus.el lisp/w3/w3-display.el lisp/w3/w3-e19.el lisp/w3/w3-menu.el lisp/w3/w3-parse.el lisp/w3/w3-vars.el lisp/w3/w3.el lisp/x11/x-select.el lisp/x11/x-toolbar.el lwlib/Makefile.in.in lwlib/xlwscrollbar.c man/Makefile man/custom.texi man/gnats/Makefile man/gnus.texi man/internals/Makefile man/internals/internals.texi man/lispref/Makefile man/lispref/debugging.texi man/message.texi man/new-users-guide/Makefile man/ph.texi man/tm/Makefile man/w3.texi man/widget.texi man/xemacs/Makefile nt/config.h pkg-src/tree-x/Makefile.in.in pkg-src/tree-x/dbl.h pkg-src/tree-x/input.c pkg-src/tree-x/intf.c src/ChangeLog src/Makefile.in.in src/abbrev.c src/alloc.c src/bytecode.c src/callint.c src/config.h.in src/data.c src/database.c src/dired.c src/doc.c src/elhash.c src/elhash.h src/emacs.c src/emacsfns.h src/energize.c src/eval.c src/event-Xt.c src/event-stream.c src/events.c src/extents.c src/faces.c src/fileio.c src/fns.c src/frame.c src/glyphs.c src/glyphs.h src/gui-x.c src/hash.c src/hash.h src/indent.c src/keymap.c src/lisp.h src/lread.c src/lstream.c src/m/7300.h src/m/altos.h src/m/iris4d.h src/m/iris5d.h src/m/mips-siemens.h src/m/mips.h src/m/mips4.h src/m/news-risc.h src/m/nu.h src/m/sgi-challenge.h src/macros.c src/md5.c src/menubar-x.c src/minibuf.c src/msdos.c src/mule-ccl.c src/mule-coding.c src/mule-wnnfns.c src/mule.c src/objects.c src/opaque.c src/print.c src/process.c src/rangetab.c src/redisplay-x.c src/redisplay.c src/s/aix3-1.h src/s/aix3-2-5.h src/s/decosf1-3-static.h src/s/decosf1-3.h src/s/decosf3-1-static.h src/s/decosf3-2-static.h src/s/decosf4-0-static.h src/s/decosf4-0.h src/s/hpux.h src/s/linux-static.h src/s/sol2-static.h src/s/sol2.h src/s/umips.h src/s/unipl5-0.h src/s/unipl5-2.h src/s/usg5-0.h src/s/usg5-2.h src/s/xenix.h src/search.c src/sgiplay.c src/specifier.c src/symbols.c src/toolbar.c src/tooltalk.c src/unexalpha.c src/window.c src/xselect.c version.sh
diffstat 223 files changed, 6871 insertions(+), 7268 deletions(-) [+]
line wrap: on
line diff
--- a/CHANGES-beta	Mon Aug 13 09:47:55 2007 +0200
+++ b/CHANGES-beta	Mon Aug 13 09:49:09 2007 +0200
@@ -1,4 +1,19 @@
 							-*- indented-text -*-
+to 20.3 beta13 "Brussels"
+-- W3-3.0.94
+-- ph.el-2.6 courtesy of Oscar Figueiredo
+-- Miscellaneous Configure changes from Martin and Hrvoje.
+-- crisp.el-1.19 courtesy of Gary Foster
+-- Gnus-5.4.63
+-- Major and sundry changes by Martin Buchholz
+-- gnuserv.el-3.9 (Add done button on menubar) courtesy of Hrvoje Niksic
+-- edit-toolbar.el-1.01 courtesy of Peter Pezaris
+-- toolbar-utils.el courtesy of Jeff Miller (was called toolbar-func.el on
+   xemacs-beta)
+-- Miscellaneous build fixes
+-- Custom-1.9951
+-- Miscellaneous bug fixes
+
 to 20.3 beta12 "Helsinki"
 -- cc-mode-5.12.
 -- ~/.xemacs --> ~/.xemacs/init.el
--- a/ChangeLog	Mon Aug 13 09:47:55 2007 +0200
+++ b/ChangeLog	Mon Aug 13 09:49:09 2007 +0200
@@ -1,3 +1,45 @@
+1997-07-13  Steven L Baur  <steve@altair.xemacs.org>
+
+	* XEmacs 20.3-beta13 is released.
+
+	* info/dir (Packages): Integrate texinfo manual for PH.
+
+1997-07-10  Hrvoje Niksic  <hniksic@srce.hr>
+
+ 	* extents.c (print_extent): Print correctly.
+	
+1997-07-13  Steven L Baur  <steve@altair.xemacs.org>
+
+	* configure.in (CPP): Add -Wall to default gcc CFLAGS.
+
+1997-07-11  Martin Buchholz  <mrb@eng.sun.com>
+
+	* *Makefile*: More cleanup.
+	- MAKE CFLAGS=-foo now works with recursive invocations on old makes
+	- Nuke ld_call_shared from s&m files
+	- Nuke src/s/*-static.h
+	- Nuke Solaris and DEC OSF static build support.
+	- Nuke SHORTNAMES
+	- Nuke libmld
+	- CLASH_DETECTION configurable, off by default.
+
+	* *.[ch]: Warning elimination, code cleanup, some 64-bit
+	safeguarding.
+
+	* sol2.h: More bullet-proofing for Sun bugs in header files.
+
+	* lib-src/etags.c: etags version 12.19.
+
+	* lisp/x11/x-select.el:
+	* src/xselect.c: Try STRING if selection owner couldn't convert
+	COMPOUND_TEXT. 
+
+	* src/*.c: Change defalt to default_, and in general allow
+	doc-snarfing functions to recognize and ignore trailing `_'
+
+	* src/*.[ch]: Introduce XVECTOR_DATA and XVECTOR_LENGTH macros and 
+	convert source code to use them consistently.
+
 1997-07-08  Steven L Baur  <steve@altair.xemacs.org>
 
 	* XEmacs 20.3-beta12 is released.
--- a/Makefile.in	Mon Aug 13 09:47:55 2007 +0200
+++ b/Makefile.in	Mon Aug 13 09:49:09 2007 +0200
@@ -49,8 +49,11 @@
 ## make extraclean
 ##      Still more severe - delete backup and autosave files, too.
 
+@SET_MAKE@
+RECURSIVE_MAKE=@RECURSIVE_MAKE@
 SHELL = /bin/sh
-@SET_MAKE@
+RM = rm -f
+pwd = /bin/pwd
 
 ## ==================== Things `configure' Might Edit ====================
 
@@ -58,9 +61,6 @@
 CPP=@CPP@
 LN_S=@LN_S@
 CFLAGS=@CFLAGS@
-YACC=@YACC@
-pwd=/bin/pwd
-RM=rm -f
 
 ## These help us choose version- and architecture-specific directories
 ## to install files in.
@@ -229,24 +229,23 @@
 .PHONY: ${SUBDIR} all beta all-elc all-elcs dump-elc dump-elcs autoloads
 
 ## Convenience target for XEmacs beta testers
-beta:	clean all-elc
+beta: clean all-elc
 
 ## Convenience target for XEmacs maintainers
 ## This would run `make-xemacsdist' if I were really confident that everything
 ## was turnkey.
-dist:	all-elc info
+dist: all-elc info
 
 ## Build XEmacs and recompile out-of-date and missing .elc files along
 ## the way.
-all-elc all-elcs:   lib-src lwlib dump-elcs src
+all-elc all-elcs: lib-src lwlib dump-elcs src
 	MAKE='$(MAKE)' sh ${srcdir}/lib-src/update-elc.sh
 
 ## Sub-target for all-elc.
 dump-elc dump-elcs: ${GENERATED_HEADERS} FRC.dump-elcs
-	cd src && $(MAKE) dump-elcs $(MFLAGS) \
-		CC='${CC}' CFLAGS='${CFLAGS}' MAKE='${MAKE}'
+	cd src && $(RECURSIVE_MAKE) dump-elcs
 
-autoloads:	src
+autoloads: src
 	MAKE='$(MAKE)' sh ${srcdir}/lib-src/update-autoloads.sh
 
 ## We force the rebuilding of src/paths.h because the user might give
@@ -301,7 +300,7 @@
 	 echo "  	Automatically generated by XEmacs */" ; \
 	 echo "#define PURESIZE_ADJUSTMENT 0") > $@
 
-src:	@SRC_SUBDIR_DEPS@ FRC.src
+src: @SRC_SUBDIR_DEPS@ FRC.src
 pkg-src/tree-x: pkg-src/FRC.tree-x
 lib-src: FRC.lib-src
 lwlib:	FRC.lwlib
@@ -311,8 +310,7 @@
 .RECURSIVE: ${SUBDIR}
 
 ${SUBDIR}: ${SUBDIR_MAKEFILES} ${GENERATED_HEADERS} FRC
-	cd $@ && $(MAKE) all $(MFLAGS) \
-		CC='${CC}' CFLAGS='${CFLAGS}' MAKE='${MAKE}'
+	cd $@ && $(RECURSIVE_MAKE) all
 
 Makefile: ${srcdir}/Makefile.in config.status
 	./config.status
@@ -366,7 +364,7 @@
 
 install-arch-dep: mkdir
 	for subdir in ${INSTALL_ARCH_DEP_SUBDIR}; do \
-	( cd $${subdir} && $(MAKE) install $(MFLAGS) prefix=${prefix} \
+	( cd $${subdir} && $(RECURSIVE_MAKE) install prefix=${prefix} \
 	    exec_prefix=${exec_prefix} bindir=${bindir} libdir=${libdir} \
 	    archlibdir=${archlibdir} ) ; done
 	if test `(cd ${archlibdir} && $(pwd))` != `(cd lib-src && $(pwd))`; then \
@@ -443,7 +441,7 @@
 #### would be extremely dangerous for anyone to use it.
 #uninstall:
 #	(cd lib-src; 					\
-#	 $(MAKE) $(MFLAGS) uninstall			\
+#	 $(RECURSIVE_MAKE) uninstall			\
 #	    prefix=${prefix} exec_prefix=${exec_prefix}	\
 #	    bindir=${bindir} libdir=${libdir} archlibdir=${archlibdir})
 #	for dir in ${lispdir} ${etcdir} ; do 		\
@@ -477,7 +475,7 @@
 ##      target for GCC does not delete `libgcc.a', because recompiling it
 ##      is rarely necessary and takes a lot of time.
 mostlyclean: FRC.mostlyclean
-	for d in $(SUBDIR); do (cd $$d && $(MAKE) $(MFLAGS) $@); done
+	for d in $(SUBDIR); do (cd $$d && $(RECURSIVE_MAKE) $@); done
 
 ## `clean'
 ##      Delete all files from the current directory that are normally
@@ -488,7 +486,7 @@
 
 ##      Delete `.dvi' files here if they are not part of the distribution.
 clean: FRC.clean
-	for d in $(SUBDIR); do (cd $$d && $(MAKE) $(MFLAGS) $@); done
+	for d in $(SUBDIR); do (cd $$d && $(RECURSIVE_MAKE) $@); done
 	$(RM) core
 
 ## `distclean'
@@ -506,7 +504,7 @@
 
 distclean: FRC.distclean
 	for d in lock site-lisp; do test -d $$d || mkdir $$d; done
-	for d in $(SUBDIR); do (cd $$d && $(MAKE) $(MFLAGS) $@); done
+	for d in $(SUBDIR); do (cd $$d && $(RECURSIVE_MAKE) $@); done
 	-${top_distclean}
 
 ## `realclean'
@@ -521,7 +519,7 @@
 ##      anything that needs to exist in order to run `configure' and then
 ##      begin to build the program.
 realclean: FRC.realclean
-	for d in $(SUBDIR); do (cd $$d && $(MAKE) $(MFLAGS) $@); done
+	for d in $(SUBDIR); do (cd $$d && $(RECURSIVE_MAKE) $@); done
 	-${top_distclean}
 	$(RM) TAGS
 
@@ -530,7 +528,7 @@
 ## the coding standards seem to come from.  It's like distclean, but
 ## it deletes backup and autosave files too.
 extraclean:
-	for d in $(SUBDIR); do (cd $$d && $(MAKE) $(MFLAGS) $@); done
+	for d in $(SUBDIR); do (cd $$d && $(RECURSIVE_MAKE) $@); done
 	$(RM) *~ \#*
 	-${top_distclean}
 
@@ -552,24 +550,18 @@
 unlock:
 	chmod u+w $(SOURCES) cpp/*
 	-cd elisp && chmod u+w Makefile README *.texi
-	cd etc     && $(MAKE) $(MFLAGS) unlock
-	cd lib-src && $(MAKE) $(MFLAGS) unlock
-	cd lisp    && $(MAKE) $(MFLAGS) unlock
+	for d in src etc lib-src lisp; do (cd $$d && $(RECURSIVE_MAKE) $@); done
 	cd lisp/term && chmod u+w README *.el
 	cd man && chmod u+w *texi* ChangeLog split-man
 	cd lwlib && chmod u+w *.[ch] Makefile.in.in
-	cd src && $(MAKE) $(MFLAGS) $@
 
 relock:
 	chmod u-w $(SOURCES) cpp/*
 	-cd elisp && chmod u-w Makefile README *.texi
-	cd etc     && $(MAKE) $(MFLAGS) relock
-	cd lib-src && $(MAKE) $(MFLAGS) relock
-	cd lisp    && $(MAKE) $(MFLAGS) relock
+	for d in src etc lib-src lisp; do (cd $$d && $(RECURSIVE_MAKE) $@); done
 	cd lisp/term && chmod u+w README *.el
 	cd man && chmod u+w *texi* ChangeLog split-man
 	cd lwlib && chmod u+w *.[ch] Makefile.in.in
-	cd src && $(MAKE) $(MFLAGS) $@
 
 TAGS tags: FRC.tags
 	@echo "If you don't have a copy of etags around, then do 'make lib-src' first."
@@ -590,10 +582,10 @@
 ##	cd ${srcdir} && make-dist
 
 info: FRC.info
-	cd ${srcdir}/man && $(MAKE) $(MFLAGS) $@
+	cd ${srcdir}/man && $(RECURSIVE_MAKE) $@
 
 dvi:
-	cd ${srcdir}/man && $(MAKE) $(MFLAGS) $@
+	cd ${srcdir}/man && $(RECURSIVE_MAKE) $@
 
 ## Fix up version information in executables (Solaris-only)
 mcs:
--- a/configure	Mon Aug 13 09:47:55 2007 +0200
+++ b/configure	Mon Aug 13 09:49:09 2007 +0200
@@ -186,7 +186,7 @@
 ac_ext=c
 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
-xe_libs='$xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
+xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
 ac_cpp='$CPP '"$xe_cppflags"
 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
@@ -423,6 +423,8 @@
 --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.
 --use-system-malloc	Force use of the system malloc, rather than GNU
 			malloc.
 
@@ -533,6 +535,7 @@
 	debug		| \
 	use_assertions	| \
 	memory_usage_stats | \
+	with_clash_detection | \
 	no_doc_file )
 	  	  case "$val" in
 	    y | ye | yes )	val=yes ;;
@@ -550,6 +553,7 @@
 	puresize	| \
 	cache_file	| \
 	native_sound_lib | \
+	package_path	| \
 	x_includes	| \
 	x_libraries	| \
 	site_includes	| \
@@ -821,7 +825,7 @@
 esac
 
 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:825: checking whether ln -s works" >&5
+echo "configure:829: checking whether ln -s works" >&5
 
 rm -f conftestdata
 if ln -s X conftestdata 2>/dev/null
@@ -876,6 +880,8 @@
 fi
 
 . "$srcdir/version.sh" || exit 1;
+if test -n "$emacs_beta_version"; then beta=yes; else beta=no; fi
+: "${extra_verbose=$beta}"
 version="${emacs_major_version}.${emacs_minor_version}"
 { test "$extra_verbose" = "yes" && cat << EOF
     Defining EMACS_MAJOR_VERSION = $emacs_major_version
@@ -920,15 +926,6 @@
 EOF
 }
 
-canonical_version=`echo ${version}_${canonical} | sed 'y/.-/__/'`
-{ test "$extra_verbose" = "yes" && cat << EOF
-    Defining CANONICAL_VERSION = $canonical_version
-EOF
-cat >> confdefs.h <<EOF
-#define CANONICAL_VERSION $canonical_version
-EOF
-}
-
 
 if test -n "$emacs_beta_version"; then beta=yes; else beta=no; fi
 test "${error_check_extents=$beta}"   = yes && { test "$extra_verbose" = "yes" && cat << \EOF
@@ -971,7 +968,6 @@
 EOF
 }
 
-: "${extra_verbose=$beta}"
 if test "${debug=beta}" = "yes"; then
   use_assertions=yes memory_usage_stats=yes
   extra_objs="$extra_objs debug.o" &&  if test "$extra_verbose" = "yes"; then
@@ -1005,7 +1001,7 @@
 
 
 echo "checking "the configuration name"" 1>&6
-echo "configure:1009: checking "the configuration name"" >&5
+echo "configure:1005: checking "the configuration name"" >&5
 internal_configuration=`echo $configuration | sed 's/-\(energize\|workshop\)//'`
 if canonical=`$srcdir/config.sub "$internal_configuration"` ; then : ; else
   exit $?
@@ -1384,16 +1380,37 @@
   exit 1
 fi
 
-if test "$dynamic" = "yes" ; then
+if test -z "$dynamic"; then
+  case "$opsys" in
+    hpux* | sunos4* | sco5 ) dynamic=no ;;
+    *) dynamic=yes ;;
+  esac
+fi
+if test "$dynamic" = "yes"; then
   case "$opsys" in
     hpux* | sunos4* | sco5 ) opsys="${opsys}-shr" ;;
+    decosf* ) ld_call_shared="-call_shared" ;;
   esac
-elif test "$dynamic" = "no" ; then
-  case "$opsys" in
-    sol2 | decosf1-3 | decosf3-* | decosf4-* | linux ) opsys="${opsys}-static" ;;
+else   case "$opsys" in
+    sol2 ) 
+      echo "Static linking is not supported on Solaris 2."
+      echo "Rerun configure without specifying --dynamic=no."
+      exit 1 ;;
+    linux   ) ld_call_shared="-Bstatic" ;;
+    decosf* ) ld_call_shared="-non_shared" ;;
   esac
 fi
 
+canonical_version=`echo ${version}_${canonical} | sed 'y/.-/__/'`
+{ test "$extra_verbose" = "yes" && cat << EOF
+    Defining CANONICAL_VERSION = $canonical_version
+EOF
+cat >> confdefs.h <<EOF
+#define CANONICAL_VERSION $canonical_version
+EOF
+}
+
+
 machfile="m/${machine}.h"
 opsysfile="s/${opsys}.h"
 
@@ -1424,7 +1441,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:1428: checking for $ac_word" >&5
+echo "configure:1445: checking for $ac_word" >&5
 
 if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -1450,7 +1467,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:1454: checking for $ac_word" >&5
+echo "configure:1471: checking for $ac_word" >&5
 
 if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -1495,23 +1512,23 @@
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1499: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1516: 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'
 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
-xe_libs='$xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
+xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
 ac_cpp='$CPP '"$xe_cppflags"
 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
 cross_compiling=no
 
 cat > conftest.$ac_ext <<EOF
-#line 1511 "configure"
+#line 1528 "configure"
 #include "confdefs.h"
 main(){return(0);}
 EOF
-if { (eval echo configure:1515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1532: \"$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
@@ -1531,19 +1548,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:1535: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1552: 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:1540: checking whether we are using GNU C" >&5
+echo "configure:1557: 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:1547: \"$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:1564: \"$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
@@ -1557,7 +1574,7 @@
   ac_save_CFLAGS="$CFLAGS"
   CFLAGS=
   echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1561: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1578: checking whether ${CC-cc} accepts -g" >&5
 
 echo 'void f(){}' > conftest.c
 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
@@ -1586,7 +1603,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:1590: checking for $ac_word" >&5
+echo "configure:1607: checking for $ac_word" >&5
 
 if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -1612,7 +1629,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:1616: checking for $ac_word" >&5
+echo "configure:1633: checking for $ac_word" >&5
 
 if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -1657,23 +1674,23 @@
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1661: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1678: 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'
 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
-xe_libs='$xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
+xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
 ac_cpp='$CPP '"$xe_cppflags"
 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
 cross_compiling=no
 
 cat > conftest.$ac_ext <<EOF
-#line 1673 "configure"
+#line 1690 "configure"
 #include "confdefs.h"
 main(){return(0);}
 EOF
-if { (eval echo configure:1677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1694: \"$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
@@ -1693,19 +1710,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:1697: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1714: 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:1702: checking whether we are using GNU C" >&5
+echo "configure:1719: 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:1709: \"$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:1726: \"$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
@@ -1719,7 +1736,7 @@
   ac_save_CFLAGS="$CFLAGS"
   CFLAGS=
   echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1723: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1740: checking whether ${CC-cc} accepts -g" >&5
 
 echo 'void f(){}' > conftest.c
 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
@@ -1748,7 +1765,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:1752: checking for $ac_word" >&5
+echo "configure:1769: checking for $ac_word" >&5
 
 if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -1774,7 +1791,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:1778: checking for $ac_word" >&5
+echo "configure:1795: checking for $ac_word" >&5
 
 if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -1819,23 +1836,23 @@
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1823: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1840: 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'
 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
-xe_libs='$xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
+xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
 ac_cpp='$CPP '"$xe_cppflags"
 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
 cross_compiling=no
 
 cat > conftest.$ac_ext <<EOF
-#line 1835 "configure"
+#line 1852 "configure"
 #include "confdefs.h"
 main(){return(0);}
 EOF
-if { (eval echo configure:1839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1856: \"$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
@@ -1855,19 +1872,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:1859: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1876: 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:1864: checking whether we are using GNU C" >&5
+echo "configure:1881: 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:1871: \"$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:1888: \"$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
@@ -1881,7 +1898,7 @@
   ac_save_CFLAGS="$CFLAGS"
   CFLAGS=
   echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1885: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1902: checking whether ${CC-cc} accepts -g" >&5
 
 echo 'void f(){}' > conftest.c
 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
@@ -1914,7 +1931,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:1918: checking how to run the C preprocessor" >&5
+echo "configure:1935: checking how to run the C preprocessor" >&5
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
@@ -1927,13 +1944,13 @@
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp.
   cat > conftest.$ac_ext <<EOF
-#line 1931 "configure"
+#line 1948 "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:1937: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1954: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   :
@@ -1944,13 +1961,13 @@
   rm -rf conftest*
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
-#line 1948 "configure"
+#line 1965 "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:1954: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1971: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   :
@@ -1973,9 +1990,9 @@
 
 
 echo $ac_n "checking for AIX""... $ac_c" 1>&6
-echo "configure:1977: checking for AIX" >&5
-cat > conftest.$ac_ext <<EOF
-#line 1979 "configure"
+echo "configure:1994: checking for AIX" >&5
+cat > conftest.$ac_ext <<EOF
+#line 1996 "configure"
 #include "confdefs.h"
 #ifdef _AIX
   yes
@@ -2002,9 +2019,9 @@
 
 
 echo $ac_n "checking whether we are using SunPro C""... $ac_c" 1>&6
-echo "configure:2006: checking whether we are using SunPro C" >&5
-cat > conftest.$ac_ext <<EOF
-#line 2008 "configure"
+echo "configure:2023: checking whether we are using SunPro C" >&5
+cat > conftest.$ac_ext <<EOF
+#line 2025 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -2015,7 +2032,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:2019: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2036: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   __sunpro_c=yes
 else
@@ -2119,11 +2136,6 @@
 configure___ unexec=UNEXEC
 
 
-#ifndef LD_SWITCH_CALL_SHARED
-#define LD_SWITCH_CALL_SHARED
-#endif
-configure___ ld_switch_call_shared=LD_SWITCH_CALL_SHARED
-
 #ifndef LD_SWITCH_SHARED
 #define LD_SWITCH_SHARED "-c"
 #endif
@@ -2242,14 +2254,13 @@
 rm $tempcname
 
 test "$extra_verbose" = "yes" && \
-  for var in libs_machine libs_system libs_termcap libs_standard   objects_machine objects_system c_switch_machine c_switch_system   c_switch_x_system ld_switch_machine ld_switch_system   ld_switch_x_system unexec ld_switch_call_shared ld_switch_shared   ld lib_gcc ld_text_start_addr start_files ordinary_link   have_terminfo mail_use_flock mail_use_lockf; do eval "echo \"$var = '\$$var'\""; done && echo ""
-
+  for var in libs_machine libs_system libs_termcap libs_standard   objects_machine objects_system c_switch_machine c_switch_system   c_switch_x_system ld_switch_machine ld_switch_system   ld_switch_x_system unexec ld_switch_shared   ld lib_gcc ld_text_start_addr start_files ordinary_link   have_terminfo mail_use_flock mail_use_lockf; do eval "echo \"$var = '\$$var'\""; done && echo ""
 
 test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc"
 
 if test -z "$CFLAGS"; then
       if   test "$GCC" = "yes"; then
-    CFLAGS="-g -O2"
+    CFLAGS="-g -O2 -Wall"
     test "$opsys" = "linux" -a "$machine" = "intel386" && \
       CFLAGS="$CFLAGS -fno-strength-reduce -malign-loops=2 -malign-jumps=2 -malign-functions=2"
   elif test "$__sunpro_c" = "yes"; then
@@ -2287,6 +2298,14 @@
       * ) LDFLAGS="$LDFLAGS -Xlinker $arg" ;;
     esac
   done
+  ld_call_shared_tmp="$ld_call_shared"; ld_call_shared=""
+  for arg in $ld_call_shared_tmp; do
+    case "$arg" in
+      -L* | -l* | -R* | -u* | -Wl* | -f* ) ld_call_shared="$ld_call_shared $arg" ;;
+      -Xlinker* ) ;;
+      * ) ld_call_shared="$ld_call_shared -Xlinker $arg" ;;
+    esac
+  done
 fi
 
 test -n "$objects_machine" && extra_objs="$extra_objs $objects_machine" &&  if test "$extra_verbose" = "yes"; then
@@ -2300,7 +2319,7 @@
  fi
 
 echo $ac_n "checking for dynodump""... $ac_c" 1>&6
-echo "configure:2304: checking for dynodump" >&5
+echo "configure:2323: checking for dynodump" >&5
 if test "$unexec" != "unexsol2.o"; then
   echo "$ac_t""no" 1>&6
 else
@@ -2324,7 +2343,6 @@
 
 
 
-
 test -n "$ld_text_start_addr" && start_flags="-T $ld_text_start_addr -e __start"
 
 if test "$ordinary_link" = "no" -a "$GCC" = "yes"; then
@@ -2371,19 +2389,19 @@
 
 if test "$add_runtime_path" = "yes"; then
       echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6
-echo "configure:2375: checking "for runtime libraries flag"" >&5
+echo "configure:2393: 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 2380 "configure"
+#line 2398 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:2387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   dash_r="$try_dash_r"
 else
@@ -2477,7 +2495,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:2481: checking for $ac_word" >&5
+echo "configure:2499: checking for $ac_word" >&5
 
 if test -n "$RANLIB"; then
   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
@@ -2530,7 +2548,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:2534: checking for a BSD compatible install" >&5
+echo "configure:2552: checking for a BSD compatible install" >&5
 if test -z "$INSTALL"; then
 
   IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS="${IFS}:"
@@ -2581,7 +2599,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:2585: checking for $ac_word" >&5
+echo "configure:2603: checking for $ac_word" >&5
 
 if test -n "$YACC"; then
   ac_cv_prog_YACC="$YACC" # Let the user override the test.
@@ -2612,15 +2630,15 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2616: checking for $ac_hdr" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 2619 "configure"
+echo "configure:2634: checking for $ac_hdr" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 2637 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2624: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2642: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2653,15 +2671,15 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2657: checking for $ac_hdr" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 2660 "configure"
+echo "configure:2675: checking for $ac_hdr" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 2678 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2665: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2683: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2694,15 +2712,15 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2698: checking for $ac_hdr" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 2701 "configure"
+echo "configure:2716: checking for $ac_hdr" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 2719 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2706: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2724: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2732,10 +2750,10 @@
 done
 
 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
-echo "configure:2736: checking for sys/wait.h that is POSIX.1 compatible" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 2739 "configure"
+echo "configure:2754: checking for sys/wait.h that is POSIX.1 compatible" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 2757 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/wait.h>
@@ -2751,7 +2769,7 @@
 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
 ; return 0; }
 EOF
-if { (eval echo configure:2755: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2773: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_header_sys_wait_h=yes
 else
@@ -2775,10 +2793,10 @@
 fi
 
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:2779: checking for ANSI C header files" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 2782 "configure"
+echo "configure:2797: checking for ANSI C header files" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 2800 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -2786,7 +2804,7 @@
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2790: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2808: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2803,7 +2821,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 2807 "configure"
+#line 2825 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -2821,7 +2839,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 2825 "configure"
+#line 2843 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -2839,7 +2857,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 2843 "configure"
+#line 2861 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -2850,7 +2868,7 @@
 exit (0); }
 
 EOF
-if { (eval echo configure:2854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+if { (eval echo configure:2872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
 then
   :
 else
@@ -2875,10 +2893,10 @@
 fi
 
 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:2879: checking whether time.h and sys/time.h may both be included" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 2882 "configure"
+echo "configure:2897: checking whether time.h and sys/time.h may both be included" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 2900 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/time.h>
@@ -2887,7 +2905,7 @@
 struct tm *tp;
 ; return 0; }
 EOF
-if { (eval echo configure:2891: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2909: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_header_time=yes
 else
@@ -2911,10 +2929,10 @@
 fi
 
 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
-echo "configure:2915: checking for sys_siglist declaration in signal.h or unistd.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 2918 "configure"
+echo "configure:2933: checking for sys_siglist declaration in signal.h or unistd.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 2936 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <signal.h>
@@ -2926,7 +2944,7 @@
 char *msg = *(sys_siglist + 1);
 ; return 0; }
 EOF
-if { (eval echo configure:2930: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2948: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_decl_sys_siglist=yes
 else
@@ -2951,9 +2969,9 @@
 
 
 echo $ac_n "checking for struct utimbuf""... $ac_c" 1>&6
-echo "configure:2955: checking for struct utimbuf" >&5
-cat > conftest.$ac_ext <<EOF
-#line 2957 "configure"
+echo "configure:2973: checking for struct utimbuf" >&5
+cat > conftest.$ac_ext <<EOF
+#line 2975 "configure"
 #include "confdefs.h"
 #ifdef TIME_WITH_SYS_TIME
 #include <sys/time.h>
@@ -2972,7 +2990,7 @@
 static struct utimbuf x; x.actime = x.modtime;
 ; return 0; }
 EOF
-if { (eval echo configure:2976: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2994: \"$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
@@ -2992,10 +3010,10 @@
 rm -f conftest*
 
 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:2996: checking return type of signal handlers" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 2999 "configure"
+echo "configure:3014: checking return type of signal handlers" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3017 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <signal.h>
@@ -3012,7 +3030,7 @@
 int i;
 ; return 0; }
 EOF
-if { (eval echo configure:3016: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3034: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_type_signal=void
 else
@@ -3034,10 +3052,10 @@
 
 
 echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:3038: checking for size_t" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 3041 "configure"
+echo "configure:3056: checking for size_t" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3059 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -3068,10 +3086,10 @@
 fi
 
 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
-echo "configure:3072: checking for pid_t" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 3075 "configure"
+echo "configure:3090: checking for pid_t" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3093 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -3102,10 +3120,10 @@
 fi
 
 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
-echo "configure:3106: checking for uid_t in sys/types.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 3109 "configure"
+echo "configure:3124: checking for uid_t in sys/types.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3127 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 EOF
@@ -3141,10 +3159,10 @@
 fi
 
 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
-echo "configure:3145: checking for mode_t" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 3148 "configure"
+echo "configure:3163: checking for mode_t" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3166 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -3175,10 +3193,10 @@
 fi
 
 echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:3179: checking for off_t" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 3182 "configure"
+echo "configure:3197: checking for off_t" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3200 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -3210,9 +3228,9 @@
 
 
 echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
-echo "configure:3214: checking for struct timeval" >&5
-cat > conftest.$ac_ext <<EOF
-#line 3216 "configure"
+echo "configure:3232: checking for struct timeval" >&5
+cat > conftest.$ac_ext <<EOF
+#line 3234 "configure"
 #include "confdefs.h"
 #ifdef TIME_WITH_SYS_TIME
 #include <sys/time.h>
@@ -3228,7 +3246,7 @@
 static struct timeval x; x.tv_sec = x.tv_usec;
 ; return 0; }
 EOF
-if { (eval echo configure:3232: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3250: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   echo "$ac_t""yes" 1>&6
   HAVE_TIMEVAL=yes
@@ -3250,10 +3268,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:3254: checking whether struct tm is in sys/time.h or time.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 3257 "configure"
+echo "configure:3272: checking whether struct tm is in sys/time.h or time.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3275 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <time.h>
@@ -3261,7 +3279,7 @@
 struct tm *tp; tp->tm_sec;
 ; return 0; }
 EOF
-if { (eval echo configure:3265: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3283: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_struct_tm=time.h
 else
@@ -3285,10 +3303,10 @@
 fi
 
 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
-echo "configure:3289: checking for tm_zone in struct tm" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 3292 "configure"
+echo "configure:3307: checking for tm_zone in struct tm" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3310 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <$ac_cv_struct_tm>
@@ -3296,7 +3314,7 @@
 struct tm tm; tm.tm_zone;
 ; return 0; }
 EOF
-if { (eval echo configure:3300: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3318: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_struct_tm_zone=yes
 else
@@ -3319,10 +3337,10 @@
 
 else
   echo $ac_n "checking for tzname""... $ac_c" 1>&6
-echo "configure:3323: checking for tzname" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 3326 "configure"
+echo "configure:3341: checking for tzname" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3344 "configure"
 #include "confdefs.h"
 #include <time.h>
 #ifndef tzname /* For SGI.  */
@@ -3332,7 +3350,7 @@
 atoi(*tzname);
 ; return 0; }
 EOF
-if { (eval echo configure:3336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   ac_cv_var_tzname=yes
 else
@@ -3358,10 +3376,10 @@
 
 
 echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:3362: checking for working const" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 3365 "configure"
+echo "configure:3380: checking for working const" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3383 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -3410,7 +3428,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:3414: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3432: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_const=yes
 else
@@ -3435,7 +3453,7 @@
 
 
 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:3439: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:3457: checking whether ${MAKE-make} sets \${MAKE}" >&5
 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
 
 cat > conftestmake <<\EOF
@@ -3460,12 +3478,12 @@
 
 
 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
-echo "configure:3464: checking whether byte ordering is bigendian" >&5
+echo "configure:3482: 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 3469 "configure"
+#line 3487 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/param.h>
@@ -3476,11 +3494,11 @@
 #endif
 ; return 0; }
 EOF
-if { (eval echo configure:3480: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3498: \"$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 3484 "configure"
+#line 3502 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/param.h>
@@ -3491,7 +3509,7 @@
 #endif
 ; return 0; }
 EOF
-if { (eval echo configure:3495: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3513: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_bigendian=yes
 else
@@ -3508,7 +3526,7 @@
 rm -f conftest*
 if test $ac_cv_c_bigendian = unknown; then
 cat > conftest.$ac_ext <<EOF
-#line 3512 "configure"
+#line 3530 "configure"
 #include "confdefs.h"
 main () {
   /* Are we little or big endian?  From Harbison&Steele.  */
@@ -3521,7 +3539,7 @@
   exit (u.c[sizeof (long) - 1] == 1);
 }
 EOF
-if { (eval echo configure:3525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+if { (eval echo configure:3543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
 then
   ac_cv_c_bigendian=no
 else
@@ -3547,10 +3565,10 @@
 
 
 echo $ac_n "checking size of short""... $ac_c" 1>&6
-echo "configure:3551: checking size of short" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 3554 "configure"
+echo "configure:3569: checking size of short" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3572 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 main()
@@ -3561,7 +3579,7 @@
   exit(0);
 }
 EOF
-if { (eval echo configure:3565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+if { (eval echo configure:3583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
 then
   ac_cv_sizeof_short=`cat conftestval`
 else
@@ -3588,10 +3606,10 @@
   exit 1
 fi
 echo $ac_n "checking size of int""... $ac_c" 1>&6
-echo "configure:3592: checking size of int" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 3595 "configure"
+echo "configure:3610: checking size of int" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3613 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 main()
@@ -3602,7 +3620,7 @@
   exit(0);
 }
 EOF
-if { (eval echo configure:3606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+if { (eval echo configure:3624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
 then
   ac_cv_sizeof_int=`cat conftestval`
 else
@@ -3623,10 +3641,10 @@
 
 
 echo $ac_n "checking size of long""... $ac_c" 1>&6
-echo "configure:3627: checking size of long" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 3630 "configure"
+echo "configure:3645: checking size of long" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3648 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 main()
@@ -3637,7 +3655,7 @@
   exit(0);
 }
 EOF
-if { (eval echo configure:3641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+if { (eval echo configure:3659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
 then
   ac_cv_sizeof_long=`cat conftestval`
 else
@@ -3658,10 +3676,10 @@
 
 
 echo $ac_n "checking size of long long""... $ac_c" 1>&6
-echo "configure:3662: checking size of long long" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 3665 "configure"
+echo "configure:3680: checking size of long long" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3683 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 main()
@@ -3672,7 +3690,7 @@
   exit(0);
 }
 EOF
-if { (eval echo configure:3676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+if { (eval echo configure:3694: \"$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
@@ -3693,10 +3711,10 @@
 
 
 echo $ac_n "checking size of void *""... $ac_c" 1>&6
-echo "configure:3697: checking size of void *" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 3700 "configure"
+echo "configure:3715: checking size of void *" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3718 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 main()
@@ -3707,7 +3725,7 @@
   exit(0);
 }
 EOF
-if { (eval echo configure:3711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+if { (eval echo configure:3729: \"$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
@@ -3729,7 +3747,7 @@
 
 
 echo $ac_n "checking for long file names""... $ac_c" 1>&6
-echo "configure:3733: checking for long file names" >&5
+echo "configure:3751: 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:
@@ -3776,12 +3794,12 @@
 
 
 echo $ac_n "checking for sqrt in -lm""... $ac_c" 1>&6
-echo "configure:3780: checking for sqrt in -lm" >&5
+echo "configure:3798: checking for sqrt in -lm" >&5
 ac_lib_var=`echo m'_'sqrt | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lm "
 cat > conftest.$ac_ext <<EOF
-#line 3785 "configure"
+#line 3803 "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
@@ -3792,7 +3810,7 @@
 sqrt()
 ; return 0; }
 EOF
-if { (eval echo configure:3796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3814: \"$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
@@ -3835,7 +3853,7 @@
 
 
 echo "checking type of mail spool file locking" 1>&6
-echo "configure:3839: checking type of mail spool file locking" >&5
+echo "configure:3857: 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
@@ -3859,12 +3877,12 @@
 
 
 echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6
-echo "configure:3863: checking for kstat_open in -lkstat" >&5
+echo "configure:3881: 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 3868 "configure"
+#line 3886 "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
@@ -3875,7 +3893,7 @@
 kstat_open()
 ; return 0; }
 EOF
-if { (eval echo configure:3879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3897: \"$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
@@ -3909,12 +3927,12 @@
 
 
 echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6
-echo "configure:3913: checking for kvm_read in -lkvm" >&5
+echo "configure:3931: 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 3918 "configure"
+#line 3936 "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
@@ -3925,7 +3943,7 @@
 kvm_read()
 ; return 0; }
 EOF
-if { (eval echo configure:3929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3947: \"$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
@@ -3959,12 +3977,12 @@
 
 
 echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
-echo "configure:3963: checking for cma_open in -lpthreads" >&5
+echo "configure:3981: 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 3968 "configure"
+#line 3986 "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
@@ -3975,7 +3993,7 @@
 cma_open()
 ; return 0; }
 EOF
-if { (eval echo configure:3979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3997: \"$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
@@ -4011,7 +4029,7 @@
 fi
 
 echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6
-echo "configure:4015: checking whether the -xildoff compiler flag is required" >&5
+echo "configure:4033: 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;
@@ -4022,7 +4040,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:4026: checking for \"-z ignore\" linker flag" >&5
+echo "configure:4044: 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 ;;
@@ -4032,7 +4050,7 @@
 
 
 echo "checking "for specified window system"" 1>&6
-echo "configure:4036: checking "for specified window system"" >&5
+echo "configure:4054: checking "for specified window system"" >&5
 
 if test "$x_includes $x_libraries" = "NONE NONE"; then
   if test -n "$OPENWINHOME" \
@@ -4053,7 +4071,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:4057: checking for X" >&5
+echo "configure:4075: checking for X" >&5
 
 # Check whether --with-x or --without-x was given.
 if test "${with_x+set}" = set; then
@@ -4113,12 +4131,12 @@
 
   # First, try using that file with no special directory specified.
 cat > conftest.$ac_ext <<EOF
-#line 4117 "configure"
+#line 4135 "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:4122: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4140: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4187,14 +4205,14 @@
   ac_save_LIBS="$LIBS"
   LIBS="-l$x_direct_test_library $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4191 "configure"
+#line 4209 "configure"
 #include "confdefs.h"
 
 int main() {
 ${x_direct_test_function}()
 ; return 0; }
 EOF
-if { (eval echo configure:4198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4216: \"$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.
@@ -4303,17 +4321,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:4307: checking whether -R must be followed by a space" >&5
+echo "configure:4325: 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 4310 "configure"
+#line 4328 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:4317: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   ac_R_nospace=yes
 else
@@ -4329,14 +4347,14 @@
       else
 	LIBS="$ac_xsave_LIBS -R $x_libraries"
 	cat > conftest.$ac_ext <<EOF
-#line 4333 "configure"
+#line 4351 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:4340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   ac_R_space=yes
 else
@@ -4372,12 +4390,12 @@
 else
 
 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
-echo "configure:4376: checking for dnet_ntoa in -ldnet" >&5
+echo "configure:4394: 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 4381 "configure"
+#line 4399 "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
@@ -4388,7 +4406,7 @@
 dnet_ntoa()
 ; return 0; }
 EOF
-if { (eval echo configure:4392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4410: \"$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
@@ -4412,12 +4430,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:4416: checking for dnet_ntoa in -ldnet_stub" >&5
+echo "configure:4434: 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 4421 "configure"
+#line 4439 "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
@@ -4428,7 +4446,7 @@
 dnet_ntoa()
 ; return 0; }
 EOF
-if { (eval echo configure:4432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4450: \"$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
@@ -4457,10 +4475,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:4461: checking for gethostbyname" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 4464 "configure"
+echo "configure:4479: checking for gethostbyname" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 4482 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char gethostbyname(); below.  */
@@ -4483,7 +4501,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:4487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_gethostbyname=yes"
 else
@@ -4504,12 +4522,12 @@
     if test $ac_cv_func_gethostbyname = no; then
       
 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
-echo "configure:4508: checking for gethostbyname in -lnsl" >&5
+echo "configure:4526: 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 4513 "configure"
+#line 4531 "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
@@ -4520,7 +4538,7 @@
 gethostbyname()
 ; return 0; }
 EOF
-if { (eval echo configure:4524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4542: \"$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
@@ -4550,10 +4568,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:4554: checking for connect" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 4557 "configure"
+echo "configure:4572: checking for connect" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 4575 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char connect(); below.  */
@@ -4576,7 +4594,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:4580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_connect=yes"
 else
@@ -4599,12 +4617,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:4603: checking "$xe_msg_checking"" >&5
+echo "configure:4621: 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 4608 "configure"
+#line 4626 "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
@@ -4615,7 +4633,7 @@
 connect()
 ; return 0; }
 EOF
-if { (eval echo configure:4619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4637: \"$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
@@ -4639,10 +4657,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:4643: checking for remove" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 4646 "configure"
+echo "configure:4661: checking for remove" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 4664 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char remove(); below.  */
@@ -4665,7 +4683,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:4669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_remove=yes"
 else
@@ -4686,12 +4704,12 @@
     if test $ac_cv_func_remove = no; then
       
 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
-echo "configure:4690: checking for remove in -lposix" >&5
+echo "configure:4708: 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 4695 "configure"
+#line 4713 "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
@@ -4702,7 +4720,7 @@
 remove()
 ; return 0; }
 EOF
-if { (eval echo configure:4706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4724: \"$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
@@ -4726,10 +4744,10 @@
 
     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
     echo $ac_n "checking for shmat""... $ac_c" 1>&6
-echo "configure:4730: checking for shmat" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 4733 "configure"
+echo "configure:4748: checking for shmat" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 4751 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char shmat(); below.  */
@@ -4752,7 +4770,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:4756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_shmat=yes"
 else
@@ -4773,12 +4791,12 @@
     if test $ac_cv_func_shmat = no; then
       
 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
-echo "configure:4777: checking for shmat in -lipc" >&5
+echo "configure:4795: 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 4782 "configure"
+#line 4800 "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
@@ -4789,7 +4807,7 @@
 shmat()
 ; return 0; }
 EOF
-if { (eval echo configure:4793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4811: \"$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
@@ -4823,12 +4841,12 @@
   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
   
 echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
-echo "configure:4827: checking for IceConnectionNumber in -lICE" >&5
+echo "configure:4845: 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 4832 "configure"
+#line 4850 "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
@@ -4839,7 +4857,7 @@
 IceConnectionNumber()
 ; return 0; }
 EOF
-if { (eval echo configure:4843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4861: \"$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
@@ -4971,7 +4989,7 @@
   fi
 
     echo "checking for X defines extracted by xmkmf" 1>&6
-echo "configure:4975: checking for X defines extracted by xmkmf" >&5
+echo "configure:4993: checking for X defines extracted by xmkmf" >&5
   rm -fr conftestdir
   if mkdir conftestdir; then
     cd conftestdir
@@ -5003,15 +5021,15 @@
 
     ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6
-echo "configure:5007: checking for X11/Intrinsic.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 5010 "configure"
+echo "configure:5025: checking for X11/Intrinsic.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 5028 "configure"
 #include "confdefs.h"
 #include <X11/Intrinsic.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5015: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5033: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -5035,12 +5053,12 @@
 
       
 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
-echo "configure:5039: checking for XOpenDisplay in -lX11" >&5
+echo "configure:5057: 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 5044 "configure"
+#line 5062 "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
@@ -5051,7 +5069,7 @@
 XOpenDisplay()
 ; return 0; }
 EOF
-if { (eval echo configure:5055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5073: \"$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
@@ -5076,12 +5094,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:5080: checking "$xe_msg_checking"" >&5
+echo "configure:5098: 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 5085 "configure"
+#line 5103 "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
@@ -5092,7 +5110,7 @@
 XGetFontProperty()
 ; return 0; }
 EOF
-if { (eval echo configure:5096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5114: \"$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
@@ -5119,12 +5137,12 @@
 
     
 echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6
-echo "configure:5123: checking for XShapeSelectInput in -lXext" >&5
+echo "configure:5141: 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 5128 "configure"
+#line 5146 "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
@@ -5135,7 +5153,7 @@
 XShapeSelectInput()
 ; return 0; }
 EOF
-if { (eval echo configure:5139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5157: \"$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
@@ -5158,12 +5176,12 @@
 
     
 echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6
-echo "configure:5162: checking for XtOpenDisplay in -lXt" >&5
+echo "configure:5180: 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 5167 "configure"
+#line 5185 "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
@@ -5174,7 +5192,7 @@
 XtOpenDisplay()
 ; return 0; }
 EOF
-if { (eval echo configure:5178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5196: \"$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
@@ -5197,14 +5215,14 @@
 
 
   echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6
-echo "configure:5201: checking the version of X11 being used" >&5
+echo "configure:5219: checking the version of X11 being used" >&5
   cat > conftest.$ac_ext <<EOF
-#line 5203 "configure"
+#line 5221 "configure"
 #include "confdefs.h"
 #include <X11/Intrinsic.h>
     main(int c, char* v[]) { return c>1 ? XlibSpecificationRelease : 0; }
 EOF
-if { (eval echo configure:5208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+if { (eval echo configure:5226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
 then
   ./conftest foobar; x11_release=$?
 else
@@ -5228,15 +5246,15 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5232: checking for $ac_hdr" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 5235 "configure"
+echo "configure:5250: checking for $ac_hdr" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 5253 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5240: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5258: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -5267,7 +5285,7 @@
 
 
     echo $ac_n "checking for XFree86""... $ac_c" 1>&6
-echo "configure:5271: checking for XFree86" >&5
+echo "configure:5289: checking for XFree86" >&5
   if test -d "/usr/X386/include" -o \
           -f "/etc/XF86Config"    -o \
 	  -f "/etc/X11/XF86Config" -o \
@@ -5287,12 +5305,12 @@
 
     test -z "$with_xmu" && { 
 echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6
-echo "configure:5291: checking for XmuReadBitmapDataFromFile in -lXmu" >&5
+echo "configure:5309: 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 5296 "configure"
+#line 5314 "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
@@ -5303,7 +5321,7 @@
 XmuReadBitmapDataFromFile()
 ; return 0; }
 EOF
-if { (eval echo configure:5307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5325: \"$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
@@ -5333,19 +5351,19 @@
 
       
 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
-echo "configure:5337: checking for main in -lXbsd" >&5
+echo "configure:5355: 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 5342 "configure"
+#line 5360 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:5349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5367: \"$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
@@ -5368,12 +5386,12 @@
 
     
 echo $ac_n "checking for XawScrollbarSetThumb in -lXaw""... $ac_c" 1>&6
-echo "configure:5372: checking for XawScrollbarSetThumb in -lXaw" >&5
+echo "configure:5390: 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 5377 "configure"
+#line 5395 "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
@@ -5384,7 +5402,7 @@
 XawScrollbarSetThumb()
 ; return 0; }
 EOF
-if { (eval echo configure:5388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5406: \"$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
@@ -5408,15 +5426,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:5412: checking for X11/Xaw/Reports.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 5415 "configure"
+echo "configure:5430: checking for X11/Xaw/Reports.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 5433 "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:5420: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5438: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -5475,15 +5493,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:5479: checking for X11/Xauth.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 5482 "configure"
+echo "configure:5497: checking for X11/Xauth.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 5500 "configure"
 #include "confdefs.h"
 #include <X11/Xauth.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5487: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5505: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -5506,12 +5524,12 @@
  }
 test -z "$with_xauth" && { 
 echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6
-echo "configure:5510: checking for XauGetAuthByAddr in -lXau" >&5
+echo "configure:5528: 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 5515 "configure"
+#line 5533 "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
@@ -5522,7 +5540,7 @@
 XauGetAuthByAddr()
 ; return 0; }
 EOF
-if { (eval echo configure:5526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5544: \"$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
@@ -5563,15 +5581,15 @@
 
 test -z "$with_offix" && { ac_safe=`echo "OffiX/DragAndDrop.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for OffiX/DragAndDrop.h""... $ac_c" 1>&6
-echo "configure:5567: checking for OffiX/DragAndDrop.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 5570 "configure"
+echo "configure:5585: checking for OffiX/DragAndDrop.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 5588 "configure"
 #include "confdefs.h"
 #include <OffiX/DragAndDrop.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5575: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5593: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -5594,12 +5612,12 @@
  }
 test -z "$with_offix" && { 
 echo $ac_n "checking for DndInitialize in -lDnd""... $ac_c" 1>&6
-echo "configure:5598: checking for DndInitialize in -lDnd" >&5
+echo "configure:5616: checking for DndInitialize in -lDnd" >&5
 ac_lib_var=`echo Dnd'_'DndInitialize | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lDnd "
 cat > conftest.$ac_ext <<EOF
-#line 5603 "configure"
+#line 5621 "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
@@ -5610,7 +5628,7 @@
 DndInitialize()
 ; return 0; }
 EOF
-if { (eval echo configure:5614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5632: \"$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
@@ -5649,15 +5667,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:5653: checking for ${dir}tt_c.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 5656 "configure"
+echo "configure:5671: checking for ${dir}tt_c.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 5674 "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:5661: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5679: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -5686,12 +5704,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:5690: checking "$xe_msg_checking"" >&5
+echo "configure:5708: 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 5695 "configure"
+#line 5713 "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
@@ -5702,7 +5720,7 @@
 tt_message_create()
 ; return 0; }
 EOF
-if { (eval echo configure:5706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5724: \"$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
@@ -5751,15 +5769,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:5755: checking for Dt/Dt.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 5758 "configure"
+echo "configure:5773: checking for Dt/Dt.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 5776 "configure"
 #include "confdefs.h"
 #include <Dt/Dt.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5763: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5781: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -5782,12 +5800,12 @@
  }
 test -z "$with_cde" && { 
 echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6
-echo "configure:5786: checking for DtDndDragStart in -lDtSvc" >&5
+echo "configure:5804: 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 5791 "configure"
+#line 5809 "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
@@ -5798,7 +5816,7 @@
 DtDndDragStart()
 ; return 0; }
 EOF
-if { (eval echo configure:5802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5820: \"$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
@@ -5845,19 +5863,19 @@
 
   
 echo $ac_n "checking for main in -lenergize""... $ac_c" 1>&6
-echo "configure:5849: checking for main in -lenergize" >&5
+echo "configure:5867: 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 5854 "configure"
+#line 5872 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:5861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5879: \"$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
@@ -5889,19 +5907,19 @@
   if test -z "$energize_version"; then
     
 echo $ac_n "checking for main in -lconn""... $ac_c" 1>&6
-echo "configure:5893: checking for main in -lconn" >&5
+echo "configure:5911: 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 5898 "configure"
+#line 5916 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:5905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5923: \"$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
@@ -5934,15 +5952,15 @@
   fi
   ac_safe=`echo "editorconn.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for editorconn.h""... $ac_c" 1>&6
-echo "configure:5938: checking for editorconn.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 5941 "configure"
+echo "configure:5956: checking for editorconn.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 5959 "configure"
 #include "confdefs.h"
 #include <editorconn.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5946: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5964: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -5984,7 +6002,7 @@
 
 
 echo "checking for graphics libraries" 1>&6
-echo "configure:5988: checking for graphics libraries" >&5
+echo "configure:6006: checking for graphics libraries" >&5
 test -z "$with_gif" && with_gif=yes;
 if test "$with_gif" = "yes"; then
   { test "$extra_verbose" = "yes" && cat << \EOF
@@ -6001,10 +6019,10 @@
 fi
 
 echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c" 1>&6
-echo "configure:6005: checking for Xpm - no older than 3.4f" >&5
+echo "configure:6023: checking for Xpm - no older than 3.4f" >&5
 xe_check_libs=-lXpm
 test -z "$with_xpm" && { cat > conftest.$ac_ext <<EOF
-#line 6008 "configure"
+#line 6026 "configure"
 #include "confdefs.h"
 #include <X11/xpm.h>
 int main(int c, char **v) {
@@ -6014,7 +6032,7 @@
 		0 ;
 }
 EOF
-if { (eval echo configure:6018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+if { (eval echo configure:6036: \"$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;
@@ -6052,15 +6070,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:6056: checking for compface.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 6059 "configure"
+echo "configure:6074: checking for compface.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 6077 "configure"
 #include "confdefs.h"
 #include <compface.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6064: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6082: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -6083,12 +6101,12 @@
  }
 test -z "$with_xface" && { 
 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
-echo "configure:6087: checking for UnGenFace in -lcompface" >&5
+echo "configure:6105: 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 6092 "configure"
+#line 6110 "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
@@ -6099,7 +6117,7 @@
 UnGenFace()
 ; return 0; }
 EOF
-if { (eval echo configure:6103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6121: \"$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
@@ -6135,15 +6153,15 @@
 
 test -z "$with_jpeg" && { ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6
-echo "configure:6139: checking for jpeglib.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 6142 "configure"
+echo "configure:6157: checking for jpeglib.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 6160 "configure"
 #include "confdefs.h"
 #include <jpeglib.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6147: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6165: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -6166,12 +6184,12 @@
  }
 test -z "$with_jpeg" && { 
 echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6
-echo "configure:6170: checking for jpeg_destroy_decompress in -ljpeg" >&5
+echo "configure:6188: checking for jpeg_destroy_decompress in -ljpeg" >&5
 ac_lib_var=`echo jpeg'_'jpeg_destroy_decompress | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -ljpeg "
 cat > conftest.$ac_ext <<EOF
-#line 6175 "configure"
+#line 6193 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -6182,7 +6200,7 @@
 jpeg_destroy_decompress()
 ; return 0; }
 EOF
-if { (eval echo configure:6186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -6218,15 +6236,15 @@
 
 test -z "$with_png" && { ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for png.h""... $ac_c" 1>&6
-echo "configure:6222: checking for png.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 6225 "configure"
+echo "configure:6240: checking for png.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 6243 "configure"
 #include "confdefs.h"
 #include <png.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6230: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6248: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -6248,10 +6266,10 @@
 fi
  }
 test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6
-echo "configure:6252: checking for pow" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 6255 "configure"
+echo "configure:6270: checking for pow" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 6273 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char pow(); below.  */
@@ -6274,7 +6292,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:6278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_pow=yes"
 else
@@ -6299,12 +6317,12 @@
 xe_msg_checking="for png_read_image in -lpng"
 test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs"
 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
-echo "configure:6303: checking "$xe_msg_checking"" >&5
+echo "configure:6321: checking "$xe_msg_checking"" >&5
 ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lpng $extra_libs"
 cat > conftest.$ac_ext <<EOF
-#line 6308 "configure"
+#line 6326 "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
@@ -6315,7 +6333,7 @@
 png_read_image()
 ; return 0; }
 EOF
-if { (eval echo configure:6319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6337: \"$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
@@ -6365,15 +6383,15 @@
 
   ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
-echo "configure:6369: checking for Xm/Xm.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 6372 "configure"
+echo "configure:6387: checking for Xm/Xm.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 6390 "configure"
 #include "confdefs.h"
 #include <Xm/Xm.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6377: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6395: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -6390,12 +6408,12 @@
   echo "$ac_t""yes" 1>&6
   
 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
-echo "configure:6394: checking for XmStringFree in -lXm" >&5
+echo "configure:6412: 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 6399 "configure"
+#line 6417 "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
@@ -6406,7 +6424,7 @@
 XmStringFree()
 ; return 0; }
 EOF
-if { (eval echo configure:6410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6428: \"$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
@@ -6654,7 +6672,7 @@
 
 if test "$with_mule" = "yes" ; then
   echo "checking for Mule-related features" 1>&6
-echo "configure:6658: checking for Mule-related features" >&5
+echo "configure:6676: checking for Mule-related features" >&5
   { test "$extra_verbose" = "yes" && cat << \EOF
     Defining MULE
 EOF
@@ -6671,15 +6689,15 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:6675: checking for $ac_hdr" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 6678 "configure"
+echo "configure:6693: checking for $ac_hdr" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 6696 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6683: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6701: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -6710,12 +6728,12 @@
 
   
 echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6
-echo "configure:6714: checking for strerror in -lintl" >&5
+echo "configure:6732: 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 6719 "configure"
+#line 6737 "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
@@ -6726,7 +6744,7 @@
 strerror()
 ; return 0; }
 EOF
-if { (eval echo configure:6730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6748: \"$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
@@ -6759,19 +6777,19 @@
 
 
   echo "checking for Mule input methods" 1>&6
-echo "configure:6763: checking for Mule input methods" >&5
+echo "configure:6781: 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:6767: checking for XIM" >&5
+echo "configure:6785: checking for XIM" >&5
     
 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
-echo "configure:6770: checking for XmImMbLookupString in -lXm" >&5
+echo "configure:6788: 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 6775 "configure"
+#line 6793 "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
@@ -6782,7 +6800,7 @@
 XmImMbLookupString()
 ; return 0; }
 EOF
-if { (eval echo configure:6786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6804: \"$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
@@ -6844,15 +6862,15 @@
     test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support
   test -z "$with_wnn" && { ac_safe=`echo "wnn/jllib.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for wnn/jllib.h""... $ac_c" 1>&6
-echo "configure:6848: checking for wnn/jllib.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 6851 "configure"
+echo "configure:6866: checking for wnn/jllib.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 6869 "configure"
 #include "confdefs.h"
 #include <wnn/jllib.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6856: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6874: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -6877,10 +6895,10 @@
     for ac_func in crypt
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6881: checking for $ac_func" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 6884 "configure"
+echo "configure:6899: checking for $ac_func" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 6902 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -6903,7 +6921,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:6907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -6932,12 +6950,12 @@
 
     test "$ac_cv_func_crypt" != "yes" && { 
 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
-echo "configure:6936: checking for crypt in -lcrypt" >&5
+echo "configure:6954: 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 6941 "configure"
+#line 6959 "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
@@ -6948,7 +6966,7 @@
 crypt()
 ; return 0; }
 EOF
-if { (eval echo configure:6952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6970: \"$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
@@ -6982,12 +7000,12 @@
   fi
     test -z "$with_wnn" && { 
 echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6
-echo "configure:6986: checking for jl_dic_list_e in -lwnn" >&5
+echo "configure:7004: 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 6991 "configure"
+#line 7009 "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
@@ -6998,7 +7016,7 @@
 jl_dic_list_e()
 ; return 0; }
 EOF
-if { (eval echo configure:7002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7020: \"$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
@@ -7035,12 +7053,12 @@
  fi
     
 echo $ac_n "checking for jl_fi_dic_list in -lwnn""... $ac_c" 1>&6
-echo "configure:7039: checking for jl_fi_dic_list in -lwnn" >&5
+echo "configure:7057: 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 7044 "configure"
+#line 7062 "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
@@ -7051,7 +7069,7 @@
 jl_fi_dic_list()
 ; return 0; }
 EOF
-if { (eval echo configure:7055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7073: \"$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
@@ -7083,15 +7101,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:7087: checking for canna/RK.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 7090 "configure"
+echo "configure:7105: checking for canna/RK.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7108 "configure"
 #include "confdefs.h"
 #include <canna/RK.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7095: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7113: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -7114,12 +7132,12 @@
  }
   test -z "$with_canna" && { 
 echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6
-echo "configure:7118: checking for RkBgnBun in -lRKC" >&5
+echo "configure:7136: 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 7123 "configure"
+#line 7141 "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
@@ -7130,7 +7148,7 @@
 RkBgnBun()
 ; return 0; }
 EOF
-if { (eval echo configure:7134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7152: \"$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
@@ -7153,12 +7171,12 @@
  }
   test -z "$with_canna" && { 
 echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6
-echo "configure:7157: checking for jrKanjiControl in -lcanna" >&5
+echo "configure:7175: 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 7162 "configure"
+#line 7180 "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
@@ -7169,7 +7187,7 @@
 jrKanjiControl()
 ; return 0; }
 EOF
-if { (eval echo configure:7173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7191: \"$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
@@ -7269,10 +7287,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:7273: checking for $ac_func" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 7276 "configure"
+echo "configure:7291: checking for $ac_func" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7294 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -7295,7 +7313,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:7299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7317: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -7332,10 +7350,10 @@
     for ac_func in realpath
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:7336: checking for $ac_func" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 7339 "configure"
+echo "configure:7354: checking for $ac_func" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7357 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -7358,7 +7376,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:7362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -7391,16 +7409,16 @@
 esac
 
 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
-echo "configure:7395: checking whether netdb declares h_errno" >&5
-cat > conftest.$ac_ext <<EOF
-#line 7397 "configure"
+echo "configure:7413: checking whether netdb declares h_errno" >&5
+cat > conftest.$ac_ext <<EOF
+#line 7415 "configure"
 #include "confdefs.h"
 #include <netdb.h>
 int main() {
 return h_errno;
 ; return 0; }
 EOF
-if { (eval echo configure:7404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7422: \"$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
@@ -7420,16 +7438,16 @@
 rm -f conftest*
 
 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
-echo "configure:7424: checking for sigsetjmp" >&5
-cat > conftest.$ac_ext <<EOF
-#line 7426 "configure"
+echo "configure:7442: checking for sigsetjmp" >&5
+cat > conftest.$ac_ext <<EOF
+#line 7444 "configure"
 #include "confdefs.h"
 #include <setjmp.h>
 int main() {
 sigjmp_buf bar; sigsetjmp (bar, 0);
 ; return 0; }
 EOF
-if { (eval echo configure:7433: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7451: \"$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
@@ -7449,11 +7467,11 @@
 rm -f conftest*
 
 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
-echo "configure:7453: checking whether localtime caches TZ" >&5
+echo "configure:7471: checking whether localtime caches TZ" >&5
 
 if test "$ac_cv_func_tzset" = "yes"; then
 cat > conftest.$ac_ext <<EOF
-#line 7457 "configure"
+#line 7475 "configure"
 #include "confdefs.h"
 #include <time.h>
 #if STDC_HEADERS
@@ -7488,7 +7506,7 @@
   exit (0);
 }
 EOF
-if { (eval echo configure:7492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+if { (eval echo configure:7510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
 then
   emacs_cv_localtime_cache=no
 else
@@ -7517,9 +7535,9 @@
 
 if test "$HAVE_TIMEVAL" = "yes"; then
 echo $ac_n "checking whether gettimeofday cannot accept two arguments""... $ac_c" 1>&6
-echo "configure:7521: checking whether gettimeofday cannot accept two arguments" >&5
-cat > conftest.$ac_ext <<EOF
-#line 7523 "configure"
+echo "configure:7539: checking whether gettimeofday cannot accept two arguments" >&5
+cat > conftest.$ac_ext <<EOF
+#line 7541 "configure"
 #include "confdefs.h"
 
 #ifdef TIME_WITH_SYS_TIME
@@ -7541,7 +7559,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:7545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   echo "$ac_t""no" 1>&6
 else
@@ -7563,19 +7581,19 @@
 
 
 echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:7567: checking for inline" >&5
+echo "configure:7585: checking for inline" >&5
 
 ac_cv_c_inline=no
 for ac_kw in inline __inline__ __inline; do
   cat > conftest.$ac_ext <<EOF
-#line 7572 "configure"
+#line 7590 "configure"
 #include "confdefs.h"
 
 int main() {
 } $ac_kw foo() {
 ; return 0; }
 EOF
-if { (eval echo configure:7579: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7597: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_inline=$ac_kw; break
 else
@@ -7625,17 +7643,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:7629: checking for working alloca.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 7632 "configure"
+echo "configure:7647: checking for working alloca.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7650 "configure"
 #include "confdefs.h"
 #include <alloca.h>
 int main() {
 char *p = alloca(2 * sizeof(int));
 ; return 0; }
 EOF
-if { (eval echo configure:7639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   ac_cv_header_alloca_h=yes
 else
@@ -7659,10 +7677,10 @@
 fi
 
 echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:7663: checking for alloca" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 7666 "configure"
+echo "configure:7681: checking for alloca" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7684 "configure"
 #include "confdefs.h"
 
 #ifdef __GNUC__
@@ -7685,7 +7703,7 @@
 char *p = (char *) alloca(1);
 ; return 0; }
 EOF
-if { (eval echo configure:7689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   ac_cv_func_alloca_works=yes
 else
@@ -7724,10 +7742,10 @@
 
 
 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:7728: checking whether alloca needs Cray hooks" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 7731 "configure"
+echo "configure:7746: checking whether alloca needs Cray hooks" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7749 "configure"
 #include "confdefs.h"
 #if defined(CRAY) && ! defined(CRAY2)
 webecray
@@ -7751,10 +7769,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:7755: checking for $ac_func" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 7758 "configure"
+echo "configure:7773: checking for $ac_func" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7776 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -7777,7 +7795,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:7781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -7807,10 +7825,10 @@
 fi
 
 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:7811: checking stack direction for C alloca" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 7814 "configure"
+echo "configure:7829: checking stack direction for C alloca" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7832 "configure"
 #include "confdefs.h"
 find_stack_direction ()
 {
@@ -7829,7 +7847,7 @@
   exit (find_stack_direction() < 0);
 }
 EOF
-if { (eval echo configure:7833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+if { (eval echo configure:7851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
 then
   ac_cv_c_stack_direction=1
 else
@@ -7857,15 +7875,15 @@
 
 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
-echo "configure:7861: checking for vfork.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 7864 "configure"
+echo "configure:7879: checking for vfork.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7882 "configure"
 #include "confdefs.h"
 #include <vfork.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7869: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7887: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -7893,10 +7911,10 @@
 fi
 
 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
-echo "configure:7897: checking for working vfork" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 7900 "configure"
+echo "configure:7915: checking for working vfork" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7918 "configure"
 #include "confdefs.h"
 /* Thanks to Paul Eggert for this test.  */
 #include <stdio.h>
@@ -7991,7 +8009,7 @@
   }
 }
 EOF
-if { (eval echo configure:7995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+if { (eval echo configure:8013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
 then
   ac_cv_func_vfork_works=yes
 else
@@ -8016,10 +8034,10 @@
 
 
 echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
-echo "configure:8020: checking for working strcoll" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8023 "configure"
+echo "configure:8038: checking for working strcoll" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8041 "configure"
 #include "confdefs.h"
 #include <string.h>
 main ()
@@ -8029,7 +8047,7 @@
 	strcoll ("123", "456") >= 0);
 }
 EOF
-if { (eval echo configure:8033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+if { (eval echo configure:8051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
 then
   ac_cv_func_strcoll_works=yes
 else
@@ -8056,10 +8074,10 @@
 for ac_func in getpgrp
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:8060: checking for $ac_func" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8063 "configure"
+echo "configure:8078: checking for $ac_func" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8081 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -8082,7 +8100,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:8086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:8104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -8110,10 +8128,10 @@
 done
 
 echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
-echo "configure:8114: checking whether getpgrp takes no argument" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8117 "configure"
+echo "configure:8132: checking whether getpgrp takes no argument" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8135 "configure"
 #include "confdefs.h"
 
 /*
@@ -8168,7 +8186,7 @@
 }
 
 EOF
-if { (eval echo configure:8172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+if { (eval echo configure:8190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
 then
   ac_cv_func_getpgrp_void=yes
 else
@@ -8194,10 +8212,10 @@
 
 
 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:8198: checking for working mmap" >&5
+echo "configure:8216: checking for working mmap" >&5
 case "$opsys" in ultrix* ) have_mmap=no ;; *)
 cat > conftest.$ac_ext <<EOF
-#line 8201 "configure"
+#line 8219 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 #include <unistd.h>
@@ -8230,7 +8248,7 @@
   return 1;
 }
 EOF
-if { (eval echo configure:8234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+if { (eval echo configure:8252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
 then
   have_mmap=yes
 else
@@ -8263,10 +8281,10 @@
 
 
 echo $ac_n "checking for socket""... $ac_c" 1>&6
-echo "configure:8267: checking for socket" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8270 "configure"
+echo "configure:8285: checking for socket" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8288 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char socket(); below.  */
@@ -8289,7 +8307,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:8293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:8311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_socket=yes"
 else
@@ -8304,15 +8322,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:8308: checking for netinet/in.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8311 "configure"
+echo "configure:8326: checking for netinet/in.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8329 "configure"
 #include "confdefs.h"
 #include <netinet/in.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8316: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8334: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -8329,15 +8347,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:8333: checking for arpa/inet.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8336 "configure"
+echo "configure:8351: checking for arpa/inet.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8354 "configure"
 #include "confdefs.h"
 #include <arpa/inet.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8341: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8359: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -8362,9 +8380,9 @@
 }
 
       echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6
-echo "configure:8366: checking "for sun_len member in struct sockaddr_un"" >&5
+echo "configure:8384: checking "for sun_len member in struct sockaddr_un"" >&5
       cat > conftest.$ac_ext <<EOF
-#line 8368 "configure"
+#line 8386 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -8375,7 +8393,7 @@
 static struct sockaddr_un x; x.sun_len = 1;
 ; return 0; }
 EOF
-if { (eval echo configure:8379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:8397: \"$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
@@ -8406,10 +8424,10 @@
 
 
 echo $ac_n "checking for msgget""... $ac_c" 1>&6
-echo "configure:8410: checking for msgget" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8413 "configure"
+echo "configure:8428: checking for msgget" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8431 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char msgget(); below.  */
@@ -8432,7 +8450,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:8436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:8454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_msgget=yes"
 else
@@ -8447,15 +8465,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:8451: checking for sys/ipc.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8454 "configure"
+echo "configure:8469: checking for sys/ipc.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8472 "configure"
 #include "confdefs.h"
 #include <sys/ipc.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8459: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8477: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -8472,15 +8490,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:8476: checking for sys/msg.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8479 "configure"
+echo "configure:8494: checking for sys/msg.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8497 "configure"
 #include "confdefs.h"
 #include <sys/msg.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8484: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8502: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -8518,15 +8536,15 @@
 
 ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for dirent.h""... $ac_c" 1>&6
-echo "configure:8522: checking for dirent.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8525 "configure"
+echo "configure:8540: checking for dirent.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8543 "configure"
 #include "confdefs.h"
 #include <dirent.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8530: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8548: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -8553,15 +8571,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:8557: checking for sys/dir.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8560 "configure"
+echo "configure:8575: checking for sys/dir.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8578 "configure"
 #include "confdefs.h"
 #include <sys/dir.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8565: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8583: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -8594,15 +8612,15 @@
 
 ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
-echo "configure:8598: checking for nlist.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8601 "configure"
+echo "configure:8616: checking for nlist.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8619 "configure"
 #include "confdefs.h"
 #include <nlist.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8606: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8624: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -8643,7 +8661,7 @@
 
 
 echo "checking "for sound support"" 1>&6
-echo "configure:8647: checking "for sound support"" >&5
+echo "configure:8665: checking "for sound support"" >&5
 case "$with_sound" in
   native | both ) with_native_sound=yes;;
   nas    | no   ) with_native_sound=no;;
@@ -8654,15 +8672,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:8658: checking for multimedia/audio_device.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8661 "configure"
+echo "configure:8676: checking for multimedia/audio_device.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8679 "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:8666: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8684: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -8710,12 +8728,12 @@
       if test -z "$native_sound_lib"; then
         
 echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6
-echo "configure:8714: checking for ALopenport in -laudio" >&5
+echo "configure:8732: 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 8719 "configure"
+#line 8737 "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
@@ -8726,7 +8744,7 @@
 ALopenport()
 ; return 0; }
 EOF
-if { (eval echo configure:8730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:8748: \"$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
@@ -8757,12 +8775,12 @@
       if test -z "$native_sound_lib"; then
 	
 echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6
-echo "configure:8761: checking for AOpenAudio in -lAlib" >&5
+echo "configure:8779: 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 8766 "configure"
+#line 8784 "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
@@ -8773,7 +8791,7 @@
 AOpenAudio()
 ; return 0; }
 EOF
-if { (eval echo configure:8777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:8795: \"$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
@@ -8811,15 +8829,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:8815: checking for ${dir}/soundcard.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8818 "configure"
+echo "configure:8833: checking for ${dir}/soundcard.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8836 "configure"
 #include "confdefs.h"
 #include <${dir}/soundcard.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8823: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8841: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -8889,7 +8907,7 @@
  fi
   LIBS="-laudio $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-laudio\" to \$LIBS"; fi
       cat > conftest.$ac_ext <<EOF
-#line 8893 "configure"
+#line 8911 "configure"
 #include "confdefs.h"
 #include <audio/Xtutil.h>
 EOF
@@ -8916,7 +8934,7 @@
 
 if test "$with_tty" = "yes"  ; then
   echo "checking for TTY-related features" 1>&6
-echo "configure:8920: checking for TTY-related features" >&5
+echo "configure:8938: checking for TTY-related features" >&5
   { test "$extra_verbose" = "yes" && cat << \EOF
     Defining HAVE_TTY
 EOF
@@ -8931,15 +8949,15 @@
 
       ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for termios.h""... $ac_c" 1>&6
-echo "configure:8935: checking for termios.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8938 "configure"
+echo "configure:8953: checking for termios.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8956 "configure"
 #include "confdefs.h"
 #include <termios.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8943: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8961: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -8966,15 +8984,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:8970: checking for termio.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8973 "configure"
+echo "configure:8988: checking for termio.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8991 "configure"
 #include "confdefs.h"
 #include <termio.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8978: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8996: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -9007,12 +9025,12 @@
     if test -z "$with_ncurses"; then
     
 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
-echo "configure:9011: checking for tgetent in -lncurses" >&5
+echo "configure:9029: 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 9016 "configure"
+#line 9034 "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
@@ -9023,7 +9041,7 @@
 tgetent()
 ; return 0; }
 EOF
-if { (eval echo configure:9027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:9045: \"$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
@@ -9056,15 +9074,15 @@
 
     ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
-echo "configure:9060: checking for ncurses/curses.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 9063 "configure"
+echo "configure:9078: checking for ncurses/curses.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 9081 "configure"
 #include "confdefs.h"
 #include <ncurses/curses.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9068: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:9086: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -9086,15 +9104,15 @@
 
     ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6
-echo "configure:9090: checking for ncurses/term.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 9093 "configure"
+echo "configure:9108: checking for ncurses/term.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 9111 "configure"
 #include "confdefs.h"
 #include <ncurses/term.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9098: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:9116: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -9124,15 +9142,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:9128: checking for ncurses/curses.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 9131 "configure"
+echo "configure:9146: checking for ncurses/curses.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 9149 "configure"
 #include "confdefs.h"
 #include <ncurses/curses.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9136: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:9154: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -9167,12 +9185,12 @@
 	for lib in curses termlib termcap; do
 	  
 echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6
-echo "configure:9171: checking for tgetent in -l$lib" >&5
+echo "configure:9189: 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 9176 "configure"
+#line 9194 "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
@@ -9183,7 +9201,7 @@
 tgetent()
 ; return 0; }
 EOF
-if { (eval echo configure:9187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:9205: \"$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
@@ -9214,12 +9232,12 @@
       else
 	
 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
-echo "configure:9218: checking for tgetent in -lcurses" >&5
+echo "configure:9236: 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 9223 "configure"
+#line 9241 "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
@@ -9230,7 +9248,7 @@
 tgetent()
 ; return 0; }
 EOF
-if { (eval echo configure:9234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:9252: \"$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
@@ -9248,12 +9266,12 @@
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
-echo "configure:9252: checking for tgetent in -ltermcap" >&5
+echo "configure:9270: 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 9257 "configure"
+#line 9275 "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
@@ -9264,7 +9282,7 @@
 tgetent()
 ; return 0; }
 EOF
-if { (eval echo configure:9268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:9286: \"$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
@@ -9312,15 +9330,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:9316: checking for gpm.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 9319 "configure"
+echo "configure:9334: checking for gpm.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 9337 "configure"
 #include "confdefs.h"
 #include <gpm.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9324: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:9342: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -9343,12 +9361,12 @@
  }
   test -z "$with_gpm" && { 
 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
-echo "configure:9347: checking for Gpm_Open in -lgpm" >&5
+echo "configure:9365: 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 9352 "configure"
+#line 9370 "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
@@ -9359,7 +9377,7 @@
 Gpm_Open()
 ; return 0; }
 EOF
-if { (eval echo configure:9363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:9381: \"$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
@@ -9408,17 +9426,17 @@
 
 
 echo "checking for database support" 1>&6
-echo "configure:9412: checking for database support" >&5
+echo "configure:9430: 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:9417: checking for dbm_open in -lgdbm" >&5
+echo "configure:9435: 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 9422 "configure"
+#line 9440 "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
@@ -9429,7 +9447,7 @@
 dbm_open()
 ; return 0; }
 EOF
-if { (eval echo configure:9433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:9451: \"$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
@@ -9451,10 +9469,10 @@
 
   if test "$with_database_gnudbm" != "yes"; then
     echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
-echo "configure:9455: checking for dbm_open" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 9458 "configure"
+echo "configure:9473: checking for dbm_open" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 9476 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char dbm_open(); below.  */
@@ -9477,7 +9495,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:9481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:9499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_dbm_open=yes"
 else
@@ -9513,10 +9531,10 @@
 
 if test "$with_database_dbm" != "no"; then
   echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
-echo "configure:9517: checking for dbm_open" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 9520 "configure"
+echo "configure:9535: checking for dbm_open" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 9538 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char dbm_open(); below.  */
@@ -9539,7 +9557,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:9543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:9561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_dbm_open=yes"
 else
@@ -9560,12 +9578,12 @@
   if test "$need_libdbm" != "no"; then
     
 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
-echo "configure:9564: checking for dbm_open in -ldbm" >&5
+echo "configure:9582: 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 9569 "configure"
+#line 9587 "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
@@ -9576,7 +9594,7 @@
 dbm_open()
 ; return 0; }
 EOF
-if { (eval echo configure:9580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:9598: \"$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
@@ -9613,10 +9631,10 @@
 
 if test "$with_database_berkdb" != "no"; then
   echo $ac_n "checking for dbopen""... $ac_c" 1>&6
-echo "configure:9617: checking for dbopen" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 9620 "configure"
+echo "configure:9635: checking for dbopen" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 9638 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char dbopen(); below.  */
@@ -9639,7 +9657,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:9643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:9661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_dbopen=yes"
 else
@@ -9660,12 +9678,12 @@
   if test "$need_libdb" != "no"; then
     
 echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
-echo "configure:9664: checking for dbopen in -ldb" >&5
+echo "configure:9682: 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 9669 "configure"
+#line 9687 "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
@@ -9676,7 +9694,7 @@
 dbopen()
 ; return 0; }
 EOF
-if { (eval echo configure:9680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:9698: \"$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
@@ -9700,7 +9718,7 @@
   if test "$with_database_berkdb" = "yes"; then
     for path in "db/db.h" "db.h"; do
 cat > conftest.$ac_ext <<EOF
-#line 9704 "configure"
+#line 9722 "configure"
 #include "confdefs.h"
 #ifdef HAVE_INTTYPES_H
 #define __BIT_TYPES_DEFINED__
@@ -9718,7 +9736,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:9722: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9740: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   db_h_path="$path"; break
 else
@@ -9770,12 +9788,12 @@
 if test "$with_socks" = "yes"; then
   
 echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6
-echo "configure:9774: checking for SOCKSinit in -lsocks" >&5
+echo "configure:9792: 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 9779 "configure"
+#line 9797 "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
@@ -9786,7 +9804,7 @@
 SOCKSinit()
 ; return 0; }
 EOF
-if { (eval echo configure:9790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:9808: \"$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
@@ -9990,11 +10008,26 @@
 
 
 
-
-
-
-
-
+RECURSIVE_MAKE="\$(MAKE) \$(MFLAGS) CC='\$(CC)' CFLAGS='\$(CFLAGS)' LDFLAGS='\$(LDFLAGS)' CPPFLAGS='\$(CPPFLAGS)'"
+
+
+
+
+
+
+
+
+if test -n "$package_path"; then
+  package_path=`echo $package_path | sed 'y/ /:/'`
+  { test "$extra_verbose" = "yes" && cat << EOF
+    Defining PACKAGE_PATH = "$package_path"
+EOF
+cat >> confdefs.h <<EOF
+#define PACKAGE_PATH "$package_path"
+EOF
+}
+
+fi
 
 { test "$extra_verbose" = "yes" && cat << EOF
     Defining EMACS_CONFIGURATION = "$canonical"
@@ -10005,6 +10038,14 @@
 }
 
 { test "$extra_verbose" = "yes" && cat << EOF
+    Defining EMACS_CONFIG_OPTIONS = "${ac_configure_args}"
+EOF
+cat >> confdefs.h <<EOF
+#define EMACS_CONFIG_OPTIONS "${ac_configure_args}"
+EOF
+}
+
+{ test "$extra_verbose" = "yes" && cat << EOF
     Defining config_machfile = "$machfile"
 EOF
 cat >> confdefs.h <<EOF
@@ -10179,6 +10220,13 @@
 EOF
 }
 
+test "$with_clash_detection" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining CLASH_DETECTION
+EOF
+cat >> confdefs.h <<\EOF
+#define CLASH_DETECTION 1
+EOF
+}
 
 test "$use_union_type" != yes && { test "$extra_verbose" = "yes" && cat << \EOF
     Defining NO_UNION_TYPE
@@ -10415,7 +10463,6 @@
 s%@LN_S@%$LN_S%g
 s%@CC@%$CC%g
 s%@CPP@%$CPP%g
-s%@ld_switch_call_shared@%$ld_switch_call_shared%g
 s%@ld_switch_shared@%$ld_switch_shared%g
 s%@start_files@%$start_files%g
 s%@start_flags@%$start_flags%g
@@ -10468,6 +10515,7 @@
 s%@ld_libs_window_system@%$ld_libs_window_system%g
 s%@ld_libs_all@%$ld_libs_all%g
 s%@libsrc_libs@%$libsrc_libs%g
+s%@RECURSIVE_MAKE@%$RECURSIVE_MAKE%g
 s%@native_sound_lib@%$native_sound_lib%g
 s%@sound_cflags@%$sound_cflags%g
 s%@dynodump_arch@%$dynodump_arch%g
--- a/configure.in	Mon Aug 13 09:47:55 2007 +0200
+++ b/configure.in	Mon Aug 13 09:49:09 2007 +0200
@@ -199,7 +199,7 @@
 dnl # $ld_switch_x_machine $ld_switch_x_system
 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
-xe_libs='$xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
+xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
 ac_cpp='$CPP '"$xe_cppflags"
 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&AC_FD_CC'
 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&AC_FD_CC'
@@ -538,6 +538,8 @@
 --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.
 --use-system-malloc	Force use of the system malloc, rather than GNU
 			malloc.
 
@@ -679,6 +681,7 @@
 	debug		| \
 	use_assertions	| \
 	memory_usage_stats | \
+	with_clash_detection | \
 	no_doc_file )
 	  dnl Make sure the value given was either "yes" or "no".
 	  case "$val" in
@@ -697,6 +700,7 @@
 	puresize	| \
 	cache_file	| \
 	native_sound_lib | \
+	package_path	| \
 	x_includes	| \
 	x_libraries	| \
 	site_includes	| \
@@ -1039,6 +1043,9 @@
 dnl Find out which version of XEmacs this is
 dnl ----------------------------------------
 . "$srcdir/version.sh" || exit 1;
+dnl Must do the following first to determine verbosity for AC_DEFINE
+if test -n "$emacs_beta_version"; then beta=yes; else beta=no; fi
+: "${extra_verbose=$beta}"
 version="${emacs_major_version}.${emacs_minor_version}"
 AC_DEFINE_UNQUOTED(EMACS_MAJOR_VERSION, $emacs_major_version)
 AC_DEFINE_UNQUOTED(EMACS_MINOR_VERSION, $emacs_minor_version)
@@ -1048,8 +1055,6 @@
 fi
 AC_DEFINE_UNQUOTED(XEMACS_CODENAME, "$xemacs_codename")
 AC_DEFINE_UNQUOTED(EMACS_VERSION, "$version")
-canonical_version=`echo ${version}_${canonical} | sed 'y/.-/__/'`
-AC_DEFINE_UNQUOTED(CANONICAL_VERSION, $canonical_version)
 
 dnl ----------------------------------
 dnl Error checking and debugging flags
@@ -1062,7 +1067,6 @@
 test "${error_check_bufpos=$beta}"    = yes && AC_DEFINE(ERROR_CHECK_BUFPOS)
 test "${error_check_gc=$beta}"        = yes && AC_DEFINE(ERROR_CHECK_GC)
 test "${error_check_malloc=$beta}"    = yes && AC_DEFINE(ERROR_CHECK_MALLOC)
-: "${extra_verbose=$beta}"
 dnl debug=yes must be set when error checking is present.  This should be
 dnl fixed up.
 dnl debug implies other options
@@ -1570,16 +1574,31 @@
   exit 1
 fi
 
-if test "$dynamic" = "yes" ; then
+if test -z "$dynamic"; then
+  case "$opsys" in
+    hpux* | sunos4* | sco5 ) dynamic=no ;;
+    *) dynamic=yes ;;
+  esac
+fi
+if test "$dynamic" = "yes"; then
   case "$opsys" in
     hpux* | sunos4* | sco5 ) opsys="${opsys}-shr" ;;
+    decosf* ) ld_call_shared="-call_shared" ;;
   esac
-elif test "$dynamic" = "no" ; then
+else dnl "$dynamic" = "no"
   case "$opsys" in
-    sol2 | decosf1-3 | decosf3-* | decosf4-* | linux ) opsys="${opsys}-static" ;;
+    sol2 ) 
+      echo "Static linking is not supported on Solaris 2."
+      echo "Rerun configure without specifying --dynamic=no."
+      exit 1 ;;
+    linux   ) ld_call_shared="-Bstatic" ;;
+    decosf* ) ld_call_shared="-non_shared" ;;
   esac
 fi
 
+canonical_version=`echo ${version}_${canonical} | sed 'y/.-/__/'`
+AC_DEFINE_UNQUOTED(CANONICAL_VERSION, $canonical_version)
+
 machfile="m/${machine}.h"
 opsysfile="s/${opsys}.h"
 
@@ -1703,7 +1722,6 @@
 
 CPP_to_sh(UNEXEC, unexec, unexec.o)
 
-CPP_to_sh(LD_SWITCH_CALL_SHARED, ld_switch_call_shared)
 CPP_to_sh(LD_SWITCH_SHARED, ld_switch_shared, -c)
 
 #ifdef ORDINARY_LINK
@@ -1792,11 +1810,10 @@
   PRINT_VAR(libs_machine libs_system libs_termcap libs_standard
   objects_machine objects_system c_switch_machine c_switch_system
   c_switch_x_system ld_switch_machine ld_switch_system
-  ld_switch_x_system unexec ld_switch_call_shared ld_switch_shared
+  ld_switch_x_system unexec ld_switch_shared
   ld lib_gcc ld_text_start_addr start_files ordinary_link
   have_terminfo mail_use_flock mail_use_lockf) && echo ""
 
-
 dnl Non-ordinary link usually requires -lc
 test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc"
 
@@ -1806,7 +1823,7 @@
   dnl Following values of CFLAGS are known to work well.
   dnl Should we take debugging options into consideration?
   if   test "$GCC" = "yes"; then
-    CFLAGS="-g -O2"
+    CFLAGS="-g -O2 -Wall"
     test "$opsys" = "linux" -a "$machine" = "intel386" && \
       CFLAGS="$CFLAGS -fno-strength-reduce -malign-loops=2 -malign-jumps=2 -malign-functions=2"
   elif test "$__sunpro_c" = "yes"; then
@@ -1833,6 +1850,7 @@
   XE_GCC_WRAP_LDFLAGS(ld_switch_system)
   XE_GCC_WRAP_LDFLAGS(ld_switch_machine)
   XE_GCC_WRAP_LDFLAGS(LDFLAGS)
+  XE_GCC_WRAP_LDFLAGS(ld_call_shared)
 fi
 
 dnl Add s&m-determined objects (including unexec) to link line
@@ -1858,7 +1876,6 @@
 fi
 
 dnl Feed s&m crud to src/Makefile
-AC_SUBST(ld_switch_call_shared)
 AC_SUBST(ld_switch_shared)
 AC_SUBST(start_files)
 test -n "$ld_text_start_addr" && start_flags="-T $ld_text_start_addr -e __start"
@@ -3284,13 +3301,23 @@
 AC_SUBST(CFLAGS)
 AC_SUBST(CPPFLAGS)
 AC_SUBST(LDFLAGS)
+RECURSIVE_MAKE="\$(MAKE) \$(MFLAGS) CC='\$(CC)' CFLAGS='\$(CFLAGS)' LDFLAGS='\$(LDFLAGS)' CPPFLAGS='\$(CPPFLAGS)'"
+AC_SUBST(RECURSIVE_MAKE)
 
 AC_SUBST(native_sound_lib)
 AC_SUBST(sound_cflags)
 AC_SUBST(RANLIB)
 AC_SUBST(dynodump_arch)
 
+
+dnl change blanks to colons in package path, and make available to config.h
+if test -n "$package_path"; then
+  package_path=`echo $package_path | sed 'y/ /:/'`
+  AC_DEFINE_UNQUOTED(PACKAGE_PATH, "$package_path")
+fi
+
 AC_DEFINE_UNQUOTED(EMACS_CONFIGURATION, "$canonical")
+AC_DEFINE_UNQUOTED(EMACS_CONFIG_OPTIONS, "${ac_configure_args}")
 AC_DEFINE_UNQUOTED(config_machfile,  "$machfile")
 AC_DEFINE_UNQUOTED(config_opsysfile, "$opsysfile")
 
@@ -3325,7 +3352,7 @@
 test "$with_pop"           = "yes" && AC_DEFINE(MAIL_USE_POP)
 test "$with_kerberos"      = "yes" && AC_DEFINE(KERBEROS)
 test "$with_hesiod"        = "yes" && AC_DEFINE(HESIOD)
-
+test "$with_clash_detection" = "yes" && AC_DEFINE(CLASH_DETECTION)
 test "$use_union_type" != yes && AC_DEFINE(NO_UNION_TYPE)
 
 dnl -------------------------------
--- a/dynodump/Makefile.in.in	Mon Aug 13 09:47:55 2007 +0200
+++ b/dynodump/Makefile.in.in	Mon Aug 13 09:49:09 2007 +0200
@@ -21,6 +21,11 @@
 
 ## Synched up with: Not synched with FSF.
 
+## For performance and consistency, no built-in rules.
+.SUFFIXES:
+.SUFFIXES: .c .o .i .h
+
+@SET_MAKE@
 SHELL = /bin/sh
 RM = rm -f
 
--- a/dynodump/dynodump.c	Mon Aug 13 09:47:55 2007 +0200
+++ b/dynodump/dynodump.c	Mon Aug 13 09:49:09 2007 +0200
@@ -73,7 +73,9 @@
  * N.B. The above commentary is not quite correct in the flags have been hardwired
  *      to RTLD_SAVREL.
  */
-#pragma ident	"@(#) $Id: dynodump.c,v 1.3 1997/05/29 04:22:30 steve Exp $ - SMI"
+#pragma ident	"@(#) $Id: dynodump.c,v 1.4 1997/07/13 22:40:53 steve Exp $ - SMI"
+
+#define __EXTENSIONS__ 1
 
 #include	<sys/param.h>
 #include	<sys/procfs.h>
--- a/etc/NEWS	Mon Aug 13 09:47:55 2007 +0200
+++ b/etc/NEWS	Mon Aug 13 09:49:09 2007 +0200
@@ -138,20 +138,29 @@
 creating a new frame with `C-x 5 2' also raises and selects that
 frame.  The behavior of window system frames is unchanged.
 
-** Zmacs region is selectively deactivated when an error is signaled.
-
-The behavior of the zmacs region can now be controlled in the event of a
-signaled error.  The new variable `errors-deactivate-region' may be set
-to nil to avoid losing the zmacs region.  When this is in effect, to
-deactivate the region, you have to press C-g explicitly, in the buffer
-where the region is active.  This can be a win under many circumstances,
-but can lead to potentially confusing situations when isearch is in effect.
-
-To control just keeping the region when moving against the endpoints of a
-buffer, the existing variable `signal-error-on-buffer-boundary' can be set
-to nil.
-
-NOTE:  This feature is enabled by default in 20.3beta.
+** Zmacs region is not deactivated when an error is signaled.
+
+The behavior of the zmacs region can now be controlled in the event of
+a signaled error.  The new variable `errors-deactivate-region' may be
+set to nil to revert to the old behaviour.  As before, typing C-g
+deactivate the region.
+
+** Pending-delete changes.
+
+*** Pending-delete is now a minor mode, with the normal minor-mode
+semantics and toggle functions.  Old functions are left for
+compatibility.
+
+*** Loading pending-del no longer turns on pending-delete mode.  In
+fact, it is no longer necessary to explicitly load pending-del.  All
+you need to do to turn on tpu-edt is run the tpu-edt function.  Here's
+how to run pending-delete instead of loading the file:
+
+  Within XEmacs:   Type      M-x pending-delete <ret>
+                    not      M-x load-library <ret> pending-delete <ret>
+  
+  In .emacs:       Use       (turn-on-pending-delete)
+                   not       (load "pending-del")
 
 ** Abbreviations can now contain non-word characters.
 
@@ -253,6 +262,9 @@
 was set up as the terminal's erase character at the tim Emacs was
 started.
 
+** `insert-file-contents' can now read from a special file,
+as long as the arguments VISIT and REPLACE are nil.
+
 ** `string-to-number' now accepts an optional BASE argument which
 specifies which base to use.  The default base is 10.
 
--- a/etc/w3/stylesheet	Mon Aug 13 09:47:55 2007 +0200
+++ b/etc/w3/stylesheet	Mon Aug 13 09:49:09 2007 +0200
@@ -129,8 +129,8 @@
        dt { font-weight: bold; display: list-item }
        dd { display: list-item; margin-left: 5em; }
        li { display: list-item; margin-left: 5em; }
-    ol li { list-style: decimal; }
-    ul li { list-style: circle; }
+       ol { list-style: decimal; }
+       ul { list-style: circle; }
 
 /* These are to make nested list items look better */
 ul ul,ol ul,ol ol,ul ol { display: line; }
--- a/info/dir	Mon Aug 13 09:47:55 2007 +0200
+++ b/info/dir	Mon Aug 13 09:49:09 2007 +0200
@@ -67,6 +67,7 @@
 * MH-E::	Emacs interface to MH, a mail-handling package.
 * OO-Browser::	The Multi-Language Object-Oriented Browser.
 * PCL-CVS::	An XEmacs-based front end to CVS.
+* PH::		Client interface to the CCSO white pages directory system
 * PSGML::	A powerful mode for HTML and other SGML documents.
 * PSGML-API::	PSGML, the API documentation.
 * Rmail::	An older mail reader for Emacs.
--- a/lib-src/Makefile.in.in	Mon Aug 13 09:47:55 2007 +0200
+++ b/lib-src/Makefile.in.in	Mon Aug 13 09:49:09 2007 +0200
@@ -23,21 +23,21 @@
 ## above a certain point in this file are in shell format instead of
 ## in C format.  How the hell is this supposed to work? */
 
-SHELL = /bin/sh
-RM = rm -f
-
 ## For performance and consistency, no built-in rules
 .SUFFIXES:
 .SUFFIXES: .c .o .i .h
 ## ==================== Things "configure" will edit ====================
 
+@SET_MAKE@
+SHELL = /bin/sh
+RM = rm -f
+
 CC=@CC@
 CPP=@CPP@
 CFLAGS=@CFLAGS@
 CPPFLAGS=@CPPFLAGS@
 LDFLAGS=@LDFLAGS@
 ALLOCA=@ALLOCA@
-YACC=@YACC@
 LN_S=@LN_S@
 version=@version@
 
@@ -276,52 +276,56 @@
 	$(CC) -c `echo ${cflags} | sed 's/-Demacs/ /'` \
 		-DINHIBIT_STRING_HEADER ${srcdir}/../src/regex.c
 
-etags: ${srcdir}/etags.c $(GETOPTDEPS) $(REGEXDEPS) ../src/config.h
-	$(CC) ${cflags} -DVERSION="\"${version}\"" ${srcdir}/etags.c $(GETOPTOBJS) $(REGEXOBJ) $(ldflags) -o etags
+etags_args = -I. ${cflags} -I${srcdir} -I${srcdir}/../src \
+	-DVERSION='"${version}"' ${srcdir}/etags.c \
+	$(GETOPTOBJS) $(REGEXOBJ) $(ldflags)
+etags_deps   = ${srcdir}/etags.c $(GETOPTDEPS) $(REGEXDEPS) ../src/config.h
 
-## We depend on etags to assure that parallel makes do not write two
-## etags.o files on top of each other.
-ctags: ${srcdir}/etags.c $(GETOPTDEPS) $(REGEXDEPS) etags
-	$(CC) ${cflags} -DCTAGS -DVERSION="\"${version}\"" ${srcdir}/etags.c $(GETOPTOBJS) $(REGEXOBJ) $(ldflags) -o ctags
+etags: ${etags_deps}
+	$(CC) ${etags_args} -o $@
+## ctags depends on etags to assure that parallel makes do not write
+## two etags.o files on top of each other.
+ctags: ${etags_deps} etags
+	$(CC) -DCTAGS ${etags_args} -o $@
 
 wakeup: ${srcdir}/wakeup.c
-	$(CC) ${cflags} ${srcdir}/wakeup.c $(ldflags) -o wakeup
+	$(CC) ${cflags} ${srcdir}/wakeup.c $(ldflags) -o $@
 
 profile: ${srcdir}/profile.c
-	$(CC) ${cflags} ${srcdir}/profile.c $(ldflags) -o profile
+	$(CC) ${cflags} ${srcdir}/profile.c $(ldflags) -o $@
 
 make-docfile: ${srcdir}/make-docfile.c
-	$(CC) ${cflags} ${srcdir}/make-docfile.c $(ldflags) -o make-docfile
+	$(CC) ${cflags} ${srcdir}/make-docfile.c $(ldflags) -o $@
 
 digest-doc: ${srcdir}/digest-doc.c
-	$(CC) ${cflags} ${srcdir}/digest-doc.c $(ldflags) -o digest-doc
+	$(CC) ${cflags} ${srcdir}/digest-doc.c $(ldflags) -o $@
 
 sorted-doc: ${srcdir}/sorted-doc.c ${ALLOCA}
-	$(CC) ${cflags} ${srcdir}/sorted-doc.c ${ALLOCA} $(ldflags) -o sorted-doc
+	$(CC) ${cflags} ${srcdir}/sorted-doc.c ${ALLOCA} $(ldflags) -o $@
 
 b2m: ${srcdir}/b2m.c ../src/config.h
-	$(CC) ${cflags} ${srcdir}/b2m.c $(ldflags) -o b2m
+	$(CC) ${cflags} ${srcdir}/b2m.c $(ldflags) -o $@
 
 movemail: ${srcdir}/movemail.c ${srcdir}/pop.c ${srcdir}/pop.h ../src/config.h
-	$(CC) ${cflags} ${MOVE_FLAGS} ${srcdir}/movemail.c ${srcdir}/pop.c $(ldflags) ${MOVE_LIBS} -o movemail
+	$(CC) ${cflags} ${MOVE_FLAGS} ${srcdir}/movemail.c ${srcdir}/pop.c $(ldflags) ${MOVE_LIBS} -o $@
 
 cvtmail: ${srcdir}/cvtmail.c
-	$(CC) ${cflags} ${srcdir}/cvtmail.c $(ldflags) -o cvtmail
+	$(CC) ${cflags} ${srcdir}/cvtmail.c $(ldflags) -o $@
 
 fakemail: ${srcdir}/fakemail.c ../src/config.h
-	$(CC) ${cflags} ${srcdir}/fakemail.c $(ldflags) -o fakemail
+	$(CC) ${cflags} ${srcdir}/fakemail.c $(ldflags) -o $@
 
 yow: ${srcdir}/yow.c ../src/paths.h
-	$(CC) ${cflags} ${srcdir}/yow.c $(ldflags) -o yow
+	$(CC) ${cflags} ${srcdir}/yow.c $(ldflags) -o $@
 
 hexl: ${srcdir}/hexl.c
-	$(CC) ${cflags} ${srcdir}/hexl.c $(ldflags) -o hexl
+	$(CC) ${cflags} ${srcdir}/hexl.c $(ldflags) -o $@
 
 make-msgfile: ${srcdir}/make-msgfile.c
-	$(CC) $(cflags) ${srcdir}/make-msgfile.c $(ldflags) -o make-msgfile
+	$(CC) $(cflags) ${srcdir}/make-msgfile.c $(ldflags) -o $@
 
 make-po: ${srcdir}/make-po.c
-	$(CC) $(cflags) ${srcdir}/make-po.c $(ldflags) -o make-po
+	$(CC) $(cflags) ${srcdir}/make-po.c $(ldflags) -o $@
 
 ## Why oh why does HP not include half of the standard X distribution?
 
@@ -329,26 +333,26 @@
 gnuslib.o: ${srcdir}/gnuslib.c ${srcdir}/gnuserv.h ../src/config.h
 	$(CC) -c ${cflags} ${srcdir}/gnuslib.c
 gnuclient: ${srcdir}/gnuclient.c gnuslib.o ${srcdir}/gnuserv.h
-	$(CC) ${cflags} -o $@ ${srcdir}/$@.c gnuslib.o ${ldflags_gnuserv}
+	$(CC) ${cflags} ${srcdir}/$@.c gnuslib.o ${ldflags_gnuserv} -o $@
 gnuserv: ${srcdir}/gnuserv.c gnuslib.o ${srcdir}/gnuserv.h
-	$(CC) ${cflags} -o $@ ${srcdir}/$@.c gnuslib.o ${ldflags_gnuserv}
+	$(CC) ${cflags} ${srcdir}/$@.c gnuslib.o ${ldflags_gnuserv} -o $@
 
 ## mmencode binary is used by tm - but is really part of the metamail package
 ## mmencode.c was merged copy of mmencode.c and codes.c of metamail
 mmencode : ${srcdir}/mmencode.c
-	$(CC) ${cflags} ${srcdir}/mmencode.c -o mmencode
+	$(CC) ${cflags} ${srcdir}/mmencode.c -o $@
 
 
 ## The timer utility (timer.c, getdate.y) is not used in XEmacs
 ## because XEmacs provides built-in timer facilities.
 
 make-path: ${srcdir}/make-path.c ../src/config.h
-	$(CC) $(cflags) ${srcdir}/make-path.c -o make-path
+	$(CC) $(cflags) ${srcdir}/make-path.c -o $@
 
 ## These are NOT included in INSTALLABLES or UTILITIES.
 ## See ../src/Makefile.in.in.
 aixcc: ${srcdir}/aixcc.c
-	$(CC) $(cflags) -o aixcc ${srcdir}/aixcc.c
+	$(CC) $(cflags) ${srcdir}/aixcc.c -o $@
 
 aixcc.c: ${srcdir}/aixcc.lex
 	lex ${srcdir}/aixcc.lex
--- a/lib-src/b2m.c	Mon Aug 13 09:47:55 2007 +0200
+++ b/lib-src/b2m.c	Mon Aug 13 09:49:09 2007 +0200
@@ -70,12 +70,12 @@
   char *buffer;
 };
 
-extern char *strtok();
 
-long *xmalloc (), *xrealloc ();
-char *concat ();
-long readline ();
-void fatal (char *);
+static long *xmalloc (unsigned int);
+static long *xrealloc (void *, unsigned int);
+static char *concat (char *s1, char *s2, char *s3);
+static long readline (struct linebuffer *, FILE *);
+static void fatal (char *);
 
 /*
  * xnew -- allocate storage.  SYNOPSIS: Type *xnew (int n, Type);
@@ -87,11 +87,11 @@
 char *progname;
 
 int
-main (int argc, char **argv)
+main (int argc, char *argv[])
 {
   logical labels_saved, printing, header;
   time_t ltoday;
-  char *labels, *p, *today;
+  char *labels = NULL, *p, *today;
   struct linebuffer data;
 
 #ifdef MSDOS
@@ -143,7 +143,7 @@
 	      p = strtok (data.buffer, " ,\r\n\t");
 	      labels = "X-Babyl-Labels: ";
 
-	      while (p = strtok (NULL, " ,\r\n\t"))
+	      while ((p = strtok (NULL, " ,\r\n\t")))
 		labels = concat (labels, p, ", ");
 
 	      p = &labels[strlen (labels) - 2];
@@ -174,7 +174,7 @@
  * Return a newly-allocated string whose contents
  * concatenate those of s1, s2, s3.
  */
-char *
+static char *
 concat (char *s1, char *s2, char *s3)
 {
   int len1 = strlen (s1), len2 = strlen (s2), len3 = strlen (s3);
@@ -193,8 +193,8 @@
  * Return the number of characters read from `stream',
  * which is the length of the line including the newline, if any.
  */
-long
-readline (struct linebuffer *linebuffer, register FILE *stream)
+static long
+readline (struct linebuffer *linebuffer, FILE *stream)
 {
   char *buffer = linebuffer->buffer;
   register char *p = linebuffer->buffer;
@@ -242,7 +242,7 @@
 /*
  * Like malloc but get fatal error if memory is exhausted.
  */
-long *
+static long *
 xmalloc (unsigned int size)
 {
   long *result = (long *) malloc (size);
@@ -251,8 +251,8 @@
   return result;
 }
 
-long *
-xrealloc (char *ptr, unsigned int size)
+static long *
+xrealloc (void *ptr, unsigned int size)
 {
   long *result = (long *) realloc (ptr, size);
   if (result == NULL)
@@ -260,7 +260,7 @@
   return result;
 }
 
-void
+static void
 fatal (char *message)
 {
   fprintf (stderr, "%s: %s\n", progname, message);
--- a/lib-src/etags.c	Mon Aug 13 09:47:55 2007 +0200
+++ b/lib-src/etags.c	Mon Aug 13 09:49:09 2007 +0200
@@ -31,7 +31,7 @@
  *	Francesco Potorti` (F.Potorti@cnuce.cnr.it) is the current maintainer.
  */
 
-char pot_etags_version[] = "@(#) pot revision number is 12.11";
+char pot_etags_version[] = "@(#) pot revision number is 12.19";
 
 #define	TRUE	1
 #define	FALSE	0
@@ -41,9 +41,13 @@
 #endif
 
 #ifdef MSDOS
-# include <string.h>
 # include <fcntl.h>
 # include <sys/param.h>
+# include <io.h>
+# ifndef HAVE_CONFIG_H
+#   define DOS_NT
+#   include <sys/config.h>
+# endif
 #endif /* MSDOS */
 
 #ifdef WINDOWSNT
@@ -52,27 +56,41 @@
 # include <string.h>
 # include <io.h>
 # define MAXPATHLEN _MAX_PATH
-#endif
+# ifdef HAVE_CONFIG_H
+#   undef HAVE_NTGUI
+# else
+#   define DOS_NT
+#   define HAVE_GETCWD
+# endif /* not HAVE_CONFIG_H */
+#endif /* WINDOWSNT */
 
 #ifdef HAVE_CONFIG_H
 # include <config.h>
   /* On some systems, Emacs defines static as nothing for the sake
      of unexec.  We don't want that here since we don't use unexec. */
 # undef static
-# define ETAGS_REGEXPS
-# define LONG_OPTIONS
-#endif
-
-#if !defined (MSDOS) && !defined (WINDOWSNT) && defined (STDC_HEADERS)
+# define ETAGS_REGEXPS		/* use the regexp features */
+# define LONG_OPTIONS		/* accept long options */
+#endif /* HAVE_CONFIG_H */
+
+#if !defined (WINDOWSNT) && defined (STDC_HEADERS)
 #include <stdlib.h>
 #include <string.h>
 #endif
 
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#else
+# ifdef HAVE_GETCWD
+    extern char *getcwd ();
+# endif
+#endif /* HAVE_UNISTD_H */
+
 #include <stdio.h>
 #include <ctype.h>
 #include <errno.h>
 #ifndef errno
-extern int errno;
+  extern int errno;
 #endif
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -81,12 +99,8 @@
 # define S_ISREG(m)	(((m) & S_IFMT) == S_IFREG)
 #endif
 
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
 #ifdef LONG_OPTIONS
-# include "getopt.h"
+# include <getopt.h>
 #else
 # define getopt_long(argc,argv,optstr,lopts,lind) getopt (argc, argv, optstr)
   extern char *optarg;
@@ -94,7 +108,7 @@
 #endif /* LONG_OPTIONS */
 
 #ifdef ETAGS_REGEXPS
-# include "../src/regex.h"
+# include <regex.h>
 #endif /* ETAGS_REGEXPS */
 
 /* Define CTAGS to make the program "ctags" compatible with the usual one.
@@ -272,11 +286,11 @@
 bool _wht[CHARS], _nin[CHARS], _itk[CHARS], _btk[CHARS], _etk[CHARS];
 char
   /* white chars */
-  *white = " \f\t\n\013",
+  *white = " \f\t\n\r",
   /* not in a name */
-  *nonam =" \f\t\n\013(=,[;",
+  *nonam =" \f\t\n\r(=,[;",
   /* token ending chars */
-  *endtk = " \t\n\013\"'#()[]{}=-+%*/&|^~!<>;,.:?",
+  *endtk = " \t\n\r\"'#()[]{}=-+%*/&|^~!<>;,.:?",
   /* token starting chars */
   *begtk = "ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz$~@",
   /* valid in-token chars */
@@ -490,7 +504,7 @@
 }
 
 #ifndef VERSION
-# define VERSION "19"
+# define VERSION "20"
 #endif
 void
 print_version ()
@@ -793,7 +807,7 @@
 
 #ifdef ETAGS_REGEXPS
   /* Set syntax for regular expression routines. */
-  re_set_syntax (RE_SYNTAX_EMACS);
+  re_set_syntax (RE_SYNTAX_EMACS | RE_INTERVALS);
 #endif /* ETAGS_REGEXPS */
 
   /*
@@ -1510,10 +1524,10 @@
   if (!CTAGS)
     {
       if (node->name != NULL)
-	fprintf (tagf, "%s\177%s\001%d,%d\n",
+	fprintf (tagf, "%s\177%s\001%d,%ld\n",
 		 node->pat, node->name, node->lno, node->cno);
       else
-	fprintf (tagf, "%s\177%d,%d\n",
+	fprintf (tagf, "%s\177%d,%ld\n",
 		 node->pat, node->lno, node->cno);
     }
   else
@@ -1631,6 +1645,7 @@
 friend,		C_PLPL,	st_C_ignore
 extends,  	C_JAVA,	st_C_javastruct
 implements,  	C_JAVA,	st_C_javastruct
+interface,	C_JAVA, st_C_struct
 class,  	C_PLPL,	st_C_struct
 namespace,	C_PLPL,	st_C_struct
 domain, 	C_STAR,	st_C_struct
@@ -1669,7 +1684,7 @@
 %]
 and replace lines between %< and %> with its output. */
 /*%<*/
-/* starting time is 10:31:16 */
+/* starting time is 10:15:51 */
 /* C code produced by gperf version 2.1 (K&R C version) */
 /* Command-line: gperf -c -k 1,3 -o -p -r -t  */
 
@@ -1678,11 +1693,11 @@
 
 #define MIN_WORD_LENGTH 3
 #define MAX_WORD_LENGTH 15
-#define MIN_HASH_VALUE 15
-#define MAX_HASH_VALUE 128
+#define MIN_HASH_VALUE 11
+#define MAX_HASH_VALUE 117
 /*
-   39 keywords
-  114 is the maximum key range
+   40 keywords
+  107 is the maximum key range
 */
 
 static int
@@ -1692,19 +1707,19 @@
 {
   static unsigned char hash_table[] =
     {
-     128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
-     128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
-     128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
-     128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
-     128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
-     128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
-     128, 128, 128, 128,  39, 128, 128, 128,  54,  48,
-      46, 128, 128, 128, 128, 128, 128, 128, 128, 128,
-      28, 128, 128,  40,  32, 128, 128, 128, 128, 128,
-     128, 128, 128, 128, 128, 128, 128,  24,  30,  47,
-      62,   7,  60,  27, 128,  60, 128, 128,  59,  16,
-      31,  23,  45, 128,   4,  14,   2,  55,   5, 128,
-     128, 128, 128, 128, 128, 128, 128, 128,
+     117, 117, 117, 117, 117, 117, 117, 117, 117, 117,
+     117, 117, 117, 117, 117, 117, 117, 117, 117, 117,
+     117, 117, 117, 117, 117, 117, 117, 117, 117, 117,
+     117, 117, 117, 117, 117, 117, 117, 117, 117, 117,
+     117, 117, 117, 117, 117, 117, 117, 117, 117, 117,
+     117, 117, 117, 117, 117, 117, 117, 117, 117, 117,
+     117, 117, 117, 117,   1, 117, 117, 117,   2,  42,
+      16, 117, 117, 117, 117, 117, 117, 117, 117, 117,
+       5, 117, 117,  21,  54, 117, 117, 117, 117, 117,
+     117, 117, 117, 117, 117, 117, 117,  24,  19,  43,
+       2,  35,   3,  10, 117,  26, 117, 117,   9,  20,
+      35,   9,  61, 117,  40,  52,  10,  57,   3, 117,
+     117, 117, 117, 117, 117, 117, 117, 117,
   };
   return len + hash_table[str[2]] + hash_table[str[0]];
 }
@@ -1718,71 +1733,68 @@
   static struct C_stab_entry  wordlist[] =
     {
       {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, 
-      {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, 
+      {"",}, {"",}, 
+      {"define",   	0,	st_C_define},
+      {"",}, {"",}, {"",}, {"",}, {"",}, 
+      {"float",    	0,	st_C_typespec},
+      {"",}, {"",}, 
+      {"volatile", 	0,	st_C_typespec},
+      {"",}, {"",}, 
+      {"DEFUN", 		0,	st_C_gnumacro},
+      {"",}, {"",}, {"",}, {"",}, 
+      {"domain",  	C_STAR,	st_C_struct},
+      {"",}, {"",}, {"",}, 
+      {"bool", 		C_PLPL,	st_C_typespec},
+      {"void",     	0,	st_C_typespec},
+      {"",}, 
+      {"friend", 		C_PLPL,	st_C_ignore},
+      {"@implementation", 0,	st_C_objimpl},
+      {"mutable", 	C_PLPL,	st_C_typespec},
+      {"auto",     	0,	st_C_typespec},
+      {"int",      	0,	st_C_typespec},
+      {"@end", 		0,	st_C_objend},
+      {"",}, {"",}, {"",}, {"",}, 
+      {"interface", 	C_JAVA, st_C_struct},
+      {"@interface", 	0,	st_C_objprot},
+      {"",}, 
+      {"long",     	0,	st_C_typespec},
+      {"SYSCALL", 	0,	st_C_gnumacro},
+      {"@protocol", 	0,	st_C_objprot},
       {"extern",   	0,	st_C_typespec},
       {"extends",   	C_JAVA,	st_C_javastruct},
-      {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, 
-      {"struct",  	0,	st_C_struct},
-      {"mutable", 	C_PLPL,	st_C_typespec},
-      {"",}, {"",}, {"",}, {"",}, 
-      {"auto",     	0,	st_C_typespec},
+      {"PSEUDO", 		0,	st_C_gnumacro},
       {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, 
-      {"",}, {"",}, 
+      {"",}, 
+      {"namespace", 	C_PLPL,	st_C_struct},
+      {"double",   	0,	st_C_typespec},
       {"short",    	0,	st_C_typespec},
       {"",}, 
-      {"static",   	0,	st_C_typespec},
+      {"signed",   	0,	st_C_typespec},
       {"",}, {"",}, 
-      {"signed",   	0,	st_C_typespec},
-      {"",}, {"",}, {"",}, {"",}, 
-      {"@protocol", 	0,	st_C_objprot},
-      {"",}, 
+      {"char",     	0,	st_C_typespec},
+      {"class",   	C_PLPL,	st_C_struct},
+      {"",}, {"",}, {"",}, {"",}, {"",}, 
       {"typedef",  	0,	st_C_typedef},
       {"typename", 	C_PLPL,	st_C_typespec},
-      {"namespace", 	C_PLPL,	st_C_struct},
-      {"bool", 		C_PLPL,	st_C_typespec},
+      {"",}, {"",}, 
+      {"static",   	0,	st_C_typespec},
+      {"const",    	0,	st_C_typespec},
+      {"",}, {"",}, {"",}, {"",}, 
+      {"union",   	0,	st_C_struct},
+      {"",}, {"",}, {"",}, {"",}, 
+      {"import", 		C_JAVA,	st_C_ignore},
+      {"",}, {"",}, 
+      {"enum",     	0,	st_C_enum},
+      {"implements",   	C_JAVA,	st_C_javastruct},
+      {"struct",  	0,	st_C_struct},
+      {"",}, {"",}, 
+      {"ENTRY", 		0,	st_C_gnumacro},
       {"",}, {"",}, 
       {"explicit", 	C_PLPL,	st_C_typespec},
-      {"",}, {"",}, {"",}, {"",}, 
-      {"int",      	0,	st_C_typespec},
-      {"enum",     	0,	st_C_enum},
-      {"",}, {"",}, 
-      {"void",     	0,	st_C_typespec},
-      {"@implementation", 0,	st_C_objimpl},
-      {"",}, 
-      {"volatile", 	0,	st_C_typespec},
-      {"",}, 
-      {"@end", 		0,	st_C_objend},
-      {"char",     	0,	st_C_typespec},
-      {"class",   	C_PLPL,	st_C_struct},
-      {"unsigned", 	0,	st_C_typespec},
-      {"",}, {"",}, 
-      {"@interface", 	0,	st_C_objprot},
-      {"",}, 
-      {"PSEUDO", 		0,	st_C_gnumacro},
-      {"const",    	0,	st_C_typespec},
-      {"domain",  	C_STAR,	st_C_struct},
-      {"ENTRY", 		0,	st_C_gnumacro},
-      {"",}, 
-      {"SYSCALL", 	0,	st_C_gnumacro},
-      {"float",    	0,	st_C_typespec},
-      {"",}, {"",}, {"",}, {"",}, {"",}, 
-      {"long",     	0,	st_C_typespec},
-      {"",}, {"",}, {"",}, {"",}, 
+      {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, 
       {"package", 	C_JAVA,	st_C_ignore},
       {"",}, {"",}, {"",}, {"",}, {"",}, 
-      {"DEFUN", 		0,	st_C_gnumacro},
-      {"",}, {"",}, {"",}, {"",}, {"",}, 
-      {"import", 		C_JAVA,	st_C_ignore},
-      {"",}, {"",}, {"",}, 
-      {"implements",   	C_JAVA,	st_C_javastruct},
-      {"",}, {"",}, {"",}, {"",}, 
-      {"union",   	0,	st_C_struct},
-      {"",}, {"",}, 
-      {"double",   	0,	st_C_typespec},
-      {"",}, {"",}, 
-      {"friend", 		C_PLPL,	st_C_ignore},
-      {"",}, 
-      {"define",   	0,	st_C_define},
+      {"unsigned", 	0,	st_C_typespec},
     };
 
   if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
@@ -1799,7 +1811,7 @@
     }
   return 0;
 }
-/* ending time is 10:31:16 */
+/* ending time is 10:15:52 */
 /*%>*/
 
 enum sym_type
@@ -4280,7 +4292,6 @@
   patbuf->buffer = NULL;
   patbuf->allocated = 0;
 
-  re_syntax_options = RE_INTERVALS;
   err = re_compile_pattern (regexp_pattern, strlen (regexp_pattern), patbuf);
   if (err != NULL)
     {
@@ -4593,8 +4604,14 @@
 void
 suggest_asking_for_help ()
 {
-  fprintf (stderr, "\tTry `%s --help' for a complete list of options.\n",
-	   progname);
+  fprintf (stderr, "\tTry `%s %s' for a complete list of options.\n",
+	   progname,
+#ifdef LONG_OPTIONS
+	   "--help"
+#else
+	   "-h"
+#endif
+	   );
   exit (BAD);
 }
 
--- a/lib-src/gnuclient.c	Mon Aug 13 09:47:55 2007 +0200
+++ b/lib-src/gnuclient.c	Mon Aug 13 09:49:09 2007 +0200
@@ -297,7 +297,7 @@
 #ifdef SYSV_IPC
   struct msgbuf *msgp;		/* message */
 #endif /* SYSV_IPC */
-  char *tty;
+  char *tty = NULL;
   char buffer[GSERV_BUFSZ + 1];	/* buffer to read pid */
   char result[GSERV_BUFSZ + 1];
   int i;
--- a/lib-src/make-docfile.c	Mon Aug 13 09:47:55 2007 +0200
+++ b/lib-src/make-docfile.c	Mon Aug 13 09:49:09 2007 +0200
@@ -77,7 +77,6 @@
 
 /* Stdio stream for output to the DOC file.  */
 static FILE *outfile;
-static char *extra_elcs = NULL;
 
 enum
 {
@@ -176,6 +175,7 @@
   int i;
   int err_count = 0;
   int first_infile;
+  char *extra_elcs = NULL;
 
   progname = argv[0];
 
@@ -378,16 +378,16 @@
 #if 0
   int need_space = 1;
 
-  fprintf (out, "(%s", func); 
-#else 
+  fprintf (out, "(%s", func);
+#else
   /* XEmacs - "arguments:" is for parsing the docstring.  FSF's help system
      doesn't parse the docstring for arguments like we do, so we're also
      going to omit the function name to preserve compatibility with elisp
      that parses the docstring.  Finally, not prefixing the arglist with
      anything is asking for trouble because it's not uncommon to have an
      unescaped parenthesis at the beginning of a line. --Stig */
-  fprintf (out, "arguments: ("); 
-#endif 
+  fprintf (out, "arguments: (");
+#endif
 
   if (*buff == '(')
     ++buff;
@@ -409,7 +409,7 @@
 	    p++;
 	  c = *p;
 	}
-      
+
       /* Notice when we start printing a new identifier.  */
       if (C_IDENTIFIER_CHAR_P (c) != in_ident)
 	{
@@ -435,18 +435,14 @@
 
       /* Print the C argument list as it would appear in lisp:
 	 print underscores as hyphens, and print commas as spaces.
-	 Collapse adjacent spaces into one.  */
+	 Collapse adjacent spaces into one. */
       if (c == '_') c = '-';
       if (c == ',') c = ' ';
 
-      /* In C code, `default' is a reserved word, so we spell it
-	 `defalt'; unmangle that here.  */
-      if (ident_start
-	  && strncmp (p, "defalt", 6) == 0
-	  && ! C_IDENTIFIER_CHAR_P (p[6]))
+      /* If the C argument name ends with `_', change it to ' ',
+	 to allow use of C reserved words or global symbols as Lisp args. */
+      if (c == '-' && ! C_IDENTIFIER_CHAR_P (p[1]))
 	{
-	  fprintf (out, "DEFAULT");
-	  p += 5;
 	  in_ident = 0;
 	  just_spaced = 0;
 	}
@@ -700,9 +696,9 @@
  and we use that instead of reading a doc string within that defining-form.
 
  For defun, defmacro, and autoload, we know how to skip over the arglist.
- For defvar, defconst, and fset we skip to the docstring with a kludgy 
+ For defvar, defconst, and fset we skip to the docstring with a kludgy
  formatting convention: all docstrings must appear on the same line as the
- initial open-paren (the one in column zero) and must contain a backslash 
+ initial open-paren (the one in column zero) and must contain a backslash
  and a double-quote immediately after the initial double-quote.  No newlines
  must appear between the beginning of the form and the first double-quote.
  The only source file that must follow this convention is loaddefs.el; aside
@@ -747,7 +743,7 @@
 
   if (! buffer[0])
     fprintf (stderr, "## expected a symbol, got '%c'\n", c);
-  
+
   skip_white (infile);
 }
 
@@ -887,13 +883,13 @@
 		      getc (infile);
 		      goto nextchar;
 		    }
-		  
+
 		  c2 = c1;
 		  c1 = c;
 		nextchar:
 		  c = getc (infile);
 		}
-	  
+
 	      /* If two previous characters were " and \,
 		 this is a doc string.  Otherwise, there is none.  */
 	      if (c2 != '"' || c1 != '\\')
@@ -950,7 +946,7 @@
 		  c1 = c;
 		  c = getc (infile);
 		}
-	  
+
 	      /* If two previous characters were " and \,
 		 this is a doc string.  Otherwise, there is none.  */
 	      if (c2 != '"' || c1 != '\\')
--- a/lib-src/movemail.c	Mon Aug 13 09:47:55 2007 +0200
+++ b/lib-src/movemail.c	Mon Aug 13 09:49:09 2007 +0200
@@ -129,30 +129,25 @@
 #undef write
 #undef close
 
-#ifndef errno
-extern int errno;
+static void fatal (char *, char*);
+static void error (char *, char *, char *);
+static void pfatal_with_name (char *);
+static void pfatal_and_delete (char *);
+static char *concat (char *, char *, char *);
+static long *xmalloc (unsigned int);
+static int popmail (char *, char *, char *);
+#ifdef MAIL_USE_POP
+static int pop_retr (popserver server, int msgno, int (*action)(), int arg);
 #endif
-char *strerror ();
-
-void fatal (char *, char*);
-void error ();
-void pfatal_with_name ();
-void pfatal_and_delete ();
-char *concat ();
-long *xmalloc ();
-int popmail ();
-int pop_retr ();
-int mbx_write ();
-int mbx_delimit_begin ();
-int mbx_delimit_end ();
+static int mbx_write (char *, FILE *);
+static int mbx_delimit_begin (FILE *);
+static int mbx_delimit_end (FILE *);
 
 /* Nonzero means this is name of a lock file to delete on fatal error.  */
 char *delete_lockname;
 
 int
-main (argc, argv)
-     int argc;
-     char **argv;
+main (int argc, char *argv[])
 {
   char *inname, *outname;
   int indesc, outdesc;
@@ -193,13 +188,13 @@
   /* Also check that outname's directory is writable to the real uid.  */
   {
     char *buf = (char *) xmalloc (strlen (outname) + 1);
-    char *p;
+    char *cp;
     strcpy (buf, outname);
-    p = buf + strlen (buf);
-    while (p > buf && !IS_DIRECTORY_SEP (p[-1]))
-      *--p = 0;
-    if (p == buf)
-      *p++ = '.';
+    cp = buf + strlen (buf);
+    while (cp > buf && !IS_DIRECTORY_SEP (cp[-1]))
+      *--cp = 0;
+    if (cp == buf)
+      *cp++ = '.';
     if (access (buf, W_OK) != 0)
       pfatal_with_name (buf);
     free (buf);
@@ -411,38 +406,34 @@
 
 /* Print error message and exit.  */
 
-void
-fatal (s1, s2)
-     char *s1, *s2;
+static void
+fatal (char *s1, char *s2)
 {
   if (delete_lockname)
     unlink (delete_lockname);
-  error (s1, s2);
+  error (s1, s2, NULL);
   exit (1);
 }
 
 /* Print error message.  `s1' is printf control string, `s2' is arg for it. */
 
-void
-error (s1, s2, s3)
-     char *s1, *s2, *s3;
+static void
+error (char *s1, char *s2, char *s3)
 {
   fprintf (stderr, "movemail: ");
   fprintf (stderr, s1, s2, s3);
   fprintf (stderr, "\n");
 }
 
-void
-pfatal_with_name (name)
-     char *name;
+static void
+pfatal_with_name (char *name)
 {
   char *s = concat ("", strerror (errno), " for %s");
   fatal (s, name);
 }
 
-void
-pfatal_and_delete (name)
-     char *name;
+static void
+pfatal_and_delete (char *name)
 {
   char *s = concat ("", strerror (errno), " for %s");
   unlink (name);
@@ -451,9 +442,8 @@
 
 /* Return a newly-allocated string whose contents concatenate those of s1, s2, s3.  */
 
-char *
-concat (s1, s2, s3)
-     char *s1, *s2, *s3;
+static char *
+concat (char *s1, char *s2, char *s3)
 {
   int len1 = strlen (s1), len2 = strlen (s2), len3 = strlen (s3);
   char *result = (char *) xmalloc (len1 + len2 + len3 + 1);
@@ -468,9 +458,8 @@
 
 /* Like malloc but get fatal error if memory is exhausted.  */
 
-long *
-xmalloc (size)
-     unsigned size;
+static long *
+xmalloc (unsigned int size)
 {
   long *result = (long *) malloc (size);
   if (!result)
@@ -504,10 +493,8 @@
 char obuffer[BUFSIZ];
 char Errmsg[80];
 
-popmail (user, outfile, password)
-     char *user;
-     char *outfile;
-     char *password;
+static int
+popmail (char *user, char *outfile, char *password)
 {
   int nmsgs, nbytes;
   register int i;
@@ -521,13 +508,13 @@
   server = pop_open (0, user, password, POP_NO_GETPASS);
   if (! server)
     {
-      error (pop_error);
+      error (pop_error, NULL, NULL);
       return (1);
     }
 
   if (pop_stat (server, &nmsgs, &nbytes))
     {
-      error (pop_error);
+      error (pop_error, NULL, NULL);
       return (1);
     }
 
@@ -549,7 +536,7 @@
   if ((mbf = fdopen (mbfi, "wb")) == NULL)
     {
       pop_close (server);
-      error ("Error in fdopen: %s", strerror (errno));
+      error ("Error in fdopen: %s", strerror (errno), NULL);
       close (mbfi);
       unlink (outfile);
       return (1);
@@ -560,7 +547,7 @@
       mbx_delimit_begin (mbf);
       if (pop_retr (server, i, mbx_write, mbf) != OK)
 	{
-	  error (Errmsg);
+	  error (Errmsg, NULL, NULL);
 	  close (mbfi);
 	  return (1);
 	}
@@ -568,7 +555,7 @@
       fflush (mbf);
       if (ferror (mbf))
 	{
-	  error ("Error in fflush: %s", strerror (errno));
+	  error ("Error in fflush: %s", strerror (errno), NULL);
 	  pop_close (server);
 	  close (mbfi);
 	  return (1);
@@ -584,14 +571,14 @@
 #ifdef BSD
   if (fsync (mbfi) < 0)
     {
-      error ("Error in fsync: %s", strerror (errno));
+      error ("Error in fsync: %s", strerror (errno), NULL);
       return (1);
     }
 #endif
 
   if (close (mbfi) == -1)
     {
-      error ("Error in close: %s", strerror (errno));
+      error ("Error in close: %s", strerror (errno), NULL);
       return (1);
     }
 
@@ -599,7 +586,7 @@
     {
       if (pop_delete (server, i))
 	{
-	  error (pop_error);
+	  error (pop_error, NULL, NULL);
 	  pop_close (server);
 	  return (1);
 	}
@@ -607,16 +594,15 @@
 
   if (pop_quit (server))
     {
-      error (pop_error);
+      error (pop_error, NULL, NULL);
       return (1);
     }
     
   return (0);
 }
 
-pop_retr (server, msgno, action, arg)
-     popserver server;
-     int (*action)();
+static int
+pop_retr (popserver server, int msgno, int (*action)(), int arg)
 {
   extern char *strerror ();
   char *line;
@@ -659,10 +645,8 @@
 			 && (a[3] == 'm') \
 			 && (a[4] == ' '))
 
-int
-mbx_write (line, mbf)
-     char *line;
-     FILE *mbf;
+static int
+mbx_write (char *line, FILE *mbf)
 {
   if (IS_FROM_LINE (line))
     {
@@ -676,17 +660,16 @@
   return (OK);
 }
 
-int
-mbx_delimit_begin (mbf)
-     FILE *mbf;
+static int
+mbx_delimit_begin (FILE *mbf)
 {
   if (fputs ("\f\n0, unseen,,\n", mbf) == EOF)
     return (NOTOK);
   return (OK);
 }
 
-mbx_delimit_end (mbf)
-     FILE *mbf;
+static int
+mbx_delimit_end (FILE *mbf)
 {
   if (putc ('\037', mbf) == EOF)
     return (NOTOK);
@@ -696,9 +679,8 @@
 #endif /* MAIL_USE_POP */
 
 #ifndef HAVE_STRERROR
-char *
-strerror (errnum)
-     int errnum;
+static char *
+strerror (int errnum)
 {
   extern char *sys_errlist[];
   extern int sys_nerr;
--- a/lisp/ChangeLog	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/ChangeLog	Mon Aug 13 09:49:09 2007 +0200
@@ -1,3 +1,184 @@
+1997-07-13  Steven L Baur  <steve@altair.xemacs.org>
+
+	* prim/files.el (save-some-buffers): Guard call to
+	`delete-other-windows'.
+
+1997-07-13  Karl M. Hegbloom  <karlheg@inetarena.com>
+
+	* prim/minibuf.el: (read-from-minibuffer) Corrected indentation,
+ 	History lists don't contain dups anymore, newest is put on top and
+ 	removed from the cdr.
+
+1997-07-13  Karl M. Hegbloom  <karlheg@inetarena.com>
+
+	* packages/man.el: (manual-entry) Added `Manual-page-
+ 	minibuffer-history', and added it to the read-string statement.
+  	Added #\: to `fmh' so that manuals named like MIME::Parser(3) are
+ 	found at point.
+	(Manual-mouseify-xrefs) Fixed it so now it will mousify the manual
+ 	entry on the first line of an apropos listing.
+
+1997-07-10  Karl M. Hegbloom  <karlheg@inetarena.com>
+
+	* packages/info.el: Added `Info-minibuffer-history', and made it
+ 	the minibuffer history variable in the `completing-read' calls.
+
+	* utils/savehist.el: Added `Info-minibuffer-history' to default
+ 	value of `savehist-history-variables'.
+
+1997-07-13  Steven L Baur  <steve@altair.xemacs.org>
+
+	* modes/lisp-mode.el: Restore verbosity as an option.
+	From Hrvoje Niksic <hniksic@srce.hr>
+
+1997-07-11  Hrvoje Niksic  <hniksic@srce.hr>
+
+	* prim/cmdloop.el (execute-extended-command): Use
+ 	`sorted-key-descriptions'.
+
+	* prim/help.el (sorted-key-descriptions): New function.
+	(where-is): Use it.
+	(where-is): Use `read-command'.
+
+	* prim/macros.el (kbd-macro-query): Use `read-char-exclusive'
+	instead of `read-char'.
+
+	* prim/cmdloop.el (read-char): Correctly inhibit quit.
+
+	* prim/files.el: Use `files' group.
+
+	* prim/disp-table.el (describe-display-table): Made it work; don't 
+	use `describe-vector'.
+
+	* prim/gui.el: Customized.
+
+	* utils/edmacro.el (insert-kbd-macro): Move to macros.el.
+
+	* prim/macros.el: Synch with FSF 19.34.
+
+	* prim/featurep.el: Comment addition.
+
+	* prim/cus-start.el: Add variables from replace.el.
+
+	* prim/replace.el (case-replace): Use `defvar', not `defconst'.
+
+	* utils/crontab.el: Customized.
+
+	* utils/highlight-headers.el: Define -faces as a separate group;
+	customize the variables.
+
+	* utils/uniquify.el: Hide from the Customize tree; the package
+	changes state of XEmacs on load.
+
+	* packages/igrep.el: Don't insinuate XEmacs when loading.
+	(igrep-insinuate): New function.
+
+	* packages/blink-cursor.el (blink-cursor-callback): Don't blink on 
+	TTY-s.
+
+	* prim/console.el (resume-pid-console): Use `eql'.
+
+	* prim/profile.el (profile): Restore old profiling state, instead
+	of blindly turning off profiling.
+
+	* packages/add-log.el (add-log-c-like-modes): Add java-mode.
+
+	* packages/add-log.el: Require fortran when compiling.
+
+	* prim/device.el (device-list): Use `nconc' instead of `append'.
+
+1997-07-13  Steven L Baur  <steve@altair.xemacs.org>
+
+	* prim/files.el (save-some-buffers): Only delete other windows the
+	first time through.
+	Based on code from Hrvoje Niksic <hniksic@srce.hr>
+
+1997-07-12  Steven L Baur  <steve@altair.xemacs.org>
+
+	* prim/modeline.el (mouse-drag-modeline): Don't queue dummy eval
+	events.
+	From Kyle Jones <kyle_jones@wonderworks.com>
+
+1997-07-10  Hrvoje Niksic  <hniksic@srce.hr>
+
+	* packages/gnuserv.el (gnuserv-edit-files): Operate on this
+	buffer's menubar.
+
+1997-07-11  Steven L Baur  <steve@altair.xemacs.org>
+
+	* packages/gnuserv.el: Add done button.
+	From Hrvoje Niksic <hniksic@srce.hr>
+
+1997-07-10  Steven L Baur  <steve@altair.xemacs.org>
+
+	* utils/edit-toolbar.el: (edit-toolbar-file-name): Use
+	`emacs-user-extension-dir'.
+	(edit-toolbar-add-initialization): Ditto.
+	(edit-toolbar-prompt-for-initialization): Ditto.
+
+	* utils/edit-toolbar.el: New file.
+	From Peter Pezaris <pez@dwwc.com>
+
+	* utils/toolbar-utils.el: New file.
+	From Jeff Miller <jmiller@smart.net>
+
+1997-07-10  Hrvoje Niksic  <hniksic@srce.hr>
+
+	* packages/add-log.el (change-log-font-lock-keywords): Don't
+	fontify closing paren.
+
+	* packages/pending-del.el: Some renamings, synch with Emacs 19.34.
+
+1997-07-10  Steven L Baur  <steve@altair.xemacs.org>
+
+	* packages/hyper-apropos.el (hyper-apropos-get-doc): Don't
+	autoload, there is very little point.
+
+	* prim/obsolete.el (frame-first-window): Make compatible, not
+	obsolete.
+
+1997-07-10  Hrvoje Niksic  <hniksic@srce.hr>
+
+	* packages/pending-del.el (pending-delete-pre-hook): Don't quote
+ 	lambda.
+	(pending-delete-pre-hook): Use `error-message-string'.
+	(pending-delete): Treat as minor mode; define the standard turn-on 
+	and turn-off functions.
+	(delete-active-region): Simplified.
+
+	* packages/pending-del.el: Don't turn on by default.
+
+1997-07-09  Steven L Baur  <steve@altair.xemacs.org>
+
+	* packages/pending-del.el: Correct typo in Hrvoje's upgrade.
+
+	* mel/mel-u.el (uuencode-external-decode-region): Force
+	buffer-read-only nil because it gets changed magically to t during 
+	the call to `insert-file-contents'.
+
+	* tm/tm-image.el (mime-preview/filter-for-image): Comment out test 
+	for invalid glyph.  It appears to be non-functional.
+
+	* modes/lisp-mode.el (lisp-interaction-mode-popup-menu-1): Add
+	entry for debug on signal.
+
+	* packages/supercite.el (sc-attribs-%@-addresses): + is valid in
+	an Email address.
+	(sc-attribs-<>-addresses): Ditto.
+	(sc-get-address): Ditto.
+
+	* cc-mode/cc-cmds.el (c-electric-brace): Fix Ebola infection.
+
+	* prim/dumped-lisp.el (dumped-lisp-packages): Tweak dump order
+	so "startup" is loaded before the autoloads.
+
+	* custom/cus-edit.el (custom-file): Use same logic as startup.el
+
+j1997-07-08  Hrvoje Niksic  <hniksic@srce.hr>
+
+	* prim/simple.el (log-message-ignore-regexps): Reduced
+	significantly.
+
 Tue Jul  8 23:47:47 1997  Barry A. Warsaw  <cc-mode-help@python.org>
 
 	* cc-mode/Release 5.12
--- a/lisp/auctex/custom-load.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/auctex/custom-load.el	Mon Aug 13 09:49:09 2007 +0200
@@ -1,11 +1,11 @@
-(custom-put 'LaTeX-macro 'custom-loads '("latex"))
-(custom-put 'LaTeX-math 'custom-loads '("latex"))
-(custom-put 'LaTeX-indentation 'custom-loads '("latex"))
-(custom-put 'LaTeX-label 'custom-loads '("latex"))
-(custom-put 'LaTeX-environment 'custom-loads '("latex"))
+(custom-put 'AUC-TeX 'custom-loads '("tex"))
+(custom-put 'TeX-file 'custom-loads '("tex"))
+(custom-put 'TeX-command 'custom-loads '("tex"))
+(custom-put 'LaTeX 'custom-loads '("tex" "latex"))
+(custom-put 'TeX-output 'custom-loads '("tex" "tex-buf"))
 (custom-put 'TeX-command-name 'custom-loads '("tex"))
-(custom-put 'TeX-output 'custom-loads '("tex" "tex-buf"))
-(custom-put 'LaTeX 'custom-loads '("tex" "latex"))
-(custom-put 'TeX-command 'custom-loads '("tex"))
-(custom-put 'TeX-file 'custom-loads '("tex"))
-(custom-put 'AUC-TeX 'custom-loads '("tex"))
+(custom-put 'LaTeX-environment 'custom-loads '("latex"))
+(custom-put 'LaTeX-label 'custom-loads '("latex"))
+(custom-put 'LaTeX-indentation 'custom-loads '("latex"))
+(custom-put 'LaTeX-math 'custom-loads '("latex"))
+(custom-put 'LaTeX-macro 'custom-loads '("latex"))
--- a/lisp/cc-mode/cc-cmds.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/cc-mode/cc-cmds.el	Mon Aug 13 09:49:09 2007 +0200
@@ -193,7 +193,7 @@
 	    blink-paren-function
 	    (insertion-point (point))
 	    delete-temp-newline
-	    (preserve-p (eq 32 (char-syntax (char-before))))
+	    (preserve-p (eq ?  (char-syntax (char-before))))
 	    ;; shut this up too
 	    (c-echo-syntactic-information-p nil)
 	    (syntax (progn
@@ -638,7 +638,7 @@
 
 ;; set up electric character functions to work with pending-del,
 ;; (a.k.a. delsel) mode.  All symbols get the t value except
-;; c-electric-delete which gets 'supersede.
+;; the functions which delete, which gets 'supersede.
 (mapcar
  (function
   (lambda (sym)
@@ -651,8 +651,10 @@
    c-electric-semi&comma
    c-electric-lt-gt
    c-electric-colon))
-(put 'c-electric-delete 'delete-selection 'supersede) ; delsel
-(put 'c-electric-delete 'pending-delete   'supersede) ; pending-del
+(put 'c-electric-delete    'delete-selection 'supersede) ; delsel
+(put 'c-electric-delete    'pending-delete   'supersede) ; pending-del
+(put 'c-electric-backspace 'delete-selection 'supersede) ; delsel
+(put 'c-electric-backspace 'pending-delete   'supersede) ; pending-del
 
 
 ;; This is used by indent-for-comment to decide how much to indent a
--- a/lisp/comint/custom-load.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/comint/custom-load.el	Mon Aug 13 09:49:09 2007 +0200
@@ -1,10 +1,10 @@
-(custom-put 'telnet 'custom-loads '("telnet"))
-(custom-put 'ssh 'custom-loads '("ssh"))
-(custom-put 'shell-faces 'custom-loads '("shell"))
-(custom-put 'shell-directories 'custom-loads '("shell"))
+(custom-put 'background 'custom-loads '("background"))
+(custom-put 'comint 'custom-loads '("comint-xemacs" "comint" "telnet"))
+(custom-put 'comint-completion 'custom-loads '("comint"))
+(custom-put 'comint-source 'custom-loads '("comint"))
+(custom-put 'rlogin 'custom-loads '("rlogin"))
 (custom-put 'shell 'custom-loads '("shell"))
-(custom-put 'rlogin 'custom-loads '("rlogin"))
-(custom-put 'comint-source 'custom-loads '("comint"))
-(custom-put 'comint-completion 'custom-loads '("comint"))
-(custom-put 'comint 'custom-loads '("comint-xemacs" "comint" "telnet"))
-(custom-put 'background 'custom-loads '("background"))
+(custom-put 'shell-directories 'custom-loads '("shell"))
+(custom-put 'shell-faces 'custom-loads '("shell"))
+(custom-put 'ssh 'custom-loads '("ssh"))
+(custom-put 'telnet 'custom-loads '("telnet"))
--- a/lisp/custom/ChangeLog	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/custom/ChangeLog	Mon Aug 13 09:49:09 2007 +0200
@@ -1,16 +1,190 @@
+Sat Jul 12 01:24:32 1997  Per Abrahamsen  <abraham@dina.kvl.dk>
+
+	* Version 1.9951 released.
+
+Sat Jul 12 00:29:33 1997  Per Abrahamsen  <abraham@dina.kvl.dk>
+
+	* cus-edit.el (customize-save-variable): New command.
+
+	* wid-edit.el (widget-move): Use `previous-overlay-change' and
+	`next-overlay-change'. 
+	(widget-use-overlay-change): New option to control it.
+
+Fri Jul 11 14:25:34 1997  Per Abrahamsen  <abraham@dina.kvl.dk>
+
+	* cus-edit.el (custom-save-all): Inhibit read only.
+	Reported by Simon Marshall <Simon.Marshall@esrin.esa.it>.
+
+	* wid-edit.el (regexp): Outcomment :value-face.
+	(file): Ditto.
+
+Thu Jul 10 16:13:36 1997  Per Abrahamsen  <abraham@dina.kvl.dk>
+
+	* Version 1.9950 released.
+
+Thu Jul 10 16:12:33 1997  Per Abrahamsen  <abraham@dina.kvl.dk>
+
+	* wid-edit.el (widget-add-change): Use local hooks.
+	(widget-before-change): Ditto.
+	Suggested by Simon Marshall <Simon.Marshall@esrin.esa.it>.
+
+Wed Jul 09 21:35:05 1997  Per Abrahamsen  <abraham@dina.kvl.dk>
+
+	* Version 1.9949 released.
+
+Wed Jul  9 20:26:58 1997  Per Abrahamsen  <abraham@dina.kvl.dk>
+
+	* widget.el (:doc-overlay): New keyword.
+	* wid-edit.el (set-text-properties): Don't define.
+	(widget-specify-none): Delete.
+	(widget-specify-text): Delete.
+	(widget-field-use-before-change): Don't enable for XEmacs.
+	(widget-specify-field): Don't use text properties.
+	(widget-specify-field): Ditto.
+	(widget-specify-doc): Ditto.
+	(widget-specify-insert): Ditto.
+	(widget-insert): Ditto.
+	(widget-convert-text): Ditto.
+	(widget-leave-text): Ditto.
+	(widget-setup): Ditto.
+	(widget-before-change): Ditto.
+	(widget-default-create): Ditto.
+	(widget-default-delete): Ditto.
+	(widget-editable-list-insert-before): Ditto.
+	(widget-editable-list-entry-create): Ditto.
+	(widget-add-change): New function.
+
+	* cus-edit.el (custom-buffer-create-internal): Refer to `mouse-2'
+	instead of `mouse-1'.
+	(custom-mode-map): Don't bind `mouse-1'.
+
+1997-07-09  Steven L Baur  <steve@altair.xemacs.org>
+
+	* custom/cus-edit.el (custom-file): Use same logic as startup.el
+
+Tue Jul 08 13:30:11 1997  Per Abrahamsen  <abraham@dina.kvl.dk>
+
+	* Version 1.9948 released.
+
+Tue Jul  8 11:34:44 1997  Per Abrahamsen  <abraham@dina.kvl.dk>
+
+	* wid-edit.el (widget-field-use-before-change): Doc fix.
+
 1997-07-08  Steven L Baur  <steve@altair.xemacs.org>
 
 	* cus-edit.el (custom-file): Rename .xemacs-custom to something
 	more general.
 
-1997-06-28  Steven L Baur  <steve@altair.xemacs.org>
-
-	* cus-edit.el (customize-customized): Trap errors.
-	(customize-saved): Ditto.
-	(custom-add-parent-links): Ditto.
-	(custom-save-variables): Ditto.
-	(custom-save-faces): Ditto.
-	(customize-save-customized): Ditto.
+Mon Jul 07 14:20:33 1997  Per Abrahamsen  <abraham@dina.kvl.dk>
+
+	* Version 1.9947 released.
+
+Mon Jul  7 14:16:10 1997  Simon Marshall <Simon.Marshall@esrin.esa.it>
+
+	* cus-edit.el (custom-group-members): New function.
+	(custom-group-value-create): Use it rather than get.
+
+Mon Jul  7 11:39:31 1997  Per Abrahamsen  <abraham@dina.kvl.dk>
+
+	* wid-edit.el (emacs-library-link): New widget.
+	(widget-emacs-library-link-action): New function.
+	Provided by Stephen Eglen <stephene@cogs.susx.ac.uk>.
+
+1997-07-06  Hrvoje Niksic  <hniksic@srce.hr>
+
+	* wid-edit.el (widget-beginning-of-line): Preserve zmacs region.
+	(widget-end-of-line): Ditto.
+
+Sun Jul  6 21:57:32 1997  Per Abrahamsen  <abraham@dina.kvl.dk>
+
+	* wid-edit.el (widget-field-use-before-change): Enable for Emacs
+	20. 
+
+Fri Jul 04 16:24:21 1997  Per Abrahamsen  <abraham@dina.kvl.dk>
+
+	* Version 1.9946 released.
+
+Fri Jul  4 15:31:45 1997  Per Abrahamsen  <abraham@dina.kvl.dk>
+
+	* wid-edit.el (widget-color-sample-face-get): Kludge to make it
+	work before widget is fully created.
+	(widget-color-action): Try to use same relative position of point
+	in minibuffer as it had in the field.
+
+	* cus-edit.el (custom-mode): Document `M-TAB'.
+
+	* custom.texi (Usage for Package Authors): Fixed typo.
+	Patch by Adrian Aichner <aichner@ecf.teradyne.com>.
+
+Fri Jul 04 13:58:14 1997  Per Abrahamsen  <abraham@dina.kvl.dk>
+
+	* all: Synched with FSF.
+	
+	* Version 1.9945 released.
+
+Fri Jul  4 12:40:13 1997  Per Abrahamsen  <abraham@dina.kvl.dk>
+
+	* widget.el (:sample-overlay): New keyword.
+	* wid-edit.el (widget-leave-text): Use it.
+	(widget-specify-sample): Use it.
+	(widget-default-delete): Ditto.
+	 (color): Make it an editable field.
+	(widget-color-value-create): Deleted.
+	(widget-color-value-get): Deleted.
+	(widget-color-value-set): Deleted.
+	(color-item): Deleted.
+	(widget-color-item-button-face-get): Renamed to
+	`widget-color-sample-face-get'. 
+	(color-sample): Deleted.
+	(editable-color): Deleted.
+	(widget-editable-color-value-create): Deleted.
+
+Fri Jul 04 11:33:31 1997  Per Abrahamsen  <abraham@dina.kvl.dk>
+
+	* all: Synched with FSF.
+	
+	* Version 1.9944 released.
+
+Fri Jul  4 11:32:04 1997  Per Abrahamsen  <abraham@dina.kvl.dk>
+
+	* wid-edit.el (widget-specify-field): Add newline in overlay for
+	nil-:sized fields.
+	(widget-field-end): Ditto.
+
+Thu Jul  3 19:12:13 1997  Per Abrahamsen  <abraham@dina.kvl.dk>
+
+	* wid-edit.el (emacs-library-link): New widget.
+	(widget-emacs-library-link-action): New function.
+	(widgets): Use it.
+	Suggested by Stephen Eglen <stephene@cogs.susx.ac.uk>.
+	(file-link): New widget.
+	(widget-file-link-action): New function.
+
+Wed Jul 02 17:44:40 1997  Per Abrahamsen  <abraham@dina.kvl.dk>
+
+	* Version 1.9943 released.
+
+Wed Jul  2 17:35:42 1997  Per Abrahamsen  <abraham@dina.kvl.dk>
+
+	* all: Synched with FSF.
+
+Wed Jul 02 17:19:13 1997  Per Abrahamsen  <abraham@dina.kvl.dk>
+
+	* Version 1.9942 released.
+
+Wed Jul  2 17:18:08 1997  Per Abrahamsen  <abraham@dina.kvl.dk>
+
+	* cus-edit.el (customize-browse): Use glyphs in description, if
+	possible. 
+
+Mon Jun 30 17:07:20 1997  Per Abrahamsen  <abraham@dina.kvl.dk>
+
+	* Version 1.9941 released.
+
+Mon Jun 30 17:02:21 1997  Per Abrahamsen  <abraham@dina.kvl.dk>
+
+	* wid-edit.el (widget-menu-minibuffer-flag): Default to t on
+	XEmacs. 
 
 Thu Jun 26 16:49:32 1997  Per Abrahamsen  <abraham@dina.kvl.dk>
 
--- a/lisp/custom/auto-autoloads.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/custom/auto-autoloads.el	Mon Aug 13 09:49:09 2007 +0200
@@ -2,7 +2,7 @@
 (if (not (featurep 'custom-autoloads))
     (progn
 
-;;;### (autoloads (customize-menu-create custom-menu-create custom-save-all customize-save-customized customize-browse custom-buffer-create-other-window custom-buffer-create customize-apropos-groups customize-apropos-faces customize-apropos-options customize-apropos customize-saved customize-customized customize-face-other-window customize-face customize-option-other-window customize-option customize-group-other-window customize-group customize customize-set-variable customize-set-value) "cus-edit" "custom/cus-edit.el")
+;;;### (autoloads (customize-menu-create custom-menu-create custom-save-all customize-save-customized customize-browse custom-buffer-create-other-window custom-buffer-create customize-apropos-groups customize-apropos-faces customize-apropos-options customize-apropos customize-saved customize-customized customize-face-other-window customize-face customize-option-other-window customize-option customize-group-other-window customize-group customize customize-save-variable customize-set-variable customize-set-value) "cus-edit" "custom/cus-edit.el")
 
 (autoload 'customize-set-value "cus-edit" "\
 Set VARIABLE to VALUE.  VALUE is a Lisp object.
@@ -28,6 +28,20 @@
 If VARIABLE has a `custom-type' property, it must be a widget and the
 `:prompt-value' property of that widget will be used for reading the value. " t nil)
 
+(autoload 'customize-save-variable "cus-edit" "\
+Set the default for VARIABLE to VALUE, and save it for future sessions.
+If VARIABLE has a `custom-set' property, that is used for setting
+VARIABLE, otherwise `set-default' is used.
+
+The `customized-value' property of the VARIABLE will be set to a list
+with a quoted VALUE as its sole list member.
+
+If VARIABLE has a `variable-interactive' property, that is used as if
+it were the arg to `interactive' (which see) to interactively read the value.
+
+If VARIABLE has a `custom-type' property, it must be a widget and the
+`:prompt-value' property of that widget will be used for reading the value. " t nil)
+
 (autoload 'customize "cus-edit" "\
 Select a customization buffer which you can use to set user options.
 User options are structured into \"groups\".
@@ -99,7 +113,7 @@
 (autoload 'customize-browse "cus-edit" "\
 Create a tree browser for the customize hierarchy." t nil)
 
-(defcustom custom-file (if (boundp 'emacs-user-extension-dir) (concat emacs-user-extension-dir "options.el") "~/.emacs") "File used for storing customization information.\nIf you change this from the default \"~/.emacs\" you need to\nexplicitly load that file for the settings to take effect." :type 'file :group 'customize)
+(defcustom custom-file (if (boundp 'emacs-user-extension-dir) (concat "~" init-file-user emacs-user-extension-dir "options.el") "~/.emacs") "File used for storing customization information.\nIf you change this from the default \"~/.emacs\" you need to\nexplicitly load that file for the settings to take effect." :type 'file :group 'customize)
 
 (autoload 'customize-save-customized "cus-edit" "\
 Save all user options which have been set in this session." t nil)
--- a/lisp/custom/cus-edit.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/custom/cus-edit.el	Mon Aug 13 09:49:09 2007 +0200
@@ -4,7 +4,7 @@
 ;;
 ;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
 ;; Keywords: help, faces
-;; Version: 1.9940
+;; Version: 1.9951
 ;; X-URL: http://www.dina.kvl.dk/~abraham/custom/
 
 ;; This file is part of GNU Emacs.
@@ -768,6 +768,26 @@
   (put var 'customized-value (list (custom-quote val))))
 
 ;;;###autoload
+(defun customize-save-variable (var val)
+  "Set the default for VARIABLE to VALUE, and save it for future sessions.
+If VARIABLE has a `custom-set' property, that is used for setting
+VARIABLE, otherwise `set-default' is used.
+
+The `customized-value' property of the VARIABLE will be set to a list
+with a quoted VALUE as its sole list member.
+
+If VARIABLE has a `variable-interactive' property, that is used as if
+it were the arg to `interactive' (which see) to interactively read the value.
+
+If VARIABLE has a `custom-type' property, it must be a widget and the
+`:prompt-value' property of that widget will be used for reading the value. " 
+  (interactive (custom-prompt-variable "Set and ave variable: "
+				       "Set and save value for %s as: "))
+  (funcall (or (get var 'custom-set) 'set-default) var val)
+  (put var 'saved-value (list (custom-quote val)))
+  (custom-save-all))
+
+;;;###autoload
 (defun customize ()
   "Select a customization buffer which you can use to set user options.
 User options are structured into \"groups\".
@@ -795,7 +815,9 @@
     (if (get-buffer name)
 	(switch-to-buffer name)
       (custom-buffer-create (list (list group 'custom-group))
-			    name))))
+			    name
+			    (concat " for group "
+				    (custom-unlispify-tag-name group))))))
 
 ;;;###autoload
 (defun customize-group-other-window (symbol)
@@ -879,12 +901,7 @@
   (interactive)
   (let ((found nil))
     (mapatoms (lambda (symbol)
-		(and (condition-case nil
-			 (get symbol 'customized-face)
-		       (t (progn
-			    (message "Bad plist in %s"
-				     (symbol-name symbol))
-			    nil)))
+		(and (get symbol 'customized-face)
 		     (custom-facep symbol)
 		     (push (list symbol 'custom-face) found))
 		(and (get symbol 'customized-value)
@@ -901,12 +918,7 @@
   (interactive)
   (let ((found nil))
     (mapatoms (lambda (symbol)
-		(and (condition-case nil
-			 (get symbol 'saved-face)
-		       (t (progn
-			    (message "Bad plist in %s"
-				     (symbol-name symbol))
-			    nil)))
+		(and (get symbol 'saved-face)
 		     (custom-facep symbol)
 		     (push (list symbol 'custom-face) found))
 		(and (get symbol 'saved-value)
@@ -986,7 +998,7 @@
   :group 'custom-buffer)
 
 ;;;###autoload
-(defun custom-buffer-create (options &optional name)
+(defun custom-buffer-create (options &optional name description)
   "Create a buffer containing OPTIONS.
 Optional NAME is the name of the buffer.
 OPTIONS should be an alist of the form ((SYMBOL WIDGET)...), where
@@ -995,10 +1007,10 @@
   (unless name (setq name "*Customization*"))
   (kill-buffer (get-buffer-create name))
   (switch-to-buffer (get-buffer-create name))
-  (custom-buffer-create-internal options))
+  (custom-buffer-create-internal options description))
 
 ;;;###autoload
-(defun custom-buffer-create-other-window (options &optional name)
+(defun custom-buffer-create-other-window (options &optional name description)
   "Create a buffer containing OPTIONS.
 Optional NAME is the name of the buffer.
 OPTIONS should be an alist of the form ((SYMBOL WIDGET)...), where
@@ -1008,7 +1020,7 @@
   (kill-buffer (get-buffer-create name))
   (let ((window (selected-window)))
     (switch-to-buffer-other-window (get-buffer-create name))
-    (custom-buffer-create-internal options)
+    (custom-buffer-create-internal options description)
     (select-window window)))
 
 (defcustom custom-reset-button-menu nil
@@ -1017,12 +1029,18 @@
   :type 'boolean
   :group 'custom-buffer)
 
-(defun custom-buffer-create-internal (options)
+(defun custom-buffer-create-internal (options &optional description)
   (message "Creating customization buffer...")
   (custom-mode)
-  (widget-insert "This is a customization buffer.
+  (widget-insert "This is a customization buffer")
+  (if description
+      (widget-insert description))
+  (widget-insert ".
 Square brackets show active fields; type RET or click mouse-2
-on an active field to invoke its action.  Invoke ")
+on an active field to invoke its action.  Editing an option value
+changes the text in the buffer; invoke the State button and
+choose the Set operation to set the option value.
+Invoke ")
   (widget-create 'info-link 
 		 :tag "Help"
 		 :help-echo "Read the online help."
@@ -1031,26 +1049,28 @@
   (message "Creating customization buttons...")
   (widget-insert "Operate on everything in this buffer:\n ")
   (widget-create 'push-button
-		 :tag "Set"
+		 :tag "Set for Current Session"
 		 :help-echo "\
 Make your editing in this buffer take effect for this session."
 		 :action (lambda (widget &optional event)
 			   (Custom-set)))
   (widget-insert " ")
   (widget-create 'push-button
-		 :tag "Save"
+		 :tag "Save for Future Sessions"
 		 :help-echo "\
 Make your editing in this buffer take effect for future Emacs sessions."
 		 :action (lambda (widget &optional event)
 			   (Custom-save)))
-  (widget-insert " ")
   (if custom-reset-button-menu
-      (widget-create 'push-button
-		     :tag "Reset"
-		     :help-echo "Show a menu with reset operations."
-		     :mouse-down-action (lambda (&rest junk) t)
-		     :action (lambda (widget &optional event)
-			       (custom-reset event)))
+      (progn
+	(widget-insert " ")
+	(widget-create 'push-button
+		       :tag "Reset"
+		       :help-echo "Show a menu with reset operations."
+		       :mouse-down-action (lambda (&rest junk) t)
+		       :action (lambda (widget &optional event)
+				 (custom-reset event))))
+    (widget-insert "\n ")
     (widget-create 'push-button
 		   :tag "Reset"
 		   :help-echo "\
@@ -1103,6 +1123,7 @@
 		      options))))
   (unless (eq (preceding-char) ?\n)
     (widget-insert "\n"))
+  (message "Creating customization items %2d%%...done" 100)
   (unless (eq custom-buffer-style 'tree)
     (mapcar 'custom-magic-reset custom-options))
   (message "Creating customization setup...")
@@ -1131,9 +1152,27 @@
     (switch-to-buffer (get-buffer-create name)))
   (custom-mode)
   (widget-insert "\
-Invoke [+] or [?] below to expand items, and [-] to collapse items.
-Invoke the [Group], [Face], and [Option] buttons below to edit that
-item in another window.\n\n")
+Invoke [+] or [?] below to expand items, and [-] to collapse items.\n")
+  (if custom-browse-only-groups
+      (widget-insert "\
+Invoke the [Group] button below to edit that item in another window.\n\n")
+    (widget-insert "Invoke the ") 
+    (widget-create 'item 
+		   :format "%t"
+		   :tag "[Group]"
+		   :tag-glyph "folder")
+    (widget-insert ", ")
+    (widget-create 'item 
+		   :format "%t"
+		   :tag "[Face]"
+		   :tag-glyph "face")
+    (widget-insert ", and ")
+    (widget-create 'item 
+		   :format "%t"
+		   :tag "[Option]"
+		   :tag-glyph "option")
+    (widget-insert " buttons below to edit that
+item in another window.\n\n"))
   (let ((custom-buffer-style 'tree))
     (widget-create 'custom-group 
 		   :custom-last t
@@ -1284,11 +1323,11 @@
 			       (invalid "x" custom-invalid-face "\
 the value displayed for this %c is invalid and cannot be set.")
 			       (modified "*" custom-modified-face "\
-you have edited the value, and can now set the %c." "\
-you have edited something in this group, and can now set it.")
+you have edited the value as text, but you have not set the %c." "\
+you have edited something in this group, but not set it.")
 			       (set "+" custom-set-face "\
-you have set this %c, but not saved it." "\
-something in this group has been set, but not yet saved.")
+you have set this %c, but not saved it for future sessions." "\
+something in this group has been set, but not saved.")
 			       (changed ":" custom-changed-face "\
 this %c has been changed outside the customize buffer." "\
 something in this group has been changed outside customize.")
@@ -1485,7 +1524,6 @@
   :value-delete 'widget-children-value-delete
   :value-get 'widget-value-value-get
   :validate 'widget-children-validate
-  :button-face 'custom-button-face
   :match (lambda (widget value) (symbolp value)))
 
 (defun custom-convert-widget (widget)
@@ -1659,13 +1697,7 @@
 	found)
     (insert (or initial-string "Parent groups:"))
     (mapatoms (lambda (symbol)
-		(let ((entry (assq name
-				   (condition-case nil
-				       (get symbol 'custom-group)
-				     (t (progn
-					  (message "Bad plist in %s"
-						   (symbol-name symbol))
-					  nil))))))
+		(let ((entry (assq name (get symbol 'custom-group))))
 		  (when (eq (nth 1 entry) type)
 		    (insert " ")
 		    (push (widget-create-child-and-convert 
@@ -1900,10 +1932,10 @@
     (widget-put widget :custom-state state)))
 
 (defvar custom-variable-menu 
-  '(("Set" custom-variable-set
+  '(("Set for Current Session" custom-variable-set
      (lambda (widget)
        (eq (widget-get widget :custom-state) 'modified)))
-    ("Save" custom-variable-save
+    ("Save for Future Sessions" custom-variable-save
      (lambda (widget)
        (memq (widget-get widget :custom-state) '(modified set changed rogue))))
     ("Reset to Current" custom-redraw
@@ -2273,8 +2305,8 @@
 	     (message "Creating face editor...done"))))))
 
 (defvar custom-face-menu 
-  '(("Set" custom-face-set)
-    ("Save" custom-face-save)
+  '(("Set for Current Session" custom-face-set)
+    ("Save for Future Sessions" custom-face-save)
     ("Reset to Saved" custom-face-reset-saved
      (lambda (widget)
        (get (widget-value widget) 'saved-face)))
@@ -2538,19 +2570,32 @@
 	(insert "--------")))
   (widget-default-create widget))
 
+(defun custom-group-members (symbol groups-only)
+  "Return SYMBOL's custom group members.
+If GROUPS-ONLY non-nil, return only those members that are groups."
+  (if (not groups-only)
+      (get symbol 'custom-group)
+    (let (members)
+      (dolist (entry (get symbol 'custom-group))
+	(when (eq (nth 1 entry) 'custom-group)
+	  (push entry members)))
+      (nreverse members))))
+
 (defun custom-group-value-create (widget)
   "Insert a customize group for WIDGET in the current buffer."
-  (let ((state (widget-get widget :custom-state))
-	(level (widget-get widget :custom-level))
-	(indent (widget-get widget :indent))
-	(prefix (widget-get widget :custom-prefix))
-	(buttons (widget-get widget :buttons))
-	(tag (widget-get widget :tag))
-	(symbol (widget-value widget)))
+  (let* ((state (widget-get widget :custom-state))
+	 (level (widget-get widget :custom-level))
+	 (indent (widget-get widget :indent))
+	 (prefix (widget-get widget :custom-prefix))
+	 (buttons (widget-get widget :buttons))
+	 (tag (widget-get widget :tag))
+	 (symbol (widget-value widget))
+	 (members (custom-group-members symbol
+					(and (eq custom-buffer-style 'tree)
+					     custom-browse-only-groups))))
     (cond ((and (eq custom-buffer-style 'tree)
 		(eq state 'hidden)
-		(or (get symbol 'custom-group)
-		    (custom-unloaded-widget-p widget)))
+		(or members (custom-unloaded-widget-p widget)))
 	   (custom-browse-insert-prefix prefix)
 	   (push (widget-create-child-and-convert
 		  widget 'custom-browse-visibility 
@@ -2565,7 +2610,7 @@
 	   (insert " " tag "\n")
 	   (widget-put widget :buttons buttons))
 	  ((and (eq custom-buffer-style 'tree)
-		(zerop (length (get symbol 'custom-group))))
+		(zerop (length members)))
 	   (custom-browse-insert-prefix prefix)
 	   (insert "[ ]-- ")
 	   ;; (widget-glyph-insert nil "[ ]" "empty")
@@ -2578,7 +2623,7 @@
 	  ((eq custom-buffer-style 'tree)
 	   (custom-browse-insert-prefix prefix)
 	   (custom-load-widget widget)
-	   (if (zerop (length (get symbol 'custom-group)))
+	   (if (zerop (length members))
 	       (progn 
 		 (custom-browse-insert-prefix prefix)
 		 (insert "[ ]-- ")
@@ -2602,7 +2647,7 @@
 	     (insert " " tag "\n")
 	     (widget-put widget :buttons buttons)
 	     (message "Creating group...")
-	     (let* ((members (custom-sort-items (get symbol 'custom-group)
+	     (let* ((members (custom-sort-items members
 			      custom-browse-sort-alphabetically
 			      custom-browse-order-groups))
 		    (prefixes (widget-get widget :custom-prefixes))
@@ -2615,18 +2660,16 @@
 	       (while members
 		 (setq entry (car members)
 		       members (cdr members))
-		 (when (or (not custom-browse-only-groups)
-			   (eq (nth 1 entry) 'custom-group))
-		   (push (widget-create-child-and-convert
-			  widget (nth 1 entry)
-			  :group widget
-			  :tag (custom-unlispify-tag-name (nth 0 entry))
-			  :custom-prefixes custom-prefix-list
-			  :custom-level (1+ level)
-			  :custom-last (null members)
-			  :value (nth 0 entry)
-			  :custom-prefix prefix)
-			 children)))
+		 (push (widget-create-child-and-convert
+			widget (nth 1 entry)
+			:group widget
+			:tag (custom-unlispify-tag-name (nth 0 entry))
+			:custom-prefixes custom-prefix-list
+			:custom-level (1+ level)
+			:custom-last (null members)
+			:value (nth 0 entry)
+			:custom-prefix prefix)
+		       children))
 	       (widget-put widget :children (reverse children)))
 	     (message "Creating group...done")))
 	  ;; Nested style.
@@ -2721,7 +2764,7 @@
 	   ;; Members.
 	   (message "Creating group...")
 	   (custom-load-widget widget)
-	   (let* ((members (custom-sort-items (get symbol 'custom-group)
+	   (let* ((members (custom-sort-items members
 					      custom-buffer-sort-alphabetically
 					      custom-buffer-order-groups))
 		  (prefixes (widget-get widget :custom-prefixes))
@@ -2760,10 +2803,10 @@
 	   (insert "/\n")))))
 
 (defvar custom-group-menu 
-  '(("Set" custom-group-set
+  '(("Set for Current Session" custom-group-set
      (lambda (widget)
        (eq (widget-get widget :custom-state) 'modified)))
-    ("Save" custom-group-save
+    ("Save for Future Sessions" custom-group-save
      (lambda (widget)
        (memq (widget-get widget :custom-state) '(modified set))))
     ("Reset to Current" custom-group-reset-current
@@ -2860,7 +2903,10 @@
 ;;; The `custom-save-all' Function.
 ;;;###autoload
 (defcustom custom-file (if (boundp 'emacs-user-extension-dir)
-			   (concat emacs-user-extension-dir "options.el")
+			   (concat "~"
+				   init-file-user
+				   emacs-user-extension-dir
+				   "options.el")
 			 "~/.emacs")
   "File used for storing customization information.
 If you change this from the default \"~/.emacs\" you need to
@@ -2895,12 +2941,7 @@
 	(princ "\n"))
       (princ "(custom-set-variables")
       (mapatoms (lambda (symbol)
-		  (let ((value (condition-case nil
-				   (get symbol 'saved-value)
-				 (t (progn
-				      (message "Bad plist in %s"
-					       (symbol-name symbol))
-				      nil))))
+		  (let ((value (get symbol 'saved-value))
 			(requests (get symbol 'custom-requests))
 			(now (not (or (get symbol 'standard-value)
 				      (and (not (boundp symbol))
@@ -2943,12 +2984,7 @@
 	      (princ ")")
 	    (princ " t)"))))
       (mapatoms (lambda (symbol)
-		  (let ((value (condition-case nil
-				   (get symbol 'saved-face)
-				 (t (progn
-				      (message "Bad plist in %s"
-					       (symbol-name symbol)))
-				    nil))))
+		  (let ((value (get symbol 'saved-face)))
 		    (when (and (not (eq symbol 'default))
 			       ;; Don't print default face here.
 			       value)
@@ -2970,28 +3006,26 @@
   "Save all user options which have been set in this session."
   (interactive)
   (mapatoms (lambda (symbol)
-	      (condition-case nil
-		  (let ((face (get symbol 'customized-face))
-			(value (get symbol 'customized-value)))
-		    (when face
-		      (put symbol 'saved-face face)
-		      (put symbol 'customized-face nil))
-		    (when value
-		      (put symbol 'saved-value value)
-		      (put symbol 'customized-value nil)))
-		(t (message "Bad plist in %s"
-			    (symbol-name symbol))))))
+	      (let ((face (get symbol 'customized-face))
+		    (value (get symbol 'customized-value)))
+		(when face 
+		  (put symbol 'saved-face face)
+		  (put symbol 'customized-face nil))
+		(when value 
+		  (put symbol 'saved-value value)
+		  (put symbol 'customized-value nil)))))
   ;; We really should update all custom buffers here.
   (custom-save-all))
 
 ;;;###autoload
 (defun custom-save-all ()
   "Save all customizations in `custom-file'."
-  (custom-save-variables)
-  (custom-save-faces)
-  (save-excursion
-    (set-buffer (find-file-noselect custom-file))
-    (save-buffer)))
+  (let ((inhibit-read-only t))
+    (custom-save-variables)
+    (custom-save-faces)
+    (save-excursion
+      (set-buffer (find-file-noselect custom-file))
+      (save-buffer))))
 
 ;;; The Customize Menu.
 
@@ -3134,7 +3168,19 @@
   (define-key custom-mode-map " " 'scroll-up)
   (define-key custom-mode-map "\177" 'scroll-down)
   (define-key custom-mode-map "q" 'bury-buffer)
-  (define-key custom-mode-map "u" 'Custom-goto-parent))
+  (define-key custom-mode-map "u" 'Custom-goto-parent)
+  ;; (define-key custom-mode-map [mouse-1] 'Custom-move-and-invoke)
+  )
+
+(defun Custom-move-and-invoke (event)
+  "Move to where you click, and if it is an active field, invoke it."
+  (interactive "e")
+  (mouse-set-point event)
+  (if (widget-event-point event)
+      (let* ((pos (widget-event-point event))
+	     (button (get-char-property pos 'button)))
+	(if button
+	    (widget-button-click event)))))
 
 (easy-menu-define Custom-mode-menu 
     custom-mode-map
@@ -3175,7 +3221,10 @@
 
 Move to next button or editable field.     \\[widget-forward]
 Move to previous button or editable field. \\[widget-backward]
-Invoke button under the mouse pointer.     \\[widget-button-click]
+\\<widget-field-keymap>\
+Complete content of editable text field.   \\[widget-complete]
+\\<custom-mode-map>\
+Invoke button under the mouse pointer.     \\[Custom-move-and-invoke]
 Invoke button under point.		   \\[widget-button-press]
 Set all modifications.			   \\[Custom-set]
 Make all modifications default.		   \\[Custom-save]
@@ -3193,6 +3242,8 @@
   (make-local-variable 'custom-options)
   (make-local-variable 'widget-documentation-face)
   (setq widget-documentation-face 'custom-documentation-face)
+  (make-local-variable 'widget-button-face)
+  (setq widget-button-face 'custom-button-face)
   (make-local-hook 'widget-edit-functions)
   (add-hook 'widget-edit-functions 'custom-state-buffer-message nil t)
   (run-hooks 'custom-mode-hook))
--- a/lisp/custom/cus-face.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/custom/cus-face.el	Mon Aug 13 09:49:09 2007 +0200
@@ -4,7 +4,7 @@
 ;;
 ;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
 ;; Keywords: help, faces
-;; Version: 1.9940
+;; Version: 1.9951
 ;; X-URL: http://www.dina.kvl.dk/~abraham/custom/
 
 ;;; Commentary:
--- a/lisp/custom/custom.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/custom/custom.el	Mon Aug 13 09:49:09 2007 +0200
@@ -4,7 +4,7 @@
 ;;
 ;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
 ;; Keywords: help, faces
-;; Version: 1.9940
+;; Version: 1.9951
 ;; X-URL: http://www.dina.kvl.dk/~abraham/custom/
 
 ;; This file is part of GNU Emacs.
@@ -195,7 +195,7 @@
 :initialize VALUE should be a function used to initialize the
 	variable.  It takes two arguments, the symbol and value
 	given in the `defcustom' call.  The default is
-	`custom-initialize-default' 
+	`custom-initialize-set' 
 :set	VALUE should be a function to set the value of the symbol. 
 	It takes two arguments, the symbol to set and the value to
 	give it.  The default is `set-default'.
--- a/lisp/custom/wid-browse.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/custom/wid-browse.el	Mon Aug 13 09:49:09 2007 +0200
@@ -4,7 +4,7 @@
 ;;
 ;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
 ;; Keywords: extensions
-;; Version: 1.9940
+;; Version: 1.9951
 ;; X-URL: http://www.dina.kvl.dk/~abraham/custom/
 
 ;; This file is part of GNU Emacs.
--- a/lisp/custom/wid-edit.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/custom/wid-edit.el	Mon Aug 13 09:49:09 2007 +0200
@@ -4,7 +4,7 @@
 ;;
 ;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
 ;; Keywords: extensions
-;; Version: 1.9940
+;; Version: 1.9951
 ;; X-URL: http://www.dina.kvl.dk/~abraham/custom/
 
 ;; This file is part of GNU Emacs.
@@ -38,6 +38,7 @@
 (eval-and-compile
   (autoload 'pp-to-string "pp")
   (autoload 'Info-goto-node "info")
+  (autoload 'finder-commentary "finder" nil t)
 
   (when (string-match "XEmacs" emacs-version)
     (condition-case nil
@@ -101,27 +102,6 @@
 	(display-error obj buf)
 	(buffer-string buf)))))
 
-(when (let ((a "foo"))
-	(put-text-property 1 2 'foo 1 a)
-	(put-text-property 1 2 'bar 2 a)
-	(set-text-properties 1 2 nil a)
-	(text-properties-at 1 a))
-  ;; XEmacs 20.2 and earlier had a buggy set-text-properties.
-  (defun set-text-properties (start end props &optional buffer-or-string)
-    "Completely replace properties of text from START to END.
-The third argument PROPS is the new property list.
-The optional fourth argument, BUFFER-OR-STRING,
-is the string or buffer containing the text."
-    (map-extents #'(lambda (extent ignored)
-		     (remove-text-properties
-		      start end
-		      (list (extent-property extent 'text-prop)
-			    nil)
-		      buffer-or-string)
-		     nil)
-		 buffer-or-string start end nil nil 'text-prop)
-    (add-text-properties start end props buffer-or-string)))
-
 ;;; Customization.
 
 (defgroup widgets nil
@@ -129,6 +109,7 @@
   :link '(custom-manual "(widget)Top")
   :link '(url-link :tag "Development Page" 
 		   "http://www.dina.kvl.dk/~abraham/custom/")
+  :link '(emacs-library-link :tag "Lisp File" "widget.el")
   :prefix "widget-"
   :group 'extensions
   :group 'hypermedia)
@@ -157,6 +138,10 @@
   :group 'widget-documentation
   :group 'widget-faces)
 
+(defvar widget-button-face 'widget-button-face
+  "Face used for buttons in widges.
+This exists as a variable so it can be set locally in certain buffers.")
+
 (defface widget-button-face '((t (:bold t)))
   "Face used for widget buttons."
   :group 'widget-faces)
@@ -236,7 +221,7 @@
   :group 'widgets
   :type 'integer)
 
-(defcustom widget-menu-minibuffer-flag nil
+(defcustom widget-menu-minibuffer-flag (string-match "XEmacs" emacs-version)
   "*Control how to ask for a choice from the keyboard.
 Non-nil means use the minibuffer;
 nil means read a single character."
@@ -299,31 +284,34 @@
 	   ;; Define SPC as a prefix char to get to this menu.
 	   (define-key overriding-terminal-local-map " "
 	     (setq map (make-sparse-keymap title)))
-	   (while items
-	     (setq choice (car items) items (cdr items))
-	     (if (consp choice)
-		 (let* ((name (car choice))
-		       (function (cdr choice))
-		       (character (aref name 0)))
-		   ;; Pick a character for this choice;
-		   ;; avoid duplication.
-		   (when (lookup-key map (vector character))
-		     (setq character (downcase character))
-		     (when (lookup-key map (vector character))
-		       (setq character next-digit
-			     next-digit (1+ next-digit))))
-		   (define-key map (vector character)
-		     (cons (format "%c = %s" character name) function)))))
-	   (define-key map [?\C-g] '("Quit" . keyboard-quit))
+	   (save-excursion
+	     (set-buffer (get-buffer-create " widget-choose"))
+	     (erase-buffer)
+	     (insert "Available choices:\n\n")
+	     (while items
+	       (setq choice (car items) items (cdr items))
+	       (if (consp choice)
+		   (let* ((name (car choice))
+			 (function (cdr choice)))
+		     (insert (format "%c = %s\n" next-digit name))
+		     (define-key map (vector next-digit) function)))
+	       ;; Allocate digits to disabled alternatives
+	       ;; so that the digit of a given alternative never varies.
+	       (setq next-digit (1+ next-digit)))
+	     (insert "\nC-g = Quit"))
+	   (define-key map [?\C-g] 'keyboard-quit)
 	   (define-key map [t] 'keyboard-quit)
 	   (setcdr map (nreverse (cdr map)))
 	   ;; Unread a SPC to lead to our new menu.
 	   (setq unread-command-events (cons ?\ unread-command-events))
 	   ;; Read a char with the menu, and return the result
 	   ;; that corresponds to it.
-	   (setq value
-		 (lookup-key overriding-terminal-local-map
-			     (read-key-sequence title) t))
+	   (save-window-excursion
+	     (display-buffer (get-buffer " widget-choose"))
+	     (let ((cursor-in-echo-area t))
+	       (setq value
+		     (lookup-key overriding-terminal-local-map
+				 (read-key-sequence title) t))))
 	   (when (eq value 'keyboard-quit)
 	     (error "Canceled"))
 	   value))))
@@ -340,18 +328,6 @@
 ;; 
 ;; These functions are for specifying text properties. 
 
-(defun widget-specify-none (from to)
-  ;; Clear all text properties between FROM and TO.
-  (set-text-properties from to nil))
-
-(defun widget-specify-text (from to)
-  ;; Default properties.
-  (add-text-properties from to (list 'read-only t
-				     'front-sticky t
-				     'rear-nonsticky nil
-				     'start-open nil
-				     'end-open nil)))
-
 (defcustom widget-field-add-space 
   (or (< emacs-major-version 20)
       (and (eq emacs-major-version 20)
@@ -366,11 +342,11 @@
   :group 'widgets)
 
 (defcustom widget-field-use-before-change
-  (or (> emacs-minor-version 34)
-      (> emacs-major-version 20)
-      (string-match "XEmacs" emacs-version))
+  (and (or (> emacs-minor-version 34)
+	   (> emacs-major-version 19))
+       (not (string-match "XEmacs" emacs-version)))
   "Non-nil means use `before-change-functions' to track editable fields.
-This enables the use of undo, but doesn'f work on Emacs 19.34 and earlier. 
+This enables the use of undo, but doesn't work on Emacs 19.34 and earlier. 
 Using before hooks also means that the :notify function can't know the
 new value."
   :type 'boolean
@@ -378,26 +354,22 @@
 
 (defun widget-specify-field (widget from to)
   "Specify editable button for WIDGET between FROM and TO."
-  (put-text-property from to 'read-only nil)
   ;; Terminating space is not part of the field, but necessary in
   ;; order for local-map to work.  Remove next sexp if local-map works
   ;; at the end of the overlay.
   (save-excursion
     (goto-char to)
-    (when widget-field-add-space
-      (insert-and-inherit " "))
+    (cond ((null (widget-get widget :size))
+	   (forward-char 1))
+	  (widget-field-add-space
+	   (insert-and-inherit " ")))
     (setq to (point)))
-  (if widget-field-add-space
-      (add-text-properties (1- to) to
-			   '(front-sticky nil start-open t read-only to))
-    (add-text-properties to (1+ to) 
-			 '(front-sticky nil start-open t read-only to)))
-  (add-text-properties (1- from) from 
-		       '(rear-nonsticky t end-open t read-only from))
   (let ((map (widget-get widget :keymap))
 	(face (or (widget-get widget :value-face) 'widget-field-face))
 	(help-echo (widget-get widget :help-echo))
-	(overlay (make-overlay from to nil nil t)))
+	(overlay (make-overlay from to nil 
+			       nil (or (not widget-field-add-space)
+				       (widget-get widget :size)))))
     (unless (or (stringp help-echo) (null help-echo))
       (setq help-echo 'widget-mouse-help))    
     (widget-put widget :field-overlay overlay)
@@ -437,15 +409,17 @@
 
 (defun widget-specify-sample (widget from to)
   ;; Specify sample for WIDGET between FROM and TO.
-  (let ((face (widget-apply widget :sample-face-get)))
-    (when face
-      (add-text-properties from to (list 'start-open t
-					 'end-open t
-					 'face face)))))
+  (let ((face (widget-apply widget :sample-face-get))
+	(overlay (make-overlay from to nil t nil)))
+    (overlay-put overlay 'face face)
+    (widget-put widget :sample-overlay overlay)))
+
 (defun widget-specify-doc (widget from to)
   ;; Specify documentation for WIDGET between FROM and TO.
-  (add-text-properties from to (list 'widget-doc widget
-				     'face widget-documentation-face)))
+  (let ((overlay (make-overlay from to nil t nil)))
+    (overlay-put overlay 'widget-doc widget)
+    (overlay-put overlay 'face widget-documentation-face)
+    (widget-put widget :doc-overlay overlay)))
 
 (defmacro widget-specify-insert (&rest form)
   ;; Execute FORM without inheriting any text properties.
@@ -457,7 +431,6 @@
 	   after-change-functions)
        (insert "<>")
        (narrow-to-region (- (point) 2) (point))
-       (widget-specify-none (point-min) (point-max))
        (goto-char (1+ (point-min)))
        (setq result (progn (,@ form)))
        (delete-region (point-min) (1+ (point-min)))
@@ -870,8 +843,7 @@
 	before-change-functions
 	after-change-functions
 	(from (point)))
-    (apply 'insert args)
-    (widget-specify-text from (point))))
+    (apply 'insert args)))
 
 (defun widget-convert-text (type from to
 				 &optional button-from button-to
@@ -885,7 +857,6 @@
   (let ((widget (apply 'widget-convert type :delete 'widget-leave-text args))
 	(from (copy-marker from))
 	(to (copy-marker to)))
-    (widget-specify-text from to)
     (set-marker-insertion-type from t)
     (set-marker-insertion-type to nil)
     (widget-put widget :from from)
@@ -907,12 +878,18 @@
   (let ((from (widget-get widget :from))
 	(to (widget-get widget :to))
 	(button (widget-get widget :button-overlay))
+	(sample (widget-get widget :sample-overlay))
+	(doc (widget-get widget :doc-overlay))
 	(field (widget-get widget :field-overlay))
 	(children (widget-get widget :children)))
     (set-marker from nil)
     (set-marker to nil)
     (when button
       (delete-overlay button))
+    (when sample
+      (delete-overlay sample))
+    (when doc
+      (delete-overlay doc))
     (when field
       (delete-overlay field))
     (mapcar 'widget-leave-text children)))
@@ -1106,6 +1083,12 @@
 	    widget))
       nil)))
 
+(defcustom widget-use-overlay-change (string-match "XEmacs" emacs-version)
+  "If non-nil, use overlay change functions to tab around in the buffer.
+This is much faster, but doesn't work reliably on Emacs 19.34."
+  :type 'boolean
+  :group 'widgets)
+
 (defun widget-move (arg)
   "Move point to the ARG next field or button.
 ARG may be negative to move backward."
@@ -1116,9 +1099,12 @@
 	new)
     ;; Forward.
     (while (> arg 0)
-      (if (eobp)
-	  (goto-char (point-min))
-	(forward-char 1))
+      (cond ((eobp)
+	     (goto-char (point-min)))
+	    (widget-use-overlay-change
+	     (goto-char (next-overlay-change (point))))
+	    (t
+	     (forward-char 1)))
       (and (eq pos (point))
 	   (eq arg number)
 	   (error "No buttons or fields found"))
@@ -1129,9 +1115,12 @@
 	    (setq old new)))))
     ;; Backward.
     (while (< arg 0)
-      (if (bobp)
-	  (goto-char (point-max))
-	(backward-char 1))
+      (cond ((bobp)
+	     (goto-char (point-max)))
+	    (widget-use-overlay-change
+	     (goto-char (previous-overlay-change (point))))
+	    (t
+	     (backward-char 1)))
       (and (eq pos (point))
 	   (eq arg number)
 	   (error "No buttons or fields found"))
@@ -1167,7 +1156,9 @@
 	 (start (and field (widget-field-start field))))
     (if (and start (not (eq start (point))))
 	(goto-char start)
-      (call-interactively 'beginning-of-line))))
+      (call-interactively 'beginning-of-line)))
+  ;; XEmacs: preserve the region
+  (setq zmacs-region-stays t))
 
 (defun widget-end-of-line ()
   "Go to end of field or end of line, whichever is first."
@@ -1176,7 +1167,9 @@
 	 (end (and field (widget-field-end field))))
     (if (and end (not (eq end (point))))
 	(goto-char end)
-      (call-interactively 'end-of-line))))
+      (call-interactively 'end-of-line)))
+  ;; XEmacs: preserve the region
+  (setq zmacs-region-stays t))
 
 (defun widget-kill-line ()
   "Kill to end of field or end of line, whichever is first."
@@ -1230,14 +1223,7 @@
 	(set-marker from nil)
 	(set-marker to nil))))
   (widget-clear-undo)
-  ;; We need to maintain text properties and size of the editing fields.
-  (make-local-variable 'after-change-functions)
-  (setq after-change-functions
-	(if widget-field-list '(widget-after-change) nil))
-  (when widget-field-use-before-change
-    (make-local-variable 'before-change-functions)
-    (setq before-change-functions
-	  (if widget-field-list '(widget-before-change) nil))))
+  (widget-add-change))
 
 (defvar widget-field-last nil)
 ;; Last field containing point.
@@ -1261,7 +1247,8 @@
   "Return the end of WIDGET's editing field."
   (let ((overlay (widget-get widget :field-overlay)))
     ;; Don't subtract one if local-map works at the end of the overlay.
-    (and overlay (if widget-field-add-space
+    (and overlay (if (or widget-field-add-space
+			 (null (widget-get widget :size)))
 		     (1- (overlay-end overlay))
 		   (overlay-end overlay)))))
 
@@ -1281,13 +1268,29 @@
 	  (setq found field))))
     found))
 
-(defun widget-before-change (from &rest ignore)
+(defun widget-before-change (from to)
   ;; This is how, for example, a variable changes its state to `modified'.
   ;; when it is being edited.
-  (condition-case nil
-      (let ((field (widget-field-find from)))
-	(widget-apply field :notify field))
-    (error (debug "Before Change"))))
+  (let ((from-field (widget-field-find from))
+	(to-field (widget-field-find to)))
+    (cond ((not (eq from-field to-field))
+	   (add-hook 'post-command-hook 'widget-add-change nil t)
+	   (error "Change should be restricted to a single field"))
+	  ((null from-field)
+	   (add-hook 'post-command-hook 'widget-add-change nil t)
+	   (error "Attempt to change text outside editable field"))
+	  (widget-field-use-before-change
+	   (condition-case nil
+	       (widget-apply from-field :notify from-field)
+	     (error (debug "Before Change")))))))
+
+(defun widget-add-change ()
+  (make-local-hook 'post-command-hook)
+  (remove-hook 'post-command-hook 'widget-add-change t)
+  (make-local-hook 'before-change-functions)
+  (add-hook 'before-change-functions 'widget-before-change nil t)
+  (make-local-hook 'after-change-functions)
+  (add-hook 'after-change-functions 'widget-after-change nil t))
 
 (defun widget-after-change (from to old)
   ;; Adjust field size and text properties.
@@ -1483,7 +1486,6 @@
        (widget-apply widget :value-create)))
    (let ((from (copy-marker (point-min)))
 	 (to (copy-marker (point-max))))
-     (widget-specify-text from to)
      (set-marker-insertion-type from t)
      (set-marker-insertion-type to nil)
      (widget-put widget :from from)
@@ -1530,17 +1532,13 @@
 	   (error "Unknown escape `%c'" escape)))
     (widget-put widget :buttons buttons)))
 
-(defvar widget-button-face nil
-  "Face to use for buttons.
-This is a variable so that it can be buffer-local.")
-
 (defun widget-default-button-face-get (widget)
   ;; Use :button-face or widget-button-face
   (or (widget-get widget :button-face)
       (let ((parent (widget-get widget :parent)))
 	(if parent
 	    (widget-apply parent :button-face-get)
-	  'widget-button-face))))
+	  widget-button-face))))
 
 (defun widget-default-sample-face-get (widget)
   ;; Use :sample-face.
@@ -1552,6 +1550,8 @@
 	(to (widget-get widget :to))
 	(inactive-overlay (widget-get widget :inactive))
 	(button-overlay (widget-get widget :button-overlay))
+	(sample-overlay (widget-get widget :sample-overlay))
+	(doc-overlay (widget-get widget :doc-overlay))
 	before-change-functions
 	after-change-functions
 	(inhibit-read-only t))
@@ -1560,6 +1560,10 @@
       (delete-overlay inactive-overlay))
     (when button-overlay
       (delete-overlay button-overlay))
+    (when sample-overlay
+      (delete-overlay sample-overlay))
+    (when doc-overlay
+      (delete-overlay doc-overlay))
     (when (< from to)
       ;; Kludge: this doesn't need to be true for empty formats.
       (delete-region from to))
@@ -1782,6 +1786,36 @@
   (require 'browse-url)
   (funcall browse-url-browser-function (widget-value widget)))
 
+;;; The `file-link' Widget.
+
+(define-widget 'file-link 'link
+  "A link to a file."
+  :action 'widget-file-link-action)
+
+(defun widget-file-link-action (widget &optional event)
+  "Find the file specified by WIDGET."
+  (find-file (widget-value widget)))
+
+;;; The `emacs-library-link' Widget.
+
+(define-widget 'emacs-library-link 'link
+  "A link to an Emacs Lisp library file."
+  :action 'widget-emacs-library-link-action)
+
+(defun widget-emacs-library-link-action (widget &optional event)
+  "Find the Emacs Library file specified by WIDGET."
+  (find-file (locate-library (widget-value widget))))
+
+;;; The `emacs-commentary-link' Widget.
+    
+(define-widget 'emacs-commentary-link 'link
+  "A link to Commentary in an Emacs Lisp library file."
+  :action 'widget-emacs-commentary-link-action)
+    
+(defun widget-emacs-commentary-link-action (widget &optional event)
+  "Find the Commentary section of the Emacs file specified by WIDGET."
+  (finder-commentary (widget-value widget)))
+
 ;;; The `editable-field' Widget.
 
 (define-widget 'editable-field 'default
@@ -2026,7 +2060,7 @@
 				      (widget-get current :value)))
       (widget-setup)
       (widget-apply widget :notify widget event)))
-  (run-hooks 'widget-edit-hook))
+  (run-hook-with-args 'widget-edit-functions widget))
 
 (defun widget-choice-validate (widget)
   ;; Valid if we have made a valid choice.
@@ -2082,7 +2116,7 @@
   ;; Toggle value.
   (widget-value-set widget (not (widget-value widget)))
   (widget-apply widget :notify widget event)
-  (run-hooks 'widget-edit-hook))
+  (run-hook-with-args 'widget-edit-functions widget))
 
 ;;; The `checkbox' Widget.
 
@@ -2569,8 +2603,6 @@
 	(when (< (widget-get child :entry-from) (widget-get widget :from))
 	  (set-marker (widget-get widget :from)
 		      (widget-get child :entry-from)))
-	(widget-specify-text (widget-get child :entry-from)
-			     (widget-get child :entry-to))
 	(if (eq (car children) before)
 	    (widget-put widget :children (cons child children))
 	  (while (not (eq (car (cdr children)) before))
@@ -2644,7 +2676,6 @@
 				      (widget-get widget :buttons))))
      (let ((entry-from (copy-marker (point-min)))
 	   (entry-to (copy-marker (point-max))))
-       (widget-specify-text entry-from entry-to)
        (set-marker-insertion-type entry-from t)
        (set-marker-insertion-type entry-to nil)
        (widget-put child :entry-from entry-from)
@@ -2903,7 +2934,8 @@
   "A regular expression."
   :match 'widget-regexp-match
   :validate 'widget-regexp-validate
-  :value-face 'widget-single-line-field-face
+  ;; Doesn't work well with terminating newline.
+  ;; :value-face 'widget-single-line-field-face
   :tag "Regexp")
 
 (defun widget-regexp-match (widget value)
@@ -2929,7 +2961,8 @@
   :complete-function 'widget-file-complete
   :prompt-value 'widget-file-prompt-value
   :format "%{%t%}: %v"
-  :value-face 'widget-single-line-field-face
+  ;; Doesn't work well with terminating newline.
+  ;; :value-face 'widget-single-line-field-face
   :tag "File")
 
 (defun widget-file-complete ()
@@ -3315,57 +3348,61 @@
 
 ;;; The `color' Widget.
 
-(define-widget 'color-item 'choice-item
-  "A color name (with sample)."
-  :format "%v (%{sample%})\n"
-  :sample-face-get 'widget-color-item-button-face-get)
-
-(defun widget-color-item-button-face-get (widget)
-  (let ((symbol (intern (concat "fg:" (widget-value widget)))))
+(define-widget 'color 'editable-field 
+  "Choose a color name (with sample)."
+  :format "%t: %v (%{sample%})\n"
+  :size 10
+  :tag "Color"
+  :value "black"
+  :complete 'widget-color-complete
+  :sample-face-get 'widget-color-sample-face-get
+  :notify 'widget-color-notify
+  :action 'widget-color-action)
+
+(defun widget-color-complete (widget)
+  "Complete the color in WIDGET."
+  (let* ((prefix (buffer-substring-no-properties (widget-field-start widget)
+						 (point)))
+	 (list (widget-color-choice-list))
+	 (completion (try-completion prefix list)))
+    (cond ((eq completion t)
+	   (message "Exact match."))
+	  ((null completion)
+	   (error "Can't find completion for \"%s\"" prefix))
+	  ((not (string-equal prefix completion))
+	   (insert-and-inherit (substring completion (length prefix))))
+	  (t
+	   (message "Making completion list...")
+	   (let ((list (all-completions prefix list nil)))
+	     (with-output-to-temp-buffer "*Completions*"
+	       (display-completion-list list)))
+	   (message "Making completion list...done")))))
+
+(defun widget-color-sample-face-get (widget)
+  (let* ((value (condition-case nil
+		    (widget-value widget)
+		  (error (widget-get widget :value))))
+	 (symbol (intern (concat "fg:" value))))
     (if (string-match "XEmacs" emacs-version)
 	(prog1 symbol
 	  (or (find-face symbol)
-	      (set-face-foreground (make-face symbol) (widget-value widget))))
+	      (set-face-foreground (make-face symbol) value)))
       (condition-case nil
 	  (facemenu-get-face symbol)
 	(error 'default)))))
 
-(define-widget 'color 'push-button
-  "Choose a color name (with sample)."
-  :format "%[%t%]: %v"
-  :tag "Color"
-  :value "black"
-  :value-create 'widget-color-value-create
-  :value-delete 'widget-children-value-delete
-  :value-get 'widget-color-value-get
-  :value-set 'widget-color-value-set
-  :action 'widget-color-action
-  :match 'widget-field-match
-  :tag "Color")
-
 (defvar widget-color-choice-list nil)
 ;; Variable holding the possible colors.
 
 (defun widget-color-choice-list ()
   (unless widget-color-choice-list
     (setq widget-color-choice-list 
-	  (mapcar '(lambda (color) (list color))
-		  (x-defined-colors))))
+	  (if (fboundp 'read-color-completion-table)
+	      (read-color-completion-table)
+	    (mapcar '(lambda (color) (list color))
+		    (x-defined-colors)))))
   widget-color-choice-list)
 
-(defun widget-color-value-create (widget)
-  (let ((child (widget-create-child-and-convert
-		widget 'color-item (widget-get widget :value))))
-    (widget-put widget :children (list child))))
-
-(defun widget-color-value-get (widget)
-  ;; Pass command to first child.
-  (widget-apply (car (widget-get widget :children)) :value-get))
-
-(defun widget-color-value-set (widget value)
-  ;; Pass command to first child.
-  (widget-apply (car (widget-get widget :children)) :value-set value))
-
 (defvar widget-color-history nil
   "History of entered colors")
 
@@ -3373,19 +3410,32 @@
   ;; Prompt for a color.
   (let* ((tag (widget-apply widget :menu-tag-get))
 	 (prompt (concat tag ": "))
-	 (answer (cond ((string-match "XEmacs" emacs-version)
-			(read-color prompt))
-		       ((fboundp 'x-defined-colors)
-			(completing-read (concat tag ": ")
-					 (widget-color-choice-list) 
-					 nil nil nil 'widget-color-history))
-		       (t
-			(read-string prompt (widget-value widget))))))
+	 (value (widget-value widget))
+	 (start (widget-field-start widget))
+	 (pos (cond ((< (point) start)
+		     0)
+		    ((> (point) (+ start (length value)))
+		     (length value))
+		    (t
+		     (- (point) start))))
+	 (answer (if (commandp 'read-color)
+		     (read-color prompt)
+		   (completing-read (concat tag ": ")
+				    (widget-color-choice-list) 
+				    nil nil 
+				    (cons value pos)
+				    'widget-color-history))))
     (unless (zerop (length answer))
       (widget-value-set widget answer)
       (widget-setup)
       (widget-apply widget :notify widget event))))
 
+(defun widget-color-notify (widget child &optional event)
+  "Update the sample, and notofy the parent."
+  (overlay-put (widget-get widget :sample-overlay) 
+	       'face (widget-apply widget :sample-face-get))
+  (widget-default-notify widget child event))
+
 ;;; The Help Echo
 
 (defun widget-echo-help-mouse ()
--- a/lisp/custom/widget-example.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/custom/widget-example.el	Mon Aug 13 09:49:09 2007 +0200
@@ -4,7 +4,7 @@
 ;;
 ;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
 ;; Keywords: help, extensions, faces, hypermedia
-;; Version: 1.9940
+;; Version: 1.9951
 ;; X-URL: http://www.dina.kvl.dk/~abraham/custom/
 
 (require 'widget)
--- a/lisp/custom/widget.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/custom/widget.el	Mon Aug 13 09:49:09 2007 +0200
@@ -4,7 +4,7 @@
 ;;
 ;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
 ;; Keywords: help, extensions, faces, hypermedia
-;; Version: 1.9940
+;; Version: 1.9951
 ;; X-URL: http://www.dina.kvl.dk/~abraham/custom/
 
 ;; This file is part of GNU Emacs.
@@ -44,7 +44,8 @@
 	     (set (car keywords) (car keywords)))
 	 (setq keywords (cdr keywords)))))))
 
-(define-widget-keywords :match-alternatives :documentation-indent
+(define-widget-keywords :doc-overlay :sample-overlay
+  :match-alternatives :documentation-indent
   :complete-function :complete :button-overlay
   :field-overlay  
   :documentation-shown :button-prefix  
--- a/lisp/emulators/crisp.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/emulators/crisp.el	Mon Aug 13 09:49:09 2007 +0200
@@ -1,46 +1,51 @@
 ;; @(#) crisp.el -- CRiSP/Brief Emacs emulator
 
 ;; Author: Gary D. Foster <Gary.Foster@corp.sun.com>
-;; $Revision: 1.3 $
+;; 1.19
 ;; Keywords: emulations brief crisp
 
-;; This file is part of GNU Emacs.
+;; This file is part of XEmacs.
 
-;; GNU Emacs is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
+;; XEmacs is free software; you can redistribute it and/or modify it
+;; under the terms of the GNU General Public License as published by
 ;; the Free Software Foundation; either version 2, or (at your option)
 ;; any later version.
 
-;; GNU Emacs is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-;; GNU General Public License for more details.
+;; XEmacs is distributed in the hope that it will be useful, but
+;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+;; General Public License for more details.
 
 ;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; along with XEmacs; see the file COPYING.  If not, write to the Free
+;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+;; 02111-1307, USA.
+
+;; CRiSP is a registered trademark of Foxtrot Systems Ltd.
 
 ;;; Commentary:
 
 ;; Keybindings and minor functions to duplicate the functionality and
-;; finger-feel of the Crisp/Brief editor.  This package is designed to
+;; finger-feel of the CRiSP/Brief editor.  This package is designed to
 ;; facilitate transitioning from Brief to (XE|E)macs with a minimum
 ;; amount of hassles.
 
-;; Enable this package by putting the following in your .emacs
-;; (require 'crisp)
-;; and use M-x crisp-mode to toggle it on or off.
+;; Enable this package by putting (require 'crisp) in your .emacs and
+;; use M-x crisp-mode to toggle it on or off.
 
-;; This package will automatically default to loading the scroll-lock.el
-;; package unless you put (setq crisp-load-scroll-lock nil) in your
-;; .emacs.  If this feature is enabled, it will bind meta-f1 to the
-;; scroll-lock mode toggle.
+;; This package will automatically load the scroll-lock.el package if
+;; you put (setq crisp-load-scroll-lock t) in your .emacs before
+;; loading this package.  If this feature is enabled, it will bind
+;; meta-f1 to the scroll-lock mode toggle.  The scroll-lock package
+;; duplicates the scroll-locking feature in CRiSP.
 
-;; Also, the default keybindings for brief override the meta-x key to
-;; exit the editor.  If you don't like this functionality, you can
-;; prevent this key from being rebound with
-;; (setq crisp-override-meta-x nil) in your .emacs.
+;; Also, the default keybindings for brief/CRiSP override the M-x
+;; key to exit the editor.  If you don't like this functionality, you
+;; can prevent this behavior (or redefine it dynamically) by setting
+;; the value of `crisp-override-meta-x' either in your .emacs or
+;; interactively.  The default setting is nil, which means that M-x will
+;; by default run `execute-extended-command' instead of the command
+;; `save-buffers-kill-emacs'.
 
 ;; Finally, if you want to change the string displayed in the modeline
 ;; when this mode is in effect, override the definition of
@@ -52,43 +57,49 @@
 
 ;; local variables
 
+(defgroup emulations-crisp nil
+  "CRiSP emulator customizable settings."
+  :group 'emulations)
+
 (defvar crisp-mode-map (copy-keymap (current-global-map))
   "Local keymap for CRiSP emulation mode.
 All the bindings are done here instead of globally to try and be
 nice to the world.")
 
-(defvar crisp-mode-modeline-string " *CRiSP*"
-  "String to display in the modeline when CRiSP emulation mode is enabled.")
+(defcustom crisp-mode-modeline-string " *CRiSP*"
+  "*String to display in the modeline when CRiSP emulation mode is enabled."
+  :type 'string
+  :group 'emulations-crisp)
 
 (defvar crisp-mode-original-keymap (copy-keymap (current-global-map))
   "The original keymap before CRiSP emulation mode remaps anything.
 This keymap is restored when CRiSP emulation mode is disabled.")
 
-(defvar crisp-mode-enabled 'nil
+(defvar crisp-mode-enabled nil
   "Track status of CRiSP emulation mode.
 A value of nil means CRiSP mode is not enabled.  A value of t
 indicates CRiSP mode is enabled.")
 
-(defvar crisp-override-meta-x 't
-  "Controls overriding the normal Emacs M-x key binding in the CRiSP emulator.
-Normally the CRiSP emulator rebinds M-x to save-buffers-exit-emacs
-and provides the usual M-x functionality on the F10 key.
+(defcustom crisp-override-meta-x t
+  "*Controls overriding the normal Emacs M-x key binding in the CRiSP emulator.
+Normally the CRiSP emulator rebinds M-x to save-buffers-exit-emacs and
+provides the usual M-x functionality on the F10 key.  If this variable
+is non-nil, M-x will exit Emacs."
+  :type 'boolean
+  :group 'emulations-crisp)
 
-If this variable is nil when you start the CRiSP emulator, it
-does not alter the binding of M-x.")
-
-(defvar crisp-load-scroll-lock 't
+(defvar crisp-load-scroll-lock nil
   "Controls loading of the Scroll Lock in the CRiSP emulator.
 Its Default behavior is to load and enable the Scroll Lock minor mode
 package when enabling the CRiSP emulator.
 
 If this variable is nil when you start the CRiSP emulator, it
-does not load Scroll Lock.")
+does not load the scroll-lock package.")
 
 (defvar crisp-load-hook nil
-  "Hooks to run after loadint the CRiSP emulator package.")
+  "Hooks to run after loading the CRiSP emulator package.")
 
-(defvar crisp-version "crisp.el release 1.1/$Revision: 1.3 $"
+(defconst crisp-version "crisp.el release 1.1/1.19"
   "The release number and RCS version for the CRiSP emulator.")
 
 (if (string-match "XEmacs\\Lucid" emacs-version)
@@ -146,9 +157,7 @@
 (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)
-(if
- (eq crisp-override-meta-x 't)
-  (define-key crisp-mode-map [(meta x)]     'save-buffers-kill-emacs))
+(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")))
@@ -201,6 +210,16 @@
      (end-of-line)))
   (setq last-last-command last-command))
 
+(defun crisp-meta-x-wrapper ()
+  "Wrapper function to conditionally override the normal M-x bindings.
+When `crisp-override-meta-x' is non-nil, M-x will exit Emacs (the
+normal CRiSP binding) and when it is nil M-x will run
+`execute-extended-command' (the normal Emacs binding)."
+  (interactive)
+  (if crisp-override-meta-x
+      (save-buffers-kill-emacs)
+    (call-interactively 'execute-extended-command)))
+
 ;; Now enable the mode
 
 (defun crisp-mode ()
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/emulators/custom-load.el	Mon Aug 13 09:49:09 2007 +0200
@@ -0,0 +1,1 @@
+(custom-put 'emulations-crisp 'custom-loads '("crisp"))
--- a/lisp/gnus/ChangeLog	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/gnus/ChangeLog	Mon Aug 13 09:49:09 2007 +0200
@@ -1,3 +1,50 @@
+Sat Jul 12 19:46:22 1997  Lars Magne Ingebrigtsen  <larsi@menja.ifi.uio.no>
+
+	* gnus.el: Gnus v5.4.63 is released.
+
+Sat Jul 12 17:02:30 1997  Lars Magne Ingebrigtsen  <larsi@ifi.uio.no>
+
+	* gnus-undo.el (gnus-undo-mode): Use it.
+
+	* gnus-salt.el (gnus-pick-mode): Use it.
+
+	* gnus-gl.el (gnus-grouplens-mode): Use it.
+
+	* gnus-ems.el (gnus-add-minor-mode): New function.
+
+Sat Jul 12 16:21:41 1997  Michael R. Cook  <mcook@cognex.com>
+
+	* gnus-topic.el (gnus-topic-toggle-display-empty-topics): List
+	groups. 
+
+Fri Jul 11 21:12:07 1997  Per Abrahamsen  <abraham@dina.kvl.dk>
+
+	* gnus-art.el (gnus-article-treat-html): Use `w3-region'.
+
+Fri Jul 11 13:20:58 1997  Lars Magne Ingebrigtsen  <larsi@ifi.uio.no>
+
+	* message.el (message-check-news-header-syntax): Check repeated
+	groups. 
+
+	* gnus-move.el (gnus-move-group-to-server): Protect against nil
+	articles. 
+
+Thu Jul 10 20:01:44 1997  Lars Magne Ingebrigtsen  <larsi@ifi.uio.no>
+
+	* gnus-start.el (gnus-check-first-time-used): Force reading the
+	active file the first time Gnus is used.
+
+	* gnus-group.el (gnus-group-set-mode-line): Conditionalize
+	modified. 
+
+	* gnus-ems.el (gnus-mode-line-modified): New variable.
+
+	* gnus-xmas.el (gnus-summary-toolbar): Typo fix.
+
+Mon Jul  7 11:06:32 1997  Lars Magne Ingebrigtsen  <larsi@ifi.uio.no>
+
+	* gnus-start.el (gnus-check-new-newsgroups): New default.
+
 Sun Jul  6 17:22:47 1997  Lars Magne Ingebrigtsen  <larsi@menja.ifi.uio.no>
 
 	* gnus.el: Gnus v5.4.62 is released.
--- a/lisp/gnus/custom-load.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/gnus/custom-load.el	Mon Aug 13 09:49:09 2007 +0200
@@ -1,3 +1,4 @@
+(custom-put 'gnus-cache 'custom-loads '())
 (custom-put 'smiley 'custom-loads '())
 (custom-put 'nnmail-various 'custom-loads '("nnmail"))
 (custom-put 'nnmail-procmail 'custom-loads '("nnmail"))
--- a/lisp/gnus/gnus-art.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/gnus/gnus-art.el	Mon Aug 13 09:49:09 2007 +0200
@@ -1126,7 +1126,7 @@
       nil)))
 
 (eval-and-compile
-  (autoload 'w3-parse-buffer "w3-parse")
+  (autoload 'w3-display "w3-parse")
   (autoload 'w3-do-setup "w3" "" t))
 
 (defun gnus-article-treat-html ()
@@ -1146,8 +1146,8 @@
 	(insert-buffer-substring gnus-article-buffer b e)
 	(require 'url)
 	(save-window-excursion
-	  (w3-parse-buffer (current-buffer))
-	  (setq buf (buffer-string))))
+	  (w3-region (point-min) (point-max))
+	  (setq buf (buffer-substring-no-properties (point-min) (point-max)))))
       (when buf
 	(delete-region (point-min) (point-max))
 	(insert buf))
--- a/lisp/gnus/gnus-ems.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/gnus/gnus-ems.el	Mon Aug 13 09:49:09 2007 +0200
@@ -34,6 +34,11 @@
 
 (defvar gnus-mouse-2 [mouse-2])
 (defvar gnus-down-mouse-2 [down-mouse-2])
+(defvar gnus-mode-line-modified
+  (if (and (not gnus-xemacs)
+	   (< emacs-major-version 20))
+      '("--**-" . "-----")
+    '("**" "--")))
 
 (eval-and-compile
   (autoload 'gnus-xmas-define "gnus-xmas")
@@ -197,6 +202,15 @@
        (boundp 'mark-active)
        mark-active))
 
+(defun gnus-add-minor-mode (mode name map)
+  (if (fboundp 'add-minor-mode)
+      (add-minor-mode mode name map)
+    (unless (assq mode minor-mode-alist)
+      (push `(,mode ,name) minor-mode-alist))
+    (unless (assq mode minor-mode-map-alist)
+      (push (cons mode map)
+	    minor-mode-map-alist))))
+
 (provide 'gnus-ems)
 
 ;; Local Variables:
--- a/lisp/gnus/gnus-gl.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/gnus/gnus-gl.el	Mon Aug 13 09:49:09 2007 +0200
@@ -850,11 +850,8 @@
       (when (and menu-bar-mode
 		 (gnus-visual-p 'grouplens-menu 'menu))
 	(gnus-grouplens-make-menu-bar))
-      (unless (assq 'gnus-grouplens-mode minor-mode-alist)
-	(push '(gnus-grouplens-mode " GroupLens") minor-mode-alist))
-      (unless (assq 'gnus-grouplens-mode minor-mode-map-alist)
-	(push (cons 'gnus-grouplens-mode gnus-grouplens-mode-map)
-	      minor-mode-map-alist))
+      (gnus-add-minor-mode
+       'gnus-grouplens-mode " GroupLens" gnus-grouplens-mode-map)
       (run-hooks 'gnus-grouplens-mode-hook))))
 
 (provide 'gnus-gl)
--- a/lisp/gnus/gnus-group.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/gnus/gnus-group.el	Mon Aug 13 09:49:09 2007 +0200
@@ -1213,7 +1213,9 @@
 		     (not (zerop (buffer-size))))))
 	     (mode-string (eval gformat)))
 	;; Say whether the dribble buffer has been modified.
-	(setq mode-line-modified (if modified "**" "--"))
+	(setq mode-line-modified
+	      (if modified (car gnus-mode-line-modified)
+		(cdr gnus-mode-line-modified)))
 	;; If the line is too long, we chop it off.
 	(when (> (length mode-string) max-len)
 	  (setq mode-string (substring mode-string 0 (- max-len 4))))
--- a/lisp/gnus/gnus-move.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/gnus/gnus-move.el	Mon Aug 13 09:49:09 2007 +0200
@@ -59,15 +59,18 @@
   "Move group INFO from FROM-SERVER to TO-SERVER."
   (let ((group (gnus-info-group info))
 	to-active hashtb type mark marks
-	to-article to-reads to-marks article)
+	to-article to-reads to-marks article
+	act-articles)
     (gnus-message 7 "Translating %s..." group)
     (when (gnus-request-group group nil to-server)
       (setq to-active (gnus-parse-active)
-	    hashtb (gnus-make-hashtable 1024))
+	    hashtb (gnus-make-hashtable 1024)
+	    act-articles (gnus-uncompress-range to-active))
       ;; Fetch the headers from the `to-server'.
       (when (and to-active
+		 act-articles
 		 (setq type (gnus-retrieve-headers
-			     (gnus-uncompress-range to-active)
+			     act-articles
 			     group to-server)))
 	;; Convert HEAD headers.  I don't care.
 	(when (eq type 'headers)
--- a/lisp/gnus/gnus-salt.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/gnus/gnus-salt.el	Mon Aug 13 09:49:09 2007 +0200
@@ -130,11 +130,7 @@
       ;; Set up the menu.
       (when (gnus-visual-p 'pick-menu 'menu)
 	(gnus-pick-make-menu-bar))
-      (unless (assq 'gnus-pick-mode minor-mode-alist)
-	(push '(gnus-pick-mode " Pick") minor-mode-alist))
-      (unless (assq 'gnus-pick-mode minor-mode-map-alist)
-	(push (cons 'gnus-pick-mode gnus-pick-mode-map)
-	      minor-mode-map-alist))
+      (gnus-add-minor-mode 'gnus-pick-mode " Pick" gnus-pick-mode-map)
       (run-hooks 'gnus-pick-mode-hook))))
 
 (defun gnus-pick-setup-message ()
@@ -337,11 +333,7 @@
       ;; Set up the menu.
       (when (gnus-visual-p 'binary-menu 'menu)
 	(gnus-binary-make-menu-bar))
-      (unless (assq 'gnus-binary-mode minor-mode-alist)
-	(push '(gnus-binary-mode " Binary") minor-mode-alist))
-      (unless (assq 'gnus-binary-mode minor-mode-map-alist)
-	(push (cons 'gnus-binary-mode gnus-binary-mode-map)
-	      minor-mode-map-alist))
+      (gnus-add-minor-mode 'gnus-binary-mode " Binary" gnus-binary-mode-map)
       (run-hooks 'gnus-binary-mode-hook))))
 
 (defun gnus-binary-display-article (article &optional all-header)
--- a/lisp/gnus/gnus-score.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/gnus/gnus-score.el	Mon Aug 13 09:49:09 2007 +0200
@@ -1275,8 +1275,7 @@
 	  (erase-buffer)
 	  (let (emacs-lisp-mode-hook)
 	    (if (string-match
-		 (concat (regexp-quote gnus-adaptive-file-suffix)
-			 "$")
+		 (concat (regexp-quote gnus-adaptive-file-suffix) "$")
 		 file)
 		;; This is an adaptive score file, so we do not run
 		;; it through `pp'.  These files can get huge, and
--- a/lisp/gnus/gnus-start.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/gnus/gnus-start.el	Mon Aug 13 09:49:09 2007 +0200
@@ -79,7 +79,7 @@
   :group 'gnus-dribble-file
   :type '(choice directory (const nil)))
 
-(defcustom gnus-check-new-newsgroups t
+(defcustom gnus-check-new-newsgroups 'ask-server
   "*Non-nil means that Gnus will run gnus-find-new-newsgroups at startup.
 This normally finds new newsgroups by comparing the active groups the
 servers have already reported with those Gnus already knows, either alive
@@ -840,7 +840,7 @@
     ;; done in `gnus-get-unread-articles'.
     (and gnus-read-active-file
 	 (not level)
-	 (gnus-read-active-file))
+	 (gnus-read-active-file nil dont-connect))
 
     (unless gnus-active-hashtb
       (setq gnus-active-hashtb (gnus-make-hashtable 4096)))
@@ -897,8 +897,8 @@
   "Search for new newsgroups and add them.
 Each new newsgroup will be treated with `gnus-subscribe-newsgroup-method.'
 The `-n' option line from .newsrc is respected.
-If ARG (the prefix), use the `ask-server' method to query
-the server for new groups."
+If ARG (the prefix), use the `ask-server' method to query the server
+for new groups."
   (interactive "P")
   (let ((check (if (or (and arg (not (listp gnus-check-new-newsgroups)))
 		       (null gnus-read-active-file)
@@ -1052,7 +1052,8 @@
       nil
     (gnus-message 6 "First time user; subscribing you to default groups")
     (unless (gnus-read-active-file-p)
-      (gnus-read-active-file))
+      (let ((gnus-read-active-file t))
+	(gnus-read-active-file)))
     (setq gnus-newsrc-last-checked-date (current-time-string))
     (let ((groups gnus-default-subscribed-newsgroups)
 	  group)
@@ -1561,11 +1562,12 @@
   (gnus-dribble-touch))
 
 ;; Get the active file(s) from the backend(s).
-(defun gnus-read-active-file (&optional force)
+(defun gnus-read-active-file (&optional force not-native)
   (gnus-group-set-mode-line)
   (let ((methods
 	 (append
-	  (if (gnus-check-server gnus-select-method)
+	  (if (and (not not-native)
+		   (gnus-check-server gnus-select-method))
 	      ;; The native server is available.
 	      (cons gnus-select-method gnus-secondary-select-methods)
 	    ;; The native server is down, so we just do the
--- a/lisp/gnus/gnus-sum.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/gnus/gnus-sum.el	Mon Aug 13 09:49:09 2007 +0200
@@ -5018,11 +5018,8 @@
 	  (if (null arg) (not gnus-dead-summary-mode)
 	    (> (prefix-numeric-value arg) 0)))
     (when gnus-dead-summary-mode
-      (unless (assq 'gnus-dead-summary-mode minor-mode-alist)
-	(push '(gnus-dead-summary-mode " Dead") minor-mode-alist))
-      (unless (assq 'gnus-dead-summary-mode minor-mode-map-alist)
-	(push (cons 'gnus-dead-summary-mode gnus-dead-summary-mode-map)
-	      minor-mode-map-alist)))))
+      (gnus-add-minor-mode
+       'gnus-dead-summary-mode " Dead" gnus-dead-summary-mode-map))))
 
 (defun gnus-deaden-summary ()
   "Make the current summary buffer into a dead summary buffer."
--- a/lisp/gnus/gnus-topic.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/gnus/gnus-topic.el	Mon Aug 13 09:49:09 2007 +0200
@@ -945,11 +945,7 @@
       (setq gnus-topic-line-format-spec
 	    (gnus-parse-format gnus-topic-line-format
 			       gnus-topic-line-format-alist t))
-      (unless (assq 'gnus-topic-mode minor-mode-alist)
-	(push '(gnus-topic-mode " Topic") minor-mode-alist))
-      (unless (assq 'gnus-topic-mode minor-mode-map-alist)
-	(push (cons 'gnus-topic-mode gnus-topic-mode-map)
-	      minor-mode-map-alist))
+      (gnus-add-minor-mode 'gnus-topic-mode " Topic" gnus-topic-mode-map)
       (add-hook 'gnus-summary-exit-hook 'gnus-topic-update-topic)
       (add-hook 'gnus-group-catchup-group-hook 'gnus-topic-update-topic)
       (set (make-local-variable 'gnus-group-prepare-function)
@@ -1307,6 +1303,7 @@
   (interactive)
   (setq gnus-topic-display-empty-topics
 	(not gnus-topic-display-empty-topics))
+  (gnus-group-list-groups)
   (message "%s empty topics"
 	   (if gnus-topic-display-empty-topics
 	       "Showing" "Hiding")))
--- a/lisp/gnus/gnus-undo.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/gnus/gnus-undo.el	Mon Aug 13 09:49:09 2007 +0200
@@ -95,12 +95,7 @@
     ;; Set up the menu.
     (when (gnus-visual-p 'undo-menu 'menu)
       (gnus-undo-make-menu-bar))
-    ;; Don't display anything in the mode line -- too annoying.
-    ;;(unless (assq 'gnus-undo-mode minor-mode-alist)
-    ;;  (push '(gnus-undo-mode " Undo") minor-mode-alist))
-    (unless (assq 'gnus-undo-mode minor-mode-map-alist)
-      (push (cons 'gnus-undo-mode gnus-undo-mode-map)
-	    minor-mode-map-alist))
+    (gnus-add-minor-mode 'gnus-undo-mode "" gnus-undo-mode-map)
     (make-local-hook 'post-command-hook)
     (add-hook 'post-command-hook 'gnus-undo-boundary nil t)
     (run-hooks 'gnus-undo-mode-hook)))
--- a/lisp/gnus/gnus-uu.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/gnus/gnus-uu.el	Mon Aug 13 09:49:09 2007 +0200
@@ -1386,7 +1386,7 @@
 
 	(if (not (looking-at gnus-uu-begin-string))
 	    (setq state (list 'middle))
-	  ;; This is the beginning of an uuencoded article.
+	  ;; This is the beginning of a uuencoded article.
 	  ;; We replace certain characters that could make things messy.
 	  (setq gnus-uu-file-name
 		(let ((nnheader-file-name-translation-alist
--- a/lisp/gnus/gnus-xmas.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/gnus/gnus-xmas.el	Mon Aug 13 09:49:09 2007 +0200
@@ -646,7 +646,7 @@
     [gnus-summary-save-article
      gnus-summary-save-article t "Save article"]
     [gnus-uu-post-news
-     gnus-uu-post-news t "Post an uuencoded article"]
+     gnus-uu-post-news t "Post a uuencoded article"]
     [gnus-summary-cancel-article
      gnus-summary-cancel-article t "Cancel article"]
     [gnus-summary-catchup
--- a/lisp/gnus/gnus.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/gnus/gnus.el	Mon Aug 13 09:49:09 2007 +0200
@@ -238,7 +238,7 @@
   :link '(custom-manual "(gnus)Exiting Gnus")
   :group 'gnus)
 
-(defconst gnus-version-number "5.4.62"
+(defconst gnus-version-number "5.4.63"
   "Version number for this version of Gnus.")
 
 (defconst gnus-version (format "Gnus v%s" gnus-version-number)
--- a/lisp/gnus/message.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/gnus/message.el	Mon Aug 13 09:49:09 2007 +0200
@@ -2208,6 +2208,22 @@
 	 (y-or-n-p
 	  (format "The %s header looks odd: \"%s\".  Really post? "
 		  (car headers) header)))))
+   (message-check 'repeated-newsgroups
+     (let ((case-fold-search t)
+	   (headers '("Newsgroups" "Followup-To"))
+	   header error groups group)
+       (while (and headers
+		   (not error))
+	 (when (setq header (mail-fetch-field (pop headers)))
+	   (setq groups (message-tokenize-header header ","))
+	   (while (setq group (pop groups))
+	     (when (member group groups)
+	       (setq error group
+		     groups nil)))))
+       (if (not error)
+	   t
+	 (y-or-n-p
+	  (format "Group %s is repeated in headers.  Really post? " error)))))
    ;; Check the From header.
    (message-check 'from
      (let* ((case-fold-search t)
--- a/lisp/gnus/nnweb.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/gnus/nnweb.el	Mon Aug 13 09:49:09 2007 +0200
@@ -342,7 +342,7 @@
   (goto-char (point-min))
   (while (re-search-forward "&\\([a-z]+\\);" nil t)
     (replace-match (char-to-string (or (cdr (assq (intern (match-string 1))
-						  w3-html-entities ))
+						  w3-html-entities))
 				       ?#))
 		   t t)))
 
--- a/lisp/mel/mel-u.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/mel/mel-u.el	Mon Aug 13 09:49:09 2007 +0200
@@ -4,7 +4,7 @@
 
 ;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
 ;; Created: 1995/10/25
-;; Version: $Id: mel-u.el,v 1.3 1997/03/16 03:05:15 steve Exp $
+;; Version: $Id: mel-u.el,v 1.4 1997/07/13 22:41:32 steve Exp $
 ;; Keywords: uuencode
 
 ;; This file is part of MEL (MIME Encoding Library).
@@ -84,6 +84,10 @@
 		  t nil nil (cdr uuencode-external-decoder))
 	   (setq filename (expand-file-name filename mime-temp-directory))
 	   (as-binary-input-file (insert-file-contents filename))
+	   ;; The previous line causes the buffer to be made read-only, I
+	   ;; do not pretend to understand the control flow leading to this
+	   ;; but suspect it has something to do with image-mode. -slb
+	   (setq buffer-read-only nil)
 	   (delete-file filename)
 	   ))
       )))
--- a/lisp/mh-e/custom-load.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/mh-e/custom-load.el	Mon Aug 13 09:49:09 2007 +0200
@@ -1,4 +1,4 @@
-(custom-put 'mh-compose 'custom-loads '("mh-comp"))
+(custom-put 'mh-buffer 'custom-loads '("mh-utils"))
+(custom-put 'mh-hook 'custom-loads '("mh-e"))
 (custom-put 'mh 'custom-loads '("mh-comp" "mh-e" "mh-utils"))
-(custom-put 'mh-hook 'custom-loads '("mh-e"))
-(custom-put 'mh-buffer 'custom-loads '("mh-utils"))
+(custom-put 'mh-compose 'custom-loads '("mh-comp"))
--- a/lisp/modes/auto-autoloads.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/modes/auto-autoloads.el	Mon Aug 13 09:49:09 2007 +0200
@@ -357,73 +357,6 @@
 
 ;;;***
 
-;;;### (autoloads (follow-delete-other-windows-and-split follow-mode turn-off-follow-mode turn-on-follow-mode) "follow" "modes/follow.el")
-
-(add-minor-mode 'follow-mode nil 'follow-mode-map)
-
-(autoload 'turn-on-follow-mode "follow" "\
-Turn on Follow mode. Please see the function `follow-mode'." t nil)
-
-(autoload 'turn-off-follow-mode "follow" "\
-Turn off Follow mode. Please see the function `follow-mode'." t nil)
-
-(autoload 'follow-mode "follow" "\
-Minor mode which combines windows into one tall virtual window.
-
-The feeling of a \"virtual window\" has been accomplished by the use
-of two major techniques:
-
-* The windows always displays adjacent sections of the buffer. 
-  This means that whenever one window is moved, all the
-  others will follow.  (Hence the name Follow Mode.)
-
-* Should the point (cursor) end up outside a window, another 
-  window displaying that point is selected, if possible.  This 
-  makes it possible to walk between windows using normal cursor 
-  movement commands.
-
-Follow mode comes to its prime when used on a large screen and two
-side-by-side window are used. The user can, with the help of Follow
-mode, use two full-height windows as though they would have been
-one. Imagine yourself editing a large function, or section of text,
-and being able to use 144 lines instead of the normal 72... (your
-mileage may vary).
-
-To split one large window into two side-by-side windows, the commands
-`\\[split-window-horizontally]' or `M-x follow-delete-other-windows-and-split' can be used.
-
-Only windows displayed in the same frame follow each-other.
-
-If the variable `follow-intercept-processes' is non-nil, Follow mode
-will listen to the output of processes and redisplay accordingly.
-\(This is the default.)
-
-When Follow mode is switched on, the hook `follow-mode-hook'
-is called.  When turned off, `follow-mode-off-hook' is called.
-
-Keys specific to Follow mode:
-\\{follow-mode-map}" t nil)
-
-(autoload 'follow-delete-other-windows-and-split "follow" "\
-Create two side by side windows and enter Follow Mode.
-
-Execute this command to display as much as possible of the text
-in the selected window.  All other windows, in the current 
-frame, are deleted and the selected window is split in two
-side-by-side windows. Follow Mode is activated, hence the 
-two windows always will display two successive pages.
-\(If one window is moved, the other one will follow.)
-
-If ARG is positive, the leftmost window is selected.  If it negative,
-the rightmost is selected.  If ARG is nil, the leftmost window is
-selected if the original window is the first one in the frame.
-
-To bind this command to a hotkey, place the following line
-in your `~/.emacs' file, replacing [f7] by your favourite key:
-    (global-set-key [f7] 'follow-delete-other-windows-and-split)" t nil)
-
-;;;***
-
 ;;;### (autoloads (fortran-mode) "fortran" "modes/fortran.el")
 
 (defcustom fortran-tab-mode-default nil "*Default tabbing/carriage control style for empty files in Fortran mode.\nA value of t specifies tab-digit style of continuation control.\nA value of nil specifies that continuation lines are marked\nwith a character in column 6." :type 'boolean :group 'fortran-indent)
@@ -680,7 +613,7 @@
 ;;;### (autoloads (ksh-mode) "ksh-mode" "modes/ksh-mode.el")
 
 (autoload 'ksh-mode "ksh-mode" "\
-ksh-mode $Revision: 1.4 $ - Major mode for editing (Bourne, Korn or Bourne again)
+ksh-mode $Revision: 1.5 $ - Major mode for editing (Bourne, Korn or Bourne again)
 shell scripts.
 Special key bindings and commands:
 \\{ksh-mode-map}
@@ -2037,7 +1970,7 @@
 
 (autoload 'vhdl-mode "vhdl-mode" "\
 Major mode for editing VHDL code.
-vhdl-mode $Revision: 1.4 $
+vhdl-mode $Revision: 1.5 $
 To submit a problem report, enter `\\[vhdl-submit-bug-report]' from a
 vhdl-mode buffer.  This automatically sets up a mail buffer with version
 information already added.  You just need to add a description of the
--- a/lisp/modes/custom-load.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/modes/custom-load.el	Mon Aug 13 09:49:09 2007 +0200
@@ -1,31 +1,31 @@
-(custom-put 'asm 'custom-loads '("asm-mode"))
-(custom-put 'auto-show 'custom-loads '("auto-show"))
-(custom-put 'lisp-indent 'custom-loads '("cl-indent"))
-(custom-put 'c-macro 'custom-loads '("cmacexp"))
-(custom-put 'enriched 'custom-loads '("enriched"))
-(custom-put 'executable 'custom-loads '("executable"))
-(custom-put 'f90 'custom-loads '("f90"))
-(custom-put 'f90-indent 'custom-loads '("f90"))
-(custom-put 'fortran 'custom-loads '("f90" "fortran"))
-(custom-put 'fortran-indent 'custom-loads '("fortran"))
-(custom-put 'fortran-comment 'custom-loads '("fortran"))
-(custom-put 'icon 'custom-loads '("icon"))
-(custom-put 'mail-abbrevs 'custom-loads '("mail-abbrevs"))
-(custom-put 'makefile-mode 'custom-loads '("make-mode"))
-(custom-put 'outl-mouse 'custom-loads '("outl-mouse"))
+(custom-put 'xrdb 'custom-loads '("xrdb-mode"))
+(custom-put 'winmgr 'custom-loads '("winmgr-mode"))
+(custom-put 'whitespace 'custom-loads '("whitespace-mode"))
+(custom-put 'vrml 'custom-loads '("vrml-mode"))
+(custom-put 'verilog 'custom-loads '("verilog-mode"))
+(custom-put 'texinfo 'custom-loads '("texinfo"))
+(custom-put 'tcl 'custom-loads '("tcl"))
+(custom-put 'strokes 'custom-loads '("strokes"))
+(custom-put 'sh-script 'custom-loads '("sh-script"))
+(custom-put 'sh 'custom-loads '("sh-script"))
+(custom-put 'resize-minibuffer 'custom-loads '("rsz-minibuf"))
+(custom-put 'rexx 'custom-loads '("rexx-mode"))
+(custom-put 'reftex-label-support 'custom-loads '("reftex"))
+(custom-put 'reftex 'custom-loads '("reftex"))
+(custom-put 'prolog 'custom-loads '("prolog"))
 (custom-put 'pascal 'custom-loads '("pascal"))
-(custom-put 'prolog 'custom-loads '("prolog"))
-(custom-put 'reftex 'custom-loads '("reftex"))
-(custom-put 'reftex-label-support 'custom-loads '("reftex"))
-(custom-put 'rexx 'custom-loads '("rexx-mode"))
-(custom-put 'resize-minibuffer 'custom-loads '("rsz-minibuf"))
-(custom-put 'sh 'custom-loads '("sh-script"))
-(custom-put 'sh-script 'custom-loads '("sh-script"))
-(custom-put 'strokes 'custom-loads '("strokes"))
-(custom-put 'tcl 'custom-loads '("tcl"))
-(custom-put 'texinfo 'custom-loads '("texinfo"))
-(custom-put 'verilog 'custom-loads '("verilog-mode"))
-(custom-put 'vrml 'custom-loads '("vrml-mode"))
-(custom-put 'whitespace 'custom-loads '("whitespace-mode"))
-(custom-put 'winmgr 'custom-loads '("winmgr-mode"))
-(custom-put 'xrdb 'custom-loads '("xrdb-mode"))
+(custom-put 'outl-mouse 'custom-loads '("outl-mouse"))
+(custom-put 'makefile-mode 'custom-loads '("make-mode"))
+(custom-put 'mail-abbrevs 'custom-loads '("mail-abbrevs"))
+(custom-put 'icon 'custom-loads '("icon"))
+(custom-put 'fortran-comment 'custom-loads '("fortran"))
+(custom-put 'fortran-indent 'custom-loads '("fortran"))
+(custom-put 'fortran 'custom-loads '("f90" "fortran"))
+(custom-put 'f90-indent 'custom-loads '("f90"))
+(custom-put 'f90 'custom-loads '("f90"))
+(custom-put 'executable 'custom-loads '("executable"))
+(custom-put 'enriched 'custom-loads '("enriched"))
+(custom-put 'c-macro 'custom-loads '("cmacexp"))
+(custom-put 'lisp-indent 'custom-loads '("cl-indent"))
+(custom-put 'auto-show 'custom-loads '("auto-show"))
+(custom-put 'asm 'custom-loads '("asm-mode"))
--- a/lisp/modes/follow.el	Mon Aug 13 09:47:55 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,2435 +0,0 @@
-;;; follow.el --- Minor mode, Synchronize windows showing the same buffer.
-
-;; Copyright (C) 1995, 1996 Free Software Foundation, Inc.
-
-;; Author: Anders Lindgren <andersl@csd.uu.se>
-;; Maintainer: Anders Lindgren <andersl@csd.uu.se>
-;; Created: 25 May 1995
-;; Version: 1.6
-;; Keywords: display, window, minor-mode
-;; Date: 20 Feb 1996
-
-;; This file is part of XEmacs.
-
-;; XEmacs is free software; you can redistribute it and/or modify it
-;; under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
-;; any later version.
-
-;; XEmacs is distributed in the hope that it will be useful, but
-;; WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-;; General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with XEmacs; see the file COPYING.  If not, write to the Free
-;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-;; 02111-1307, USA.
-
-;;; Commentary:
-
-;;{{{ Documentation
-
-;; `Follow mode' is a minor mode for Emacs 19 and XEmacs which
-;; combines windows into one tall virtual window.
-;;
-;; The feeling of a "virtual window" has been accomplished by the use
-;; of two major techniques:
-;;
-;; * The windows always displays adjacent sections of the buffer. 
-;;   This means that whenever one window is moved, all the
-;;   others will follow.  (Hence the name Follow Mode.)
-;;
-;; * Should the point (cursor) end up outside a window, another 
-;;   window displaying that point is selected, if possible.  This 
-;;   makes it possible to walk between windows using normal cursor 
-;;   movement commands.
-;;
-;; Follow mode comes to its prime when used on a large screen and two
-;; side-by-side window are used. The user can, with the help of Follow
-;; mode, use two full-height windows as though they would have been
-;; one. Imagine yourself editing a large function, or section of text,
-;; and being able to use 144 lines instead of the normal 72... (your
-;; mileage may vary).
-
-;; The latest version, and a demonstration, are avaiable at:
-;;
-;;	ftp://ftp.csd.uu.se/pub/users/andersl/emacs/follow.el
-;;	http://www.csd.uu.se/~andersl/follow.shtml
-
-;; `Follow mode' can be used together with Emacs 19 and XEmacs.
-;; It has been tested together with Emacs 19.27, 19.28, 19.29,
-;; 19.30, XEmacs 19.12, and 19.13.
-
-
-;; To test this package, make sure `follow' is loaded, or will be
-;; autoloaded when activated (see below). Then do the following:
-;;
-;; * Find your favorite file (preferably a long one.)
-;;
-;; * Resize Emacs so that it will be wide enough for two full sized
-;;   columns.  Delete the other windows and split with the commands
-;;   `C-x 1 C-x 3'.
-;;
-;; * Give the command:
-;;	M-x follow-mode <RETURN>
-;;
-;; * Now the display should look something like (assuming the text "71"
-;;   is on line 71):
-;;
-;;		    +----------+----------+
-;;		    |1         |73        |
-;;		    |2         |74        |
-;;		    |3         |75        |
-;;		         ...        ...   
-;;		    |71        |143       |
-;;		    |72        |144       |
-;;		    +----------+----------+
-;;
-;;   As you can see, the right-hand window starts at line 73, the line
-;;   immediately below the end of the left-hand window. As long as
-;;   `follow-mode' is active, the two windows will follow eachother!
-;;
-;; * Play around and enjoy! Scroll one window and watch the other.
-;;   Jump to the beginning or end. Press `Cursor down' at the last
-;;   line of the left-hand window. Enter new lines into the
-;;   text. Enter long lines spanning several lines, or several
-;;   windows.
-;;
-;; * Should you find `Follow' mode annoying, just type
-;;	M-x follow-mode <RETURN> 
-;;   to turn it off.
-
-
-;; Installation:
-;;
-;; To fully install this, add this file to your Emacs Lisp directory and
-;; compile it with M-x byte-compile-file.  Then add the following to the
-;; appropriate init file (normally your `~/.emacs' file):
-;;
-;; (autoload 'follow-mode "follow"
-;;   "Synchronize windows showing the same buffer, minor mode." t)
-
-
-;; The command `follow-delete-other-windows-and-split' maximises the
-;; visible area of the current buffer.
-;;
-;; I recommend adding it, and `follow-mode', to hotkeys in the global
-;; key map.  To do so, add the following lines (replacing `[f7]' and
-;; `[f8]' with your favorite keys) to the init file:
-;;
-;; (autoload 'follow-mode "follow"
-;;   "Synchronize windows showing the same buffer, minor mode." t)
-;; (global-set-key [f8] 'follow-mode)
-;;
-;; (autoload 'follow-delete-other-windows-and-split "follow"
-;;   "Delete other windows, split the frame in two, and enter Follow Mode." t)
-;; (global-set-key [f7] 'follow-delete-other-windows-and-split)
-
-
-;; There exists two system variables which controls the appearence of
-;; lines which are wider than the window containing them.  The default
-;; is to truncate long lines whenever a window isn't as wide as the
-;; frame.
-;;
-;; To make sure lines are never truncated, please place the following
-;; lines in your init file:
-;;
-;; (setq truncate-lines nil)
-;; (setq truncate-partial-width-windows nil)
-
-
-;; Since the display of XEmacs is pixel-oriented, a line could be
-;; clipped in half at the bottom of the window.
-;;
-;; To make XEmacs avoid clipping (normal) lines, please place the
-;; following line in your init-file:
-;;
-;; (setq pixel-vertical-clip-threshold 30)
-
-
-;; The correct way to cofigurate Follow mode, or any other mode for
-;; that matter, is to create one (or more) function which does
-;; whatever you would like to do.  The function is then added to
-;; a hook.
-;;
-;; When `Follow' mode is activated, functions stored in the hook
-;; `follow-mode-hook' are called.  When it is deactivated
-;; `follow-mode-off-hook' is runed.
-;;
-;; The keymap `follow-key-map' contains key bindings activated by
-;; `follow-mode'.
-;;
-;; Example:
-;; (add-hook 'follow-mode-hook 'my-follow-mode-hook)
-;;
-;; (defun my-follow-mode-hook ()
-;;    (define-key follow-mode-map "\C-ca" 'your-favorite-function)
-;;    (define-key follow-mode-map "\C-cb" 'another-function))
-
-
-;; Usage:
-;;
-;; To activate give the command:  M-x follow-mode
-;; and press return. To deactivate, do it again.
-;;
-;; Some special commands have been developed to make life even easier:
-;;	follow-scroll-up			 C-c . C-v
-;;		Scroll text in a Follow Mode window chain up.
-;;
-;;	follow-scroll-down			 C-c . v
-;;		Like `follow-scroll-up', but in the other direction.
-;;
-;;	follow-delete-other-windows-and-split	 C-c . 1
-;;		Maximise the visible area of the current buffer,
-;;		and enter Follow Mode. 	This is a very convenient
-;;		way to start Follow Mode, hence it is recomended
-;;		that this command is added to the global keymap.
-;;
-;;	follow-recenter				 C-c . C-l
-;;		Place the point in the center of the middle window,
-;;		or a specified number of lines from either top or bottom.
-;;
-;;	follow-switch-to-buffer			 C-c . b
-;;		Switch buffer in all windows displaying the current buffer
-;;		in this frame.
-;;
-;;	follow-switch-to-buffer-all		 C-c . C-b
-;;		Switch buffer in all windows in the active frame.
-;;
-;;	follow-switch-to-current-buffer-all
-;;		Show the current buffer in all windows on the current
-;;		frame and turn on `follow-mode'.
-;;
-;;	follow-first-window			 C-c . <
-;;		Select the first window in the frame showing the same buffer.
-;;
-;;	follow-last-window			 C-c . >
-;;		Select the last window in the frame showing the same buffer.
-;;
-;;	follow-next-window			 C-c . n
-;;		Select the next window in the frame showing the same buffer.
-;;
-;;	follow-previous-window			 C-c . p
-;;		Select the previous window showing the same buffer.
-
-
-;; Well, it seems ok, but what if I really want to look at two different
-;; positions in the text? Here are two simple methods to use:
-;;
-;; 1) Use multiple frames; `follow' mode only affects windows displayed
-;;    in the same frame. (My apoligies to you who can't use frames.)
-;;
-;; 2) Bind `follow-mode' to key so you can turn it off whenever
-;;    you want to view two locations. Of course, `follow' mode can
-;;    be reactivated by hitting the same key again.
-;;
-;;    Example from my ~/.emacs:
-;;	(global-set-key [f8] 'follow-mode)
-
-
-;; Implementation: 
-;;
-;; In an ideal world, follow mode would have been implemented in the
-;; kernal of the display routines, making sure that the windows (in
-;; follow mode) ALWAYS are aligned. On planet earth, however, we must
-;; accept a solution where we ALMOST ALWAYS can make sure that the
-;; windows are aligned.
-;;
-;; Follow mode does this in three places:
-;; 1) After each user command.
-;; 2) After a process output has been perfomed.
-;; 3) When a scrollbar has been moved.
-;;
-;; This will cover most situations. (Let me know if there are other
-;; situations which should be covered.)
-;;
-;; However, only the selected window is checked, for the reason of
-;; efficiency and code complexity. (i.e. it is possible to make a
-;; non-selected windows unaligned. It will, however, pop right back
-;; when it is selected.)
-
-;;}}}
-;;{{{ Change Log
-
-;;; Change log:
-;;	25-May-95 andersl  * File created.
-;;	26-May-95 andersl  * It works!
-;;	27-May-95 andersl  * Avoids hitting the head in the roof.
-;;		           * follow-scroll-up, -scroll-down, and -recenter.
-;;		           * V0.1 Sent to Ohio.
-;;	28-May-95 andersl  * Scroll-bar support added.
-;;	30-May-95 andersl  * Code adopted to standard style.
-;;			   * Minor mode keymap.
-;;	 2-Jun-95 andersl  * Processor output.
-;;	 3-Jun-95 andersl  * V0.4
-;;	 5-Jun-95 andersl  * V0.5. Copyright notice corrected.
-;;			     (The old one stated that I had copyright, but
-;;			     that Emacs could be freely distributed ;-)  )
-;;	 6-Jun-95 andersl  * Lucid support added. (no longer valid.)
-;;	 7-Jun-95 andersl  * Menu bar added.
-;;			   * Bug fix, (at-window 0 0) => (frame-first-window)
-;;	15-Jun-95 andersl  * 0.8 Major rework. looong lines and outline mode.
-;;	18-Jun-95 andersl  * 0.9 Allow a tail window to be selected, but pick
-;;			     a better one when edited.
-;;	26-Jun-95 andersl  * Inlineing.
-;;      02-Jul-95 andersl  * compute-motion imitated with a ugly workaround,
-;;			     Works with XEmacs again!
-;;	15-Jul-95 andersl  * find-file hook.
-;;                         * submit-feedback.
-;;                         * Survives major mode changes.
-;;                         * Region spanning multiple windows looks 
-;;			       resonabely good.
-;;	19-Jul-95 andersl  * New process-filter handling.
-;;	 1-Aug-95 andersl  * XEmacs scrollbar support.
-;;			   * Emacs 19 `window-size-change' support.
-;;			   * `save-window-excursion' removed, it triggered
-;;			     a redraw!
-;;	 5-Aug-95 andersl  * `follow-switch-to-current-buffer-all' added.
-;;	16-Nov-95 andersl  * V1.0 released!
-;;	17-Nov-95 andersl  * Byte compiler silencer for XEmacs broken.
-;;			   * fkey-end-of-buffer treated the same way 
-;;			     end-of-buffer is.
-;;			   * follow-mode-off-hook added. 
-;;			     (Suggested by David Hughes, thanks!)
-;;	20-Nov-95 andersl  * Bug in menu code corrected.
-;;			     (Reported by Robert E. Brown, thanks!)
-;;	 5-Dec-95 andersl  * `follow-avoid-tail-recenter' added to the
-;;			     post-command-idle-hook to avoid recentering
-;;			     caused by `paren' et. al.
-;;	 7-Dec-95 andersl  * `follow-avoid-tail-recenter' called by
-;;			     `window-scroll-functions'.
-;;	18-Dec-95 andersl  * All processes intercepted.
-;;	20-Dec-95 andersl  * `follow-recenter' accepts arguments.
-;;                         * `move-overlay' advices, drag-region works.
-;;	 2-Jan-96 andersl  * XEmacs: isearch fixed.
-;;                         * `follow-calc-win-end' created.
-;;       8-Jan-96 andersl  * XEmacs: `window-end' with `guarantee'
-;;                           argument used in `follow-calc-win-end'.
-;;       9-Jan-96 andersl  * `follow-end-of-buffer' added. 
-;;                           Code in post hook removed.
-;;                         * XEmacs: Post hook is always executed
-;;			     after a mouse button event.
-;;      22-Jan-96 andersl  * 1.5 released.
-;;
-
-;;}}}
-;;{{{ LCD Entry
-
-;;; LCD Archive Entry:
-;; follow|Anders Lindgren|andersl@csd.uu.se|
-;; Combines windows into tall virtual window, minor mode.
-;; 20-Feb-1996|1.6|~/modes/follow.el.Z|
-
-;;}}}
-
-;;; Code:
-
-;;{{{ Preliminaries
-
-;; Make the compiler shut up!
-;; There are two strategies:
-;; 1) Shut warnings off completely.
-;; 2) Handle each warning separately.
-;;
-;; Since I would like to see real errors, I've selected the latter
-;; method.
-;;
-;; The problem with undefined variables and functions has been solved
-;; by using `set', `symbol-value' and `symbol-function' rather than
-;; `setq' and direct references to variables and functions.
-;;
-;; For example:
-;;	(if (boundp 'foo)   ... (symbol-value 'foo) )
-;;	(set 'foo ...)   <-- XEmacs doesn't fall for this one.
-;;	(funcall (symbol-function 'set) 'bar ...)
-;;
-;; Note: When this file is interpreted, `eval-when-compile' is
-;; evaluted (really smart...)  Since it doesn't hurt to evaluate it,
-;; but it is a bit annoying, we test if the byte-compiler has been
-;; loaded.  This can, of course, lead to some occasional unintended
-;; evaluation...
-;;
-;; Should someone come up with a better solution, please let me
-;; know.
-
-(eval-when-compile
-  (if (or (featurep 'bytecomp)
-	  (featurep 'byte-compile))
-      (cond ((string-match "XEmacs" emacs-version)
-	     ;; Make XEmacs shut up!  I'm using standard Emacs
-	     ;; functions, they are NOT obsolete!
-	     (if (eq (get 'force-mode-line-update 'byte-compile)
-		     'byte-compile-obsolete)
-		 (put 'force-mode-line-update 'byte-compile 'nil))
-	     (if (eq (get 'frame-first-window 'byte-compile)
-		     'byte-compile-obsolete)
-		 (put 'frame-first-window 'byte-compile 'nil))))))
-
-;;}}}
-;;{{{ Variables
-
-(defvar follow-mode nil
-  "Variable indicating if Follow mode is active.")
-
-(defvar follow-mode-hook nil
-  "*Hooks to run when follow-mode is turned on.")
-
-(defvar follow-mode-off-hook nil
-  "*Hooks to run when follow-mode is turned off.")
-
-(defvar follow-mode-version "follow.el (Release 1.6)"
-  "The current version of Follow mode.")
-
-(defvar follow-mode-map nil
-  "*Minor mode keymap for Follow mode.")
-
-(defvar follow-mode-line-text " Follow"
-  "*Text shown in the mode line when Follow mode is active.  
-Defaults to \" Follow\".  Examples of other values
-are \" Fw\", or simply \"\".")
-
-(defvar follow-auto nil
-  "*Non-nil activates Follow mode whenever a file is loaded.")
-
-(defvar follow-mode-prefix "\C-c."
-  "*Prefix key to use for follow commands in Follow mode.
-The value of this variable is checked as part of loading Follow mode.
-After that, changing the prefix key requires manipulating keymaps.")
-
-(defvar follow-intercept-processes t
-  "*When non-nil, Follow Mode will monitor process output.")
-
-(defvar follow-emacs-version-xemacs-p 
-  (string-match "XEmacs" emacs-version)
-  "Non-nil when running under XEmacs.")
-
-(defvar follow-avoid-tail-recenter-p 
-  (not follow-emacs-version-xemacs-p)
-  "*When non-nil, patch emacs so that tail windows won't be recentered.
-
-A \"tail window\" is a window which displays only the end of 
-the buffer.  Normally it is practical for the user that empty
-windows are recentered automatically.  However, when using 
-Follow Mode it breaks the display when the end is displayed 
-in a window \"above\" the last window.  This is for 
-example the case when displaying a short page in info.
-
-Must be set before Follow Mode is loaded.
-
-Please note that it is not possible to fully prevent Emacs from
-recentering empty windows.  Please report if you find a repeatable
-situation in which Emacs recenters empty windows.
-
-XEmacs, as of 19.12, does not recenter windows, good!")
-
-(defvar follow-cache-command-list
-  '(next-line previous-line forward-char backward-char)
-  "List of commands which don't require recalculation.
-
-In order to be able to use the cache, a command should not change the
-contents of the buffer, nor should it change selected window or current
-buffer.
-
-The commands in this list are checked at load time.
-
-To mark other commands as suitable for caching, set the symbol
-property `follow-mode-use-cache' to non-nil.")
-
-(defvar follow-debug nil
-  "*Non-nil when debugging Follow mode.")
-
-
-;; Internal variables:
-
-(defvar follow-internal-force-redisplay nil
-  "True when Follow mode should redisplay the windows.")
-
-(defvar follow-process-filter-alist '()
-  "The original filters for processes intercepted by Follow mode.")
-
-(defvar follow-active-menu nil
-  "The menu visible when Follow mode is active.")
-
-(defvar follow-deactive-menu nil
-  "The menu visible when Follow mode is deactivated.")
-
-(defvar follow-inside-post-command-hook nil
-  "Non-nil when inside Follow modes `post-command-hook'. 
-Used by `follow-window-size-change'.")
-
-(defvar follow-windows-start-end-cache nil
-  "Cache used by `follow-window-start-end'.")
-
-;;}}}
-;;{{{ Bug report
-
-(eval-when-compile (require 'reporter))
-
-(defun follow-submit-feedback ()
-  "Sumbit feedback on Follow mode to the author: andersl@csd.uu.se"
-  (interactive)
-  (require 'reporter)
-  (and (y-or-n-p "Do you really want to submit a report on Follow mode? ")
-       (reporter-submit-bug-report
-	"Anders Lindgren <andersl@csd.uu.se>"
-	follow-mode-version
-	'(post-command-hook 
-	  post-command-idle-hook
-	  pre-command-hook
-	  window-size-change-functions
-	  window-scroll-functions
-	  follow-mode-hook
-	  follow-mode-off-hook
-	  follow-auto 
-	  follow-intercept-processes
-	  follow-avoid-tail-recenter-p
-	  follow-process-filter-alist)
-	nil
-	nil
-	(concat 
-	 "Hi Anders!\n\n"
-	 "(I have read the section on how to report bugs in the "
-	 "Emacs manual.)\n\n"
-	 "Even though I know you are busy, I thought you might "
-	 "want to know...\n\n"))))
-
-;;}}}
-;;{{{ Debug messages
-
-;; This inline function must be as small as possible!
-;; Maybe we should define a macro which expands to nil if
-;; the varible is not set.
-
-(defsubst follow-debug-message (&rest args)
-  "Like message, but only active when `follow-debug' is non-nil."
-  (if (and (boundp 'follow-debug) follow-debug)
-      (apply 'message args)))
-
-;;}}}
-
-;;{{{ Keymap/Menu
-
-;;; Define keys for the follow-mode minor mode map and replace some
-;;; functions in the global map.  All `follow' mode special functions
-;;; can be found on (the somewhat cumbersome) "C-c . <key>"
-;;; (Control-C dot <key>). (As of Emacs 19.29 the keys
-;;; C-c <punctuation character> are reserved for minor modes.)
-;;;
-;;; To change the prefix, redefine `follow-mode-prefix' before
-;;; `follow' is loaded, or see the section on `follow-mode-hook'
-;;; above for an example of how to bind the keys the way you like.
-;;;
-;;; Please note that the keymap is defined the first time this file is
-;;; loaded.  Also note that the only legal way to manipulate the
-;;; keymap is to use `define-key'.  Don't change it using `setq' or
-;;; similar!
-
-
-(if follow-mode-map
-    nil
-  (setq follow-mode-map (make-sparse-keymap))
-  ;; XEmacs: need this for the change in add-minor-mode
-  (fset 'follow-mode-map follow-mode-map)
-  (let ((map (make-sparse-keymap)))
-    (define-key map "\C-v"	'follow-scroll-up)
-    (define-key map "\M-v"	'follow-scroll-down)
-    (define-key map "v"		'follow-scroll-down)
-    (define-key map "1"		'follow-delete-other-windows-and-split)
-    (define-key map "b"		'follow-switch-to-buffer)
-    (define-key map "\C-b"	'follow-switch-to-buffer-all)
-    (define-key map "\C-l"	'follow-recenter)
-    (define-key map "<"		'follow-first-window)
-    (define-key map ">"		'follow-last-window)
-    (define-key map "n"		'follow-next-window)
-    (define-key map "p"		'follow-previous-window)
-
-    (define-key follow-mode-map follow-mode-prefix map)
-
-    ;; Replace the standard `end-of-buffer', when in Follow Mode.  (I
-    ;; don't see the point in trying to replace every function which
-    ;; could be enhanced in Follow mode.  End-of-buffer is a special
-    ;; case since it is very simple to define and it greatly enhances
-    ;; the look and feel of Follow mode.)
-    ;;
-    ;; (The function `substitute-key-definition' does not work
-    ;; in all versions of Emacs.)
-    (mapcar
-     (function 
-      (lambda (pair)
-	(let ((old (car pair))
-	      (new (cdr pair)))
-	  (mapcar (function (lambda (key) 
-			      (define-key follow-mode-map key new)))
-		  (where-is-internal old global-map)))))
-     '((end-of-buffer      . follow-end-of-buffer)
-       (fkey-end-of-buffer . follow-end-of-buffer)))
-
-    ;;;
-    ;;; The menu.
-    ;;;
-
-    (if (not follow-emacs-version-xemacs-p)
-
-	;;
-	;; Emacs 19
-	;;
-	(let ((menumap (funcall (symbol-function 'make-sparse-keymap)	
-			"Follow"))
-	      (count 0)
-	      id)
-	  (mapcar 
-	   (function 
-	    (lambda (item)
-	      (setq id 
-		    (or (cdr item)
-			(progn
-			  (setq count (+ count 1))
-			  (intern (format "separator-%d" count)))))
-	      (define-key menumap (vector id) item)
-	      (or (eq id 'follow-mode)
-		  (put id 'menu-enable 'follow-mode))))
-	   ;; In reverse order:
-	   '(("Toggle Follow mode" . follow-mode)
-	     ("--")
-	     ("Recenter"           . follow-recenter)
-	     ("--")
-	     ("Previous Window"    . follow-previous-window)
-	     ("Next Windows"       . follow-next-window)
-	     ("Last Window"        . follow-last-window)
-	     ("First Window"       . follow-first-window)
-	     ("--")
-	     ("Switch To Buffer (all windows)"
-	                           . follow-switch-to-buffer-all)
-	     ("Switch To Buffer"   . follow-switch-to-buffer)
-	     ("--")
-	     ("Delete Other Windows and Split"
-	                           . follow-delete-other-windows-and-split)
-	     ("--")
-	     ("Scroll Down"        . follow-scroll-down)
-	     ("Scroll Up"          . follow-scroll-up)))
-	  
-	  ;; If there is a `tools' meny, we use it. However, we can't add a
-	  ;; minor-mode specific item to it (it's broken), so we make the
-	  ;; contents ghosted when not in use, and add ourselves to the
-	  ;; global map.  If no `tools' menu is present, just make a
-	  ;; top-level menu visible when the mode is activated.
-	  
-	  (let ((tools-map (lookup-key (current-global-map) [menu-bar tools]))
-		(last nil))
-	    (if (sequencep tools-map)
-		(progn
-		  ;; Find the last entry in the menu and store it in `last'.
-		  (mapcar (function
-			   (lambda (x) 
-			     (setq last (or (cdr-safe 
-					     (cdr-safe 
-					      (cdr-safe x))) 
-					    last))))
-			  tools-map)
-		  (if last
-		      (progn
-			(funcall (symbol-function 'define-key-after)
-				  tools-map [separator-follow] '("--") last)
-			(funcall (symbol-function 'define-key-after)
-				 tools-map [follow] (cons "Follow" menumap)
-				 'separator-follow))
-		    ;; Didn't find the last item, Adding to the top of
-		    ;; tools.  (This will probably never happend...)
-		    (define-key (current-global-map) [menu-bar tools follow]
-		      (cons "Follow" menumap))))
-	      ;; No tools menu, add "Follow" to the menubar.
-	      (define-key follow-mode-map [menu-bar follow]
-		(cons "Follow" menumap)))))
-
-      ;;
-      ;; XEmacs.
-      ;;
-
-      ;; place the menu in the `Tools' menu.
-      (let ((menu '("Follow"
-		    :filter follow-menu-filter
-		    ["Scroll Up" follow-scroll-up t]
-		    ["Scroll Down" follow-scroll-down t]
-		    ["Delete Other Windows and Split"
-		     follow-delete-other-windows-and-split t]
-		    ["Switch To Buffer" follow-switch-to-buffer t]
-		    ["Switch To Buffer (all windows)" 
-		     follow-switch-to-buffer-all t]
-		    ["First Window" follow-first-window t]
-		    ["Last Window" follow-last-window t]
-		    ["Next Windows" follow-next-window t]
-		    ["Previous Window" follow-previous-window t]
-		    ["Recenter" follow-recenter t]
-		    ["Deactivate" follow-mode t])))
-
-	;; Why not just `(set-buffer-menubar current-menubar)'?  The
-	;; question is a very good question.  The reason is that under
-	;; Emacs 19, neither `set-buffer-menubar' nor
-	;; `current-menubar' is defined, hence the byte-compiler will
-	;; warn.
-	(funcall (symbol-function 'set-buffer-menubar)
-		 (symbol-value 'current-menubar))
-	(funcall (symbol-function 'add-submenu) '("Tools") menu))
-
-      ;; When the mode is not activated, only one item is visible:
-      ;; "Activate".
-      (defun follow-menu-filter (menu)
-	(if follow-mode
-	    menu
-	  '(["Activate          " follow-mode t]))))))
-
-
-;;; Register the follow mode keymap.
-;(or (assq 'follow-mode minor-mode-map-alist)
-;    (setq minor-mode-map-alist
-;	  (cons (cons 'follow-mode follow-mode-map) minor-mode-map-alist)))
-;; XEmacs: do it right.  Author has been notified.
-;;;###autoload
-(add-minor-mode 'follow-mode nil 'follow-mode-map)
-
-;;}}}
-;;{{{ Cache
-
-(let ((cmds follow-cache-command-list))
-  (while cmds
-    (put (car cmds) 'follow-mode-use-cache t)
-    (setq cmds (cdr cmds))))
-
-;;}}}
-
-;;{{{ The mode
-
-;;;###autoload
-(defun turn-on-follow-mode ()
-  "Turn on Follow mode. Please see the function `follow-mode'."
-  (interactive)
-  (follow-mode 1))
-
-
-;;;###autoload
-(defun turn-off-follow-mode ()
-  "Turn off Follow mode. Please see the function `follow-mode'."
-  (interactive)
-  (follow-mode -1))
-
-
-;;;###autoload
-(defun follow-mode (arg) 
-  "Minor mode which combines windows into one tall virtual window.
-
-The feeling of a \"virtual window\" has been accomplished by the use
-of two major techniques:
-
-* The windows always displays adjacent sections of the buffer. 
-  This means that whenever one window is moved, all the
-  others will follow.  (Hence the name Follow Mode.)
-
-* Should the point (cursor) end up outside a window, another 
-  window displaying that point is selected, if possible.  This 
-  makes it possible to walk between windows using normal cursor 
-  movement commands.
-
-Follow mode comes to its prime when used on a large screen and two
-side-by-side window are used. The user can, with the help of Follow
-mode, use two full-height windows as though they would have been
-one. Imagine yourself editing a large function, or section of text,
-and being able to use 144 lines instead of the normal 72... (your
-mileage may vary).
-
-To split one large window into two side-by-side windows, the commands
-`\\[split-window-horizontally]' or \
-`M-x follow-delete-other-windows-and-split' can be used.
-
-Only windows displayed in the same frame follow each-other.
-
-If the variable `follow-intercept-processes' is non-nil, Follow mode
-will listen to the output of processes and redisplay accordingly.
-\(This is the default.)
-
-When Follow mode is switched on, the hook `follow-mode-hook'
-is called.  When turned off, `follow-mode-off-hook' is called.
-
-Keys specific to Follow mode:
-\\{follow-mode-map}"
-  (interactive "P")
-  (make-local-variable 'follow-mode)
-  (put 'follow-mode 'permanent-local t)
-  (let ((follow-mode-orig follow-mode))
-    (setq follow-mode
-	  (if (null arg)
-	      (not follow-mode)
-	    (> (prefix-numeric-value arg) 0)))
-    (if (and follow-mode follow-intercept-processes)
-	(follow-intercept-process-output))
-    (cond ((and follow-mode (not follow-mode-orig)) ; On
-	   ;; XEmacs: If this is non-nil, the window will scroll before
-	   ;; the point will have a chance to get into the next window.
-	   (if (boundp 'scroll-on-clipped-lines)
-	       (set 'scroll-on-clipped-lines nil))
-	   (force-mode-line-update)
-	   (add-hook 'post-command-hook 'follow-post-command-hook t)
-	   (if (boundp 'post-command-idle-hook)
-	       (add-hook 'post-command-idle-hook 
-			 'follow-avoid-tail-recenter t))
-	   (run-hooks 'follow-mode-hook))
-
-	  ((and (not follow-mode) follow-mode-orig) ; Off
-	   (force-mode-line-update)
-	   (run-hooks 'follow-mode-off-hook)))))
-
-
-;; Register follow-mode as a minor mode.
-
-(if (fboundp 'add-minor-mode)
-    ;; XEmacs
-    (funcall (symbol-function 'add-minor-mode)
-	     'follow-mode 'follow-mode-line-text)
-  (or (assq 'follow-mode minor-mode-alist)
-      (setq minor-mode-alist
-	    (cons '(follow-mode follow-mode-line-text) minor-mode-alist))))
-
-;;}}}
-;;{{{ Find file hook
-
-;; This will start follow-mode whenever a new file is loaded, if
-;; the variable `follow-auto' is non-nil.
-
-(add-hook 'find-file-hooks 'follow-find-file-hook t)
-
-(defun follow-find-file-hook ()
-  "Find-file hook for Follow Mode.  See the variable `follow-auto'."
-  (if follow-auto (follow-mode t)))
-
-;;}}}
-
-;;{{{ User functions
-
-;;;
-;;; User functions usable when in Follow mode.
-;;;
-
-;;{{{ Scroll
-
-;; `scroll-up' and `-down', but for windows in Follow Mode.
-;;
-;; Almost like the real thing, excpet when the cursor ends up outside
-;; the top or bottom...  In our case however, we end up outside the
-;; window and hence we are recenterd.  Should we let `recenter' handle
-;; the point position we would never leave the selected window.  To do
-;; it ourselves we would need to do our own redisplay, which is easier
-;; said than done.  (Why didn't I do a real display abstraction from
-;; the beginning?)
-;;
-;; We must sometimes set `follow-internal-force-redisplay', otherwise
-;; our post-command-hook will move our windows back into the old
-;; position...  (This would also be corrected if we would have had a
-;; good redisplay abstraction.)
-
-(defun follow-scroll-up (&optional arg)
-  "Scroll text in a Follow Mode window chain up.
-
-If called with no ARG, the `next-screen-context-lines' last lines of
-the bottom window in the chain will be visible in the top window.
-
-If called with an argument, scroll ARG lines up.
-Negative ARG means scroll downward.
-
-Works like `scroll-up' when not in Follow Mode."
-  (interactive "P")
-  (cond ((not (and (boundp 'follow-mode) follow-mode))
-	 (scroll-up arg))
-	(arg
-	 (save-excursion (scroll-up arg))
-	 (setq follow-internal-force-redisplay t))
-	(t
-	 (let* ((windows (follow-all-followers))
-		(end (window-end (car (reverse windows)))))
-	   (if (eq end (point-max))
-	       (signal 'end-of-buffer nil)
-	     (select-window (car windows))
-	     (goto-char end)
-	     (vertical-motion (- next-screen-context-lines))
-	     (set-window-start (car windows) (point)))))))
-
-
-(defun follow-scroll-down (&optional arg)
-  "Scroll text in a Follow Mode window chain down.
-
-If called with no ARG, the `next-screen-context-lines' top lines of
-the top window in the chain will be visible in the bottom window.
-
-If called with an argument, scroll ARG lines down.
-Negative ARG means scroll upward.
-
-Works like `scroll-up' when not in Follow Mode."
-  (interactive "P")
-  (cond ((not (and (boundp 'follow-mode) follow-mode))
-	 (scroll-up arg))
-	(arg
-	 (save-excursion (scroll-down arg)))
-	(t
-	 (let* ((windows (follow-all-followers))
-		(win (car (reverse windows)))
-		(start (window-start (car windows))))
-	   (if (eq start (point-min))
-	       (signal 'beginning-of-buffer nil)
-	     (select-window win)
-	     (goto-char start)
-	     (vertical-motion (- (- (window-height win) 
-				    1 
-				    next-screen-context-lines)))
-	     (set-window-start win (point))
-	     (goto-char start)
-	     (vertical-motion (- next-screen-context-lines 1))
-	     (setq follow-internal-force-redisplay t))))))
-
-;;}}}
-;;{{{ Buffer
-
-;;;###autoload
-(defun follow-delete-other-windows-and-split (&optional arg)
-  "Create two side by side windows and enter Follow Mode.
-
-Execute this command to display as much as possible of the text
-in the selected window.  All other windows, in the current 
-frame, are deleted and the selected window is split in two
-side-by-side windows. Follow Mode is activated, hence the 
-two windows always will display two successive pages.
-\(If one window is moved, the other one will follow.)
-
-If ARG is positive, the leftmost window is selected.  If it negative,
-the rightmost is selected.  If ARG is nil, the leftmost window is
-selected if the original window is the first one in the frame.
-
-To bind this command to a hotkey, place the following line
-in your `~/.emacs' file, replacing [f7] by your favourite key:
-    (global-set-key [f7] 'follow-delete-other-windows-and-split)"
-  (interactive "P")
-  (let ((other (or (and (null arg) 
-			(not (eq (selected-window)
-				 (frame-first-window (selected-frame)))))
-		   (and arg
-			(< (prefix-numeric-value arg) 0))))
-	(start (window-start)))
-    (delete-other-windows)
-    (split-window-horizontally)
-    (if other 
-	(progn
-	  (other-window 1)
-	  (set-window-start (selected-window) start)
-	  (setq follow-internal-force-redisplay t)))
-    (follow-mode 1)))
-
-(defun follow-switch-to-buffer (buffer)
-  "Show BUFFER in all windows in the current Follow Mode window chain."
-  (interactive "BSwitch to Buffer: ")
-  (let ((orig-window (selected-window))
-	(windows (follow-all-followers)))
-    (while windows
-      (select-window (car windows))
-      (switch-to-buffer buffer)
-      (setq windows (cdr windows)))
-    (select-window orig-window)))
-
-
-(defun follow-switch-to-buffer-all (&optional buffer)
-  "Show BUFFER in all windows on this frame.
-Defaults to current buffer."
-  (interactive (list (read-buffer "Switch to Buffer: " 
-				  (current-buffer))))
-  (or buffer (setq buffer (current-buffer)))
-  (let ((orig-window (selected-window)))
-    (walk-windows 
-     (function 
-      (lambda (win)
-	(select-window win)
-	(switch-to-buffer buffer))))
-    (select-window orig-window)
-    (follow-redisplay)))
-
-
-(defun follow-switch-to-current-buffer-all ()
-  "Show current buffer in all windows on this frame, and enter Follow Mode.
-
-To bind this command to a hotkey place the following line 
-in your `~/.emacs' file:
-	(global-set-key [f7] 'follow-switch-to-current-buffer-all)"
-  (interactive)
-  (or (and (boundp 'follow-mode) follow-mode)
-      (follow-mode 1))
-  (follow-switch-to-buffer-all))
-
-;;}}}
-;;{{{ Movement
-
-;; Note, these functions are not very useful, atleast not unless you
-;; rebind the rather cumbersome key sequence `C-c . p'.
-
-(defun follow-next-window ()
-  "Select the next window showing the same buffer."
-  (interactive)
-  (let ((succ (cdr (follow-split-followers (follow-all-followers)))))
-    (if succ
-	(select-window (car succ))
-      (error "%s" "No more windows"))))
-
-
-(defun follow-previous-window ()
-  "Select the previous window showing the same buffer."
-  (interactive)
-  (let ((pred (car (follow-split-followers (follow-all-followers)))))
-    (if pred
-	(select-window (car pred))
-      (error "%s" "No more windows"))))
-
-
-(defun follow-first-window ()
-  "Select the first window in the frame showing the same buffer."
-  (interactive)
-  (select-window (car (follow-all-followers))))
-
-
-(defun follow-last-window ()
-  "Select the last window in the frame showing the same buffer."
-  (interactive)
-  (select-window (car (reverse (follow-all-followers)))))
-
-;;}}}
-;;{{{ Redraw
-
-(defun follow-recenter (&optional arg)
-  "Recenter the middle window around the point,
-and rearrange all other windows around the middle window.
-
-With a positive argument, place the current line ARG lines
-from the top.  With a negative, place it -ARG lines from the
-bottom."
-  (interactive "P")
-  (if arg
-      (let ((p (point))
-	    (arg (prefix-numeric-value arg)))
-	(if (>= arg 0)
-	    ;; Recenter relative to the top.
-	    (progn
-	      (follow-first-window)
-	      (goto-char p)
-	      (recenter arg))
-	  ;; Recenter relative to the bottom.
-	  (follow-last-window)
-	  (goto-char p)
-	  (recenter arg)
-	  ;; Otherwise, our post-command-hook will move the window
-	  ;; right back.
-	  (setq follow-internal-force-redisplay t)))
-    ;; Recenter in the middle.
-    (let* ((dest (point))
-	   (windows (follow-all-followers))
-	   (win (nth (/ (- (length windows) 1) 2) windows)))
-      (select-window win)
-      (goto-char dest)
-      (recenter)
-      ;;(setq follow-internal-force-redisplay t)
-      )))
-
-
-(defun follow-redraw ()
-  "Arrange windows displaying the same buffer in successor order.
-This function can be called even if the buffer is not in Follow mode.
-
-Hopefully, there should be no reason to call this function when in
-Follow mode since the windows should always be aligned."
-  (interactive)
-  (sit-for 0)
-  (follow-redisplay))
-
-;;}}}
-;;{{{ End of buffer
-
-(defun follow-end-of-buffer (&optional arg)
-  "Move point to the end of the buffer. Follow Mode style.
-
-If the end is not visible, it will be displayed in the last possible
-window in the Follow Mode window chain.
-
-The mark is left at the previous position. With arg N, put point N/10
-of the way from the true end."
-  (interactive "P")
-  (let ((followers (follow-all-followers))
-	(pos (point)))
-    (cond (arg
-	   (select-window (car (reverse followers))))
-	  ((follow-select-if-end-visible 
-	    (follow-windows-start-end followers)))
-	  (t
-	   (select-window (car (reverse followers)))))
-    (goto-char pos)
-    (end-of-buffer arg)))
-
-;;}}}
-
-;;}}}
-
-;;{{{ Display
-
-;;;; The display routines
-
-;;{{{ Information gathering functions
-
-(defun follow-all-followers (&optional testwin)
-  "Return all windows displaying the same buffer as the TESTWIN.
-The list contains only windows displayed in the same frame as TESTWIN.
-If TESTWIN is nil the selected window is used."
-  (or (and testwin (window-live-p testwin))
-      (setq testwin (selected-window)))
-  (let* ((top (frame-first-window (window-frame testwin)))
-	 (win top)
-	 (done nil)
-	 (windows '())
-	 (buffer (window-buffer testwin)))
-    (while (and (not done) win)
-      (if (eq (window-buffer win) buffer)
-	  (setq windows (cons win windows)))
-      (setq win (next-window win 'not))
-      (if (eq win top)
-	  (setq done t)))
-    (nreverse windows)))
-
-
-(defun follow-split-followers (windows &optional win)
-  "Split the WINDOWS into the sets: predecessors and successors.
-Return `(PRED . SUCC)' where `PRED' and `SUCC' are ordered starting 
-from the selected window."
-  (or win 
-      (setq win (selected-window)))
-  (let ((pred '()))
-    (while (not (eq (car windows) win))
-      (setq pred (cons (car windows) pred))
-      (setq windows (cdr windows)))
-    (cons pred (cdr windows))))
-
-
-;; Try to optimize this function for speed!
-
-(defun follow-calc-win-end (&optional win)
-  "Calculate the presumed window end for WIN.
-
-Actually, the position returned is the start of the next
-window, normally is the end plus one.
-
-If WIN is nil, the selected window is used.
-
-Returns (end-pos end-of-buffer-p)"
-  (if follow-emacs-version-xemacs-p
-      ;; XEmacs can calculate the end of the window by using
-      ;; the 'guarantee options. GOOD!
-      (let ((end (window-end win t)))
-	(if (= end (funcall (symbol-function 'point-max)
-			    (window-buffer win)))
-	    (list end t)
-	  (list (+ end 1) nil))) 
-    ;; Emacs 19: We have to calculate the end by ourselves.
-    ;; This code works on both XEmacs and Emacs 19, but now
-    ;; that XEmacs has got custom-written code, this could
-    ;; be optimized for Emacs 19.
-    (let ((orig-win (and win (selected-window)))
-	  height
-	  buffer-end-p)
-      (if win (select-window win))
-      (prog1
-	  (save-excursion
-	    (goto-char (window-start))
-	    (setq height (- (window-height) 1))
-	    (setq buffer-end-p
-		  (if (bolp)
-		      (not (= height (vertical-motion height)))
-		    (save-restriction
-		      ;; Fix a mis-feature in `vertical-motion':
-		      ;; The start of the window is assumed to
-		      ;; coinside with the start of a line.
-		      (narrow-to-region (point) (point-max))
-		      (not (= height (vertical-motion height))))))
-	    (list (point) buffer-end-p))
-	(if orig-win
-	    (select-window orig-win))))))
-
-
-;; Can't use `save-window-excursion' since it triggers a redraw.
-(defun follow-calc-win-start (windows pos win)
-  "Calculate where WIN will start if the first in WINDOWS start at POS.
-
-If WIN is nil the point below all windows is returned."
-  (let (start)
-    (while (and windows (not (eq (car windows) win)))
-      (setq start (window-start (car windows)))
-      (set-window-start (car windows) pos 'noforce)
-      (setq pos (car (inline (follow-calc-win-end (car windows)))))
-      (set-window-start (car windows) start 'noforce)
-      (setq windows (cdr windows)))
-    pos))
-
-
-;; The result from `follow-windows-start-end' is cached when using
-;; a handful simple commands, like cursor movement commands.
-
-(defsubst follow-cache-valid-p (windows)
-  "Test if the cached value of `follow-windows-start-end' can be used.
-Note that this handles the case when the cache has been set to nil."
-  (let ((res t)
-	(cache follow-windows-start-end-cache))
-    (while (and res windows cache)
-      (setq res (and (eq (car windows)
-			 (car (car cache)))
-		     (eq (window-start (car windows))
-			 (car (cdr (car cache))))))
-      (setq windows (cdr windows))
-      (setq cache (cdr cache)))
-    (and res (null windows) (null cache))))
-
-
-(defsubst follow-invalidate-cache ()
-  "Force `follow-windows-start-end' to recalculate the end of the window."
-  (setq follow-windows-start-end-cache nil))
-
-
-;; Build a list of windows and their start and end positions.
-;; Useful to avoid calculating start/end position whenever they are needed.
-;; The list has the format:
-;; ((Win Start End End-of-buffer-visible-p) ...)
-
-;; Used to have a `save-window-excursion', but it obviously triggered
-;; redraws of the display. Check if I used it for anything.
-
-
-(defun follow-windows-start-end (windows)
-  "Builds a list of (WIN START END BUFFER-END-P) for every window in WINDOWS."
-  (if (follow-cache-valid-p windows)
-      follow-windows-start-end-cache
-    (let ((win-start-end '())
-	  (orig-win (selected-window)))
-      (while windows
-	(select-window (car windows))
-	(setq win-start-end 
-	      (cons (cons (car windows) 
-			  (cons (window-start)
-				(follow-calc-win-end)))
-		    win-start-end))
-	(setq windows (cdr windows)))
-      (select-window orig-win)
-      (setq follow-windows-start-end-cache (nreverse win-start-end))
-      follow-windows-start-end-cache)))
-
-
-(defsubst follow-pos-visible (pos win win-start-end)
-  "Non-nil when POS is visible in WIN."
-  (let ((wstart-wend-bend (cdr (assq win win-start-end))))
-    (and (>= pos (car wstart-wend-bend))
-	 (or (< pos (car (cdr wstart-wend-bend)))
-	     (nth 2 wstart-wend-bend)))))
-
-
-;; By `aligned' we mean that for all adjecent windows, the end of the
-;; first is equal with the start of the successor.  The first window
-;; should start at a full screen line.
-
-(defsubst follow-windows-aligned-p (win-start-end)
-  "Non-nil if the follower WINDOWS are alinged."
-  (let ((res t)) 
-    (save-excursion
-       (goto-char (window-start (car (car win-start-end))))
-       (if (bolp)
-	   nil
-	 (vertical-motion 0 (car (car win-start-end)))
-	 (setq res (eq (point) (window-start (car (car win-start-end)))))))
-    (while (and res (cdr win-start-end))
-      ;; At least two followers left
-      (setq res (eq (car (cdr (cdr (car win-start-end))))
-		    (car (cdr (car (cdr win-start-end))))))
-      (setq win-start-end (cdr win-start-end)))
-    res))
-
-
-;; Check if the point is visible in all windows. (So that
-;; no one will be recentered.)
-
-(defun follow-point-visible-all-windows-p (win-start-end)
-  "Non-nil when the window-point is visible in all windows."
-  (let ((res t))
-    (while (and res win-start-end)
-      (setq res (follow-pos-visible (window-point (car (car win-start-end)))
-				    (car (car win-start-end))
-				    win-start-end))
-      (setq win-start-end (cdr win-start-end)))
-    res))
-
-
-;; Make sure WIN always starts at the beginning of an whole screen
-;; line. If WIN is not aligned the start is updated which probably
-;; will lead to a redisplay of the screen later on.
-;;
-;; This is used with the first window in a follow chain.  The reason
-;; is that we want to detect that the point is outside the window.
-;; (Without the update, the start of the window will move as the
-;; user presses BackSpace, and the other window redisplay routines
-;; will move the start of the window in the wrong direction.)
-
-(defun follow-update-window-start (win)
-  "Make sure that the start of WIN starts at a full screen line."
-  (save-excursion
-    (goto-char (window-start win))
-    (if (bolp)
-	nil
-      (vertical-motion 0 win)
-      (if (eq (point) (window-start win))
-	  nil
-	(vertical-motion 1 win)
-	(set-window-start win (point) 'noforce)))))
-
-;;}}}
-;;{{{ Selection functions
-
-;; Make a window in WINDOWS selected if it currently
-;; is displaying the position DEST.
-;;
-;; We don't select a window if it just has been moved.
-
-(defun follow-select-if-visible (dest win-start-end)
-  "Select and return a window, if DEST is visible in it.
-Return the selected window."
-  (let ((win nil))
-    (while (and (not win) win-start-end)
-      ;; Don't select a window which was just moved. This makes it
-      ;; possible to later select the last window after a `end-of-buffer'
-      ;; command.
-      (if (follow-pos-visible dest (car (car win-start-end)) win-start-end)
-	  (progn
-	    (setq win (car (car win-start-end)))
-	    (select-window win)))
-      (setq win-start-end (cdr win-start-end)))
-    win))
-
-
-;; Lets select a window showing the end. Make sure we only select it if it
-;; wasn't just moved here. (i.e. M-> shall not unconditionally place
-;; the point in the selected window.)
-;;
-;; (Compatibility kludge: in Emacs 19 `window-end' is equal to `point-max';
-;; in XEmacs, it is equal to `point-max + 1'. Should I really bother
-;; checking `window-end' now when I check `end-of-buffer' explicitylt?)
-
-(defun follow-select-if-end-visible (win-start-end)
-  "Select and return a window, if end is visible in it."
-  (let ((win nil))
-    (while (and (not win) win-start-end)
-      ;; Don't select a window which was just moved. This makes it
-      ;; possible to later select the last window after a `end-of-buffer'
-      ;; command.
-      (if (and (eq (point-max) (nth 2 (car win-start-end)))
-	       (nth 3 (car win-start-end))
-	       (eq (point-max) (min (point-max)
-				    (window-end (car (car win-start-end))))))
-	  (progn
-	    (setq win (car (car win-start-end)))
-	    (select-window win)))
-      (setq win-start-end (cdr win-start-end)))
-    win))
-
-
-;; Select a window which will display the point if the windows would
-;; be redisplayed with the first window fixed. This is useful for
-;; example when the user has pressed return at the bottom of a window
-;; as the point is not visible in any window.
-
-(defun follow-select-if-visible-from-first (dest windows)
-  "Select and return a window with DEST, if WINDOWS are redrawn from top."
-  (let ((win nil)
-	end-pos-end-p)
-    (save-excursion
-      (goto-char (window-start (car windows)))
-      ;; Make sure the line start in the beginning of a real screen
-      ;; line.
-      (vertical-motion 0 (car windows))    
-      (if (< dest (point))
-	  ;; Above the start, not visible.
-	  nil
-	;; At or below the start. Check the windows.
-	(save-window-excursion
-	  (while (and (not win) windows)
-	    (set-window-start (car windows) (point) 'noforce)
-	    (setq end-pos-end-p (follow-calc-win-end (car windows)))
-	    (goto-char (car end-pos-end-p))
-	    ;; Visible, if dest above end, or if eob is visible inside
-	    ;; the window.
-	    (if (or (car (cdr end-pos-end-p))
-		    (< dest (point)))
-		  (setq win (car windows))
-		(setq windows (cdr windows)))))))
-    (if win 
-	(select-window win))
-    win))
-
-
-;;}}}
-;;{{{ Redisplay 
-
-;; Redraw all the windows on the screen, starting with the top window.
-;; The window used as marker is WIN, or the selcted window if WIN
-;; is nil.
-
-(defun follow-redisplay (&optional windows win)
-  "Reposition the WINDOWS around WIN.
-Should the point be too close to the roof we redisplay everything
-from the top. WINDOWS should contain a list of windows to
-redisplay, it is assumed that WIN is a member of the list. 
-Should WINDOWS be nil, the windows displaying the
-same buffer as WIN, in the current frame, are used.
-Should WIN be nil, the selected window is used." 
-  (or win
-      (setq win (selected-window)))
-  (or windows 
-      (setq windows (follow-all-followers win)))
-  (follow-downward windows (follow-calculate-first-window-start windows win)))
-
-
-;; Redisplay a chain of windows. Start every window directly after the
-;; end of the previous window, to make sure long lines are displayed
-;; correctly.
-
-(defun follow-downward (windows pos)
-  "Redisplay all WINDOWS starting at POS."
-  (while windows
-    (set-window-start (car windows) pos)
-    (setq pos (car (follow-calc-win-end (car windows))))
-    (setq windows (cdr windows))))
-
-
-;;(defun follow-downward (windows pos)
-;;  "Redisplay all WINDOWS starting at POS."
-;;  (let (p)
-;;    (while windows
-;;      (setq p (window-point (car windows)))
-;;      (set-window-start (car windows) pos)
-;;      (set-window-point (car windows) (max p pos))
-;;      (setq pos (car (follow-calc-win-end (car windows))))
-;;      (setq windows (cdr windows)))))
-
-
-;; Return the start of the first window.
-;;
-;; First, estimate the position. It the value is not perfect (i.e. we
-;; have somewhere splited a line between windows) we try to enhance
-;; the value.
-;;
-;; The guess is always perfect if no long lines is split between
-;; windows.
-;;
-;; The worst case peformace of probably very bad, but it is very
-;; unlikely that we ever will miss the correct start by more than one
-;; or two lines.
-
-(defun follow-calculate-first-window-start (windows &optional win start)
-  "Calculate the start of the first window.
-
-WINDOWS is a chain of windows to work with.  WIN is the window
-to recenter around.  It is assumed that WIN starts at position 
-START."
-  (or win 
-      (setq win (selected-window)))
-  (or start 
-      (setq start (window-start win)))
-  (let ((guess (follow-estimate-first-window-start windows win start)))
-    (if (car guess)
-	(cdr guess)
-      ;; The guess wasn't exact, try to enhance it.
-      (let ((win-start (follow-calc-win-start windows (cdr guess) win)))
-	(cond ((= win-start start) 
-	       (follow-debug-message "exact")
-	       (cdr guess))
-	      ((< win-start start)
-	       (follow-debug-message "above")
-	       (follow-calculate-first-window-start-from-above 
-		windows (cdr guess) win start))
-	      (t
-	       (follow-debug-message "below")
-	       (follow-calculate-first-window-start-from-below 
-		windows (cdr guess) win start)))))))
-
-
-;; `exact' is disabled due to XEmacs and fonts of variable
-;; height.
-(defun follow-estimate-first-window-start (windows win start)
-  "Estimate the position of the first window.
-
-Returns (EXACT . POS). If EXACT is non-nil, POS is the starting
-position of the first window. Otherwise it is a good guess."
-  (let ((pred (car (follow-split-followers windows win)))
-	(exact nil))
-    (save-excursion
-      (goto-char start)
-      ;(setq exact (bolp))
-      (vertical-motion 0 win)
-      (while pred
-	(vertical-motion (- 1 (window-height (car pred))) (car pred))
-	(if (not (bolp))
-	  (setq exact nil))
-	(setq pred (cdr pred)))
-      (cons exact (point)))))
-
-
-;; Find the starting point, start at GUESS and search downward.
-;; The returned point is always a point below GUESS.
-
-(defun follow-calculate-first-window-start-from-above 
-       (windows guess win start)
-  (save-excursion
-    (let ((done nil)
-	  win-start
-	  res)
-      (goto-char guess)
-      (while (not done)
-	(if (not (= (vertical-motion 1 (car windows)) 1))
-	    ;; Hit bottom! (Can we really do this?)
-	    ;; We'll keep it, since it ensures termination.
-	    (progn
-	      (setq done t)
-	      (setq res (point-max)))
-	  (setq win-start (follow-calc-win-start windows (point) win))
-	  (if (>= win-start start)
-	      (progn 
-		(setq done t)
-		(setq res (point))))))
-      res)))
-
-
-;; Find the starting point, start at GUESS and search upward.  Return
-;; a point on the same line as GUESS, or above.
-;;
-;; (Is this ever used? I must make sure it works just in case it is
-;; ever called.)
-
-(defun follow-calculate-first-window-start-from-below
-       (windows guess &optional win start)
-  (setq win (or win (selected-window)))
-  (setq start (or start (window-start win)))
-  (save-excursion
-    (let ((done nil)
-	  win-start
-	  res)
-      ;; Always calculate what happend when no line is displayed in the first
-      ;; window. (The `previous' res is needed below!)
-      (goto-char guess)
-      (vertical-motion 0 (car windows))
-      (setq res (point))
-      (while (not done)
-	(if (not (= (vertical-motion -1 (car windows)) -1))
-	    ;; Hit roof!
-	    (progn
-	      (setq done t)
-	      (setq res (point-min)))
-	  (setq win-start (follow-calc-win-start windows (point) win))
-	  (cond ((= win-start start)	; Perfect match, use this value
-		 (setq done t)
-		 (setq res (point)))
-		((< win-start start)	; Walked to far, use preious result
-		 (setq done t))
-		(t			; Store result for next iteration
-		 (setq res (point))))))
-      res)))
-
-;;}}}
-;;{{{ Avoid tail recenter
-
-;; This sets the window internal flag `force_start'. The effect is that
-;; windows only displaying the tail isn't recentered.
-;; Has to be called before every redisplay... (Great isn't it?)
-;;
-;; XEmacs doesn't recenter the tail, GOOD!
-;;
-;; A window displaying only the tail, is a windows whose
-;; window-start position is equal to (point-max) of the buffer it
-;; displays.
-;;
-;; This function is also added to `post-command-idle-hook', introduced
-;; in Emacs 19.30.  This is needed since the vaccine injected by the
-;; call from `post-command-hook' only works until the next redisplay.
-;; It is possible that the functions in the `post-command-idle-hook'
-;; can cause a redisplay, and hence a new vaccine is needed.
-;;
-;; Sometimes, calling this function could actually cause a redisplay,
-;; especially if it is placed in the debug filter section.  I must
-;; investigate this further...
-
-(defun follow-avoid-tail-recenter (&rest rest)
-  "Make sure windows displaying the end of a buffer aren't recentered.
-
-This is done by reading and rewriting the start positon of 
-non-first windows in Follow Mode."
-  (if follow-avoid-tail-recenter-p
-      (let* ((orig-buffer (current-buffer))
-	    (top (frame-first-window (selected-frame)))
-	    (win top)
-	    (who '())			; list of (buffer . frame)
-	    start
-	    pair)			; (buffer . frame)
-	;; If the only window in the frame is a minibuffer
-	;; window, `next-window' will never find it again...
-	(if (window-minibuffer-p top)
-	    nil
-	  (while  ;; look, no body!
-	      (progn
-		(setq start (window-start win))
-		(set-buffer (window-buffer win))
-		(setq pair (cons (window-buffer win) (window-frame win)))
-		(if (member pair who)
-		    (if (and (boundp 'follow-mode) follow-mode 
-			     (eq (point-max) start))
-			;; Write the same window start back, but don't
-			;; set the NOFORCE flag.
-			(set-window-start win start))
-		  (setq who (cons pair who)))
-		(setq win (next-window win 'not t))
-		(not (eq win top))))  ;; Loop while this is true.
-	  (set-buffer orig-buffer)))))
-
-;;}}}
-
-;;}}}
-;;{{{ Post Command Hook
-
-;;; The magic little box. This function is called after every command.
-
-;; This is not as complicated as it seems. It is simply a list of common
-;; display situations and the actions to take, plus commands for redrawing
-;; the screen if it should be unaligned.
-;;
-;; We divide the check into two parts; whether we are at the end or not.
-;; This is due to the fact that the end can actaually be visible
-;; in several window even though they are aligned.
-
-(defun follow-post-command-hook ()
-  "Ensure that the windows in Follow mode are adjecent after each command."
-  (setq follow-inside-post-command-hook t)
-  (if (or (not (input-pending-p))
-	  ;; Sometimes, in XEmacs, mouse events are not handled
-	  ;; properly by `input-pending-p'.  A typical example is
-	  ;; when clicking on a node in `info'.
-	  (and (boundp 'current-mouse-event)
-	       (symbol-value 'current-mouse-event)
-	       (fboundp 'button-event-p)
-	       (funcall (symbol-function 'button-event-p)
-			(symbol-value 'current-mouse-event))))
-      ;; Work in the selected window, not in the current buffer.
-      (let ((orig-buffer (current-buffer))
-	    (win (selected-window)))
-	(set-buffer (window-buffer win))
-	(or (and (symbolp this-command) 
-		 (get this-command 'follow-mode-use-cache))
-	    (follow-invalidate-cache))
-	(if (and (boundp 'follow-mode) follow-mode
-		 (not (window-minibuffer-p win)))
-	    ;; The buffer shown in the selected window is in follow
-	    ;; mode, lets find the current state of the display and
-	    ;; cache the result for speed (i.e. `aligned' and `visible'.)
-	    (let* ((windows (inline (follow-all-followers win)))
-		   (dest (point))
-		   (win-start-end (inline
-				    (follow-update-window-start (car windows))
-				    (follow-windows-start-end windows)))
-		   (aligned (follow-windows-aligned-p win-start-end))
-		   (visible (follow-pos-visible dest win win-start-end)))
-	      (if (not (and aligned visible))
-		  (follow-invalidate-cache))
-	      (inline (follow-avoid-tail-recenter))
-	      ;; Select a window to display the point.
-	      (or follow-internal-force-redisplay
-		  (progn
-		    (if (eq dest (point-max))
-			;; We're at the end, we have to be careful since
-			;; the display can be aligned while `dest' can
-			;; be visible in several windows.
-			(cond
-			 ;; Select the current window, but only when
-			 ;; the display is correct. (When inserting
-			 ;; character in a tail window, the display is
-			 ;; not correct, as they are shown twice.)
-			 ;;
-			 ;; Never stick to the current window after a
-			 ;; deletion.  The reason is cosmetic, when
-			 ;; typing `DEL' in a window showing only the
-			 ;; end of the file, character are removed
-			 ;; from the window above, which is very
-			 ;; unintuitive.
-			 ((and visible
-			       aligned
-			       (not (memq this-command 
-					  '(backward-delete-char
-					    delete-backward-char
-					    backward-delete-char-untabify
-					    kill-region))))
-			  (follow-debug-message "Max: same"))
-			 ;; If the end is visible, and the window
-			 ;; doesn't seems like it just has been moved,
-			 ;; select it.
-			 ((follow-select-if-end-visible win-start-end)
-			  (follow-debug-message "Max: end visible")
-			  (setq visible t)
-			  (setq aligned nil)
-			  (goto-char dest))
-			 ;; Just show the end...
-			 (t
-			  (follow-debug-message "Max: default")
-			  (select-window (car (reverse windows)))
-			  (goto-char dest)
-			  (setq visible nil)
-			  (setq aligned nil)))
-		      
-		      ;; We're not at the end, here life is much simpler.
-		      (cond
-		       ;; This is the normal case! 
-		       ;; It should be optimized for speed.
-		       ((and visible aligned)
-			(follow-debug-message "same"))
-		       ;; Pick a position in any window.  If the
-		       ;; display is ok, this will pick the `correct'
-		       ;; window.  If the display is wierd do this
-		       ;; anyway, this will be the case after a delete
-		       ;; at the beginning of the window.
-		       ((follow-select-if-visible dest win-start-end)
-			(follow-debug-message "visible")
-			(setq visible t)
-			(goto-char dest))
-		       ;; Not visible anywhere else, lets pick this one.
-		       ;; (Is this case used?)
-		       (visible
-			(follow-debug-message "visible in selected."))
-		       ;; Far out!
-		       ((eq dest (point-min))
-			(follow-debug-message "min")
-			(select-window (car windows))
-			(goto-char dest)
-			(set-window-start (selected-window) (point-min))
-			(setq win-start-end (follow-windows-start-end windows))
-			(follow-invalidate-cache)
-			(setq visible t)
-			(setq aligned nil))
-		       ;; If we can position the cursor without moving the first
-		       ;; window, do it. This is the case which catches `RET'
-		       ;; at the bottom of a window.
-		       ((follow-select-if-visible-from-first dest windows)
-			(follow-debug-message "Below first")
-			(setq visible t)		  
-			(setq aligned t)
-			(follow-redisplay windows (car windows))
-			(goto-char dest))
-		       ;; None of the above. For simplicity, we stick to the
-		       ;; selected window.
-		       (t
-			(follow-debug-message "None")
-			(setq visible nil)
-			(setq aligned nil))))
-		    ;; If a new window has been selected, make sure that the
-		    ;; old is not scrolled when the point is outside the
-		    ;; window.
-		    (or (eq win (selected-window))
-			(let ((p (window-point win)))
-			  (set-window-start win (window-start win) nil)
-			  (set-window-point win p)))))
-	      ;; Make sure the point is visible in the selected window.
-	      ;; (This could lead to a scroll.)
-	      (if (or visible
-		      (follow-pos-visible dest win win-start-end))
-		  nil
-		(sit-for 0)
-		(follow-avoid-tail-recenter)
-		(setq win-start-end (follow-windows-start-end windows))
-		(follow-invalidate-cache)
-		(setq aligned nil))
-	      ;; Redraw the windows whenever needed.
-	      (if (or follow-internal-force-redisplay
-		      (not (or aligned
-			       (follow-windows-aligned-p win-start-end)))
-		      (not (inline (follow-point-visible-all-windows-p 
-				    win-start-end))))
-		  (progn
-		    (setq follow-internal-force-redisplay nil)
-		    (follow-redisplay windows (selected-window))
-		    (setq win-start-end (follow-windows-start-end windows))
-		    (follow-invalidate-cache)
-		    ;; When the point ends up in another window. This
-		    ;; happends when dest is in the beginning of the
-		    ;; file and the selected window is not the first.
-		    ;; It can also, in rare situations happend when
-		    ;; long lines are used and there is a big
-		    ;; difference between the width of the windows.
-		    ;; (When scrolling one line in a wide window which
-		    ;; will cause a move larger that an entire small
-		    ;; window.)
-		    (if (follow-pos-visible dest win win-start-end)
-			nil
-		      (follow-select-if-visible dest win-start-end)
-		      (goto-char dest))))
-	      
-	      ;; If the region is visible, make it look good when spanning
-	      ;; multiple windows.
-	      (if (or (and (boundp 'mark-active) (symbol-value 'mark-active))
-		      (and (fboundp 'region-active-p) 
-			   (funcall (symbol-function 'region-active-p))))
-		  (follow-maximize-region 
-		   (selected-window) windows win-start-end))
-
-	      (inline (follow-avoid-tail-recenter))
-	      ;; DEBUG
-	      ;;(if (not (follow-windows-aligned-p 
-	      ;;           (follow-windows-start-end windows)))
-	      ;;    (message "follow-mode: windows still unaligend!"))
-	      ;; END OF DEBUG
-	      )				; Matches (let*
-	  ;; Buffer not in follow mode:
-	  ;; We still must update the windows displaying the tail so that
-	  ;; Emacs won't recenter them.
-	  (follow-avoid-tail-recenter))
-	(set-buffer orig-buffer)))
-  (setq follow-inside-post-command-hook nil))
-
-;;}}}
-;;{{{ The region
-
-;; Tries to make the highlighted area representing the region look
-;; good when spanning several windows. 
-;;
-;; Not perfect, as the point can't be placed at window end, only at
-;; end-1. Whis will highlight a little bit in windows above
-;; the current.
-
-(defun follow-maximize-region (win windows win-start-end)
-  "Make a highlighted region stretching multiple windows look good
-when in Follow mode."
-  (let* ((all (follow-split-followers windows win))
-	 (pred (car all))
-	 (succ (cdr all))
-	 data)
-    (while pred
-      (setq data (assq (car pred) win-start-end))
-      (set-window-point (car pred) (max (nth 1 data) (- (nth 2 data) 1)))
-      (setq pred (cdr pred)))
-    (while succ
-      (set-window-point (car succ) (nth 1 (assq (car succ) win-start-end)))
-      (setq succ (cdr succ)))))
-
-;;}}}
-;;{{{ Scroll bar
-
-;;;; Scroll-bar support code.
-
-;;; Why is it needed? Well, if the selected window is in follow mode,
-;;; all its follower stick to it blindly. If one of them is scrolled,
-;;; it immediately returns to the original position when the mouse is
-;;; released. If the selected window is not a follower of the dragged
-;;; window the windows will be unaligned.
-
-;;; The advices doesn't get compiled. Aestetically, this might be a
-;;; problem but in practical life it isn't.
-
-;;; Discussion: Now when the other windows in the chain follow the
-;;; dragged, should we really select it?
-
-(cond ((fboundp 'scroll-bar-drag)
-       ;;;
-       ;;; Emacs 19 style scrollbars.
-       ;;;
-
-       ;; Select the dragged window if it is a follower of the
-       ;; selected window.
-       ;;
-       ;; Generate advices of the form:
-       ;; (defadvice scroll-bar-drag (after follow-scroll-bar-drag activate)
-       ;;   "Adviced by `follow-mode'."
-       ;;   (follow-redraw-after-event (ad-get-arg 0)))
-       (let ((cmds '(scroll-bar-drag
-		     scroll-bar-drag-1	; Executed at every move.
-		     scroll-bar-scroll-down
-		     scroll-bar-scroll-up
-		     scroll-bar-set-window-start)))
-	 (while cmds
-	   (eval
-	    (` (defadvice (, (intern (symbol-name (car cmds))))
-		 (after 
-		  (, (intern (concat "follow-" (symbol-name (car cmds))))) 
-		  activate)
-		 "Adviced by Follow Mode."
-		 (follow-redraw-after-event (ad-get-arg 0)))))
-	   (setq cmds (cdr cmds))))
-    
-    
-       (defun follow-redraw-after-event (event)
-	 "Adviced by Follow mode."
-	 (condition-case nil
-	     (let* ((orig-win (selected-window))
-		    (win (nth 0 (funcall 
-				 (symbol-function 'event-start) event)))
-		    (fmode (assq 'follow-mode 
-				 (buffer-local-variables 
-				  (window-buffer win)))))
-	       (if (and fmode (cdr fmode))
-		   ;; The selected window is in follow-mode
-		   (progn
-		     ;; Recenter around the dragged window.
-		     (select-window win)
-		     (follow-redisplay)
-		     (select-window orig-win))))
-	   (error nil))))
-
-
-      ((fboundp 'scrollbar-vertical-drag)
-       ;;;
-       ;;; XEmacs style scrollbars.
-       ;;;
-
-       ;; Advice all scrollbar functions on the form:
-       ;;
-       ;; (defadvice scrollbar-line-down 
-       ;;	(after follow-scrollbar-line-down activate)
-       ;;   (follow-xemacs-scrollbar-support (ad-get-arg 0)))
-
-      (let ((cmds '(scrollbar-line-down	; Window
-		    scrollbar-line-up
-		    scrollbar-page-down	; Object
-		    scrollbar-page-up
-		    scrollbar-to-bottom	; Window
-		    scrollbar-to-top
-		    scrollbar-vertical-drag ; Object
-		    )))
-	
-	(while cmds
-	  (eval
-	   (` (defadvice (, (intern (symbol-name (car cmds))))
-		(after 
-		 (, (intern (concat "follow-" (symbol-name (car cmds))))) 
-		 activate)
-		"Adviced by `follow-mode'."
-		(follow-xemacs-scrollbar-support (ad-get-arg 0)))))
-	  (setq cmds (cdr cmds))))
-
-
-      (defun follow-xemacs-scrollbar-support (window)
-	"Redraw windows showing the same buffer as shown in WINDOW.
-WINDOW is either the dragged window, or a cons containing the
-window as its first element. This is called while the user drags
-the scrollbar.
-
-WINDOW can be an object or a window."
-	(condition-case nil
-	    (progn
-	      (if (consp window)
-		  (setq window (car window)))
-	      (let ((fmode (assq 'follow-mode 
-				 (buffer-local-variables 
-				  (window-buffer window))))
-		    (orig-win (selected-window)))
-		(if (and fmode (cdr fmode))
-		    (progn
-		      ;; Recenter around the dragged window.
-		      (select-window window)
-		      (follow-redisplay)
-		      (select-window orig-win)))))
-	  (error nil)))))
-
-;;}}}
-;;{{{ Process output
-
-;;; The following sections installs a spy which listens to process
-;;; output and tries to reposition the windows whose buffers are in
-;;; Follow mode.  We play safe as much as possible...
-;;;
-;;; When follow-mode is activated all active processes are
-;;; intercepted.  All new processes which change their filter function
-;;; using `set-process-filter' are also intercepted.  The reason is
-;;; that a process can cause a redisplay recentering "tail" windows.
-;;; Note that it doesn't hurt to spy on more processes than needed.
-;;;
-;;; Technically, we set the process filter to `follow-generic-filter'.
-;;; The original filter is stored in `follow-process-filter-alist'.
-;;; Our generic filter calls the original filter, or inserts the
-;;; output into the buffer, if the buffer originally didn't have an
-;;; output filter.  It also makes sure that the windows connected to
-;;; the buffer are aligned.
-;;;
-;;; Discussion: How to we find processes which doesn't call
-;;; `set-process-filter'?  (How often are processes created in a
-;;; buffer after Follow mode are activated?)
-;;;
-;;; Discussion: Should we also advice `process-filter' to make our
-;;; filter invisible to others?
-
-;;{{{ Advice for `set-process-filter'
-
-;; Do not call this with 'follow-generic-filter as the name of the
-;; filter...
-
-(defadvice set-process-filter (before follow-set-process-filter activate)
-  "Follow Mode listens to calls to this function to make 
-sure process output will be displayed correctly in buffers
-in which the mode is activated.
-
-Follow Mode inserts it's own process filter to do it's 
-magic stuff before the real process filter is called."
-  (if follow-intercept-processes
-      (progn
-	(setq follow-process-filter-alist
-	      (delq (assq (ad-get-arg 0) follow-process-filter-alist)
-		    follow-process-filter-alist))
-	(follow-tidy-process-filter-alist)
-	(cond ((eq (ad-get-arg 1) t))
-	      ((eq (ad-get-arg 1) nil)
-	       (ad-set-arg 1 'follow-generic-filter))
-	      (t
-	       (setq follow-process-filter-alist 
-		     (cons (cons (ad-get-arg 0) (ad-get-arg 1)) 
-			   follow-process-filter-alist))
-	       (ad-set-arg 1 'follow-generic-filter))))))
-
-
-(defun follow-call-set-process-filter (proc filter)
-  "Call original `set-process-filter' without the Follow mode advice."
-  (ad-disable-advice 'set-process-filter 'before
-		     'follow-set-process-filter)
-  (ad-activate 'set-process-filter)
-  (prog1 
-      (set-process-filter proc filter)
-    (ad-enable-advice 'set-process-filter 'before
-		      'follow-set-process-filter)
-    (ad-activate 'set-process-filter)))
-
-
-(defadvice process-filter (after follow-process-filter activate)
-  "Normally when Follow mode is activated all processes has the
-process filter set to `follow-generic-filter'.  With this advice,
-the original process filter is returned."
-  (cond ((eq ad-return-value 'follow-generic-filter)
-	 (setq ad-return-value
-	       (cdr-safe (assq (ad-get-arg 0) 
-			       follow-process-filter-alist))))))
-
-
-(defun follow-call-process-filter (proc)
-  "Call original `process-filter' without the Follow mode advice."
-  (ad-disable-advice 'process-filter 'after
-		     'follow-process-filter)
-  (ad-activate 'process-filter)
-  (prog1 
-      (process-filter proc)
-    (ad-enable-advice 'process-filter 'after 
-		      'follow-process-filter)
-    (ad-activate 'process-filter)))
-  
-
-(defun follow-tidy-process-filter-alist ()
-  "Remove old processes from `follow-process-filter-alist'."
-  (let ((alist follow-process-filter-alist)
-	(ps (process-list))
-	(new ()))
-    (while alist
-      (if (and (not (memq (process-status (car (car alist))) 
-			  '(exit signal closed nil)))
-	       (memq (car (car alist)) ps))
-	  (setq new (cons (car alist) new)))
-      (setq alist (cdr alist)))
-    (setq follow-process-filter-alist new)))
-
-;;}}}
-;;{{{ Start/stop interception of processes.
-
-;; Normally, all new processed are intercepted by our `set-process-filter'.
-;; This is needed to intercept old processed which were started before we were
-;; loaded, and processes we have forgotten by calling
-;; `follow-stop-intercept-process-output'.
-
-(defun follow-intercept-process-output ()
-  "Intercept all active processes.
-
-This is needed so that Follow Mode can track all display events in the
-system.  (See `follow-mode')"
-  (interactive)
-  (let ((list (process-list)))
-    (while list
-      (if (eq (process-filter (car list)) 'follow-generic-filter)
-	  nil
-	;; The custom `set-process-filter' defined above.
-	(set-process-filter (car list) (process-filter (car list))))
-      (setq list (cdr list))))
-  (setq follow-intercept-processes t))
-
-
-(defun follow-stop-intercept-process-output ()
-  "Stop Follow Mode from spying on processes.
-
-All current spypoints are removed and no new will be added.
-
-The effect is that Follow mode won't be able to handle buffers 
-connected to processes.  
-
-The only reason to call this function is if the Follow mode spy filter
-would interfere with some other package.  If this happens, please
-report this using the `follow-submit-feedback' function."
-  (interactive)
-  (follow-tidy-process-filter-alist)
-  (let ((list (process-list)))
-    (while list
-      (if (eq (process-filter (car list)) 'follow-generic-filter)
-	  (progn
-	    (follow-call-set-process-filter 
-	     (car list) 
-	     (cdr-safe (assq (car list) follow-process-filter-alist)))
-	    (setq follow-process-filter-alist 
-		  (delq (assq (car list) follow-process-filter-alist)
-			follow-process-filter-alist))))
-      (setq list (cdr list))))
-  (setq follow-intercept-processes nil))
-
-;;}}}
-;;{{{ The filter
-
-;;; The following section is a naive method to make buffers with
-;;; process output to work with Follow mode. Whenever the start of the
-;;; window displaying the buffer is moved, we moves it back to it's
-;;; original position and try to select a new window.  (If we fail,
-;;; the normal redisplay functions of Emacs will scroll it right
-;;; back!)
-
-(defun follow-generic-filter (proc output)
-  "Process output filter for process connected to buffers in Follow mode."
-  (let* ((old-buffer (current-buffer))
-	 (orig-win (selected-window))
-	 (buf (process-buffer proc))
-	 (win (and buf (if (eq buf (window-buffer orig-win))
-			   orig-win
-			 (get-buffer-window buf t))))
-	 (return-to-orig-win (and win (not (eq win orig-win))))
-	 (orig-window-start (and win (window-start win))))
-
-    ;; If input is pending, the `sit-for' below won't redraw the
-    ;; display. In that case, calling `follow-avoid-tail-recenter' may
-    ;; provoke the process hadnling code to sceduling a redisplay.
-    ;(or (input-pending-p)
-    ; (follow-avoid-tail-recenter))
-
-    ;; Output the `output'.
-    (let ((filter (cdr-safe (assq proc follow-process-filter-alist))))
-      (cond 
-       ;; Call the original filter function
-       (filter
-	(funcall filter proc output))
-
-       ;; No filter, but we've got a buffer. Just output into it.
-       (buf
-	(set-buffer buf)
-	(if (not (marker-buffer (process-mark proc)))
-	    (set-marker (process-mark proc) (point-max)))
-	(let ((moving (= (point) (process-mark proc)))
-	      (odeactivate (and (boundp 'deactivate-mark)
-				(symbol-value 'deactivate-mark)))
-	      (old-buffer-read-only buffer-read-only))
-	  (setq buffer-read-only nil)
-	  (save-excursion
-	    (goto-char (process-mark proc))
-	    ;; `insert-before-markers' just in case the users next
-	    ;; command is M-y.
-	    (insert-before-markers output)
-	    (set-marker (process-mark proc) (point)))
-	  (if moving (goto-char (process-mark proc)))
-	  (if (boundp 'deactivate-mark)
-	      ;; This could really be
-	      ;;    (setq deactivate-mark odeactivate)
-	      ;; but this raises an error when compiling on XEmacs.
-	      (funcall (symbol-function 'set)
-		       'deactivate-mark odeactivate))
-	  (setq buffer-read-only old-buffer-read-only)))))
-
-    ;; If we're in follow mode, do our stuff.  Select a new window and
-    ;; redisplay.  (Actually, it is redundant to check `buf', but I
-    ;; feel it's more correct.)
-    (if (and buf win (window-live-p win))
-	(progn
-	  (set-buffer buf)
-	  (if (and (boundp 'follow-mode) follow-mode)
-	      (progn 
-		(select-window win)
-		(let* ((windows (follow-all-followers win))
-		       (win-start-end (follow-windows-start-end windows))
-		       (new-window-start (window-start win))
-		       (new-window-point (window-point win)))
-		  (cond
-		   ;; The window was moved. Move it back and
-		   ;; select a new.  If no better could be found,
-		   ;; we stick to the new start position.  This
-		   ;; is used when the original process filter
-		   ;; tries to position the cursor at the bottom
-		   ;; of the window.  Example: `lyskom'.
-		   ((not (eq orig-window-start new-window-start))
-		    (follow-debug-message "filter: Moved")
-		    (set-window-start win orig-window-start)
-		    (follow-redisplay windows win)
-		    (setq win-start-end (follow-windows-start-end windows))
-		    (follow-select-if-visible new-window-point 
-					      win-start-end)
-		    (goto-char new-window-point)
-		    (if (eq win (selected-window))
-			(set-window-start win new-window-start))
-		    (setq win-start-end (follow-windows-start-end windows)))
-		   ;; Stick to this window, if point is visible in it.
-		   ((pos-visible-in-window-p new-window-point)
-		    (follow-debug-message "filter: Visible in window"))
-		   ;; Avoid redisplaying the first window. If the
-		   ;; point is visible at a window below,
-		   ;; redisplay and select it.
-		   ((follow-select-if-visible-from-first 
-		     new-window-point windows)
-		    (follow-debug-message "filter: Seen from first")
-		    (follow-redisplay windows (car windows))
-		    (goto-char new-window-point)
-		    (setq win-start-end
-			  (follow-windows-start-end windows)))
-		   ;; None of the above. We stick to the current window.
-		   (t 
-		    (follow-debug-message "filter: nothing")))
-
-		  ;; Here we have slected a window. Make sure the
-		  ;; windows are aligned and the point is visible
-		  ;; in the selected window.
-		  (if (and (not (follow-pos-visible 
-				 (point) (selected-window) win-start-end))
-			   (not return-to-orig-win))
-		      (progn
-			(sit-for 0)
-			(setq win-start-end 
-			      (follow-windows-start-end windows))))
-
-		  (if (or follow-internal-force-redisplay
-			  (not (follow-windows-aligned-p win-start-end)))
-		      (follow-redisplay windows)))))))
-
-    ;; return to the original window.
-    (if return-to-orig-win
-	(select-window orig-win))
-    (set-buffer old-buffer))
-  
-  (follow-invalidate-cache)
-
-  ;; Normally, if the display has been changed, it is redrawn.  All
-  ;; windows showing only the end of a buffer is unconditionally
-  ;; recentered, we can't prevent it by calling
-  ;; `follow-avoid-tail-recenter'.
-  ;;
-  ;; By performing a redisplay on our own, Emacs need not perform
-  ;; the above described redisplay.  (However, bu performing it when
-  ;; there are input available just seems to make things worse.)
-  (if (and follow-avoid-tail-recenter-p
-	   (not (input-pending-p)))
-      (sit-for 0)))
-
-;;}}}
-
-;;}}}
-;;{{{ Window size change
-
-;; In Emacs 19.29, the functions in `window-size-change-functions' are
-;; called every time a window in a frame changes size. Most notably, it
-;; is called after the frame has been resized.
-;;
-;; We basically call our post-command-hook for every buffer which is
-;; visible in any window in the resized frame, which is in follow-mode.
-;;
-;; Since this function can be called indirectly from
-;; `follow-post-command-hook' we have a potential infinite loop.  We
-;; handle this problem by simply not doing anything at all in this
-;; situation.  The variable `follow-inside-post-command-hook' contains
-;; information about whether the execution actually is inside the
-;; post-command-hook or not.
-
-(if (boundp 'window-size-change-functions)
-    (add-hook 'window-size-change-functions 'follow-window-size-change))
-
-
-(defun follow-window-size-change (frame)
-  "Redraw all windows in FRAME, when in Follow mode."
-  ;; Below, we call `post-command-hook'. This makes sure that we
-  ;; doesn't start a mutually recursive endless loop.
-  (if follow-inside-post-command-hook
-      nil
-    (let ((buffers '())
-	  (orig-window (selected-window))
-	  (orig-buffer (current-buffer))
-	  (orig-frame (selected-frame))
-	  windows
-	  buf)
-      (select-frame frame)
-      (unwind-protect
-	  (walk-windows 
-	   (function 
-	    (lambda (win)
-	      (setq buf (window-buffer win))
-	      (if (memq buf buffers)
-		  nil
-		(set-buffer buf)
-		(if (and (boundp 'follow-mode)
-			 follow-mode)
-		    (progn
-		      (setq windows (follow-all-followers win))
-		      (if (memq orig-window windows)
-			  (progn
-			    ;; Make sure we're redrawing around the
-			    ;; selected window.
-			    ;;
-			    ;; We must be really careful not to do this
-			    ;; when we are (indirectly) called by
-			    ;; `post-command-hook'.
-			    (select-window orig-window)
-			    (follow-post-command-hook)
-			    (setq orig-window (selected-window)))
-			(follow-redisplay windows win))
-		      (setq buffers (cons buf buffers))))))))
-	(select-frame orig-frame)
-	(set-buffer orig-buffer)
-	(select-window orig-window)))))
-
-;;}}}
-
-;;{{{ XEmacs isearch
-
-;; In XEmacs, isearch often finds matches in other windows than the
-;; currently selected.  However, when exiting the old window
-;; configuration is restored, with the exception of the beginning of
-;; the start of the window for the selected window.  This is not much
-;; help for us.
-;;
-;; We overwrite the stored window configuration with the current,
-;; unless we are in `slow-search-mode', i.e. only a few lines
-;; of text is visible.
-
-(if follow-emacs-version-xemacs-p
-    (defadvice isearch-done (before follow-isearch-done activate)
-      (if (and (boundp 'follow-mode)
-	       follow-mode
-	       (boundp 'isearch-window-configuration)
-	       isearch-window-configuration
-	       (boundp 'isearch-slow-terminal-mode)
-	       (not isearch-slow-terminal-mode))
-	  (let ((buf (current-buffer)))
-	    (setq isearch-window-configuration 
-		  (current-window-configuration))
-	    (set-buffer buf)))))
-
-;;}}}
-;;{{{ Tail window handling
-
-;;; In Emacs (not XEmacs) windows showing nothing are sometimes 
-;;; recentered.  When in Follow Mode, this is not desireable for
-;;; non-first windows in the window chain.  This section tries to
-;;; make the windows stay where they should be.
-;;;
-;;; If the display is updated, all windows starting at (point-max) are
-;;; going to be recentered at the next redisplay, unless we do a
-;;; read-and-write cycle to update the `force' flag inside the windows.
-;;;
-;;; In 19.30, a new varible `window-scroll-functions' is called every
-;;; time a window is recentered.  It is not perfect for our situation,
-;;; since when it is called for a tail window, it is to late.  However,
-;;; if it is called for another window, we can try to update our
-;;; windows.
-;;;
-;;; By patching `sit-for' we can make sure that to catch all explicit
-;;; updates initiated by lisp programs.  Internal calls, on the other
-;;; hand, are not handled.
-;;;
-;;; Please note that the function `follow-avoid-tail-recenter' is also
-;;; called from other places, e.g. `post-command-hook' and
-;;; `post-command-idle-hook'.
-
-;; If this function is called it is too late for this window, but
-;; we might save other windows from being recentered.
-
-(if (and follow-avoid-tail-recenter-p (boundp 'window-scroll-functions))
-    (add-hook 'window-scroll-functions 'follow-avoid-tail-recenter t))
-
-
-;;  This prevents all packages which calls `sit-for' directly
-;;  to recenter tail windows.
-
-(if follow-avoid-tail-recenter-p
-    (defadvice sit-for (before follow-sit-for activate)
-      "Adviced by Follow Mode.
-
-Avoid to recenter windows displaying only the end of a file as when
-displaying a short file in two windows, using Follow Mode."
-      (follow-avoid-tail-recenter)))
-
-
-;;  Without this advice, `mouse-drag-region' would start to recenter
-;;  tail windows.
-
-(if (and follow-avoid-tail-recenter-p
-	 (fboundp 'move-overlay))
-    (defadvice move-overlay (before follow-move-overlay activate)
-      "Adviced by Follow Mode.  Don't recenter windows showing only 
-the end of a buffer.  This prevents `mouse-drag-region' from
-messing things up."
-      (follow-avoid-tail-recenter)))
-
-;;}}}
-;;{{{ profile support
-
-;; The following (non-evaluated) section can be used to
-;; profile this package using `elp'.
-;;
-;; Invalid indentation on purpose!
-
-(cond (nil
-(setq elp-function-list
-      '(window-end 
-	vertical-motion 
-	; sit-for  ;; elp can't handle advices...
-	follow-mode
-	follow-all-followers
-	follow-split-followers 
-	follow-redisplay
-	follow-downward
-	follow-calculate-first-window-start
-	follow-estimate-first-window-start
-	follow-calculate-first-window-start-from-above
-	follow-calculate-first-window-start-from-below
-	follow-calc-win-end
-	follow-calc-win-start
-	follow-pos-visible
-	follow-windows-start-end
-	follow-cache-valid-p
-	follow-select-if-visible
-	follow-select-if-visible-from-first
-	follow-windows-aligned-p
-	follow-point-visible-all-windows-p
-	follow-avoid-tail-recenter
-	follow-update-window-start
-	follow-post-command-hook
-	))))
-
-;;}}}
-
-;;{{{ The end
-
-;;;
-;;; We're done!
-;;;
-
-(provide 'follow)
-
-;;}}}
-
-;; /------------------------------------------------------------------------\
-;; | "I [..] am rarely happier then when spending an entire day programming |
-;; | my computer to perform automatically a task that it would otherwise    |
-;; | take me a good ten seconds to do by hand. Ten seconds, I tell myself,  |
-;; | is ten seconds. Time is valuable and ten seconds' worth of it is well  |
-;; | worth the investment of a day's happy activity working out a way to    |
-;; | save it".             -- Douglas Adams, "Last Chance to See"           |
-;; \------------------------------------------------------------------------/
-
-;;; follow.el ends here
--- a/lisp/modes/lisp-mode.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/modes/lisp-mode.el	Mon Aug 13 09:49:09 2007 +0200
@@ -61,6 +61,8 @@
 	       :style toggle :selected debug-on-error]
 	      ["Debug On Quit" (setq debug-on-quit (not debug-on-quit))
 	       :style toggle :selected debug-on-quit]
+	      ["Debug on Signal" (setq debug-on-signal (not debug-on-signal))
+	       :style toggle :selected debug-on-signal]
 	      )))
 
 (defvar emacs-lisp-mode-popup-menu nil)
@@ -376,18 +378,42 @@
     (terpri)))
 
 ;; XEmacs change
+(defcustom eval-interactive-verbose t
+  "*Non-nil means that interactive evaluation can print messages.
+The messages are printed when the expression is treated differently
+using `\\[eval-last-sexp]' and `\\[eval-defun]' than it than it would have been
+treated noninteractively.
+
+The printed messages are \"defvar treated as defconst\" and \"defcustom
+ evaluation forced\".  See `eval-interactive' for more details."
+  :type 'boolean
+  :group 'lisp)
+
 (defun eval-interactive (expr)
-  "Like `eval' except that it transforms defvars to defconsts."
-  ;; by Stig@hackvan.com
+  "Like `eval' except that it transforms defvars to defconsts.
+The evaluation of defcustom forms is forced."
   (cond ((and (consp expr)
 	      (eq (car expr) 'defvar)
 	      (> (length expr) 2))
-	 (eval (cons 'defconst (cdr expr))))
+	 (eval (cons 'defconst (cdr expr)))
+	 (and eval-interactive-verbose
+	      (message "defvar treated as defconst"))
+	 (sit-for 1)
+	 (message "")
+	 (nth 1 expr))
 	((and (consp expr)
 	      (eq (car expr) 'defcustom)
-	      (> (length expr) 2))
-	 (makunbound (nth 1 expr))
-	 (eval expr))
+	      (> (length expr) 2)
+	      (default-boundp (nth 1 expr)))
+	 ;; Force variable to be bound
+	 (set-default (nth 1 expr) (eval (nth 2 expr)))
+	 ;; And evaluate the defcustom
+	 (eval expr)
+	 (and eval-interactive-verbose
+	      (message "defcustom evaluation forced"))
+	 (sit-for 1)
+	 (message "")
+	 (nth 1 expr))
 	(t
 	 (eval expr))))
 
@@ -422,21 +448,12 @@
 Print value in minibuffer.
 With argument, insert value in current buffer after the defun."
   (interactive "P")
-  ;; XEmacs: FSF version works, so use it
-  (let ((standard-output (if eval-defun-arg-internal (current-buffer) t))
-	(form (save-excursion
-		(end-of-defun)
-		(beginning-of-defun)
-		(read (current-buffer)))))
-    (cond ((and (eq (car form) 'defvar)
-		(cdr-safe (cdr-safe form)))
-	   ;; Force variable to be bound.
-	   (setq form (cons 'defconst (cdr form))))
-	  ((and (eq (car form) 'defcustom)
-		(default-boundp (nth 1 form)))
-	   ;; Force variable to be bound.
-	   (set-default (nth 1 form) (eval (nth 2 form)))))
-    (prin1 (eval form))))
+  (let ((standard-output (if eval-defun-arg-internal (current-buffer) t)))
+    (prin1 (eval-interactive (save-excursion
+			       (end-of-defun)
+			       (beginning-of-defun)
+			       (read (current-buffer)))))))
+
 
 (defun lisp-comment-indent ()
   (if (looking-at "\\s<\\s<\\s<")
--- a/lisp/packages/add-log.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/packages/add-log.el	Mon Aug 13 09:49:09 2007 +0200
@@ -29,6 +29,10 @@
 
 ;;; Code:
 
+;; XEmacs: the byte-compiler warns on `beginning-of-fortran-subprogram'.
+(eval-when-compile
+  (require 'fortran))
+
 (defgroup change-log nil
   "Change log maintenance"
   :group 'tools
@@ -91,7 +95,7 @@
      ("\\=, \\([^ ,:([\n]+\\)" nil nil (1 font-lock-function-name-face)))
     ;;
     ;; Function or variable names.
-    ("(\\([^ ,:\n]+\\)"
+    ("(\\([^ ,:)\n]+\\)"
      (1 font-lock-keyword-face)
      ("\\=, \\([^ ,:\n]+\\)" nil nil (1 font-lock-keyword-face)))
     ;;
@@ -412,7 +416,7 @@
 
 ;;;###autoload
 (defvar add-log-c-like-modes
-    '(c-mode c++-mode c++-c-mode objc-mode)
+    '(c-mode c++-mode c++-c-mode objc-mode java-mode)
   "*Modes that look like C to `add-log-current-defun'.")
 
 ;;;###autoload
--- a/lisp/packages/auto-autoloads.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/packages/auto-autoloads.el	Mon Aug 13 09:49:09 2007 +0200
@@ -48,7 +48,7 @@
 (defvar add-log-lisp-like-modes '(emacs-lisp-mode lisp-mode scheme-mode lisp-interaction-mode) "\
 *Modes that look like Lisp to `add-log-current-defun'.")
 
-(defvar add-log-c-like-modes '(c-mode c++-mode c++-c-mode objc-mode) "\
+(defvar add-log-c-like-modes '(c-mode c++-mode c++-c-mode objc-mode java-mode) "\
 *Modes that look like C to `add-log-current-defun'.")
 
 (defvar add-log-tex-like-modes '(TeX-mode plain-TeX-mode LaTeX-mode plain-tex-mode latex-mode) "\
@@ -1227,7 +1227,7 @@
 
 ;;;***
 
-;;;### (autoloads (hyper-apropos-popup-menu hyper-apropos-set-variable hyper-set-variable hyper-apropos-get-doc hyper-apropos-read-variable-symbol hyper-describe-function hyper-describe-variable hyper-describe-face hyper-describe-key-briefly hyper-describe-key hyper-apropos) "hyper-apropos" "packages/hyper-apropos.el")
+;;;### (autoloads (hyper-apropos-popup-menu hyper-apropos-set-variable hyper-set-variable hyper-apropos-read-variable-symbol hyper-describe-function hyper-describe-variable hyper-describe-face hyper-describe-key-briefly hyper-describe-key hyper-apropos) "hyper-apropos" "packages/hyper-apropos.el")
 
 (autoload 'hyper-apropos "hyper-apropos" "\
 Display lists of functions and variables matching REGEXP
@@ -1258,9 +1258,6 @@
 
 (define-obsolete-function-alias 'hypropos-read-variable-symbol 'hyper-apropos-read-variable-symbol)
 
-(autoload 'hyper-apropos-get-doc "hyper-apropos" "\
-Toggle display of documentation for the symbol on the current line." t nil)
-
 (define-obsolete-function-alias 'hypropos-get-doc 'hyper-apropos-get-doc)
 
 (autoload 'hyper-set-variable "hyper-apropos" nil t nil)
@@ -1288,7 +1285,10 @@
 
 ;;;***
 
-;;;### (autoloads (dired-do-igrep-find dired-do-igrep igrep-find-define igrep-find igrep-define igrep) "igrep" "packages/igrep.el")
+;;;### (autoloads (dired-do-igrep-find dired-do-igrep igrep-find-define igrep-find igrep-define igrep igrep-insinuate) "igrep" "packages/igrep.el")
+
+(autoload 'igrep-insinuate "igrep" "\
+Replace the `grep' functions with `igrep'." nil nil)
 
 (autoload 'igrep "igrep" "\
 *Run `grep` PROGRAM to match EXPRESSION in FILES.
@@ -1337,14 +1337,10 @@
 *Run `grep` PROGRAM to match EXPRESSION (with optional OPTIONS)
 on the marked (or next prefix ARG) files." t nil)
 
-(defalias 'dired-do-grep 'dired-do-igrep)
-
 (autoload 'dired-do-igrep-find "igrep" "\
 *Run `grep` PROGRAM to match EXPRESSION (with optional OPTIONS)
 on the marked (or next prefix ARG) directories." t nil)
 
-(defalias 'dired-do-grep-find 'dired-do-igrep-find)
-
 ;;;***
 
 ;;;### (autoloads (Info-elisp-ref Info-emacs-key Info-goto-emacs-key-command-node Info-goto-emacs-command-node Info-emacs-command Info-search Info-visit-file Info-goto-node Info-query info) "info" "packages/info.el")
@@ -1778,23 +1774,27 @@
 
 ;;;***
 
-;;;### (autoloads (pending-delete pending-delete-off pending-delete-on) "pending-del" "packages/pending-del.el")
-
-(autoload 'pending-delete-on "pending-del" "\
-Turn on pending delete.
-When it is ON, typed text replaces the selection if the selection is active.
-When it is OFF, typed text is just inserted at point." t nil)
-
-(autoload 'pending-delete-off "pending-del" "\
-Turn off pending delete.
-When it is ON, typed text replaces the selection if the selection is active.
-When it is OFF, typed text is just inserted at point." t nil)
-
-(autoload 'pending-delete "pending-del" "\
-Toggle automatic deletion of the selected region.
+;;;### (autoloads (pending-delete-mode turn-off-pending-delete turn-on-pending-delete) "pending-del" "packages/pending-del.el")
+
+(autoload 'turn-on-pending-delete "pending-del" "\
+Turn on pending delete minor mode unconditionally." t nil)
+
+(autoload 'turn-off-pending-delete "pending-del" "\
+Turn off pending delete minor mode unconditionally." t nil)
+
+(autoload 'pending-delete-mode "pending-del" "\
+Toggle Pending Delete minor mode.
+When the pending delete is on, typed text replaces the selection.
 With a positive argument, turns it on.
-With a non-positive argument, turns it off.
-When active, typed text replaces the selection." t nil)
+With a non-positive argument, turns it off." t nil)
+
+(define-obsolete-function-alias 'pending-delete-on 'turn-on-pending-delete)
+
+(define-obsolete-function-alias 'pending-delete-off 'turn-off-pending-delete)
+
+(define-compatible-function-alias 'delete-selection-mode 'pending-delete-mode)
+
+(defalias 'pending-delete 'pending-delete-mode)
 
 ;;;***
 
--- a/lisp/packages/blink-cursor.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/packages/blink-cursor.el	Mon Aug 13 09:49:09 2007 +0200
@@ -33,7 +33,9 @@
 (defun blink-cursor-callback (foo)
   (let ((inhibit-quit t)
 	(window (selected-window)))
-    (if blink-cursor-lost-focus
+    ;; Blinking cursor just doesn't cut it on TTY-s.  Rather give it up.
+    (if (or (eq (console-type) 'tty)
+	    blink-cursor-lost-focus)
 	nil
       (or blink-cursor-last-selected-window
 	  (setq blink-cursor-last-selected-window window))
--- a/lisp/packages/custom-load.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/packages/custom-load.el	Mon Aug 13 09:49:09 2007 +0200
@@ -1,45 +1,46 @@
-(custom-put 'copyright 'custom-loads '("upd-copyr"))
-(custom-put 'time-stamp 'custom-loads '("time-stamp"))
-(custom-put 'texinfo-tex 'custom-loads '("texnfo-tex"))
-(custom-put 'supercite-hooks 'custom-loads '("supercite"))
-(custom-put 'supercite-cite 'custom-loads '("supercite"))
-(custom-put 'supercite-attr 'custom-loads '("supercite"))
-(custom-put 'supercite-frames 'custom-loads '("supercite"))
-(custom-put 'supercite 'custom-loads '("supercite"))
-(custom-put 'save-place 'custom-loads '("saveplace"))
-(custom-put 'recent-files-menu 'custom-loads '("recent-files"))
-(custom-put 'recent-files 'custom-loads '("recent-files"))
-(custom-put 'remote-compile 'custom-loads '("rcompile"))
-(custom-put 'ps-print-face 'custom-loads '("ps-print"))
-(custom-put 'ps-print-color 'custom-loads '("ps-print"))
-(custom-put 'ps-print-font 'custom-loads '("ps-print"))
-(custom-put 'ps-print-header 'custom-loads '("ps-print"))
-(custom-put 'ps-print-vertical 'custom-loads '("ps-print"))
-(custom-put 'ps-print-horizontal 'custom-loads '("ps-print"))
-(custom-put 'ps-print 'custom-loads '("ps-print"))
-(custom-put 'pages 'custom-loads '("page-ext"))
-(custom-put 'metamail 'custom-loads '("metamail"))
-(custom-put 'man 'custom-loads '("man"))
+(custom-put 'igrep 'custom-loads '("igrep"))
+(custom-put 'change-log 'custom-loads '("add-log"))
+(custom-put 'auto-save 'custom-loads '("auto-save"))
+(custom-put 'avoid 'custom-loads '("avoid"))
+(custom-put 'balloon-help 'custom-loads '("balloon-help"))
+(custom-put 'compilation 'custom-loads '("compile"))
+(custom-put 'completion 'custom-loads '("completion"))
+(custom-put 'dabbrev 'custom-loads '("dabbrev"))
+(custom-put 'desktop 'custom-loads '("desktop"))
+(custom-put 'diff 'custom-loads '("diff"))
+(custom-put 'etags 'custom-loads '("etags"))
+(custom-put 'fast-lock 'custom-loads '("fast-lock"))
+(custom-put 'feedmail 'custom-loads '("feedmail"))
+(custom-put 'filladapt 'custom-loads '("filladapt"))
+(custom-put 'fume 'custom-loads '("func-menu"))
+(custom-put 'generic-sc 'custom-loads '("generic-sc"))
+(custom-put 'gnuserv 'custom-loads '("gnuserv"))
+(custom-put 'gopher 'custom-loads '("gopher"))
+(custom-put 'hyper-apropos 'custom-loads '("hyper-apropos"))
+(custom-put 'hyper-apropos-faces 'custom-loads '("hyper-apropos"))
+(custom-put 'info 'custom-loads '("info"))
+(custom-put 'ispell 'custom-loads '("ispell"))
+(custom-put 'lpr 'custom-loads '("lpr"))
 (custom-put 'makeinfo 'custom-loads '("makeinfo"))
-(custom-put 'lpr 'custom-loads '("lpr"))
-(custom-put 'ispell 'custom-loads '("ispell"))
-(custom-put 'info 'custom-loads '("info"))
-(custom-put 'hyper-apropos-faces 'custom-loads '("hyper-apropos"))
-(custom-put 'hyper-apropos 'custom-loads '("hyper-apropos"))
-(custom-put 'gopher 'custom-loads '("gopher"))
-(custom-put 'gnuserv 'custom-loads '("gnuserv"))
-(custom-put 'generic-sc 'custom-loads '("generic-sc"))
-(custom-put 'fume 'custom-loads '("func-menu"))
-(custom-put 'filladapt 'custom-loads '("filladapt"))
-(custom-put 'feedmail 'custom-loads '("feedmail"))
-(custom-put 'fast-lock 'custom-loads '("fast-lock"))
-(custom-put 'etags 'custom-loads '("etags"))
-(custom-put 'diff 'custom-loads '("diff"))
-(custom-put 'desktop 'custom-loads '("desktop"))
-(custom-put 'dabbrev 'custom-loads '("dabbrev"))
-(custom-put 'completion 'custom-loads '("completion"))
-(custom-put 'compilation 'custom-loads '("compile"))
-(custom-put 'balloon-help 'custom-loads '("balloon-help"))
-(custom-put 'avoid 'custom-loads '("avoid"))
-(custom-put 'auto-save 'custom-loads '("auto-save"))
-(custom-put 'change-log 'custom-loads '("add-log"))
+(custom-put 'man 'custom-loads '("man"))
+(custom-put 'metamail 'custom-loads '("metamail"))
+(custom-put 'pages 'custom-loads '("page-ext"))
+(custom-put 'ps-print 'custom-loads '("ps-print"))
+(custom-put 'ps-print-horizontal 'custom-loads '("ps-print"))
+(custom-put 'ps-print-vertical 'custom-loads '("ps-print"))
+(custom-put 'ps-print-header 'custom-loads '("ps-print"))
+(custom-put 'ps-print-font 'custom-loads '("ps-print"))
+(custom-put 'ps-print-color 'custom-loads '("ps-print"))
+(custom-put 'ps-print-face 'custom-loads '("ps-print"))
+(custom-put 'remote-compile 'custom-loads '("rcompile"))
+(custom-put 'recent-files 'custom-loads '("recent-files"))
+(custom-put 'recent-files-menu 'custom-loads '("recent-files"))
+(custom-put 'save-place 'custom-loads '("saveplace"))
+(custom-put 'supercite 'custom-loads '("supercite"))
+(custom-put 'supercite-frames 'custom-loads '("supercite"))
+(custom-put 'supercite-attr 'custom-loads '("supercite"))
+(custom-put 'supercite-cite 'custom-loads '("supercite"))
+(custom-put 'supercite-hooks 'custom-loads '("supercite"))
+(custom-put 'texinfo-tex 'custom-loads '("texnfo-tex"))
+(custom-put 'time-stamp 'custom-loads '("time-stamp"))
+(custom-put 'copyright 'custom-loads '("upd-copyr"))
--- a/lisp/packages/emacsbug.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/packages/emacsbug.el	Mon Aug 13 09:49:09 2007 +0200
@@ -40,9 +40,7 @@
 (require 'sendmail)
 
 ;; XEmacs:  Screen for whether a beta version is running and redirect
-;; reports to the beta list instead of the newsgroup.  I don't think
-;; there's an XEmacs equivalent to system-configuration-options, but
-;; there should be.  -sb
+;; reports to the beta list instead of the newsgroup.
 (defvar report-emacs-bug-pretest-address "xemacs-beta@xemacs.org"
   "Address of mailing list for XEmacs beta bugs.")
 
@@ -70,8 +68,7 @@
 	(goto-char (point-min))
 	(re-search-forward (concat "^" (regexp-quote mail-header-separator) "\n"))
 	(insert "In " (emacs-version) "\n")
-	(if (and (boundp 'system-configuration-options)
-		 system-configuration-options
+	(if (and system-configuration-options
 		 (not (equal system-configuration-options "")))
 	    (insert "configured using `configure "
 		    system-configuration-options "'\n"))
@@ -115,7 +112,10 @@
 	;; in order to send easily.
 	;; XEmacs:  FSF non-abstraction of data?
 	;; (use-local-map (nconc (make-sparse-keymap) (current-local-map)))
-	(use-local-map (current-local-map))
+	;; Ghod intended it this way:
+	(use-local-map (let ((map (make-sparse-keymap)))
+			 (set-keymap-parents map (list (current-local-map)))
+			 map))
 	(define-key (current-local-map) "\C-c\C-i" 'report-emacs-bug-info)
 	(with-output-to-temp-buffer "*Bug Help*"
 	  (princ (substitute-command-keys
@@ -123,11 +123,11 @@
 	  (princ (substitute-command-keys
 		  "Type \\[kill-buffer] RET to cancel (don't send it).\n"))
 	  (terpri)
-	  (princ (substitute-command-keys
-		  "Type \\[report-emacs-bug-info] to visit in Info the Emacs Manual section
-about when and how to write a bug report,
-and what information to supply so that the bug can be fixed.
-Type SPC to scroll through this section and its subsections.")))
+	  (princ (substitute-command-keys "\
+Type \\[report-emacs-bug-info] to visit in Info the Emacs Manual section
+about when and how to write a bug report, and what information to supply
+so that the bug can be fixed.
+Type `\\[delete-other-windows]' to remove this window.")))
 	;; Make it less likely people will send empty messages.
 	(make-local-variable 'mail-send-hook)
 	(add-hook 'mail-send-hook 'report-emacs-bug-hook)
--- a/lisp/packages/gnuserv.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/packages/gnuserv.el	Mon Aug 13 09:49:09 2007 +0200
@@ -1,7 +1,7 @@
 ;;; gnuserv.el --- Lisp interface code between Emacs and gnuserv
 ;; Copyright (C) 1989-1997 Free Software Foundation, Inc.
 
-;; Version: 3.7
+;; Version: 3.9
 ;; Author: Andy Norman (ange@hplb.hpl.hp.com), originally based on server.el
 ;;         Hrvoje Niksic <hniksic@srce.hr>
 ;; Maintainer: Jan Vroonhof <vroonhof@math.ethz.ch>,
@@ -75,6 +75,9 @@
 ;; Hrvoje Niksic <hniksic@srce.hr> May/1997
 ;;     Completely rewritten.  Now uses `defstruct' and other CL stuff
 ;;     to define clients cleanly.  Many thanks to Dave Gillespie!
+;;
+;; Mike Scheidler <c23mts@eng.delcoelect.com> July, 1997
+;;     Added 'Done' button to the menubar.
 
 
 ;;; Code:
@@ -132,8 +135,8 @@
 
 (defcustom gnuserv-done-function 'kill-buffer 
   "*Function used to remove a buffer after editing.
-It is called with one BUFFER argument.  Functions such as 'kill-buffer' and
-'bury-buffer' are good values. See also `gnuserv-done-temp-file-function'."
+It is called with one BUFFER argument.  Functions such as `kill-buffer' and
+`bury-buffer' are good values. See also `gnuserv-done-temp-file-function'."
   :type '(radio (function-item kill-buffer)
 		(function-item bury-buffer)
 		(function :tag "Other"))
@@ -141,8 +144,8 @@
 
 (defcustom gnuserv-done-temp-file-function 'kill-buffer
   "*Function used to remove a temporary buffer after editing.
-It is called with one BUFFER argument.  Functions such as 'kill-buffer' and
- 'bury-buffer' are good values. See also `gnuserv-done-temp-file-function'."
+It is called with one BUFFER argument.  Functions such as `kill-buffer' and
+`bury-buffer' are good values. See also `gnuserv-done-temp-file-function'."
   :type '(radio (function-item kill-buffer)
 		(function-item bury-buffer)
 		(function :tag "Other"))
@@ -438,11 +441,14 @@
 		     gnuserv-find-file-function)
 		   path)
 	  (goto-line line)
-	  (run-hooks 'gnuserv-visit-hook)
 	  ;; Don't memorize the quick and view buffers.
 	  (unless (or quick view)
 	    (pushnew (current-buffer) (gnuclient-buffers client))
-	    (setq gnuserv-minor-mode t))
+	    (setq gnuserv-minor-mode t)
+	    ;; Add the "Done" button to the menubar, only in this buffer.
+	    (set-buffer-menubar current-menubar)
+	    (add-menu-button nil ["Done" gnuserv-edit t]))
+	  (run-hooks 'gnuserv-visit-hook)
 	  (pop list)))
       (cond
        ((and (or quick view)
@@ -592,11 +598,13 @@
     (callf2 delq buffer (gnuclient-buffers client))
     (when (null (gnuclient-buffers client))
       (gnuserv-kill-client client)))
-  ;; Get rid of the buffer
+  ;; Get rid of the buffer.
   (save-excursion
     (set-buffer buffer)
     (run-hooks 'gnuserv-done-hook)
     (setq gnuserv-minor-mode nil)
+    ;; Delete the menu button.
+    (delete-menu-item '("Done"))
     (funcall (if (gnuserv-temp-file-p buffer)
 		 gnuserv-done-temp-file-function
 	       gnuserv-done-function)
--- a/lisp/packages/hyper-apropos.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/packages/hyper-apropos.el	Mon Aug 13 09:49:09 2007 +0200
@@ -625,7 +625,6 @@
 				  "',\nwhich is an alias for `")
 		       "'")))))
 
-;;;###autoload
 (defun hyper-apropos-get-doc (&optional symbol force type this-ref-buffer)
   ;; #### - update this docstring
   "Toggle display of documentation for the symbol on the current line."
--- a/lisp/packages/igrep.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/packages/igrep.el	Mon Aug 13 09:49:09 2007 +0200
@@ -160,17 +160,18 @@
 (require 'compile)			; compile-internal and grep-regexp-
 					; alist
 
+(eval-when-compile
+  (require 'dired))
+
 (defconst igrep-version "2.56"
   "Version of igrep.el")
 
 
 ;;; User options:
 
-(progn
-  (defgroup igrep nil
-    "An improved interface to `grep'."
-    :group 'processes)
-  )
+(defgroup igrep nil
+  "An improved interface to `grep'."
+  :group 'processes)
 
 (defcustom igrep-options nil
   "*The options passed by \\[igrep] to `igrep-program', or nil.
@@ -310,17 +311,25 @@
 
 ;;; Commands:
 
-;; ;;;###autoload Not ready to replace compile.el's grep yet.  -sb 
-(defadvice grep (around igrep-interface first (&rest grep-args) activate)
-  "If called interactively, use the \\[igrep] interface instead,
+;; This used to be evaluated at top level.  We consider it evil, so it
+;; goes into a user-callable function.    --hniksic
+;;;###autoload
+(defun igrep-insinuate ()
+  "Replace the `grep' functions with `igrep'."
+  (defadvice grep (around igrep-interface first (&rest grep-args) activate)
+    "If called interactively, use the \\[igrep] interface instead,
 where GREP-ARGS is (PROGRAM EXPRESSION FILES OPTIONS);
 if called programmatically, GREP-ARGS is still (COMMAND)."
-  (interactive (igrep-read-args))
-  (if (interactive-p)
-      (apply (function igrep) grep-args)
-    ad-do-it))
+    (interactive (igrep-read-args))
+    (if (interactive-p)
+	(apply (function igrep) grep-args)
+      ad-do-it))
+  (defalias 'grep-find 'igrep-find)
+  (defalias 'dired-do-grep 'dired-do-igrep)
+  (defalias 'dired-do-grep-find 'dired-do-igrep-find))
 
-(defalias 'grep-find 'igrep-find)
+
+(defvar win32-quote-process-args)	; XEmacs
 
 ;;;###autoload
 (defun igrep (program expression files &optional options)
@@ -519,7 +528,6 @@
 	 options))
 
 ;;;###autoload
-(defalias 'dired-do-grep 'dired-do-igrep)
 
 ;; Dired recursive (`find`) commands:
 
@@ -538,9 +546,6 @@
   (let ((igrep-find t))
     (dired-do-igrep program expression options arg)))
 
-;;;###autoload
-(defalias 'dired-do-grep-find 'dired-do-igrep-find)
-
 
 ;;; Utilities:
 
--- a/lisp/packages/info.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/packages/info.el	Mon Aug 13 09:49:09 2007 +0200
@@ -297,6 +297,11 @@
 ;; Fixed up Info-next-reference to work sanely when n < 0.
 ;; Added S-tab binding.
 
+;; Modified 1997-07-10 by Karl M. Hegbloom
+;;
+;; Added `Info-minibuffer-history'
+;; (also added to defaults in "lisp/utils/savehist.el")
+
 ;; Code:
 
 (defgroup info nil
@@ -321,6 +326,9 @@
   "Non-nil if Info-find-node should modify Info-history.
 This is for use only by certain internal Info routines.")
 
+(defvar Info-minibuffer-history nil
+  "Minibuffer history for Info.")
+
 (defcustom Info-enable-edit nil
   "*Non-nil means the \\<Info-mode-map>\\[Info-edit] command in Info
 can edit the current node.
@@ -918,11 +926,11 @@
 
 (defun Info-goto-bookmark ()
   (interactive)
-  
   (let ((completion-ignore-case nil)
 	(tag (completing-read "Goto tag: "
 			      (Info-build-annotation-completions)
-			      nil t)))
+			      nil t nil
+			      'Info-minibuffer-history)))
     (or (equal tag "") (Info-find-node nil (format "<<%s>>" tag)))))
 
 ;;;###autoload
@@ -953,7 +961,10 @@
 (defun Info-read-node-name (prompt &optional default)
   (Info-setup-initial)
   (let* ((completion-ignore-case t)
-	 (nodename (completing-read prompt (Info-build-node-completions))))
+	 (nodename (completing-read prompt
+				    (Info-build-node-completions)
+				    nil nil nil
+				    'Info-minibuffer-history)))
     (if (equal nodename "")
 	(or default
 	    (Info-read-node-name prompt))
@@ -1193,7 +1204,8 @@
 					  (concat "Follow reference named: ("
 						  default ") ")
 					"Follow reference named: ")
-				      completions nil t)))
+				      completions nil t nil
+				      'Info-minibuffer-history)))
 	   (if (and (string= item "") default)
 	       (list default)
 	     (list item)))
@@ -1319,7 +1331,8 @@
 					   (format "Menu item (default %s): "
 						   default)
 					   "Menu item: ")
-				       completions nil t)))
+				       completions nil t nil
+				       'Info-minibuffer-history)))
 	 ;; we rely on the fact that completing-read accepts an input
 	 ;; of "" even when the require-match argument is true and ""
 	 ;; is not a valid possibility
--- a/lisp/packages/man.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/packages/man.el	Mon Aug 13 09:49:09 2007 +0200
@@ -57,6 +57,8 @@
 (defvar Manual-page-history nil "\
 A list of names of previously visited man page buffers.")
 
+(defvar Manual-page-minibuffer-history nil "\
+Minibuffer completion history for `manual-entry'.")
 
 ;; New variables.
 
@@ -165,7 +167,7 @@
 (defun manual-entry (topic &optional arg silent)
   "Display the Unix manual entry (or entries) for TOPIC."
   (interactive
-   (list (let* ((fmh "-A-Za-z0-9_.")
+   (list (let* ((fmh "-A-Za-z0-9_.:")
 		(default (save-excursion
 			   (buffer-substring
 			    (progn
@@ -174,7 +176,8 @@
 			    (progn (skip-chars-forward fmh) (point)))))
 		(thing (read-string
 			(if (equal default "") "Manual entry: "
-			  (concat "Manual entry: (default " default ") ")))))
+			  (concat "Manual entry: (default " default ") "))
+			nil 'Manual-page-minibuffer-history)))
 	   (if (equal thing "") default thing))
 	 (prefix-numeric-value current-prefix-arg)))
   ;;(interactive "sManual entry (topic): \np")
@@ -488,26 +491,29 @@
 
 (defun Manual-mouseify-xrefs ()
   (goto-char (point-min))
-  (forward-line 1)
   (let ((case-fold-search nil)
 	s e name extent)
     ;; possibly it would be faster to rewrite this expression to search for
     ;; a less common sequence first (like "([0-9]") and then back up to see
     ;; if it's really a match.  This function is 15% of the total time, 13%
     ;; of which is this call to re-search-forward.
-    (while (re-search-forward "[a-zA-Z_][-a-zA-Z0-9_.]*([0-9][a-zA-Z0-9]*)"
+    (while (re-search-forward "[a-zA-Z_][-a-zA-Z0-9_.:]*([0-9][a-zA-Z0-9]*)"
 			      nil t)
       (setq s (match-beginning 0)
 	    e (match-end 0)
 	    name (buffer-substring s e))
       (goto-char s)
       (skip-chars-backward " \t")
-      (if (and (bolp)
-	       (progn (backward-char 1) (= (preceding-char) ?-)))
+      (if (and (bolp) (not (bobp))
+	       (progn (backward-char 1) (equal (char-before) ?-)))
 	  (progn
 	    (setq s (point))
-	    (skip-chars-backward "-a-zA-Z0-9_.")
-	    (setq name (concat (buffer-substring (point) (1- s)) name))
+	    (skip-chars-backward "-a-zA-Z0-9_.:")
+	    (setq name (concat (buffer-substring (point)
+						 (if (>= s 0)
+						     (1- s)
+						   0))
+			       name))
 	    (setq s (point))))
       ;; if there are upper case letters in the section, downcase them.
       (if (string-match "(.*[A-Z]+.*)$" name)
--- a/lisp/packages/pending-del.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/packages/pending-del.el	Mon Aug 13 09:49:09 2007 +0200
@@ -3,6 +3,8 @@
 ;; Copyright (C) 1992, 1994 Free Software Foundation, Inc.
 
 ;; Author: Matthieu Devin <devin@lucid.com>, 14 Jul 92.
+;; Maintainer: Hrvoje Niksic <hniksic@srce.hr>
+;; Version 2.1
 
 ;; This file is part of XEmacs.
 
@@ -21,51 +23,61 @@
 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 ;; Boston, MA 02111-1307, USA.
 
-;;; Synched up with: Not in FSF.
+;;; Synched up with: 19.34  (distributed as delsel.el in FSF)
+
+;;; Commentary:
 
+;; Much of this code was revamped by Hrvoje Niksic, July 1997, with
+;; version number set to 2.x.
+
+;; Pending-del is now a minor mode, with all the normal toggle
+;; functions.  It should be somewhat faster, too.
+
+
 ;;; Code:
 
-(defvar pending-delete-verbose
-  1
-  "*nil disables on/off messages for pending-del mode
-1 suppresses messages on loading
-t enables all messages")
+(defvar pending-delete-mode nil
+  "Non-nil when Pending Delete mode is enabled.
+In Pending Delete mode, typed text replaces the selected region.")
+
+(add-minor-mode 'pending-delete-mode " PenDel")
 
-(defun delete-active-region (&optional killp)
-  (if (and (not buffer-read-only)
-	   (extentp zmacs-region-extent)
-	   (eq (current-buffer) (extent-buffer zmacs-region-extent))
-	   (extent-start-position zmacs-region-extent)
-	   (<= (extent-start-position zmacs-region-extent) (point))
-	   (<= (point) (extent-end-position zmacs-region-extent)))
-      (progn
-	(if killp
-	    (kill-region (extent-start-position zmacs-region-extent)
-			 (extent-end-position zmacs-region-extent))
-	  (delete-region (extent-start-position zmacs-region-extent)
-			 (extent-end-position zmacs-region-extent)))
-	(zmacs-deactivate-region)
-	t)))
+
+(defun pending-delete-active-region (&optional killp)
+  (when (and (region-active-p)
+	     (eq (extent-object zmacs-region-extent) (current-buffer))
+	     (not buffer-read-only))
+    ;; Here we used to check whether the point lies between the
+    ;; beginning and end of the extent.  I don't see how it is
+    ;; necessary, as the C code makes sure that this is so; it only
+    ;; slow things down.
+    (if killp
+	(kill-region (region-beginning) (region-end))
+      (delete-region (region-beginning) (region-end)))
+    (zmacs-deactivate-region)
+    t))
 
 (defun pending-delete-pre-hook ()
-  ;; don't ever signal an error in pre-command-hook!
   (condition-case e
       (let ((type (and (symbolp this-command)
 		       (get this-command 'pending-delete))))
 	(cond ((eq type 'kill)
-	       (delete-active-region t))
+	       (pending-delete-active-region t))
 	      ((eq type 'supersede)
-	       (if (delete-active-region ())
-		   (setq this-command '(lambda () (interactive)))))
+	       (if (pending-delete-active-region ())
+		   (setq this-command (lambda () (interactive)))))
 	      (type
-	       (delete-active-region ()))))
+	       (pending-delete-active-region ()))))
     (error
-     (warn "Error caught in `pending-delete-pre-hook': %s" e))))
+     (warn "Error caught in `pending-delete-pre-hook': %s"
+	   (error-message-string e)))))
 
+
 (put 'self-insert-command 'pending-delete t)
 
 (put 'yank 'pending-delete t)
 (put 'x-yank-clipboard-selection 'pending-delete t)
+(put 'toolbar-paste 'pending-delete t)
 
 (put 'delete-backward-char 'pending-delete 'supersede)
 (put 'backward-delete-char-untabify 'pending-delete 'supersede)
@@ -86,46 +98,56 @@
 
 (put 'insert-register 'pending-delete t)
 
+
 ;;;###autoload
-(defun pending-delete-on (verbose)
-  "Turn on pending delete.
-When it is ON, typed text replaces the selection if the selection is active.
-When it is OFF, typed text is just inserted at point."
-  (interactive "P")
-  (add-hook 'pre-command-hook 'pending-delete-pre-hook)
-  (and verbose
-    (message "Pending delete is ON, use M-x pending-delete to turn it OFF")))
+(defun turn-on-pending-delete (&optional ignored)
+  "Turn on pending delete minor mode unconditionally."
+  (interactive)
+  (pending-delete-mode 1))
 
 ;;;###autoload
-(defun pending-delete-off (verbose)
-  "Turn off pending delete.
-When it is ON, typed text replaces the selection if the selection is active.
-When it is OFF, typed text is just inserted at point."
-  (interactive "P")
-  (remove-hook 'pre-command-hook 'pending-delete-pre-hook)
-  (and verbose (message "pending delete is OFF")))
+(defun turn-off-pending-delete (&optional ignored)
+  "Turn off pending delete minor mode unconditionally."
+  (interactive)
+  (pending-delete-mode 0))
 
 ;;;###autoload
-(defun pending-delete (&optional arg)
-  "Toggle automatic deletion of the selected region.
+(defun pending-delete-mode (&optional arg)
+  "Toggle Pending Delete minor mode.
+When the pending delete is on, typed text replaces the selection.
 With a positive argument, turns it on.
-With a non-positive argument, turns it off.
-When active, typed text replaces the selection."
+With a non-positive argument, turns it off."
   (interactive "P")
-  (let* ((was-on (not (not (memq 'pending-delete-pre-hook pre-command-hook))))
-	 (on-p (if (null arg)
-		   (not was-on)
-		(> (prefix-numeric-value arg) 0))))
-    (cond ((eq on-p was-on)
-	   nil)
-	  (on-p
-	   (pending-delete-on pending-delete-verbose))
-	  (t
-	   (pending-delete-off pending-delete-verbose)))))
-  
-;; Add pending-del mode.  Assume that if we load it then we obviously wanted
-;; it on, even if it is already on.
-(pending-delete-on (eq pending-delete-verbose t))
+  (setq pending-delete-mode
+	(if (null arg) (not pending-delete-mode)
+	  (> (prefix-numeric-value arg) 0)))
+  (if pending-delete-mode
+      (add-hook 'pre-command-hook 'pending-delete-pre-hook)
+    (remove-hook 'pre-command-hook 'pending-delete-pre-hook))
+  (force-mode-line-update))
+
+
+;; Backward compatibility:
+;;;###autoload
+(define-obsolete-function-alias 'pending-delete-on 'turn-on-pending-delete)
+;;;###autoload
+(define-obsolete-function-alias 'pending-delete-off 'turn-off-pending-delete)
+
+;; FSF compatibility:
+;;;###autoload
+(define-compatible-function-alias 'delete-selection-mode 'pending-delete-mode)
+
+;; Compatibility and convenience:
+;;;###autoload
+(defalias 'pending-delete 'pending-delete-mode)
+
+
+;; The following code used to turn the mode on unconditionally.
+;; However, this is a very bad idea -- since pending-del is
+;; autoloaded, (turn-on-pending-delete) is as easy to add to `.emacs'
+;; as (require 'pending-del) used to be.
+
+;(pending-delete-on (eq pending-delete-verbose t))
 
 (provide 'pending-del)
 
--- a/lisp/packages/supercite.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/packages/supercite.el	Mon Aug 13 09:49:09 2007 +0200
@@ -975,7 +975,7 @@
 of \"%\" and addresses of the style ``[stuff]name@[stuff]'' when
 called with DELIM \"@\".  If DELIM is nil or not provided, matches
 addresses of the style ``name''."
-  (and (string-match (concat "[-a-zA-Z0-9_.]+" delim) from 0)
+  (and (string-match (concat "[-+a-zA-Z0-9_.]+" delim) from 0)
        (substring from
 		  (match-beginning 0)
 		  (- (match-end 0) (if (null delim) 0 1)))))
@@ -1008,7 +1008,7 @@
 		   (= (aref address (1- (length address))) ?>))
 	      (substring address 1 (1- (length address)))
 	    address))
-      (if (string-match "[-a-zA-Z0-9!@%._]+" from 0)
+      (if (string-match "[-+a-zA-Z0-9!@%._]+" from 0)
 	  (sc-submatch 0 from)
 	"")
       )))
--- a/lisp/prim/auto-autoloads.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/prim/auto-autoloads.el	Mon Aug 13 09:49:09 2007 +0200
@@ -129,7 +129,7 @@
 
 ;;;***
 
-;;;### (autoloads (apply-macro-to-region-lines kbd-macro-query name-last-kbd-macro) "macros" "prim/macros.el")
+;;;### (autoloads (apply-macro-to-region-lines kbd-macro-query insert-kbd-macro name-last-kbd-macro) "macros" "prim/macros.el")
 
 (autoload 'name-last-kbd-macro "macros" "\
 Assign a name to the last keyboard macro defined.
@@ -138,6 +138,20 @@
 Such a \"function\" cannot be called from Lisp, but it is a valid
 editor command." t nil)
 
+(autoload 'insert-kbd-macro "macros" "\
+Insert in buffer the definition of kbd macro NAME, as Lisp code.
+Optional second arg KEYS means also record the keys it is on
+\(this is the prefix argument, when calling interactively).
+
+This Lisp code will, when executed, define the kbd macro with the same
+definition it has now.  If you say to record the keys, the Lisp code
+will also rebind those keys to the macro.  Only global key bindings
+are recorded since executing this Lisp code always makes global
+bindings.
+
+To save a kbd macro, visit a file of Lisp code such as your `~/.emacs',
+use this command, and then save the file." t nil)
+
 (autoload 'kbd-macro-query "macros" "\
 Query user during kbd macro execution.
 With prefix argument, enters recursive edit,
@@ -233,7 +247,11 @@
  depending on whether the function was called interactively or not." t nil)
 
 (autoload 'profile "profile" "\
-Turn on profiling, execute FORMS and stop profiling.
+Turn on profiling, execute FORMS and restore profiling state.
+Profiling state here means that if profiling was not in effect when
+PROFILE was called, it will be turned off after FORMS are evaluated.
+Otherwise, profiling will be left running.
+
 Returns the profiling info, printable by `pretty-print-profiling-info'." nil 'macro)
 
 (autoload 'profile-key-sequence "profile" "\
--- a/lisp/prim/cmdloop.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/prim/cmdloop.el	Mon Aug 13 09:49:09 2007 +0200
@@ -305,11 +305,7 @@
 	   (format "Command `%s' is bound to key%s: %s"
 		   _execute_command_name_
 		   (if (cdr _execute_command_keys_) "s" "")
-		   (mapconcat 'key-description
-			      (sort _execute_command_keys_
-				    #'(lambda (x y)
-					(< (length x) (length y))))
-			      ", ")))
+		   (sorted-key-descriptions _execute_command_keys_)))
 	  (sit-for teach-extended-commands-timeout)
 	  (clear-message 'no-log)))
     ;; Else, just run the command.
@@ -431,8 +427,8 @@
 is most likely the wrong thing for you to be using: consider using
 the `next-command-event' function instead."
   (save-excursion
-    (let ((inhibit-quit t)
-          (event (next-command-event)))
+    (let* ((inhibit-quit t)
+	   (event (next-command-event)))
       (prog1 (or (event-to-character event)
                  ;; Kludge.  If the event we read was a mouse-release,
                  ;; discard it and read the next one.
--- a/lisp/prim/console.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/prim/console.el	Mon Aug 13 09:49:09 2007 +0200
@@ -38,10 +38,9 @@
   "Resume the consoles with a controlling process of PID."
   (mapc (lambda (c) 
 	  (if (and (eq (console-type c) 'tty)
-		   (eq pid (console-tty-controlling-process c)))
+		   (eql pid (console-tty-controlling-process c)))
 	      (resume-console c)))
 	(console-list))
-  ; documentation for mapc lies!
   nil)
 
 ;;; console.el ends here
--- a/lisp/prim/cus-start.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/prim/cus-start.el	Mon Aug 13 09:49:09 2007 +0200
@@ -22,12 +22,20 @@
 ;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 ;; 02111-1307, USA.
 
-;;; Synched up with: Not synched.
+;;; Synched up with: Not synched with FSF.
 
 ;;; Commentary:
 ;;
+;; The following code is used to define the customization properties
+;; for builtin variables, and variables in the packages that are
+;; preloaded /very/ early, before custom.el itself (replace.el is such
+;; an example).  The way it handles custom stuff is dirty, and should
+;; be regarded as a last resort.  DO NOT add variables here, unless
+;; you know what you are doing.
+
 ;; Must be run before the user has changed the value of any options!
 
+
 ;;; Code:
 
 (require 'custom)
@@ -159,7 +167,12 @@
 			     (function :tag "Other")))
 	     (undo-threshold undo integer)
 	     (undo-high-threshold undo integer)
-	     (words-include-escapes editing-basics boolean)))
+	     (words-include-escapes editing-basics boolean)
+	     ;; These are from replace.el, which is loaded too early
+	     ;; to be customizable.
+	     (case-replace matching boolean)
+	     (query-replace-highlight matching boolean)
+	     (list-matching-lines-default-context-lines matching integer)))
       this symbol group type)
   (while all 
     (setq this (car all)
--- a/lisp/prim/custom-load.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/prim/custom-load.el	Mon Aug 13 09:49:09 2007 +0200
@@ -1,12 +1,12 @@
-(custom-put 'backup 'custom-loads '("files"))
-(custom-put 'find-file 'custom-loads '("files"))
-(custom-put 'frames 'custom-loads '("frame" "window-xemacs"))
-(custom-put 'help-appearance 'custom-loads '("help"))
-(custom-put 'isearch 'custom-loads '("isearch-mode"))
+(custom-put 'sound 'custom-loads '("sound"))
+(custom-put 'paren-matching 'custom-loads '())
+(custom-put 'fill-comments 'custom-loads '("simple"))
+(custom-put 'killing 'custom-loads '("simple"))
+(custom-put 'editing-basics 'custom-loads '("simple" "files" "lisp" "cmdloop"))
+(custom-put 'modeline 'custom-loads '("modeline"))
 (custom-put 'minibuffer 'custom-loads '("minibuf"))
-(custom-put 'modeline 'custom-loads '("modeline"))
-(custom-put 'editing-basics 'custom-loads '("simple" "files" "lisp" "cmdloop"))
-(custom-put 'killing 'custom-loads '("simple"))
-(custom-put 'fill-comments 'custom-loads '("simple"))
-(custom-put 'paren-matching 'custom-loads '())
-(custom-put 'sound 'custom-loads '("sound"))
+(custom-put 'isearch 'custom-loads '("isearch-mode"))
+(custom-put 'help-appearance 'custom-loads '("help"))
+(custom-put 'frames 'custom-loads '("frame" "window-xemacs" "gui"))
+(custom-put 'find-file 'custom-loads '("files"))
+(custom-put 'backup 'custom-loads '("files"))
--- a/lisp/prim/device.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/prim/device.el	Mon Aug 13 09:49:09 2007 +0200
@@ -26,7 +26,7 @@
 
 (defun device-list ()
   "Return a list of all devices."
-  (apply 'append (mapcar 'console-device-list (console-list))))
+  (apply 'nconc (mapcar 'console-device-list (console-list))))
 
 (defun device-type (&optional device)
   "Return the type of the specified device (e.g. `x' or `tty').
--- a/lisp/prim/disp-table.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/prim/disp-table.el	Mon Aug 13 09:49:09 2007 +0200
@@ -4,7 +4,7 @@
 ;; Copyright (C) 1995 Sun Microsystems.
 
 ;; Author: Howard Gayle
-;; Maintainer: FSF
+;; Maintainer: XEmacs Development Team
 ;; Keywords: i18n
 
 ;; This file is part of XEmacs.
@@ -35,6 +35,7 @@
 
 ;;; Rewritten for XEmacs July 1995, Ben Wing.
 
+
 ;;; Code:
 
 (defun describe-display-table (dt)
@@ -43,14 +44,38 @@
    (lambda ()
      (princ "\nCharacter display glyph sequences:\n")
      (save-excursion
-       (set-buffer standard-output)
        (let ((vector (make-vector 256 nil))
              (i 0))
          (while (< i 256)
            (aset vector i (aref dt i))
-           (setq i (1+ i)))
-         ;;; ### No such function `describe-vector'...
-         (describe-vector vector))))))
+           (incf i))
+	 ;; FSF calls `describe-vector' here, but it is so incredibly
+	 ;; lame a function for that name that I cannot bring myself
+	 ;; to porting it.  Here is what `describe-vector' does:
+	 (terpri)
+	 (let ((old (aref vector 0))
+	       (oldpos 0)
+	       (i 1)
+	       str)
+	   (while (<= i 256)
+	     (when (or (= i 256)
+		       (not (equal old (aref vector i))))
+	       (if (eq oldpos (1- i))
+		   (princ (format "%s\t\t%s\n"
+				  (single-key-description (int-char oldpos))
+				  old))
+		 (setq str (format "%s - %s"
+				   (single-key-description (int-char oldpos))
+				   (single-key-description (int-char (1- i)))))
+		 (princ str)
+		 (princ (make-string (max (- 2 (/ (length str)
+						  tab-width)) 1) ?\t))
+		 (princ old)
+		 (terpri))
+	       (or (= i 256)
+		   (setq old (aref vector i)
+			 oldpos i)))
+	     (incf i))))))))
 
 ;;;###autoload
 (defun describe-current-display-table (&optional domain)
--- a/lisp/prim/dumped-lisp.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/prim/dumped-lisp.el	Mon Aug 13 09:49:09 2007 +0200
@@ -42,6 +42,8 @@
 ;; After fixing, eos/loaddefs-eos and loaddefs appear identical?!!
 ;; So just make loaddefs-eos go away...
 ;;(load-gc (if (featurep 'sparcworks) "eos/loaddefs-eos" "loaddefs"))
+	"startup"		; For initialization of
+				;  `emacs-user-extension-dir'
 	"loaddefs"		; <=== autoloads get loaded here
 	"misc"
 	;; (load-gc "profile")
@@ -59,7 +61,6 @@
 	"window"
 	"window-xemacs"
 	"paths.el"		; don't get confused if paths compiled.
-	"startup"
 	"lisp"
 	"page"
 	"register"
--- a/lisp/prim/featurep.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/prim/featurep.el	Mon Aug 13 09:49:09 2007 +0200
@@ -29,6 +29,10 @@
 ;; `featurep' is enhanced in the C code.  This support code is written in
 ;; Lisp to make it easier to experiment with the code.
 
+;; XEmacs: this code has been ported to C by Steve Baur.  The
+;; implementations should be equivalent.
+
+
 ;;; Code:
 
 (eval-when-compile (require 'cl))
--- a/lisp/prim/files.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/prim/files.el	Mon Aug 13 09:49:09 2007 +0200
@@ -37,11 +37,11 @@
 
 (defgroup backup nil
   "Backups of edited data files."
-  :group 'data)
+  :group 'files)
 
 (defgroup find-file nil
   "Finding and editing files."
-  :group 'data)
+  :group 'files)
 
 
 ;; XEmacs: In buffer.c
@@ -2283,48 +2283,51 @@
   (interactive "P")
   (save-excursion
     (save-window-excursion
-    ;; XEmacs - do not use queried flag
-    (let ((files-done
-	   (map-y-or-n-p
-	    (function
-	     (lambda (buffer)
-	       (and (buffer-modified-p buffer)
-		    (not (buffer-base-buffer buffer))
-		    ;; XEmacs addition:
-		    (not (symbol-value-in-buffer 'save-buffers-skip buffer))
-		    (or
-		     (buffer-file-name buffer)
-		     (and exiting
-			  (progn
-			    (set-buffer buffer)
-			    (and buffer-offer-save (> (buffer-size) 0)))))
-		    (if arg
-			t
-		      (when save-some-buffers-query-display-buffer
-			(when (condition-case nil
-				  (switch-to-buffer buffer t)
-				(error nil))
-			  (delete-other-windows)))
-		      (if (buffer-file-name buffer)
-			  (format "Save file %s? "
-				  (buffer-file-name buffer))
-			(format "Save buffer %s? "
-				(buffer-name buffer)))))))
-	    (function
-	     (lambda (buffer)
-	       (set-buffer buffer)
-	       (condition-case ()
-		   (save-buffer)
-		 (error nil))))
-	    (buffer-list)
-	    '("buffer" "buffers" "save")
-	    ;instead of this we just say "yes all", "no all", etc.
-	    ;"save all the rest"
-	    ;"save only this buffer" "save no more buffers")
-	    ; this is rather bogus. --ben
-	    ; (it makes the dialog box too big, and you get an error
-	    ; "wrong type argument: framep, nil" when you hit q after
-	    ; choosing the option from the dialog box)
+      ;; This can bomb during autoloads generation
+      (when (and (not noninteractive)
+		 save-some-buffers-query-display-buffer)
+	(delete-other-windows))
+      ;; XEmacs - do not use queried flag
+      (let ((files-done
+	     (map-y-or-n-p
+	      (function
+	       (lambda (buffer)
+		 (and (buffer-modified-p buffer)
+		      (not (buffer-base-buffer buffer))
+		      ;; XEmacs addition:
+		      (not (symbol-value-in-buffer 'save-buffers-skip buffer))
+		      (or
+		       (buffer-file-name buffer)
+		       (and exiting
+			    (progn
+			      (set-buffer buffer)
+			      (and buffer-offer-save (> (buffer-size) 0)))))
+		      (if arg
+			  t
+			(when save-some-buffers-query-display-buffer
+			  (condition-case nil
+			      (switch-to-buffer buffer t)
+			    (error nil)))
+			(if (buffer-file-name buffer)
+			    (format "Save file %s? "
+				    (buffer-file-name buffer))
+			  (format "Save buffer %s? "
+				  (buffer-name buffer)))))))
+	      (function
+	       (lambda (buffer)
+		 (set-buffer buffer)
+		 (condition-case ()
+		     (save-buffer)
+		   (error nil))))
+	      (buffer-list)
+	      '("buffer" "buffers" "save")
+	      ;;instead of this we just say "yes all", "no all", etc.
+	      ;;"save all the rest"
+	      ;;"save only this buffer" "save no more buffers")
+	      ;; this is rather bogus. --ben
+	      ;; (it makes the dialog box too big, and you get an error
+	      ;; "wrong type argument: framep, nil" when you hit q after
+	      ;; choosing the option from the dialog box)
 ;	    (list (list ?\C-r (lambda (buf)
 ;				(view-buffer buf)
 ;				(setq view-exit-action
@@ -2334,18 +2337,18 @@
 ;				;; Return nil to ask about BUF again.
 ;				nil)
 ;			"display the current buffer"))
-	    ))
-	  (abbrevs-done
-	   (and save-abbrevs abbrevs-changed
-		(progn
-		  (if (or arg
-			  (y-or-n-p (format "Save abbrevs in %s? " abbrev-file-name)))
-		      (write-abbrev-file nil))
-		  ;; Don't keep bothering user if he says no.
-		  (setq abbrevs-changed nil)
-		  t))))
-      (or (> files-done 0) abbrevs-done
-	  (message "(No files need saving)"))))))
+	      ))
+	    (abbrevs-done
+	     (and save-abbrevs abbrevs-changed
+		  (progn
+		    (if (or arg
+			    (y-or-n-p (format "Save abbrevs in %s? " abbrev-file-name)))
+			(write-abbrev-file nil))
+		    ;; Don't keep bothering user if he says no.
+		    (setq abbrevs-changed nil)
+		    t))))
+	(or (> files-done 0) abbrevs-done
+	    (message "(No files need saving)"))))))
 
 
 (defun not-modified (&optional arg)
--- a/lisp/prim/gui.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/prim/gui.el	Mon Aug 13 09:49:09 2007 +0200
@@ -1,5 +1,9 @@
 ;;; gui.el --- Basic GUI functions for XEmacs.
+
 ;; Copyright (C) 1996 Ben Wing
+
+;; Maintainer: XEmacs Development Team
+;; Keywords: internal
  
 ;; This file is part of XEmacs.
 
@@ -18,10 +22,14 @@
 ;; Free Software Foundation, 59 Temple Place - Suite 330,
 ;; Boston, MA 02111-1307, USA.
 
-(defvar dialog-frame-plist '(width 60 height 20)
+(defcustom dialog-frame-plist '(width 60 height 20)
   "Plist of frame properties for initially creating a dialog frame.
 Properties specified here supersede the values given in
-`default-frame-plist'.")
+`default-frame-plist'."
+  :type '(repeat (group :inline t
+			(symbol :tag "Property")
+			(sexp :tag "Value")))
+  :group 'frames)
 
 (defun make-dialog-frame (&optional props parent)
   "Create a frame suitable for use as a dialog box.
--- a/lisp/prim/help.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/prim/help.el	Mon Aug 13 09:49:09 2007 +0200
@@ -1146,6 +1146,15 @@
 	 ;; Return the text we displayed.
 	 (buffer-string))))))
 
+(defun sorted-key-descriptions (keys &optional separator)
+  "Sort and separate the key descriptions for KEYS.
+The sorting is done by length (shortest bindings first), and the bindings
+are separated with SEPARATOR (`, ' by default)."
+  (mapconcat 'key-description
+	     (sort keys #'(lambda (x y)
+			    (< (length x) (length y))))
+	     (or separator ", ")))
+
 (defun where-is (definition)
   "Print message listing key sequences that invoke specified command.
 Argument is a command definition, usually a symbol with a function definition."
@@ -1153,22 +1162,15 @@
    (let ((fn (function-called-at-point))
 	 (enable-recursive-minibuffers t)	     
 	 val)
-     ;; #### should use `read-command'
-     (setq val (completing-read (if fn
-				    (format "Where is command (default %s): " fn)
-				  "Where is command: ")
-				obarray 'commandp t nil
-				'read-command-history))
-     (list (if (equal val "")
-	       fn (intern val)))))
+     (setq val (read-command
+		(if fn (format "Where is command (default %s): " fn)
+		  "Where is command: ")))
+     (list (if (equal (symbol-name val) "")
+	       fn val))))
   (let ((keys (where-is-internal definition)))
     (if keys
-	(message "%s is on %s" definition
-                 (mapconcat 'key-description
-                            (sort keys #'(lambda (x y)
-                                           (< (length x) (length y))))
-                            ", "))
-        (message "%s is not on any keys" definition)))
+	(message "%s is on %s" definition (sorted-key-descriptions keys))
+      (message "%s is not on any keys" definition)))
   nil)
 
 ;; Synched with Emacs 19.35
--- a/lisp/prim/macros.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/prim/macros.el	Mon Aug 13 09:49:09 2007 +0200
@@ -22,7 +22,7 @@
 ;; Free Software Foundation, 59 Temple Place - Suite 330,
 ;; Boston, MA 02111-1307, USA.
 
-;;; Synched up with: FSF 19.30.
+;;; Synched up with: FSF 19.34.
 
 ;;; Commentary:
 
@@ -50,93 +50,44 @@
        (not (vectorp (symbol-function symbol)))
        (error "Function %s is already defined and not a keyboard macro."
 	      symbol))
+  (if (string-equal symbol "")
+      (error "No command name given"))
   (fset symbol last-kbd-macro))
 
-;(defun insert-kbd-macro-pretty-string (string)
-;  ;; Convert control characters to the traditional readable representation:
-;  ;; put the four characters \M-x in the buffer instead of the one char \370,
-;  ;; which would deceptively print as `oslash' with the default settings.
-;  (save-restriction
-;    (narrow-to-region (point) (point))
-;    (prin1 string (current-buffer))
-;    (goto-char (1+ (point-min)))
-;    (while (not (eobp))
-;      (cond ((= (following-char)   0) (insert "\\C-@") (delete-char 1))
-;	    ((= (following-char) ?\n) (insert "\\n") (delete-char 1))
-;	    ((= (following-char) ?\r) (insert "\\r") (delete-char 1))
-;	    ((= (following-char) ?\t) (insert "\\t") (delete-char 1))
-;	    ((= (following-char) ?\e) (insert "\\e") (delete-char 1))
-;	    ((= (following-char) 127) (insert "\\C-?") (delete-char 1))
-;	    ((= (following-char) 128) (insert "\\M-\\C-@") (delete-char 1))
-;	    ((= (following-char) 255) (insert "\\M-\\C-?") (delete-char 1))
-;	    ((and (> (following-char) 127) (< (following-char) 155))
-;	     (insert "\\M-\\C-")
-;	     (insert (- (following-char) 32))
-;	     (delete-char 1)
-;	     (forward-char -1))
-;	    ((and (>= (following-char) 155) (< (following-char) 160))
-;	     (insert "\\M-\\C-")
-;	     (insert (- (following-char) 64))
-;	     (delete-char 1)
-;	     (forward-char -1))
-;	    ((>= (following-char) 160)
-;	     (insert "\\M-")
-;	     (insert (- (following-char) 128))
-;	     (delete-char 1)
-;	     (forward-char -1))
-;	    ((< (following-char) 27)
-;	     ;;(insert "\\^") (insert (+ (following-char) 64))
-;	     (insert "\\C-") (insert (+ (following-char) 96))
-;	     (delete-char 1)
-;	     (forward-char -1))
-;	    ((< (following-char) 32)
-;	     ;;(insert "\\^") (insert (+ (following-char) 64))
-;	     (insert "\\C-") (insert (+ (following-char) 64))
-;	     (delete-char 1)
-;	     (forward-char -1))
-;	    (t
-;	     (forward-char 1))))))
+;;; Moved here from edmacro.el:
+
+;;;###autoload
+(defun insert-kbd-macro (macroname &optional keys)
+  "Insert in buffer the definition of kbd macro NAME, as Lisp code.
+Optional second arg KEYS means also record the keys it is on
+\(this is the prefix argument, when calling interactively).
+
+This Lisp code will, when executed, define the kbd macro with the same
+definition it has now.  If you say to record the keys, the Lisp code
+will also rebind those keys to the macro.  Only global key bindings
+are recorded since executing this Lisp code always makes global
+bindings.
 
-;; ;;;###autoload
-;(defun insert-kbd-macro (macroname &optional keys)
-;  "Insert in buffer the definition of kbd macro NAME, as Lisp code.
-;Optional second argument KEYS means also record the keys it is on
-;\(this is the prefix argument, when calling interactively).
-
-;This Lisp code will, when executed, define the kbd macro with the
-;same definition it has now.  If you say to record the keys,
-;the Lisp code will also rebind those keys to the macro.
-;Only global key bindings are recorded since executing this Lisp code
-;always makes global bindings.
-
-;To save a kbd macro, visit a file of Lisp code such as your `~/.emacs',
-;use this command, and then save the file."
-;  (interactive "CInsert kbd macro (name): \nP")
-;  (let (definition)
-;    (if (string= (symbol-name macroname) "")
-;	(progn
-;	  (setq macroname 'last-kbd-macro 
-;                definition last-kbd-macro)
-;	  (insert "(setq "))
-;        (progn
-;          (setq definition (symbol-function macroname))
-;          (insert "(fset '")))
-;  (prin1 macroname (current-buffer))
-;  (insert "\n   ")
-;  (let ((string (events-to-keys definition t)))
-;    (if (stringp string)
-;	(insert-kbd-macro-pretty-string string)
-;      (prin1 string (current-buffer))))
-;  (insert ")\n")
-;  (if keys
-;      (let ((keys (where-is-internal macroname)))
-;	(while keys
-;	  (insert "(global-set-key ")
-;	  (prin1 (car keys) (current-buffer))
-;	  (insert " '")
-;	  (prin1 macroname (current-buffer))
-;	  (insert ")\n")
-;            (setq keys (cdr keys)))))))
+To save a kbd macro, visit a file of Lisp code such as your `~/.emacs',
+use this command, and then save the file."
+  (interactive "CInsert kbd macro (name): \nP")
+  (let (definition)
+    (if (string= (symbol-name macroname) "")
+	(progn
+	  (setq definition (format-kbd-macro))
+	  (insert "(setq last-kbd-macro"))
+      (setq definition (format-kbd-macro macroname))
+      (insert (format "(defalias '%s" macroname)))
+    (if (> (length definition) 50)
+	(insert " (read-kbd-macro\n")
+      (insert "\n  (read-kbd-macro "))
+    (prin1 definition (current-buffer))
+    (insert "))\n")
+    (if keys
+	(let ((keys (where-is-internal macroname)))
+	  (while keys
+	    (insert (format "(global-set-key %S '%s)\n" (car keys) macroname))
+	    (pop keys))))))
 
 ;;;###autoload
 (defun kbd-macro-query (flag)
@@ -152,23 +103,24 @@
 \\[recenter]	Redisplay the frame, then ask again.
 \\[edit]	Enter recursive edit; ask again when you exit from that."
   (interactive "P")
-  (or executing-macro
+  (or executing-kbd-macro
       defining-kbd-macro
       (error "Not defining or executing kbd macro"))
   (if flag
-      (let (executing-macro defining-kbd-macro)
+      (let (executing-kbd-macro defining-kbd-macro)
 	(recursive-edit))
-    (if (not executing-macro)
+    (if (not executing-kbd-macro)
 	nil
       (let ((loop t)
 	    (msg (substitute-command-keys
                   "Proceed with macro?\\<query-replace-map>\
  (\\[act], \\[skip], \\[exit], \\[recenter], \\[edit]) ")))
 	(while loop
-	  (let ((key (let ((executing-macro nil)
+	  (let ((key (let ((executing-kbd-macro nil)
 			    (defining-kbd-macro nil))
-                       (message msg)
-                       (read-char)))
+                       (message "%s" msg)
+		       ;; XEmacs: avoid `read-char'.
+                       (read-char-exclusive)))
                 def)
 	    (setq key (vector key))
 	    (setq def (lookup-key query-replace-map key))
@@ -176,14 +128,14 @@
 		   (setq loop nil))
 		  ((eq def 'skip)
 		   (setq loop nil)
-		   (setq executing-macro ""))
+		   (setq executing-kbd-macro ""))
 		  ((eq def 'exit)
 		   (setq loop nil)
-		   (setq executing-macro t))
+		   (setq executing-kbd-macro t))
 		  ((eq def 'recenter)
 		   (recenter nil))
 		  ((eq def 'edit)
-		   (let (executing-macro defining-kbd-macro)
+		   (let (executing-kbd-macro defining-kbd-macro)
 		     (recursive-edit)))
 		  ((eq def 'quit)
 		   (setq quit-flag t))
--- a/lisp/prim/minibuf.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/prim/minibuf.el	Mon Aug 13 09:49:09 2007 +0200
@@ -363,8 +363,8 @@
          (window (minibuffer-window))
          (buffer (if (eq (minibuffer-depth) 0)
                      (window-buffer window)
-                     (get-buffer-create (format " *Minibuf-%d"
-                                                (minibuffer-depth)))))
+		   (get-buffer-create (format " *Minibuf-%d"
+					      (minibuffer-depth)))))
          (frame (window-frame window))
          (mconfig (if (eq frame (selected-frame)) 
                       nil (current-window-configuration frame)))
@@ -376,8 +376,7 @@
 	 (_history_ history))
     (unwind-protect
          (progn
-           (set-buffer buffer)
-           (reset-buffer buffer)
+           (set-buffer (reset-buffer buffer))
            (setq default-directory dir)
            (make-local-variable 'print-escape-newlines)
            (setq print-escape-newlines t)
@@ -481,7 +480,9 @@
 				minibuffer-history-minimum-string-length
 				(< (length val)
 				   minibuffer-history-minimum-string-length))
-			   (set minibuffer-history-variable (cons histval list)))))
+			   (set minibuffer-history-variable
+				(cons histval
+				      (remove histval list))))))
                  (if err (signal (car err) (cdr err)))
                  val))))
       ;; stupid display code requires this for some reason
--- a/lisp/prim/modeline.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/prim/modeline.el	Mon Aug 13 09:49:09 2007 +0200
@@ -95,8 +95,7 @@
       ;;   drag-modeline-event-lag.
       ;; do nothing if this is any other kind of event.
       (cond ((or (misc-user-event-p event)
-		 (key-press-event-p event)
-		 (eval-event-p event))
+		 (key-press-event-p event))
 	     (setq unread-command-events (nconc unread-command-events
 						(list event))
 		   done t))
--- a/lisp/prim/obsolete.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/prim/obsolete.el	Mon Aug 13 09:49:09 2007 +0200
@@ -244,7 +244,7 @@
   "Returns the topmost, leftmost window of FRAME.
 If omitted, FRAME defaults to the currently selected frame."
   (frame-highest-window frame 0))
-(make-obsolete 'frame-first-window 'frame-highest-window)
+(make-compatible 'frame-first-window 'frame-highest-window)
 
 (define-obsolete-variable-alias 'initial-frame-alist 'initial-frame-plist)
 (define-obsolete-variable-alias 'minibuffer-frame-alist
--- a/lisp/prim/profile.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/prim/profile.el	Mon Aug 13 09:49:09 2007 +0200
@@ -60,14 +60,21 @@
 
 ;;;###autoload
 (defmacro profile (&rest forms)
-  "Turn on profiling, execute FORMS and stop profiling.
+  "Turn on profiling, execute FORMS and restore profiling state.
+Profiling state here means that if profiling was not in effect when
+PROFILE was called, it will be turned off after FORMS are evaluated.
+Otherwise, profiling will be left running.
+
 Returns the profiling info, printable by `pretty-print-profiling-info'."
   `(progn
-     (unwind-protect
+     (if (profiling-active-p)
 	 (progn
-	   (start-profiling)
 	   ,@forms)
-       (stop-profiling))
+       (unwind-protect
+	   (progn
+	     (start-profiling)
+	     ,@forms)
+	 (stop-profiling)))
      (get-profiling-info)))
 
 (put 'profile 'lisp-indent-function 0)
--- a/lisp/prim/replace.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/prim/replace.el	Mon Aug 13 09:49:09 2007 +0200
@@ -30,7 +30,7 @@
 
 ;;; Code:
 
-(defconst case-replace t "\
+(defvar case-replace t "\
 *Non-nil means `query-replace' should preserve case in replacements.
 What this means is that `query-replace' will change the case of the
 replacement text so that it matches the text that was replaced.
--- a/lisp/prim/simple.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/prim/simple.el	Mon Aug 13 09:49:09 2007 +0200
@@ -3214,57 +3214,70 @@
   "Maximum size of the \" *Message-Log*\" buffer.  See `log-message'.")
 (make-compatible-variable 'message-log-max 'log-message-max-size)
 
+;; We used to reject quite a lot of stuff here, but it was a bad idea,
+;; for two reasons:
+;;
+;; a) In most circumstances, you *want* to see the message in the log.
+;;    The explicitly non-loggable messages should be marked as such by
+;;    the issuer.  Gratuitous non-displaying of random regexps made
+;;    debugging harder, too (because various reasonable debugging
+;;    messages would get eaten).
+;;
+;; b) It slowed things down.  Yes, visibly.
+;;
+;; So, I left only a few of the really useless ones on this kill-list.
+;;
+;;                                            --hniksic
 (defvar log-message-ignore-regexps
   '(;; Often-seen messages
-    "^$"				; empty message
-    "^Mark set$"
-    "^\\(Beginning\\|End\\) of buffer$"
-    "^Quit$"
-    "^Killing [0-9]+ characters$"
+    "\\`\\'"				; empty message
+    ;;"^Mark set$"
+    ;;"^\\(Beginning\\|End\\) of buffer$"
+    ;;"^Quit$"
+    ;;"^Killing [0-9]+ characters$"
     ;; saving
-    "^Saving file .*\\.\\.\\.$"		; note: cannot ignore ^Wrote, because
+    ;;"^Saving file .*\\.\\.\\.$"		; note: cannot ignore ^Wrote, because
 					; it would kill off too much stuff.
-    "^(No changes need to be saved)$"
-    "^(No files need saving)$"
+    ;;"^(No changes need to be saved)$"
+    ;;"^(No files need saving)$"
     ;; undo, with the output of redo.el
-    "^Undo[!.]+$"
-    "^Redo[!.]+$"
+    "\\`Undo[!.]+\\'"
+    "\\`Redo[!.]+\\'"
     ;; M-x compile
-    "^Parsing error messages\\.\\.\\."
+    ;;"^Parsing error messages\\.\\.\\."
     ;; M-!
-    "^(Shell command completed with no output)"
+    ;;"^(Shell command completed with no output)"
     ;; font-lock
-    "^Fontifying"
+    "\\`Fontifying"
     ;; isearch
-    "^\\(Failing \\)?\\([Ww]rapped \\)?\\([Rr]egexp \\)?I-search\\( backward\\)?:"
-    "^Mark saved where search started$"
+    ;;"^\\(Failing \\)?\\([Ww]rapped \\)?\\([Rr]egexp \\)?I-search\\( backward\\)?:"
+    ;;"^Mark saved where search started$"
     ;; menus
-    "^Selecting menu item"
+    ;;"^Selecting menu item"
     ;; completions
-    "^Making completion list"
-    "^Matches "				; paren-matching message
+    ;;"^Making completion list"
+    ;;"^Matches "				; paren-matching message
     ;; help
-    "^Type .* to \\(remove help\\|restore the other\\) window."
-    "^M-x .* (bound to key"		; teach-extended-commands
+    ;;"^Type .* to \\(remove help\\|restore the other\\) window."
     ;; VM
-    "^\\(Parsing messages\\|Reading attributes\\|Generating summary\\|Building threads\\|Converting\\)\\.\\.\\. [0-9]+$"
-    "^End of message"			; + Gnus
+    ;;"^\\(Parsing messages\\|Reading attributes\\|Generating summary\\|Building threads\\|Converting\\)\\.\\.\\. [0-9]+$"
+    ;;"^End of message"			; + Gnus
     ;; Gnus
-    "^No news is no news$"
-    "^No more\\( unread\\)? newsgroups$"
-    "^Opening [^ ]+ server\\.\\.\\."
-    "^[^:]+: Reading incoming mail"
-    "^Getting mail from "
-    "^\\(Generating Summary\\|Sorting threads\\|Making sparse threads\\|Scoring\\|Checking new news\\|Expiring articles\\|Sending\\)\\.\\.\\."
-    "^\\(Fetching headers for\\|Retrieving newsgroup\\|Reading active file\\)"
-    "^No more\\( unread\\)? articles"
-    "^Deleting article "
+    ;;"^No news is no news$"
+    ;;"^No more\\( unread\\)? newsgroups$"
+    ;;"^Opening [^ ]+ server\\.\\.\\."
+    ;;"^[^:]+: Reading incoming mail"
+    ;;"^Getting mail from "
+    ;;"^\\(Generating Summary\\|Sorting threads\\|Making sparse threads\\|Scoring\\|Checking new news\\|Expiring articles\\|Sending\\)\\.\\.\\."
+    ;;"^\\(Fetching headers for\\|Retrieving newsgroup\\|Reading active file\\)"
+    ;;"^No more\\( unread\\)? articles"
+    ;;"^Deleting article "
     ;; W3
-    "^Parsed [0-9]+ of [0-9]+ ([0-9]+%)"
+    ;;"^Parsed [0-9]+ of [0-9]+ ([0-9]+%)"
     ;; outl-mouse
-    "^Adding glyphs\\.\\.\\."
+    ;;"^Adding glyphs\\.\\.\\."
     ;; bbdb
-    "^->"
+    ;;"^->"
     )
   "List of regular expressions matching messages which shouldn't be logged.
 See `log-message'.  
--- a/lisp/prim/update-elc.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/prim/update-elc.el	Mon Aug 13 09:49:09 2007 +0200
@@ -128,14 +128,14 @@
 (if update-elc-files-to-compile
     (progn
       (setq command-line-args
-;;	    (cons (car command-line-args)
-		  (append
-		   '("-l" "loadup-el.el" "run-temacs"
-		     "-batch" "-q" "-no-site-file"
-		     "-l" "bytecomp" "-f" "batch-byte-compile")
-		   update-elc-files-to-compile)) ;; )
-      (load "loadup-el.el")
-))
+	    (append '("-l" "loadup-el.el" "run-temacs"
+		      "-batch" "-q" "-no-site-file"
+		      "-l" "bytecomp" "-f" "batch-byte-compile")
+		    update-elc-files-to-compile))
+      (load "loadup-el.el"))
+  (condition-case nil
+      (delete-file "./NOBYTECOMPILE")
+    (t nil)))
 
 (kill-emacs)
 
--- a/lisp/psgml/custom-load.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/psgml/custom-load.el	Mon Aug 13 09:49:09 2007 +0200
@@ -1,7 +1,7 @@
-(custom-put 'tempo 'custom-loads '("tempo"))
-(custom-put 'psgml-dtd 'custom-loads '("psgml"))
-(custom-put 'psgml-insert 'custom-loads '("psgml"))
+(custom-put 'html 'custom-loads '("psgml-html"))
+(custom-put 'psgml-html 'custom-loads '("psgml-html"))
+(custom-put 'sgml 'custom-loads '("psgml-html" "psgml"))
 (custom-put 'psgml 'custom-loads '("psgml-html" "psgml"))
-(custom-put 'sgml 'custom-loads '("psgml-html" "psgml"))
-(custom-put 'psgml-html 'custom-loads '("psgml-html"))
-(custom-put 'html 'custom-loads '("psgml-html"))
+(custom-put 'psgml-insert 'custom-loads '("psgml"))
+(custom-put 'psgml-dtd 'custom-loads '("psgml"))
+(custom-put 'tempo 'custom-loads '("tempo"))
--- a/lisp/tm/tm-image.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/tm/tm-image.el	Mon Aug 13 09:49:09 2007 +0200
@@ -7,7 +7,7 @@
 ;;         Dan Rich <drich@morpheus.corp.sgi.com>
 ;; Maintainer: MORIOKA Tomohiko <morioka@jaist.ac.jp>
 ;; Created: 1995/12/15
-;; Version: $Id: tm-image.el,v 1.7 1997/06/06 00:57:43 steve Exp $
+;; Version: $Id: tm-image.el,v 1.8 1997/07/13 22:41:52 steve Exp $
 
 ;; Keywords: image, picture, X-Face, MIME, multimedia, mail, news
 
@@ -155,10 +155,10 @@
 	   (gl (image-normalize minor (buffer-string)))
 	   e)
       (delete-region (point-min)(point-max))
-      (cond ((image-invalid-glyph-p gl)
-	     (setq gl nil)
-	     (message "Invalid glyph!")
-	     )
+      (cond ;; ((image-invalid-glyph-p gl)
+	     ;; (setq gl nil)
+	     ;; (message "Invalid glyph!")
+	     ;; )
 	    ((eq (aref gl 0) 'xbm)
 	     (let ((xbm-file
 		    (make-temp-name (expand-file-name "tm" mime/tmp-dir))))
--- a/lisp/utils/auto-autoloads.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/utils/auto-autoloads.el	Mon Aug 13 09:49:09 2007 +0200
@@ -236,7 +236,15 @@
 
 ;;;***
 
-;;;### (autoloads (insert-kbd-macro format-kbd-macro kbd read-kbd-macro edit-named-kbd-macro edit-last-kbd-macro edit-kbd-macro) "edmacro" "utils/edmacro.el")
+;;;### (autoloads (edit-toolbar) "edit-toolbar" "utils/edit-toolbar.el")
+
+(autoload 'edit-toolbar "edit-toolbar" "\
+Alter toolbar characteristics by editing a buffer representing the current toolbar.
+Pops up a buffer containing a list of the current toobar." t nil)
+
+;;;***
+
+;;;### (autoloads (format-kbd-macro kbd read-kbd-macro edit-named-kbd-macro edit-last-kbd-macro edit-kbd-macro) "edmacro" "utils/edmacro.el")
 
 (define-key ctl-x-map "\C-k" 'edit-kbd-macro)
 
@@ -276,20 +284,6 @@
 If VERBOSE is `1', put everything on one line.  If VERBOSE is omitted
 or nil, use a compact 80-column format." nil nil)
 
-(autoload 'insert-kbd-macro "edmacro" "\
-Insert in buffer the definition of kbd macro NAME, as Lisp code.
-Optional second arg KEYS means also record the keys it is on
-\(this is the prefix argument, when calling interactively).
-
-This Lisp code will, when executed, define the kbd macro with the same
-definition it has now.  If you say to record the keys, the Lisp code
-will also rebind those keys to the macro.  Only global key bindings
-are recorded since executing this Lisp code always makes global
-bindings.
-
-To save a kbd macro, visit a file of Lisp code such as your `~/.emacs',
-use this command, and then save the file." t nil)
-
 ;;;***
 
 ;;;### (autoloads (turn-on-eldoc-mode eldoc-mode) "eldoc" "utils/eldoc.el")
@@ -944,6 +938,31 @@
 
 ;;;***
 
+;;;### (autoloads (toolbar-kill-item toolbar-kill-item-pos toolbar-add-item restore-initial-toolbar) "toolbar-utils" "utils/toolbar-utils.el")
+
+(autoload 'restore-initial-toolbar "toolbar-utils" "\
+Restores the default toolbar defined by initial-toolbar-spec." t nil)
+
+(autoload 'toolbar-add-item "toolbar-utils" "\
+Add a toolbar item ITEM at the first location of the toolbar specifier. 
+Optionally, can specify an INDEX position to insert the ITEM.  The default is
+to use default-toolbar, but a different specifier can by specified with 
+TOOLBAR-SPEC." nil nil)
+
+(autoload 'toolbar-kill-item-pos "toolbar-utils" "\
+Remove a toolbar item ITEM at the first location of the toolbar specifier.  
+Optionally, can specify an INDEX position where to remove the ITEM.  The 
+default is to use default-toolbar, but a different specifier can by 
+specified with TOOLBAR-SPEC." nil nil)
+
+(autoload 'toolbar-kill-item "toolbar-utils" "\
+Remove a toolbar item ITEM at the first location of the toolbar specifier.  
+Optionally, can specify an ITEM to remove.  The ITEM must be in form of a 
+vector.  The default is to use default-toolbar, but a different specifier 
+can by specified with TOOLBAR-SPEC." nil nil)
+
+;;;***
+
 ;;;### (autoloads (tq-create) "tq" "utils/tq.el")
 
 (autoload 'tq-create "tq" "\
--- a/lisp/utils/crontab.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/utils/crontab.el	Mon Aug 13 09:49:09 2007 +0200
@@ -40,15 +40,26 @@
 
 ;;; Local Variables.  Define these to your liking.
 
-(defvar crontab-filename "~/.crontab"
-  "*The name of the file to store the User's Crontab.")
+(defgroup crontab nil
+  "Assist in editing crontab files."
+  :group 'languages)
+
+
+(defcustom crontab-filename "~/.crontab"
+  "*The name of the file to store the User's Crontab."
+  :type 'file
+  :group 'crontab)
 
-(defvar crontab-directory "/usr/spool/cron/crontabs"
-  "*The name of the directory in which crontab stores it's entries.")
+(defcustom crontab-directory "/usr/spool/cron/crontabs"
+  "*The name of the directory in which crontab stores it's entries."
+  :type 'file
+  :group 'crontab)
 
-(defvar crontab-use-local-file nil
+(defcustom crontab-use-local-file nil
   "*Non-nil means use file stored in User's Home directory, if it exists.
-Otherwise, always ask crontab for the current entry (maybe).")
+Otherwise, always ask crontab for the current entry (maybe)."
+  :type 'boolean
+  :group 'crontab)
 
 
 ;;; Interactive Function called to edit a Crontab Entry.  It is called
--- a/lisp/utils/custom-load.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/utils/custom-load.el	Mon Aug 13 09:49:09 2007 +0200
@@ -1,12 +1,14 @@
-(custom-put 'uniquify 'custom-loads '("uniquify"))
-(custom-put 'smtpmail 'custom-loads '("smtpmail"))
-(custom-put 'savehist 'custom-loads '("savehist"))
-(custom-put 'ph 'custom-loads '("ph"))
-(custom-put 'passwd 'custom-loads '("passwd"))
+(custom-put 'highlight-headers-faces 'custom-loads '("highlight-headers"))
+(custom-put 'crontab 'custom-loads '("crontab"))
+(custom-put 'browse-url 'custom-loads '("browse-url"))
+(custom-put 'detached-minibuf 'custom-loads '("detached-minibuf"))
+(custom-put 'edmacro 'custom-loads '("edmacro"))
+(custom-put 'eldoc 'custom-loads '("eldoc"))
+(custom-put 'elp 'custom-loads '("elp"))
+(custom-put 'highlight-headers 'custom-loads '("highlight-headers"))
 (custom-put 'message-headers 'custom-loads '())
-(custom-put 'highlight-headers 'custom-loads '("highlight-headers"))
-(custom-put 'elp 'custom-loads '("elp"))
-(custom-put 'eldoc 'custom-loads '("eldoc"))
-(custom-put 'edmacro 'custom-loads '("edmacro"))
-(custom-put 'detached-minibuf 'custom-loads '("detached-minibuf"))
-(custom-put 'browse-url 'custom-loads '("browse-url"))
+(custom-put 'passwd 'custom-loads '("passwd"))
+(custom-put 'ph 'custom-loads '("ph"))
+(custom-put 'savehist 'custom-loads '("savehist"))
+(custom-put 'smtpmail 'custom-loads '("smtpmail"))
+(custom-put 'uniquify 'custom-loads '("uniquify"))
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/utils/edit-toolbar.el	Mon Aug 13 09:49:09 2007 +0200
@@ -0,0 +1,423 @@
+;;; edit-toolbar.el --- Interactive toolbar editing mode for XEmacs
+
+;; Copyright (C) 1996 Peter D. Pezaris
+
+;; Author: Peter D. Pezaris <pez@dwwc.com>
+;; Keywords: tools
+
+;; This file is part of XEmacs.
+
+;; XEmacs is free software; you can redistribute it and/or modify it
+;; under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2, or (at your option)
+;; any later version.
+
+;; XEmacs is distributed in the hope that it will be useful, but
+;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+;; General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with XEmacs; see the file COPYING.  If not, write to the Free
+;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+;; 02111-1307, USA.
+
+;;; Synched up with: Not in FSF
+
+;;; Commentary:
+
+;; To use edit-toolbar.el, simply type M-x edit-toolbar RET
+
+;; For help on the various commands you can type ? in a edit-toolbar
+;; buffer.  To save a modified toolbar type C-x C-s in an edit-toolbar
+;; buffer.  If you want to use a saved toolbar in your future XEmacs
+;; sessions, add the following line of code to your .emacs file:
+
+;;     (load "~/.xemacs/.toolbar")
+
+;; Acknowledgements:
+
+;; Many thanks to Stig <stig@hackvan.com> and Ben Wing <wing@666.com>
+;; for writing edit-faces.el, on which much of this code is based.
+
+;; To do:
+
+;; o It would be nice if edit-toolbar could edit *any* toolbar, not just
+;;   the default one.
+;; o The function edit-toolbar-quit should do something other than just
+;;   bury the buffer.
+;; o Dynamically add new items to edit-toolbar-button-alist as new buttons
+;;   are added.
+
+;;; Code:
+
+(defvar edit-toolbar-version "1.01"
+  "Version of Edit Toolbar.")
+
+(defvar edit-toolbar-default-toolbar (specifier-instance default-toolbar)
+  "Default toolbar used when reverting.")
+
+(defvar edit-toolbar-file-name (concat "~"
+				       (if (boundp 'emacs-user-extension-dir)
+					   emacs-user-extension-dir
+					 "/")
+				       ".toolbar")
+  "File name to save toolbars to.  Defaults to \"~/.xemacs/.toolbar\"")
+
+(defvar edit-toolbar-menu
+  '("Edit Toolbar"
+    ["Move This Item Up" edit-toolbar-up t]
+    ["Move This Item Down" edit-toolbar-down t]
+    ["Set Function" edit-toolbar-set-function t]
+    ["Set Help String" edit-toolbar-set-help t]
+    ["Remove This Item" edit-toolbar-kill t]
+    "----"
+    ["Add Button..." edit-toolbar-add-button t]
+    ("Add Separator"
+     ["2D (narrow)      " edit-toolbar-add-separator-2D-narrow t]
+     ["3D (narrow)" edit-toolbar-add-separator-3D-narrow t]
+     ["2D (wide)" edit-toolbar-add-separator-2D-wide t]
+     ["3D (wide)" edit-toolbar-add-separator-3D-wide t]
+     )
+    "----"
+    ["Restore Default Toolbar      " edit-toolbar-restore t]
+    ["Save This Toolbar" edit-toolbar-save t]
+    "----"
+    ["Help" describe-mode t]
+    "----"
+    ["Quit" edit-toolbar-quit t]
+    )
+  )
+
+(defvar edit-toolbar-map
+  (let ((map (make-sparse-keymap)))
+    (suppress-keymap map)
+    (define-key map "q" 'edit-toolbar-quit)
+    (define-key map "n" 'edit-toolbar-next)
+    (define-key map "p" 'edit-toolbar-previous)
+    (define-key map " " 'edit-toolbar-next)
+    (define-key map "?" 'describe-mode)
+    (define-key map "f" 'edit-toolbar-set-function)
+    (define-key map "h" 'edit-toolbar-set-help)
+    (define-key map "a" 'edit-toolbar-add-button)
+    (define-key map "2" 'edit-toolbar-add-separator-2D-narrow)
+    (define-key map "@" 'edit-toolbar-add-separator-2D-wide)
+    (define-key map "3" 'edit-toolbar-add-separator-3D-narrow)
+    (define-key map "#" 'edit-toolbar-add-separator-3D-wide)
+    (define-key map "c" 'edit-toolbar-copy)
+    (define-key map "d" 'edit-toolbar-down)
+    (define-key map "u" 'edit-toolbar-up)
+    (define-key map "k" 'edit-toolbar-kill)
+    (define-key map "s" 'edit-toolbar-save)
+    (define-key map "\C-x\C-s" 'edit-toolbar-save)
+    (define-key map "r" 'edit-toolbar-restore)
+    (define-key map 'return 'edit-toolbar-next)
+    (define-key map 'delete 'edit-toolbar-previous)
+    map
+    ))
+
+;;;###autoload
+(defun edit-toolbar ()
+  "Alter toolbar characteristics by editing a buffer representing the current toolbar.
+Pops up a buffer containing a list of the current toobar."
+  (interactive)
+  (pop-to-buffer (get-buffer-create "*Edit Toolbar*"))
+  (edit-toolbar-list)
+  (set-buffer-modified-p nil)
+  (edit-toolbar-mode)
+  (set-face-foreground 'default "black" (current-buffer))
+  (set-face-background 'default "grey75" (current-buffer))
+  (set-face-foreground 'list-mode-item-selected "yellow" (current-buffer))
+  (set-face-background 'list-mode-item-selected "black" (current-buffer)))
+
+(define-derived-mode edit-toolbar-mode list-mode "Edit-Toolbar"
+  "Major mode for 'edit-toolbar' buffers.
+
+Editing commands:
+
+\\{edit-toolbar-map}"
+  (setq mode-popup-menu edit-toolbar-menu)
+  (if current-menubar
+      (progn
+	(set (make-local-variable 'current-menubar)
+	     (copy-sequence current-menubar))
+	(add-submenu nil edit-toolbar-menu)))
+  (use-local-map edit-toolbar-map)
+  (setq buffer-read-only nil)
+  (message "Edit Toolbar Version %s.  Type \"?\" for help." edit-toolbar-version))
+
+(defun edit-toolbar-list ()
+  (erase-buffer)
+  (edit-toolbar-insert-item 'header)
+  (let ((ilist (specifier-instance default-toolbar)))
+    (while (setq item (car ilist))
+      (edit-toolbar-insert-item item)
+      (setq ilist (cdr ilist))))
+  (goto-char (point-min)))
+
+(defun edit-toolbar-quit ()
+  "Quit an Edit Toolbar session.  This simply buries the buffer."
+  (interactive)
+  ;;FIXME
+  (bury-buffer))
+
+(defun edit-toolbar-next ()
+  "Move to the next line in the Edit Toolbar buffer."
+  (interactive)
+  (next-line 1))
+
+(defun edit-toolbar-previous ()
+  "Move to the previous line in the Edit Toolbar buffer."
+  (interactive)
+  (next-line -1))
+
+(defun edit-toolbar-set-function (func)
+  "Set the function for the selected toolbar button."
+  (interactive "aNew Function: ")
+  (let ((toolbar (specifier-instance default-toolbar))
+	(index (- (count-lines (point-min) (point)) 2)))
+    (setf (aref (nth index toolbar) 1) func)
+    (edit-toolbar-list)
+    (forward-line (+ index 2))))
+
+(defun edit-toolbar-set-help (help)
+  "Set the help string for the selected toolbar button."
+  (interactive "sNew Help String: ")
+  (let ((toolbar (specifier-instance default-toolbar))
+	(index (- (count-lines (point-min) (point)) 2)))
+    (setf (aref (nth index toolbar) 3) help)
+    (edit-toolbar-list)
+    (forward-line (+ index 2))))
+
+(defun edit-toolbar-copy ()
+  "Make a copy of the selected toolbar button."
+  (interactive)
+  (let* ((toolbar (specifier-instance default-toolbar))
+	 (index (- (count-lines (point-min) (point)) 2))
+	 (item (nth index toolbar)))
+    (setcdr (nthcdr index toolbar)
+	    (cons item (nthcdr (1+ index) toolbar)))
+    (edit-toolbar-list)
+    (forward-line (+ index 3))))
+
+(defun edit-toolbar-down ()
+  "Move the current toolbar button down (right) one position."
+  (interactive)
+  (let* ((toolbar (specifier-instance default-toolbar))
+	 (index (- (count-lines (point-min) (point)) 2))
+	 (item (nth index toolbar)))
+    (if (eq (1+ index) (length toolbar))
+	(error "Already at the bottom of the toolbar."))
+    (if (eq index 0)
+	(setq toolbar (cdr toolbar))
+      (setcdr (nthcdr (1- index) toolbar)
+	      (nthcdr (1+ index) toolbar)))
+    (setcdr (nthcdr index toolbar)
+	    (cons item (nthcdr (1+ index) toolbar)))
+    (set-specifier default-toolbar toolbar)
+    (edit-toolbar-list)
+    (forward-line (+ index 3))))
+
+(defun edit-toolbar-up ()
+  "Move the current toolbar button up (left) one position."
+  (interactive)
+  (let* ((toolbar (specifier-instance default-toolbar))
+	 (index (- (count-lines (point-min) (point)) 2))
+	 (item (nth index toolbar)))
+    (if (eq index 0)
+	(error "Already at the top of the toolbar."))
+    (setcdr (nthcdr (1- index) toolbar)
+	    (nthcdr (1+ index) toolbar))
+    (if (eq index 1)
+	(setq toolbar (cons item toolbar))
+      (setcdr (nthcdr (- index 2) toolbar)
+	      (cons item (nthcdr (- index 1) toolbar))))
+    (set-specifier default-toolbar toolbar)
+    (edit-toolbar-list)
+    (forward-line (+ index 1))))
+
+(defun edit-toolbar-kill ()
+  "Remove the current toolbar button."
+  (interactive)
+  (let* ((toolbar (specifier-instance default-toolbar))
+	 (index (- (count-lines (point-min) (point)) 2))
+	 (item (nth index toolbar)))
+    (if (eq index 0)
+	(setq toolbar (cdr toolbar))
+      (setcdr (nthcdr (1- index) toolbar)
+	      (nthcdr (1+ index) toolbar)))
+    (set-specifier default-toolbar toolbar)
+    (edit-toolbar-list)
+    (forward-line (+ index 2))))
+
+(defun edit-toolbar-insert-item (item)
+  (let ((line-format "%-30s %s\n")
+	icon function help)
+    (if (eq item 'header)
+	(progn
+	  (setq function "Function"
+		help "Help String")
+	  (insert-face "Icon\t" 'bold)
+	  (insert-face (format line-format function help) 'bold))
+      (cond ((or (eq (aref item 0) :style)
+		 (eq (aref item 0) :size))
+	     (setq icon nil
+		   function "----------------------------------------"
+		   help ""))
+	    (t
+	     (setq icon (if (listp (aref item 0))
+			    (car (aref item 0))
+			  (car (symbol-value (aref item 0))))
+		   function (aref item 1)
+		   help (aref item 3))))
+      (let ((st (point))
+	    (fn #'(lambda (str callback data)
+		    (let ((st1 (point)))
+		      (insert str)
+		      (add-list-mode-item st1 (point) nil callback data)))))
+	(insert "\t")
+	(funcall fn (format line-format function help) nil item)
+	(set-extent-begin-glyph (make-extent st (point)) icon)))))
+
+(defun edit-toolbar-create-button-alist ()
+  (let ((button-alist nil)
+	(buttons (specifier-instance default-toolbar)))
+    (while buttons
+      (setq button-alist
+	    (cons (cons (symbol-name (aref (car buttons) 1)) (car buttons))
+		  button-alist))
+      (setq buttons (cdr buttons)))
+    button-alist))
+
+(defvar edit-toolbar-button-alist (edit-toolbar-create-button-alist))
+
+(defun edit-toolbar-add-item (item)
+  "Add a toolbar item ITEM at the current location."
+  (let* ((toolbar (specifier-instance default-toolbar))
+	 (index (- (count-lines (point-min) (point)) 2)))
+    (if (eq index 0)
+	(setq toolbar (cons item toolbar))
+      (setcdr (nthcdr (- index 1) toolbar)
+	      (cons item (nthcdr index toolbar))))
+    (set-specifier default-toolbar toolbar)
+    (edit-toolbar-list)
+    (forward-line (+ index 2))))
+
+;(defun edit-toolbar-check-for-save ()
+;  (if (not (buffer-modified-p))
+;      ()
+;    (if (yes-or-no-p-maybe-dialog-box "
+
+(defun edit-toolbar-restore ()
+  "Restore the default toolbar."
+  (interactive)
+;  (edit-toolbar-check-for-save)
+  (set-specifier default-toolbar edit-toolbar-default-toolbar)
+  (edit-toolbar-list)
+  (set-buffer-modified-p nil))
+  
+(defun edit-toolbar-add-separator-2D-narrow ()
+  "Add a narrow 2D separator at the current position."
+  (interactive)
+  (edit-toolbar-add-item [:style 2D]))
+
+(defun edit-toolbar-add-separator-3D-narrow ()
+  "Add a narrow 3D separator at the current position."
+  (interactive)
+  (edit-toolbar-add-item [:style 3D]))
+
+(defun edit-toolbar-add-separator-2D-wide ()
+  "Add a wide 2D separator at the current position."
+  (interactive)
+  (edit-toolbar-add-item [:style 2D :size 30]))
+
+(defun edit-toolbar-add-separator-3D-wide ()
+  "Add a wide 3D separator at the current position."
+  (interactive)
+  (edit-toolbar-add-item [:style 3D :size 30]))
+
+(defun edit-toolbar-add-button ()
+  "Add a new toolbar item at the current position.
+Completion is available to the known toolbar buttons."
+  (interactive)
+  (let ((button (completing-read
+		 "New Toolbar Button (RET to create a new button): "
+		 edit-toolbar-button-alist nil t)))
+    (if (string-equal button "")
+	(let ((prompts '("UP glyph for button: "
+			 "DOWN glyph (RET for no glyph): "
+			 "DISABLED glyph (RET for no glyph): "
+			 "UP CAPTIONED glyph (RET for no glyph): "
+			 "DOWN CAPTIONED glyph (RET for no glyph): "
+			 "DISABLED CAPTIONED glyph (RET for no glyph): "))
+	      (glyphs nil)
+	      (count 0))
+	  (let ((glyph-file (read-file-name (car prompts) nil "")))
+	    (if (string-equal glyph-file "")
+		(error "You must specify at least the UP glyph.")
+	      (setq glyphs (list (make-glyph glyph-file)))
+	      (setq prompts (cdr prompts))))
+	  (while prompts
+	    (let ((glyph-file (read-file-name (car prompts) nil "")))
+	      (if (not (string-equal glyph-file ""))
+		  (setq glyphs
+			(append glyphs (list (make-glyph glyph-file))))))
+	    (setq prompts (cdr prompts)))
+	  (let ((func (read-string "Function to call: "))
+		(help (read-string "Help String: ")))
+	    (setq new-button (vector glyphs (intern func) t help))))
+      (let ((match (assoc button edit-toolbar-button-alist)))
+	(if match
+	    (setq new-button (cdr match))
+	  (error "Can't find button %s" button))))
+    (edit-toolbar-add-item new-button)))
+
+(defun edit-toolbar-prompt-for-initialization ()
+  (popup-dialog-box
+   '("Edit Toolbar has created the file ~/.xemacs/.toolbar
+
+In order for your changes to take effect the next time
+you start XEmacs, you need to add the following line
+to the end of your .emacs file:
+
+    (load \"~/.xemacs/.toolbar\")
+
+Alternatively, I can do this for you now."
+     ["Yes, please\nadd the line\nof code for me." edit-toolbar-add-initialization t]
+     nil
+     ["No thanks,\nI'll take care\nof it myself." ignore t])))
+
+(defun edit-toolbar-add-initialization ()
+  "Add a line to the end of the user's init file for edit-toolbar use."
+  (interactive)
+  (set-buffer (find-file-noselect user-init-file))
+  (goto-char (point-max))
+  (insert "
+(if (and (featurep 'toolbar)
+	 (fboundp 'console-on-window-system-p)
+	 (console-on-window-system-p)
+	 (file-exists-p \"" edit-toolbar-file-name "\"))
+    (load-file (expand-file-name \"" edit-toolbar-file-name "\")))
+")
+  (save-buffer))
+
+(defun edit-toolbar-save ()
+  "Save the current toolbar in the file specified by edit-toolbar-file-name."
+  (interactive)
+  (save-excursion
+    (let* ((exists (file-exists-p edit-toolbar-file-name))
+	   (buf (find-file-noselect edit-toolbar-file-name))
+	   (standard-output buf))
+      (set-buffer buf)
+      (erase-buffer)
+      (insert "(set-specifier default-toolbar '")
+      (prin1 (specifier-instance default-toolbar))
+      (insert ")")
+      (save-buffer)
+      (kill-buffer (current-buffer))
+      (or exists (edit-toolbar-prompt-for-initialization))))
+  (set-buffer-modified-p nil))
+
+(provide 'edit-toolbar)
+
+;;; edit-toolbar.el ends here
--- a/lisp/utils/edmacro.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/utils/edmacro.el	Mon Aug 13 09:49:09 2007 +0200
@@ -5,7 +5,7 @@
 ;; Author: Dave Gillespie <daveg@synaptics.com>
 ;;         Hrvoje Niksic <hniksic@srce.hr>  -- XEmacs port
 ;; Maintainer: Hrvoje Niksic <hniksic@srce.hr>
-;; Version: 3.16
+;; Version: 3.17
 ;; Keywords: abbrev
 
 ;; This file is part of XEmacs.
@@ -757,42 +757,6 @@
 	     (and macro (if verbose "\n" " ")))))))
     res))
 
-
-;;; The following probably ought to go in macros.el:
-
-;;;###autoload
-(defun insert-kbd-macro (macroname &optional keys)
-  "Insert in buffer the definition of kbd macro NAME, as Lisp code.
-Optional second arg KEYS means also record the keys it is on
-\(this is the prefix argument, when calling interactively).
-
-This Lisp code will, when executed, define the kbd macro with the same
-definition it has now.  If you say to record the keys, the Lisp code
-will also rebind those keys to the macro.  Only global key bindings
-are recorded since executing this Lisp code always makes global
-bindings.
-
-To save a kbd macro, visit a file of Lisp code such as your `~/.emacs',
-use this command, and then save the file."
-  (interactive "CInsert kbd macro (name): \nP")
-  (let (definition)
-    (if (string= (symbol-name macroname) "")
-	(progn
-	  (setq definition (format-kbd-macro))
-	  (insert "(setq last-kbd-macro"))
-      (setq definition (format-kbd-macro macroname))
-      (insert (format "(defalias '%s" macroname)))
-    (if (> (length definition) 50)
-	(insert " (read-kbd-macro\n")
-      (insert "\n  (read-kbd-macro "))
-    (prin1 definition (current-buffer))
-    (insert "))\n")
-    (if keys
-	(let ((keys (where-is-internal macroname)))
-	  (while keys
-	    (insert (format "(global-set-key %S '%s)\n" (car keys) macroname))
-	    (pop keys))))))
-
 (provide 'edmacro)
 
 ;;; edmacro.el ends here
--- a/lisp/utils/highlight-headers.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/utils/highlight-headers.el	Mon Aug 13 09:49:09 2007 +0200
@@ -24,7 +24,7 @@
 
 ;;; Synched up with: Not in FSF.
 
-;; This code is shared by RMAIL, VM, and GNUS.
+;; This code is shared by RMAIL and VM.
 ;;
 ;; Faces:
 ;;
@@ -41,29 +41,33 @@
 
 (defgroup highlight-headers nil
   "Fancify rfc822 documents."
-  :group 'faces
   :group 'mail
   :group 'news)
 
+(defgroup highlight-headers-faces nil
+  "Faces of highlighted headers."
+  :group 'highlight-headers
+  :group 'faces)
+
 (defface message-headers '((t (:bold t)))
   "Face used for header part before colon."
-  :group 'highlight-headers)
+  :group 'highlight-headers-faces)
 
 (defface message-header-contents '((t (:italic t)))
   "Face used for header part after colon."
-  :group 'highlight-headers)
+  :group 'highlight-headers-faces)
 
 (defface message-highlighted-header-contents '((t (:italic t :bold t)))
   "Face used for contents of \"special\" headers."
-  :group 'highlight-headers)
+  :group 'highlight-headers-faces)
 
 (defface message-cited-text '((t (:italic t)))
   "Face used for cited text."
-  :group 'highlight-headers)
+  :group 'highlight-headers-faces)
 
 (defface x-face '((t (:background "white" :foreground "black")))
   "Face used for X-Face icon."
-  :group 'highlight-headers)
+  :group 'highlight-headers-faces)
 
 ;;(condition-case nil
 ;;    (face-name 'message-addresses)
@@ -76,12 +80,14 @@
 ;;			       (face-underline-p
 ;;				'message-highlighted-header-contents))))))
 
-(defvar highlight-headers-regexp "Subject[ \t]*:"
+(defcustom highlight-headers-regexp "Subject[ \t]*:"
   "*The headers whose contents should be emphasized more.
 The contents of these headers will be displayed in the face 
-`message-highlighted-header-contents' instead of `message-header-contents'.")
+`message-highlighted-header-contents' instead of `message-header-contents'."
+  :type 'regexp
+  :group 'highlight-headers)
 
-(defvar highlight-headers-citation-regexp
+(defcustom highlight-headers-citation-regexp
   (concat "^\\("
 	  (mapconcat 'identity
 	   '("[ \t]*[a-zA-Z0-9_]+>+"	; supercite
@@ -92,43 +98,58 @@
 	  "\\)[ \t]*")
   "*The pattern to match cited text.
 Text in the body of a message which matches this will be displayed in
-the face `message-cited-text'.")
+the face `message-cited-text'."
+  :type 'regexp
+  :group 'highlight-headers)
 
-(defvar highlight-headers-citation-header-regexp
+(defcustom highlight-headers-citation-header-regexp
   (concat "^In article\\|^In message\\|"
 	  "^[^ \t].*\\(writes\\|wrote\\|said\\):\n"
 	  (substring highlight-headers-citation-regexp 1))
   "*The pattern to match the prolog of a cited block.
 Text in the body of a message which matches this will be displayed in
-the `message-headers' face.")
+the `message-headers' face."
+  :type 'regexp
+  :group 'highlight-headers)
 
-(defvar highlight-headers-highlight-citation-too nil
+(defcustom highlight-headers-highlight-citation-too nil
   "*Whether the whole citation line should go in the `mesage-cited-text' face.
 If nil, the text matched by `highlight-headers-citation-regexp' is in the
-default face, and the remainder of the line is in the message-cited-text face.")
+default face, and the remainder of the line is in the message-cited-text face."
+  :type 'boolean
+  :group 'highlight-headers)
 
-(defvar highlight-headers-max-message-size 10000
+(defcustom highlight-headers-max-message-size 10000
   "*If the message body is larger than this many chars, don't highlight it.
 This is to prevent us from wasting time trying to fontify things like
 uuencoded files and large digests.  If this is nil, all messages will
-be highlighted.")
+be highlighted."
+  :type '(choice integer
+		 (const :tag "Highlight All" nil))
+  :group 'highlight-headers)
 
-(defvar highlight-headers-hack-x-face-p (featurep 'xface)
+(defcustom highlight-headers-hack-x-face-p (featurep 'xface)
   "*If true, then the bitmap in an X-Face header will be displayed
 in the buffer.  This assumes you have the `uncompface' and `icontopbm'
-programs on your path.")
+programs on your path."
+  :type 'boolean
+  :group 'highlight-headers)
 
-(defvar highlight-headers-convert-quietly nil
+(defcustom highlight-headers-convert-quietly nil
   "*Non-nil inhibits the message that is normally displayed when external
 filters are used to convert an X-Face header.  This has no effect if
-XEmacs is compiled with internal support for x-faces.")
+XEmacs is compiled with internal support for x-faces."
+  :type 'boolean
+  :group 'highlight-headers)
 
-(defvar highlight-headers-invert-x-face-data nil 
+(defcustom highlight-headers-invert-x-face-data nil 
   "*If true, causes the foreground and background bits in an X-Face
 header to be flipped before the image is displayed. If you use a
 light foreground color on a dark background color, you probably want
 to set this to t. This assumes that you have the `pnminvert' program
-on your path.  This doesn't presently work with internal xface support.")
+on your path.  This doesn't presently work with internal xface support."
+  :type 'boolean
+  :group 'highlight-headers)
 
 
 ;;;###autoload
@@ -428,8 +449,13 @@
 ;;; "The Internet's new BBS!" -Boardwatch Magazine
 ;;; URL support by jwz@netscape.com
 
-(defvar highlight-headers-mark-urls (string-match "XEmacs" emacs-version)
-  "*Whether to make URLs clickable in message bodies.")
+(defcustom highlight-headers-mark-urls (string-match "XEmacs" emacs-version)
+  "*Whether to make URLs clickable in message bodies."
+  :type 'boolean
+  :group 'highlight-headers)
+
+;; Uh, these should really use browse-url.  They are too lame to be
+;; customized.
 
 (defvar highlight-headers-follow-url-function 'w3-fetch
   "The function to invoke to follow a URL.
--- a/lisp/utils/ph.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/utils/ph.el	Mon Aug 13 09:49:09 2007 +0200
@@ -5,7 +5,7 @@
 ;; Author: Oscar Figueiredo <Oscar.Figueiredo@di.epfl.ch>
 ;; Maintainer: Oscar Figueiredo <Oscar.Figueiredo@di.epfl.ch>
 ;; Created: May 1997
-;; Version: 2.1
+;; Version: 2.6
 ;; Keywords: help
 
 ;; This file is part of XEmacs
@@ -46,6 +46,9 @@
 ;;                       '(define-key message-mode-map [(control ?c) (tab)] 'ph-expand-inline))
 ;;      (eval-after-load "mail"
 ;;                       '(define-key mail-mode-map [(control ?c) (tab)] 'ph-expand-inline))
+;;    See the info file for details
+
+;;    This package runs under XEmacs 19.15 or 20 and under Emacs 19.34 and above
 
 ;;; Usage:
 ;;    - Provided you did the installation as proposed in the above section, 
@@ -56,12 +59,13 @@
 ;;    - M-x ph-customize to customize inline expansion and other features to
 ;;      your needs.
 ;;    - Look for the Ph submenu in the Tools menu for more.
+;;    See the info file for details.
 
 ;;; Code:
 
-(eval-when-compile
-  (require 'wid-edit))
+(require 'wid-edit)
 (require 'custom)
+
 (if (not (fboundp 'make-overlay))
     (require 'overlay))
 (if (locate-library "timer")
@@ -69,6 +73,7 @@
 
 (autoload 'custom-menu-create "cus-edit")
 (autoload 'bbdb-create-internal "bbdb-com")
+(autoload 'bbdb-parse-phone-number "bbdb-com")
 (autoload 'bbdb-display-records "bbdb")
 
 ;;{{{      Package customization variables
@@ -173,22 +178,13 @@
   :group 'ph)
 
 (defcustom ph-fieldname-formstring-alist '((url . "URL")
-					   (unix_gid . "Unix GID")
-					   (unix_uid . "Unix UID")
-					   (unit_code . "Unit Code")
-					   (department_code . "Department Code")
-					   (high_school . "High School")
-					   (home_phone . "Home Phone")
-					   (office_phone . "Office Phone")
 					   (callsign . "HAM Call Sign")
-					   (office_address . "Office Address")
-					   (office_location . "Office Location")
 					   (id . "ID")
 					   (email . "E-Mail")
 					   (firstname . "First Name"))
   "*A mapping of CCSO database field names onto prompt strings used in query/response forms.
-Prompt strings for fields that are not in this are derived by capitalizing
-the field name."
+Prompt strings for fields that are not in this are derived by splitting the field name
+at `_' signs and capitalizing the individual words."
   :tag   "Mapping of Field Names onto Prompt Strings"
   :type  '(repeat (cons :tag "Field"
 			(symbol :tag "Name")
@@ -201,38 +197,41 @@
 				      (phone . ((ph-bbdbify-phone phone "Phone")
 						(ph-bbdbify-phone office_phone "Office Phone"))))
   "*A mapping from BBDB to PH/QI fields.
-This is a list of cons cells (BBDB-FIELD . SPEC-OR-LIST) where BBDB-FIELD
-is the name of a field that must be defined in your BBDB (standard field
-names are `name', `company', `net', `phone', `address' and `notes').
-SPEC-OR-LIST is either a single SPEC or a list of SPECs. Lists of specs are
-valid only for the `phone' and `address' BBDB fields. 
-SPECs are sexps which are evaluated:
-  -a string evaluates to itself
-  -a symbol evaluates to the symbol value. Symbols naming PH/QI fields
-   present in the record evaluate to the value of the field in the record
-  -a form is evaluated as a function. The argument list may contain PH/QI 
-   field names which eval to the corresponding values in the record. The form
-   evaluation should return something appropriate for the particular 
-   BBDB-FIELD (see bbdb-create-internal). ph-bbdbify-phone and 
-   ph-bbdbify-address are provided as convenience functions to parse phones
-   and addresses."
+This is a list of cons cells (BBDB-FIELD . SPEC-OR-LIST) where
+BBDB-FIELD is the name of a field that must be defined in your BBDB
+environment (standard field names are `name', `company', `net', `phone',
+`address' and `notes').  SPEC-OR-LIST is either a single SPEC or a list
+of SPECs. Lists of specs are valid only for the `phone' and `address'
+BBDB fields.  SPECs are sexps which are evaluated:
+  a string evaluates to itself
+  a symbol evaluates to the symbol value. Symbols naming PH/QI fields
+    present in the record evaluate to the value of the field in the record
+  a form is evaluated as a function. The argument list may contain PH/QI 
+    field names which eval to the corresponding values in the
+    record. The form evaluation should return something appropriate for
+    the particular BBDB-FIELD (see bbdb-create-internal).
+    ph-bbdbify-phone and ph-bbdbify-address are provided as convenience
+    functions to parse phones and addresses."
   :tag "BBDB to CCSO Field Name Mapping"
   :type '(repeat (cons :tag "Field Name"
 		       (symbol :tag "BBDB Field")
 		       (sexp :tag "Conversion Spec")))
   :group 'ph)
 
-(defcustom ph-options-file "~/.emacs"
-  "*A file where the servers hotlist is stored. 
-It should be loaded automatically at startup so ~/.emacs is a reasonable
-choice."
+(defcustom ph-options-file "~/.ph-options"
+  "*A file where the `servers' hotlist (and maybe other variables in the future) is stored."
   :type '(file :Tag "File Name:"))
 
+(defcustom ph-mode-hook nil
+  "*A list of functions called when ph-mode is entered in buffers displaying query results."
+  :type '(repeat (sexp :tag "Hook")))
+
 ;;}}}
 
 
 ;;{{{      Internal cooking
 
+
 (defconst ph-xemacs-p (string-match "XEmacs" emacs-version))
 (defconst ph-fsfemacs-p (not ph-xemacs-p))
 (defconst ph-xemacs-mule-p (and ph-xemacs-p
@@ -249,9 +248,12 @@
 (defvar ph-process-buffer nil)
 (defvar ph-read-point)
 
-
-
-
+;;; Load the options file
+(if (and (and (locate-library ph-options-file)
+	      (message ""))		; Remove modeline message
+	 (not (featurep 'ph-options-file)))
+    (load ph-options-file))
+	 
 ;;; FSF Emacs does not provide that one
 (if (not (fboundp 'split-string))
     (defun split-string (string pattern)
@@ -263,10 +265,26 @@
 	(nreverse (cons (substring string start) parts))
 	)))
 
+(defun ph-mode ()
+  "Major mode used in buffers displaying the results of PH queries.
+There is no sense in calling this command from a buffer other than
+one containing the results of a PH query.
+
+Available bindings:
+\\{ph-mode-map}"
+  (interactive)
+  (kill-all-local-variables)
+  (setq major-mode 'ph-mode)
+  (setq mode-name "PH")
+  (use-local-map ph-mode-map)
+  (setq mode-popup-menu (ph-menu))
+  (run-hooks 'ph-mode-hook)
+)
+
 (defun ph-display-records (records &optional raw-field-names)
   "Display the record list RECORDS in a formatted buffer. 
-If RAW-FIELD-NAMES is non nil, no translation to form strings or 
-capitalization is done on field names."
+If RAW-FIELD-NAMES is non-nil, field names will be formatted to look
+more attractive byi capitalizing and forming strings."
   (let ((buffer (get-buffer-create "*PH Query Results*"))
 	inhibit-read-only
 	precords
@@ -277,7 +295,6 @@
     (setq buffer-read-only t)
     (setq inhibit-read-only t)
     (erase-buffer)
-    (kill-all-local-variables)
     (insert "PH Query Result\n")
     (insert "===============\n\n\n")
     (if (null records)
@@ -297,7 +314,12 @@
 					 (symbol-name (car field))
 				       (or (and (assq (car field) ph-fieldname-formstring-alist)
 						(cdr (assq (car field) ph-fieldname-formstring-alist)))
-					   (capitalize (symbol-name (car field))))))
+					   (capitalize (mapconcat '(lambda (char)
+								     (if (eq char ?_)
+									 " "
+								       (char-to-string char)))
+								  (symbol-name (car field))
+								  "")))))
 		    (if (> (length field-name) width)
 			(setq width (length field-name)))
 		    (cons field-name (cdr field))))
@@ -337,7 +359,7 @@
 		   :notify (lambda (&rest ignore)
 			     (kill-this-buffer))
 		   "Quit")
-    (use-local-map widget-keymap)
+    (ph-mode)
     (widget-setup)      
     )
 )
@@ -680,7 +702,7 @@
 
 (defun ph-bbdbify-address (addr location)
   "Parse ADDR into a vector compatible with bbdb-create-internal.
-ADR should be an address string of no more than four lines or a
+ADDR should be an address string of no more than four lines or a
 list of lines. 
 The last line is searched for the zip code, city and state name.
 LOCATION is used as the address location for bbdb"
@@ -715,14 +737,24 @@
 PHONE is either a string supposedly containing a phone number or
 a list of such strings which are concatenated.
 LOCATION is used as the phone location for bbdb"
-  (let ((phone-string (cond
-		       ((stringp phone)
-			phone)
-		       ((listp phone)
-			(mapconcat 'identity phone ", "))
-		       (t
-			(error "Invalid phone specification. Cannot create bbdb record")))))
-    (vector location phone-string)))
+  (cond 
+   ((stringp phone)
+    (let (phone-list)
+      (condition-case err
+	  (setq phone-list (bbdb-parse-phone-number phone))
+	(error
+	 (if (string= "phone number unparsable." (cadr err))
+	     (if (not (y-or-n-p (format "BBDB claims %S to be unparsable. Insert it unparsed ? " phone)))
+		 (error "phone number unparsable.")
+	       (setq phone-list (list (bbdb-string-trim phone))))
+	   (signal (car err) (cdr err)))))
+      (if (= 3 (length phone-list))
+	  (setq phone-list (append phone-list '(nil))))
+      (apply 'vector location phone-list)))
+   ((listp phone)
+    (vector location (mapconcat 'identity phone ", ")))
+   (t
+    (error "Invalid phone specification. Cannot create bbdb record"))))
 			
 ;;}}}				 
 
@@ -933,48 +965,61 @@
   )
 
 (defun ph-bookmark-server (server)
-  "Add SERVER to the servers' hotlist."
+  "Add SERVER to the `servers' hotlist."
   (interactive "sServer: ")
   (if (member server ph-server-hotlist)
       (error "%s is already in the hotlist" server)
     (setq ph-server-hotlist (cons server ph-server-hotlist))
     (ph-install-menu)
-    (ph-save-hotlist)))
+    (ph-save-options)))
 
 (defun ph-bookmark-current-server ()
-  "Add current server to the servers' hotlist."
+  "Add current server to the `servers' hotlist."
   (interactive)
   (ph-bookmark-server ph-server))
 
-(defun ph-save-hotlist ()
-  "Save the servers hotlist to ph-options-file"
+(defun ph-save-options ()
+  "Save options (essentially the hotlist) to ph-options-file"
+  (interactive)
   (save-excursion
-    (set-buffer (find-file-noselect ph-options-file))
+    (set-buffer (find-file-noselect ph-options-file t))
     ;; delete the previous setq
-    (catch 'found
-      (while t
-	(let ((sexp (condition-case nil
-			(read (current-buffer))
-		      (end-of-file (throw 'found nil)))))
-	  (if (and (listp sexp)
-		   (eq (car sexp)  'setq)
-		   (eq (cadr sexp) 'ph-server-hotlist))
-	      (progn
-		(delete-region (save-excursion
-				 (backward-sexp)
-				 (point))
-			       (point))
-		(throw 'found t))))))
-    (let ((standard-output (current-buffer)))
+    (let ((standard-output (current-buffer))
+	  provide-p
+	  setq-p)
+      (catch 'found
+	(while t
+	  (let ((sexp (condition-case nil
+			  (read (current-buffer))
+			(end-of-file (throw 'found nil)))))
+	    (if (listp sexp)
+		(progn
+		  (if (and (eq (car sexp)  'setq)
+			   (eq (cadr sexp) 'ph-server-hotlist))
+		      (progn 
+			(delete-region (save-excursion
+					 (backward-sexp)
+					 (point))
+				       (point))
+			(setq setq-p t)))
+		  (if (and (eq (car sexp)  'provide)
+			   (equal (cadr sexp) '(quote ph-options-file)))
+		      (setq provide-p t))
+		  (if (and provide-p
+			   setq-p)
+		      (throw 'found t)))))))
+      (if (eq (point-min) (point-max))
+	  (princ ";; This file was automatically generated by ph.el\n\n"))
       (if (not (bolp))
 	  (princ "\n"))
       (princ "(setq ph-server-hotlist '")
       (prin1 ph-server-hotlist)
-      (princ ")\n"))
-    (save-buffer))
+      (princ ")\n")
+      (if (not provide-p)
+	  (princ "(provide 'ph-options-file)\n"))
+    (save-buffer)))
 )
 
-
 (defun ph-insert-record-at-point-into-bbdb ()
   "Insert record at point into the BBDB database.
 This function can only be called from a PH/QI query result buffer."
@@ -984,20 +1029,61 @@
     (if (null record)
 	(error "Point is not over a record.")
       (ph-create-bbdb-record record))))
-    
+
+(defun ph-try-bbdb-insert ()
+  "Call ph-insert-record-at-point-into-bbdb if on a record"
+  (interactive)
+  (and (or (featurep 'bbdb)
+	   (prog1 (locate-library "bbdb") (message "")))
+       (overlays-at (point))
+       (overlay-get (car (overlays-at (point))) 'ph-record)
+       (ph-insert-record-at-point-into-bbdb)))
+
+(defun ph-move-to-next-record ()
+  "Move to next record in a buffer displaying ph query results"
+  (interactive)
+  (if (not (eq major-mode 'ph-mode))
+      (error "Not in a PH buffer")
+    (let ((pt (next-overlay-change (point))))
+      (if (< pt (point-max))
+	  (goto-char (1+ pt))
+	(error "No more records after point")))))
+
+(defun ph-move-to-previous-record ()
+  "Move to next record in a buffer displaying ph query results"
+  (interactive)
+  (if (not (eq major-mode 'ph-mode))
+      (error "Not in a PH buffer")
+    (let ((pt (previous-overlay-change (point))))
+      (if (> pt (point-min))
+	  (goto-char pt)
+	(error "No more records before point")))))
+
+
+      
 ;;}}}
 
-;;{{{      Menu interface
+;;{{{      Menus an keymaps
 
 (require 'easymenu)
 
+(defvar ph-mode-map (let ((map (make-sparse-keymap)))
+		      (define-key map "q" 'kill-this-buffer)
+		      (define-key map "x" 'kill-this-buffer)
+		      (define-key map "f" 'ph-query-form)
+		      (define-key map "b" 'ph-try-bbdb-insert)
+		      (define-key map "n" 'ph-move-to-next-record)
+		      (define-key map "p" 'ph-move-to-previous-record)
+		      map))
+(set-keymap-parent ph-mode-map widget-keymap)
+
 (defconst ph-tail-menu 
   `(["---" nil nil]
     ["Query Form" ph-query-form t]
     ["Expand Inline" ph-expand-inline t]
     ["Insert Record into BBDB" ph-insert-record-at-point-into-bbdb 
      (and (or (featurep 'bbdb)
-	      (locate-library 'bbdb))
+	      (prog1 (locate-library "bbdb") (message "")))
 	  (overlays-at (point))
 	  (overlay-get (car (overlays-at (point))) 'ph-record))]
     ["---" nil nil]
@@ -1036,6 +1122,7 @@
    (ph-xemacs-p
     (add-submenu '("Tools") (ph-menu)))
    (ph-fsfemacs-p
+    (easy-menu-define ph-menu-map ph-mode-map "PH Menu" (ph-menu))
     (define-key 
       global-map
       [menu-bar tools ph] 
--- a/lisp/utils/savehist.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/utils/savehist.el	Mon Aug 13 09:49:09 2007 +0200
@@ -95,6 +95,10 @@
     ;; Extended commands
     read-command-history
 
+    ;; Info, lookup, and bookmark historys
+    Info-minibuffer-history
+    Manual-page-minibuffer-history
+
     ;; GNU Emacs-specific:
     ;; Extended commands
     extended-command-history)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/utils/toolbar-utils.el	Mon Aug 13 09:49:09 2007 +0200
@@ -0,0 +1,90 @@
+;;; toolbar-utils.el --- Toolbar utility functions for XEmacs
+
+;; Copyright (C) 1997 by Free Software Foundation, Inc.
+
+;; Author: Jeff Miller <jmiller@smart.net>
+;; Keywords: extensions
+
+;; This file is part of XEmacs.
+
+;; XEmacs is free software; you can redistribute it and/or modify it
+;; under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2, or (at your option)
+;; any later version.
+
+;; XEmacs is distributed in the hope that it will be useful, but
+;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+;; General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with XEmacs; see the file COPYING.  If not, write to the Free
+;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+;; 02111-1307, USA.
+
+;;; Synched up with: Not in FSF
+
+;;; Commentary:
+
+;; Based largely on edit-toolbar.el by Peter D. Pezaris <pez@dwwc.com>
+
+;;; Code:
+
+;;;###autoload
+(defun restore-initial-toolbar ()
+  "Restores the default toolbar defined by initial-toolbar-spec."
+  (interactive)
+  (set-specifier default-toolbar initial-toolbar-spec)
+  )
+
+;;;###autoload
+(defun toolbar-add-item (item &optional index &optional toolbar-spec)
+  "Add a toolbar item ITEM at the first location of the toolbar specifier. 
+Optionally, can specify an INDEX position to insert the ITEM.  The default is
+to use default-toolbar, but a different specifier can by specified with 
+TOOLBAR-SPEC."
+  (if (eq  toolbar-spec nil )
+      (setq toolbar-spec default-toolbar))
+  (let* ((toolbar (specifier-instance toolbar-spec)))
+    (if(or (eq index nil) (eq index 0))
+	(setq toolbar (cons item toolbar))
+      (setcdr (nthcdr (- index 1) toolbar)
+	      (cons item (nthcdr index toolbar))))
+    (set-specifier toolbar-spec toolbar)
+    ))
+
+
+;;;###autoload
+(defun toolbar-kill-item-pos ( index &optional toolbar-spec) 
+  "Remove a toolbar item ITEM at the first location of the toolbar specifier.  
+Optionally, can specify an INDEX position where to remove the ITEM.  The 
+default is to use default-toolbar, but a different specifier can by 
+specified with TOOLBAR-SPEC."
+  (if (eq toolbar-spec nil ) 
+      (setq toolbar-spec default-toolbar)) 
+  (let* ((toolbar (specifier-instance toolbar-spec)) 
+	 (item (nth index toolbar))) 
+    (if (eq index 0) 
+	(setq toolbar(cdr toolbar)) 
+      (setcdr (nthcdr (1- index) toolbar) 
+	      (nthcdr (1+ index) toolbar))) 
+    (set-specifier toolbar-spec toolbar) 
+    ))
+
+;;;###autoload
+(defun toolbar-kill-item ( item &optional toolbar-spec)
+  "Remove a toolbar item ITEM at the first location of the toolbar specifier.  
+Optionally, can specify an ITEM to remove.  The ITEM must be in form of a 
+vector.  The default is to use default-toolbar, but a different specifier 
+can by specified with TOOLBAR-SPEC."
+  (if (eq  toolbar-spec nil )
+      (setq toolbar-spec default-toolbar))
+	      (let* ((toolbar (specifier-instance toolbar-spec)) )
+    (eval item)
+    (set-specifier toolbar-spec (delete item toolbar))
+    ))
+
+
+(provide 'toolbar-utils)
+
+;;; toolbar-utils.el ends here
--- a/lisp/utils/uniquify.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/utils/uniquify.el	Mon Aug 13 09:49:09 2007 +0200
@@ -83,9 +83,11 @@
 
 ;;; User-visible variables
 
-(defgroup uniquify nil
-  "Unique buffer names dependent on file name"
-  :group 'applications)
+(progn
+  (defgroup uniquify nil
+    "Unique buffer names dependent on file name"
+    :group 'applications)
+  )
 
 
 (defcustom uniquify-buffer-name-style 'post-forward
--- a/lisp/w3/ChangeLog	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/w3/ChangeLog	Mon Aug 13 09:49:09 2007 +0200
@@ -2,6 +2,81 @@
 
 * Makefile (xemacs-w3): Special target for XEmacs Build.
 
+Thu Jul 10 16:40:34 1997  William M. Perry  <wmperry@aventail.com>
+
+* Synch'd up to custom 1.9949 - added the widget and custom manuals to the
+  distribution.
+
+* lisp/Makefile.in: Fixed all makefile rebuilding rules.
+
+* lisp/w3.el (w3-do-setup): Removed w3-widget-global-map stuff, since the
+  new custom and widget library will not need it at all.
+
+Tue Jul  8 06:46:08 1997  William M. Perry  <wmperry@aventail.com>
+
+* lisp/w3-e19.el (w3-mode-version-specifics): Turn back on
+  buffer-access-fontify-functions.  This means that any text you yank out
+  of a Emacs/W3 buffer is guaranteed to be non-read-only.  Unfortunately,
+  this then makes the text in the buffer non-read-only as well. Need to
+  find a way to do something similar for XEmacs.
+
+* lisp/w3-display.el (w3-draw-tree): Make sure everything ends up
+  read-only.
+
+* lisp/w3.el (w3-mode): New variale w3-widget-global-map that inherits
+  from widget-global-map, but overrides return and mouse-button2 to
+  noops.  Removed some modeline cruft.
+
+* lisp/w3-vars.el: Removed old cruft that wasn't executed anymore
+  (widget nav. keybindings, etc.)
+
+* lisp/w3-e19.el (w3-store-in-clipboard): Try to use
+  interprogram-cut-function, as it seems the best way to do this under
+  Emacs 19.
+
+Mon Jul  7 15:50:17 1997  William M. Perry  <wmperry@aventail.com>
+
+* lisp/w3.el (w3-reload-all-files): Brute force approach to making
+  sure all of our source files get reloaded.  Walk through the obarray and
+  make anything called w3-* url-* ssl-* base64-* dsssl-* or mm-* 'unbound'
+  and 'funbound'.  I am a little leery of this, as it could tromp on
+  users' personal variables that start with this, but nobody really uses
+  this very often anyway.  Will post prominent warnings in the docs.
+
+Sun Jul  6 15:24:06 1997  William M. Perry  <wmperry@aventail.com>
+
+* lisp/w3-e19.el (w3-window-size-change-function): New function fit for
+  use on window-size-change-functions to automatically redraw any visible
+  Emacs/W3 buffers when a frame or window is resized.
+
+* lisp/w3-cus.el (w3-modeline-format): Added 'BAD HTML' indicator to the
+  modeline instead of showing warnings - was a bit too disruptive in
+  casual browsing.
+
+* lisp/w3-menu.el (w3-menu-view-menu): Use it.
+
+* lisp/w3.el (w3-display-errors): New function to display the parsing
+  errors from an HTML page.
+
+* lisp/w3-parse.el: New way of storing warning messages during the parsing
+  phase so they don't jump out at the user immediately.  Much less
+  obtrusive.
+
+Sat Jul  5 15:52:06 1997  William M. Perry  <wmperry@aventail.com>
+
+* lisp/w3-display.el: Now keeps a stack of list-style types, so setting
+  the list-style on something like 'ol' or 'ul' will do the right thing.
+
+* lisp/url-news.el (url-news-use-article-mode): New variable for whether
+  to use Gnus' article-mode to display news articles.
+
+* lisp/w3.el (w3-internal-handle-preview): This will now work even if the
+  buffer being previewed isn't associated with a file.
+
+Thu Jul  3 15:51:56 1997  William M. Perry  <wmperry@aventail.com>
+
+* lisp/w3-display.el: Better version of char-before for Emacs 19
+
 Wed Jul  2 10:39:30 1997  William M. Perry  <wmperry@aventail.com>
 
 * Emacs/W3 3.0.93 released
--- a/lisp/w3/custom-load.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/w3/custom-load.el	Mon Aug 13 09:49:09 2007 +0200
@@ -1,3 +1,4 @@
+(custom-put 'url-news 'custom-loads '("url-news"))
 (custom-put 'w3-scripting 'custom-loads '("w3-script"))
 (custom-put 'w3-hooks 'custom-loads '("w3-cus"))
 (custom-put 'w3-display 'custom-loads '("w3-cus"))
@@ -13,6 +14,6 @@
 (custom-put 'url-history 'custom-loads '("url-vars"))
 (custom-put 'url-cache 'custom-loads '("url-cache" "url-vars"))
 (custom-put 'url-file 'custom-loads '("url-cache" "url-vars"))
-(custom-put 'url 'custom-loads '("url-gw" "url-irc" "url-vars" "url"))
+(custom-put 'url 'custom-loads '("url-gw" "url-irc" "url-vars" "url" "url-news"))
 (custom-put 'url-gateway 'custom-loads '("url-gw"))
 (custom-put 'ssl 'custom-loads '("ssl"))
--- a/lisp/w3/url-news.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/w3/url-news.el	Mon Aug 13 09:49:09 2007 +0200
@@ -1,7 +1,7 @@
 ;;; url-news.el --- News Uniform Resource Locator retrieval code
 ;; Author: wmperry
-;; Created: 1997/02/18 23:35:11
-;; Version: 1.7
+;; Created: 1997/07/05 22:54:24
+;; Version: 1.8
 ;; Keywords: comm, data, processes
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -28,6 +28,15 @@
 (require 'url-vars)
 (require 'url-parse)
 
+(defgroup url-news nil
+  "News related options"
+  :group 'url)
+
+(defcustom url-news-use-article-mode nil
+  "*Whether to use Gnus' article mode for displaying news articles."
+  :type 'boolean
+  :group 'url-news)
+
 (defun url-format-news ()
   (url-clear-tmp-buffer)
   (insert "HTTP/1.0 200 Retrieval OK\r\n"
@@ -43,6 +52,7 @@
 	 (qorg  (if org (url-insert-entities-in-string org) nil))
 	 (typ   (or (cdr (assoc "content-type" url-current-mime-headers))
 		    "text/plain"))
+	 (inhibit-read-only t)
 	 (qgrps (mapcar 'car
 			(url-split
 			 (url-insert-entities-in-string
@@ -63,69 +73,85 @@
     (if (or (not (string-match "text/" typ))
  	    (string-match "text/html" typ))
  	nil				; Let natural content-type take over
-      (insert "<html>\n"
- 	      " <head>\n"
- 	      "  <title>" qsubj "</title>\n"
- 	      "  <link rev=\"made\" href=\"mailto:" qfrom "\">\n"
- 	      " </head>\n"
- 	      " <body>\n"
- 	      "  <div>\n"
- 	      "   <h1 align=center>" qsubj "</h1>\n"
- 	      "   <p role=\"headers\">\n"
- 	      "    <b>From</b>: " qfrom "<br>\n"
- 	      "    <b>Newsgroups</b>: "
- 	      (mapconcat
- 	       (function
- 		(lambda (grp)
- 		  (concat "<a href=\"" grp "\">" grp "</a>"))) qgrps ", ")
- 	      "<br>\n"
- 	      (if org
- 		  (concat
- 		   "    <b>Organization</b>: <i> " qorg "</i> <br>\n")
- 		"")
- 	      "    <b>Date</b>: <date> " date "</date> <br>\n"
- 	      "   </p> <hr>\n"
- 	      (if (null qrefs)
- 		  ""
- 		(concat
- 		 "   <p>References\n"
- 		 "    <ol>\n"
- 		 (mapconcat
- 		  (function
- 		   (lambda (ref)
- 		     (concat "     <li> <a href=\"" ref "\"> " 
- 			     ref "</a></li>\n")))
- 		  qrefs "")
- 		 "    </ol>\n"
-		 "   </p>\n"
- 		 "   <hr>\n"))
- 	      "   <ul plain>\n"
- 	      "    <li><a href=\"newspost:disfunctional\"> "
- 	      "Post to this group </a></li>\n"
- 	      "    <li><a href=\"mailto:" qfrom "\"> Reply to " qfrom
- 	      "</a></li>\n"
- 	      "   </ul>\n"
- 	      "   <hr>"
- 	      "   <pre>\n")
-      (let ((s (buffer-substring (point) (point-max))))
-	(delete-region (point) (point-max))
-	(insert (url-insert-entities-in-string s)))
-      (goto-char (point-max))
-      (setq url-current-mime-type "text/html"
- 	    url-current-mime-viewer (mm-mime-info url-current-mime-type nil 5))
-      (let ((x (assoc "content-type" url-current-mime-headers)))
- 	(if x
- 	    (setcdr x "text/html")
- 	  (setq url-current-mime-headers (cons (cons "content-type"
- 						     "text/html")
- 					       url-current-mime-headers))))
-      (insert "\n"
- 	      "   </pre>\n"
- 	      "  </div>\n"
- 	      " </body>\n"
- 	      "</html>\n"
- 	      "<!-- Automatically generated by URL/" url-version
- 	      "-->"))))
+      (if (and (fboundp 'gnus-article-mode)
+	       url-news-use-article-mode)
+	  (progn
+	    (kill-buffer (current-buffer))
+	    (set-buffer (get-buffer-create "Emacs/W3 News"))
+	    (erase-buffer)
+	    (insert
+	     (save-excursion
+	       (set-buffer nntp-server-buffer)
+	       (save-restriction
+		 (widen)
+		 (buffer-string))))
+	    (gnus-article-mode)
+	    (article-hide-headers 1)
+	    (goto-char (point-min))
+	    (display-buffer (current-buffer)))
+	(insert "<html>\n"
+		" <head>\n"
+		"  <title>" qsubj "</title>\n"
+		"  <link rev=\"made\" href=\"mailto:" qfrom "\">\n"
+		" </head>\n"
+		" <body>\n"
+		"  <div>\n"
+		"   <h1 align=center>" qsubj "</h1>\n"
+		"   <p role=\"headers\">\n"
+		"    <b>From</b>: " qfrom "<br>\n"
+		"    <b>Newsgroups</b>: "
+		(mapconcat
+		 (function
+		  (lambda (grp)
+		    (concat "<a href=\"" grp "\">" grp "</a>"))) qgrps ", ")
+		"<br>\n"
+		(if org
+		    (concat
+		     "    <b>Organization</b>: <i> " qorg "</i> <br>\n")
+		  "")
+		"    <b>Date</b>: <date> " date "</date> <br>\n"
+		"   </p> <hr>\n"
+		(if (null qrefs)
+		    ""
+		  (concat
+		   "   <p>References\n"
+		   "    <ol>\n"
+		   (mapconcat
+		    (function
+		     (lambda (ref)
+		       (concat "     <li> <a href=\"" ref "\"> " 
+			       ref "</a></li>\n")))
+		    qrefs "")
+		   "    </ol>\n"
+		   "   </p>\n"
+		   "   <hr>\n"))
+		"   <ul plain>\n"
+		"    <li><a href=\"newspost:disfunctional\"> "
+		"Post to this group </a></li>\n"
+		"    <li><a href=\"mailto:" qfrom "\"> Reply to " qfrom
+		"</a></li>\n"
+		"   </ul>\n"
+		"   <hr>"
+		"   <pre>\n")
+	(let ((s (buffer-substring (point) (point-max))))
+	  (delete-region (point) (point-max))
+	  (insert (url-insert-entities-in-string s)))
+	(goto-char (point-max))
+	(setq url-current-mime-type "text/html"
+	      url-current-mime-viewer (mm-mime-info url-current-mime-type nil 5))
+	(let ((x (assoc "content-type" url-current-mime-headers)))
+	  (if x
+	      (setcdr x "text/html")
+	    (setq url-current-mime-headers (cons (cons "content-type"
+						       "text/html")
+						 url-current-mime-headers))))
+	(insert "\n"
+		"   </pre>\n"
+		"  </div>\n"
+		" </body>\n"
+		"</html>\n"
+		"<!-- Automatically generated by URL/" url-version
+		"-->")))))
 
 (defun url-check-gnus-version ()
   (require 'nntp)
--- a/lisp/w3/url-vars.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/w3/url-vars.el	Mon Aug 13 09:49:09 2007 +0200
@@ -1,7 +1,7 @@
 ;;; url-vars.el --- Variables for Uniform Resource Locator tool
 ;; Author: wmperry
-;; Created: 1997/07/02 17:41:55
-;; Version: 1.70
+;; Created: 1997/07/12 04:58:35
+;; Version: 1.71
 ;; Keywords: comm, data, processes, hypermedia
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -38,7 +38,7 @@
     (defmacro defcustom (var value doc &rest args) 
       (` (defvar (, var) (, value) (, doc))))))
 
-(defconst url-version (let ((x "p3.0.93"))
+(defconst url-version (let ((x "p3.0.94"))
 			(if (string-match "State: \\([^ \t\n]+\\)" x)
 			    (substring x (match-beginning 1) (match-end 1))
 			  x))
--- a/lisp/w3/w3-cus.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/w3/w3-cus.el	Mon Aug 13 09:49:09 2007 +0200
@@ -1,7 +1,7 @@
 ;;; w3-cus.el --- Customization support for Emacs-W3
 ;; Author: wmperry
-;; Created: 1997/05/28 13:51:24
-;; Version: 1.9
+;; Created: 1997/07/06 22:30:54
+;; Version: 1.10
 ;; Keywords: comm, help, hypermedia
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -346,6 +346,7 @@
 	(40 (-40 "%b"))
 	" "
 	(w3-current-isindex "[Searchable]  ")
+	(w3-current-badhtml "[BAD HTML]  ")
 	"%p" "  " global-mode-string))
   "*The modeline format string when in w3 mode"
   :group 'w3-advanced
--- a/lisp/w3/w3-display.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/w3/w3-display.el	Mon Aug 13 09:49:09 2007 +0200
@@ -1,7 +1,7 @@
 ;;; w3-display.el --- display engine v99999
 ;; Author: wmperry
-;; Created: 1997/07/01 15:54:50
-;; Version: 1.192
+;; Created: 1997/07/08 13:58:52
+;; Version: 1.195
 ;; Keywords: faces, help, hypermedia
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -51,6 +51,7 @@
 (w3-d-s-var-def w3-display-list-stack)
 (w3-d-s-var-def w3-display-form-id)
 (w3-d-s-var-def w3-display-whitespace-stack)
+(w3-d-s-var-def w3-display-liststyle-stack)
 (w3-d-s-var-def w3-display-font-family-stack)
 (w3-d-s-var-def w3-display-font-weight-stack)
 (w3-d-s-var-def w3-display-font-variant-stack)
@@ -316,7 +317,8 @@
 
 
 (if (not (fboundp 'char-before))
-    (fset 'char-before 'preceding-char))
+    (defun char-before (&optional pos)
+      (char-after (1- (or pos (point))))))
 
 (defsubst w3-display-line-break (n)
   (if (or
@@ -488,7 +490,7 @@
       (progn
 	(case (car break-style)
 	  (list-item
-	   (let ((list-style (w3-get-style-info 'list-style-type node))
+	   (let ((list-style (or (car w3-display-liststyle-stack) 'disc))
 		 (list-num (if (car w3-display-list-stack)
 			       (incf (car w3-display-list-stack))
 			     1))
@@ -566,6 +568,11 @@
 			    (car w3-display-whitespace-stack))
 	 w3-display-whitespace-stack)
 	(push
+	 (or (w3-get-attribute 'foobarblatz)
+	     (w3-get-style-info 'list-style-type node
+				(car w3-display-liststyle-stack)))
+	 w3-display-liststyle-stack)
+	(push
 	 (or (w3-get-attribute 'align)
 	     (w3-get-style-info 'text-align node
 				(car w3-display-alignment-stack)))
@@ -575,6 +582,11 @@
 	(w3-display-line-break 0)
 	(w3-display-set-margins)
 	(push
+	 (or (w3-get-attribute 'foobarblatz)
+	     (w3-get-style-info 'list-style-type node
+				(car w3-display-liststyle-stack)))
+	 w3-display-liststyle-stack)
+	(push
 	 (w3-get-style-info 'white-space node
 			    (car w3-display-whitespace-stack))
 	 w3-display-whitespace-stack)
@@ -599,12 +611,14 @@
 	(w3-display-line-break 1)
 	(w3-display-restore-margins)
 	(pop w3-display-whitespace-stack)
+	(pop w3-display-liststyle-stack)
 	(pop w3-display-alignment-stack)
 	(and w3-do-incremental-display (w3-pause)))
        ((line list-item)		; Single line break
 	(w3-display-restore-margins)
 	(w3-display-line-break 0)
 	(pop w3-display-whitespace-stack)
+	(pop w3-display-liststyle-stack)
 	(pop w3-display-alignment-stack))      
        (otherwise			; Assume 'inline' rendering as default
 	nil))
@@ -1684,6 +1698,9 @@
 	  plist (plist-put plist 'maxlength maxlength))
     plist))
 
+(defun w3-resurrect-images ()
+  )
+
 (defun w3-resurrect-hyperlinks ()
   (let ((st (point-min))
 	(inhibit-read-only t)
@@ -2283,8 +2300,11 @@
     (w3-display-node (car tree))
     (setq tree (cdr tree)))
   (w3-display-fix-widgets)
-  (w3-resurrect-hyperlinks)
-  (w3-form-resurrect-widgets))
+  (let ((inhibit-read-only t))
+    (put-text-property (point-min) (point-max) 'read-only t)
+    (w3-resurrect-images)
+    (w3-resurrect-hyperlinks)
+    (w3-form-resurrect-widgets)))
 
 (defun time-display (&optional tree)
   ;; Return the # of seconds it took to draw 'tree'
--- a/lisp/w3/w3-e19.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/w3/w3-e19.el	Mon Aug 13 09:49:09 2007 +0200
@@ -1,7 +1,7 @@
 ;;; w3-e19.el --- Emacs 19.xx specific functions for emacs-w3
 ;; Author: wmperry
-;; Created: 1997/05/10 23:01:41
-;; Version: 1.26
+;; Created: 1997/07/08 14:00:33
+;; Version: 1.28
 ;; Keywords: faces, help, mouse, hypermedia
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -41,8 +41,13 @@
 (defvar w3-e19-hotlist-menu nil "A menu for hotlists.")
 (defvar w3-e19-links-menu nil "A buffer-local menu for hyperlinks.")
 (defvar w3-e19-nav-menu nil "A buffer-local menu for html based <link> tags.")
+(defvar w3-e19-window-width nil)
+
 (mapcar 'make-variable-buffer-local
-	'(w3-e19-hotlist-menu w3-e19-links-menu w3-e19-nav-menu))
+	'(w3-e19-hotlist-menu
+	  w3-e19-window-width
+	  w3-e19-links-menu
+	  w3-e19-nav-menu))
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;; Functions to build menus of urls
@@ -91,23 +96,33 @@
   )
 
 (defun w3-store-in-clipboard (str)
-  "Store string STR in the Xwindows clipboard"
-  (case (device-type)
-    (x (x-select-text str))
-    (pm (pm-put-clipboard str))
-    (ns (ns-store-pasteboard-internal str))
-    (otherwise nil)))
+  "Store string STR in the system clipboard"
+  (cond
+   ((boundp 'interprogram-cut-function)
+    (if interprogram-cut-function
+	(funcall interprogram-cut-function str t)))
+   (t
+    (case (device-type)
+      (x (x-select-text str))
+      (pm (pm-put-clipboard str))
+      (ns (ns-store-pasteboard-internal str))
+      (otherwise nil)))))
 
 (defun w3-e19-no-read-only (st nd)
   ;; Make sure we don't yank any read-only data out of this buffer
-  (let ((inhibit-read-only t))
+  (let ((inhibit-read-only t)
+	(after-change-functions nil)
+	(after-change-function nil))
+    (put-text-property st nd 'w3-munged-ro t)
     (put-text-property st nd 'read-only nil)))
 
 (defun w3-mode-version-specifics ()
   ;; Emacs 19 specific stuff for w3-mode
   (declare (special w3-face-index w3-display-background-properties))
   (make-local-variable 'track-mouse)
-  ;(set (make-local-variable 'buffer-access-fontify-functions) 'w3-e19-no-read-only)
+  (set (make-local-variable 'buffer-access-fontify-functions) 'w3-e19-no-read-only)
+  (set (make-local-variable 'buffer-access-fontified-property) 'w3-munged-ro)
+  (setq w3-e19-window-width (window-width))
   (if w3-track-mouse (setq track-mouse t))
   (if w3-display-background-properties
       (let ((face (w3-make-face (intern
@@ -139,6 +154,17 @@
       (if (assq 'onmouseover mouse-events)
 	  (w3-script-evaluate-form (cdr (assq 'onmouseover mouse-events)))))))
 
+(defun w3-window-size-change-function (frame)
+  (let ((first (frame-first-window frame))
+	(cur nil))
+    (while (not (eq cur first))
+      (setq cur (if cur (next-window cur nil frame) first))
+      (save-excursion
+	(set-buffer (window-buffer cur))
+	(if (and (eq major-mode 'w3-mode)
+		 (not (eq (window-width cur) w3-e19-window-width)))
+	    (w3-refresh-buffer))))))
+
 
 (provide 'w3-emacs19)
 (provide 'w3-e19)
--- a/lisp/w3/w3-menu.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/w3/w3-menu.el	Mon Aug 13 09:49:09 2007 +0200
@@ -1,7 +1,7 @@
 ;;; w3-menu.el --- Menu functions for emacs-w3
 ;; Author: wmperry
-;; Created: 1997/06/24 13:59:48
-;; Version: 1.40
+;; Created: 1997/07/06 22:24:36
+;; Version: 1.41
 ;; Keywords: menu, hypermedia
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -291,6 +291,7 @@
    "View"
    ["Document Information" w3-document-information t]
    ["Document Source" w3-source-document t]
+   ["Document Errors" w3-display-errors w3-current-badhtml]
    ["Load Images" w3-load-delayed-images w3-delayed-images]
    "----"
    ["Refresh" w3-refresh-buffer w3-current-parse]
--- a/lisp/w3/w3-parse.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/w3/w3-parse.el	Mon Aug 13 09:49:09 2007 +0200
@@ -66,13 +66,6 @@
 w3-parse-buffer which it is w3-parse-buffer's responsibility to
 \"let\"-bind.")
 
-  ;; *** This is unused and does not belong right here anyway.
-  (defmacro w3-resolve-numeric-entity (ent)
-    "Return a string representing the numeric entity ENT (&#ENT;)"
-    (` (if (< (, ent) 256)
-           (char-to-string (, ent))
-         (format "[Too large character: %s]" (, ent)))))
-
   (defmacro w3-p-s-var-def (var)
     "Declare VAR as a scratch variable which w3-parse-buffer must
 \"let\"-bind."
@@ -219,40 +212,25 @@
   )
 
 (defun w3-debug-html-aux (message &optional outer nocontext)
-  (let (
-        ;; We have already determined whether the user should see the
-        ;; message, so don't let w3-warn suppress it.
-        (w3-debug-html t))
-    ;; Print the URL before the first error message for a document.
-    (cond (w3-p-d-debug-url
-           (let ((url (url-view-url t)))
-             (w3-warn 'html
-                      (if (or (null url)
-                              (string-equal "" url))
-                          (format "HTML errors for buffer %s"
-                                  (current-buffer))
-                        (format "HTML errors for <URL:%s>" url))))
-           (setq w3-p-d-debug-url nil)))
-    (w3-warn 'html
-             (if nocontext
-                 message
-               (concat message
-                       ;; Display context information for each error
-                       ;; message.
-                       "\n  Containing elements: "
-                       (w3-open-elements-string (if outer 1))
-                       (concat
-                        "\n  Text around error: "
-                        (save-restriction
-                          (widen)
-                          (progn
-                            (insert "*ERROR*")
-                            (prog1
-                                (w3-quote-for-string
-                                 (buffer-substring 
-                                  (max (- (point) 27) (point-min))
-                                  (min (+ (point) 20) (point-max))))
-                              (delete-char -7))))))))))
+  (push (if nocontext
+            message
+          (concat message
+                  ;; Display context information for each error
+                  ;; message.
+                  "\n  Containing elements: "
+                  (w3-open-elements-string (if outer 1))
+                  (concat
+                   "\n  Text around error: "
+                   (save-restriction
+                     (widen)
+                     (progn
+                       (insert "*ERROR*")
+                       (prog1
+                           (w3-quote-for-string
+                            (buffer-substring 
+                             (max (- (point) 27) (point-min))
+                             (min (+ (point) 20) (point-max))))
+                         (delete-char -7))))))) w3-current-badhtml))
 
 (defun w3-quote-for-string (string)
   (save-excursion
--- a/lisp/w3/w3-vars.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/w3/w3-vars.el	Mon Aug 13 09:49:09 2007 +0200
@@ -1,7 +1,7 @@
 ;;; w3-vars.el,v --- All variable definitions for emacs-w3
 ;; Author: wmperry
-;; Created: 1997/07/02 17:41:53
-;; Version: 1.145
+;; Created: 1997/07/12 04:58:34
+;; Version: 1.149
 ;; Keywords: comm, help, hypermedia
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -34,7 +34,7 @@
 (require 'wid-edit)			; For `widget-keymap'
 
 (defconst w3-version-number
-  (let ((x "p3.0.93"))
+  (let ((x "p3.0.94"))
     (if (string-match "State:[ \t\n]+.\\([^ \t\n]+\\)" x)
 	(setq x (substring x (match-beginning 1) (match-end 1)))
       (setq x (substring x 1)))
@@ -42,7 +42,7 @@
      (function (lambda (x) (if (= x ?-) "." (char-to-string x)))) x ""))
   "Version # of w3-mode.")
 
-(defconst w3-version-date (let ((x "1997/07/02 17:41:53"))
+(defconst w3-version-date (let ((x "1997/07/12 04:58:34"))
 			    (if (string-match "Date: \\([^ \t\n]+\\)" x)
 				(substring x (match-beginning 1) (match-end 1))
 			      x))
@@ -405,6 +405,7 @@
 (defvar w3-current-metainfo nil "An assoc list of <meta> tags for this doc.")
 (defvar w3-current-source nil "Source of current document.")
 (defvar w3-current-parse nil "Parsed version of current document.")
+(defvar w3-current-badhtml nil "List of HTML warnings for this page.")
 (defconst w3-default-continuation '(url-uncompress) 
   "Default action to start with - cleans text and uncompresses if necessary.")
 (defvar w3-find-this-link nil "Link to go to within a document.")
@@ -448,6 +449,7 @@
     url-current-mime-viewer
     url-current-object
     url-current-referer
+    w3-current-badhtml
     w3-current-parse
     w3-current-isindex
     w3-current-last-buffer
@@ -545,16 +547,16 @@
 (define-key w3-mode-map "\M-m"	   'w3-mail-current-document)
 (define-key w3-mode-map "\M-s"	   'w3-save-as)
 (define-key w3-mode-map "\M-\r"    'w3-follow-inlined-image)
-(define-key w3-mode-map "b"	   'w3-widget-backward)
+(define-key w3-mode-map "b"	   'widget-backward)
 (define-key w3-mode-map "c"        'w3-mail-document-author)
 (define-key w3-mode-map "d"        'w3-download-this-url)
-(define-key w3-mode-map "f"	   'w3-widget-forward)
+(define-key w3-mode-map "f"	   'widget-forward)
 (define-key w3-mode-map "g"        'w3-reload-document)
 (define-key w3-mode-map "i"        'w3-document-information)
 (define-key w3-mode-map "k"        'w3-save-url)
 (define-key w3-mode-map "l"        'w3-goto-last-buffer)
 (define-key w3-mode-map "m"        'w3-complete-link)
-(define-key w3-mode-map "n"        'w3-widget-forward)
+(define-key w3-mode-map "n"        'widget-forward)
 (define-key w3-mode-map "o"	   'w3-open-local)
 (define-key w3-mode-map "p"        'w3-print-this-url)
 (define-key w3-mode-map "q"	   'w3-quit)
@@ -568,18 +570,6 @@
 (define-key w3-mode-map [(control alt t)] 'url-list-processes)
 (define-key w3-mode-map [(control meta t)] 'url-list-processes)
 
-;; Widget navigation
-(if t
-    nil
-  (define-key w3-mode-map "\r"          'w3-widget-button-press)
-  (define-key w3-mode-map "\n"          'w3-widget-button-press)
-  (define-key w3-mode-map [tab]         'w3-widget-forward)
-  (define-key w3-mode-map "\t"          'w3-widget-forward)
-  (define-key w3-mode-map "\M-\t"       'w3-widget-backward)
-  (define-key w3-mode-map [backtab]     'w3-widget-backward)
-  (define-key w3-mode-map [(shift tab)] 'w3-widget-backward)
-  (define-key w3-mode-map [(meta tab)]  'w3-widget-backward)
-  )
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;; Keyword definitions
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
--- a/lisp/w3/w3.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/w3/w3.el	Mon Aug 13 09:49:09 2007 +0200
@@ -1,7 +1,7 @@
 ;;; w3.el --- Main functions for emacs-w3 on all platforms/versions
 ;; Author: wmperry
-;; Created: 1997/06/30 05:29:38
-;; Version: 1.134
+;; Created: 1997/07/10 23:41:29
+;; Version: 1.139
 ;; Keywords: faces, help, comm, news, mail, processes, mouse, hypermedia
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -799,14 +799,32 @@
 	url-setup-done nil
 	w3-hotlist nil
 	url-mime-accept-string nil)
-  (let ((x '(w3 mule-sysdp w3-e19 mm url w3-xemac w3-toolbar font)))
+  (let ((x '(w3 base64 css mule-sysdp w3-e19 mm url w3-xemac
+		w3-e20 dsssl dsssl-flow font images ssl url-auth
+		url-cache url-cookie url-file url-gopher url-gw
+		url-http url-mail url-misc url-news url-ns url-parse
+		url-vars w3-about w3-cus w3-display w3-e20 w3-elisp
+		w3-emulate w3-forms w3-hot w3-imap w3-jscript
+		w3-keyword w3-latex w3-menu w3-mouse w3-parse
+		w3-prefs w3-print w3-props w3-script w3-speak w3-style
+		w3-sysdp w3-toolbar w3-vars w3-widget w3-xemac w3
+		w3-toolbar font)))
     (while x
       (setq features (delq (car x) features)
 	    x (cdr x)))
     (require 'w3))
-  (w3-do-setup)
-  (url-do-setup)
-  )
+  (mapatoms (function
+	     (lambda (sym)
+	       (if (or (string-match "^w3-" (symbol-name sym))
+		       (string-match "^url-" (symbol-name sym))
+		       (string-match "^ssl-" (symbol-name sym))
+		       (string-match "^base64-" (symbol-name sym))
+		       (string-match "^dsssl-" (symbol-name sym))
+		       (string-match "^mm-" (symbol-name sym)))
+		   (progn
+		     (fmakunbound sym)
+		     (makunbound sym))))))
+  (require 'w3))
 
 (defun w3-source-document-at-point ()
   "View source to the document pointed at by link under point"
@@ -1565,11 +1583,17 @@
     (insert-buffer buffer)
     (let ((inhibit-read-only t))
       (set-text-properties (point-min) (point-max) nil))
-    (if (not base)
-	(setq url-current-object
-	      (url-generic-parse-url (concat "file:"
-					     (buffer-file-name buffer))))
-      (setq url-current-object base))))
+    (cond
+     (base
+      (setq url-current-object base))      
+     ((buffer-file-name buffer)
+      (setq url-current-object
+	    (url-generic-parse-url (concat "file:"
+					   (buffer-file-name buffer)))))
+     (t
+      (setq url-current-object
+	    (url-generic-parse-url "file:/")
+	    url-current-mime-type "text/html")))))
 
 (defun w3-internal-url (url)
   ;; Handle internal urls (previewed buffers, etc)
@@ -1971,6 +1995,8 @@
 	 (mapconcat 'identity remember "\n")
 	 "------")))))
 
+(defvar w3-widget-global-map nil)
+
 ;;;###autoload
 (defun w3-do-setup ()
   "Do setup - this is to avoid conflict with user settings when W3 is
@@ -2063,8 +2089,6 @@
 	    (or (getenv "WWW_HOME")
 		"http://www.cs.indiana.edu/elisp/w3/docs.html")))
 
-  ; Set up the entity definition for PGP and PEM authentication
-
   (run-hooks 'w3-load-hook))
 
 (defun w3-mark-link-as-followed (ext dat)
@@ -2237,6 +2261,27 @@
       (if choice
 	  (w3-fetch choice)))))
 
+(defun w3-display-errors ()
+  "Display any HTML errors for the current page."
+  (interactive)
+  (let ((w3-notify 'friendly)
+	(inhibit-read-only t)
+	(buffer nil)
+	(todo w3-current-badhtml)
+	(url (url-view-url t)))
+    (if (not todo)
+	(error "No HTML errors on this page!  Amazing, isn't it?"))
+    (save-excursion
+      (set-buffer
+       (get-buffer-create (concat "HTML Errors for: " (or url "???"))))
+      (setq buffer (current-buffer))
+      (erase-buffer)
+      (while todo
+	(goto-char (point-min))
+	(insert "\n" (car todo))
+	(setq todo (cdr todo))))
+    (w3-notify-when-ready buffer)))
+
 (defun w3-mode ()
   "Mode for viewing HTML documents.  If called interactively, will
 display the current buffer as HTML.
@@ -2261,12 +2306,7 @@
 	    truncate-lines t
 	    mode-line-format w3-modeline-format)
       (run-hooks 'w3-mode-hook)
-      ;; Avoid calling the global bindings for RET and mouse-2.
-      (make-local-variable 'widget-global-map)
-      (setq widget-global-map  (make-sparse-keymap))
-      (widget-setup)
-      (if w3-current-isindex
-	  (setq mode-line-process "-Searchable")))))
+      (widget-setup))))
 
 (require 'mm)
 (require 'url)
--- a/lisp/x11/x-select.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/x11/x-select.el	Mon Aug 13 09:49:09 2007 +0200
@@ -28,8 +28,12 @@
 ;;; Code:
 
 (defvar x-selected-text-type
-  (if (featurep 'mule) 'COMPOUND_TEXT 'STRING)
-  "The type atom used to obtain selections from the X server.")
+  (if (featurep 'mule) '(COMPOUND_TEXT STRING) 'STRING)
+  "The type atom used to obtain selections from the X server.
+Can be either a valid X selection data type, or a list of such types.
+COMPOUND_TEXT and STRING are the most commonly used data types.
+If a list is provided, the types are tried in sequence until
+there is a successful conversion.")
 
 (defun x-get-selection (&optional type data-type)
   "Return the value of an X Windows selection.
@@ -38,12 +42,20 @@
 says how to convert the data."
   (or type (setq type 'PRIMARY))
   (or data-type (setq data-type x-selected-text-type))
-  (let ((text (x-get-selection-internal type data-type)))
-    (if (and (consp text) (symbolp (car text)))
-	(setq text (cdr text)))
-    (if (not (stringp text))
-	(error "Selection is not a string: %S" text)
-      text)))
+  (let ((text
+	 (if (consp data-type)
+	     (condition-case err
+		 (x-get-selection-internal type (car data-type))
+	       (selection-conversion-error
+		(if (cdr data-type)
+		    (x-get-selection type (cdr data-type))
+		  (signal (car err) (cdr err)))))
+	   (x-get-selection-internal type data-type))))
+    (when (and (consp text) (symbolp (car text)))
+      (setq text (cdr text)))
+    (when (not (stringp text))
+      (error "Selection is not a string: %S" text))
+    text))
 
 (defun x-get-secondary-selection ()
   "Return text selected from some X window."
--- a/lisp/x11/x-toolbar.el	Mon Aug 13 09:47:55 2007 +0200
+++ b/lisp/x11/x-toolbar.el	Mon Aug 13 09:49:09 2007 +0200
@@ -25,6 +25,9 @@
 ;; order to get different behaviour.
 ;;
 
+(eval-when-compile
+  (require 'pending-del))
+
 (defgroup toolbar nil
   "Configure XEmacs Toolbar functions and properties"
   :group 'environment)
@@ -97,6 +100,11 @@
 
 (defun toolbar-paste ()
   (interactive)
+  ;; This horrible kludge is for pending-delete to work correctly.
+  (and (boundp 'pending-delete)
+       pending-delete
+       (let ((this-command toolbar-paste-function))
+	 (pending-delete-pre-hook)))
   (call-interactively toolbar-paste-function))
 
 (defcustom toolbar-undo-function 'undo
@@ -342,9 +350,17 @@
     (toolbar-news-icon     . "news")))
 
 (defun init-x-toolbar ()
+  (toolbar-add-item-data init-x-toolbar-list )
+  ;; do this now because errors will occur if the icon symbols
+  ;; are not initted
+  (set-specifier default-toolbar initial-toolbar-spec))
+  
+(defun toolbar-add-item-data ( icon-list &optional icon-dir )
+  (if (eq icon-dir nil)
+      (setq icon-dir toolbar-icon-directory))
   (mapcar
    (lambda (cons)
-     (let ((prefix (expand-file-name (cdr cons) toolbar-icon-directory)))
+     (let ((prefix (expand-file-name (cdr cons)  icon-dir)))
        (set (car cons)
 	    (if (featurep 'xpm)
 		(toolbar-make-button-list
@@ -359,11 +375,9 @@
 	       (concat prefix "-dn.xbm")
 	       (concat prefix "-xx.xbm")
 	       )))))
-   init-x-toolbar-list)
-  ;; do this now because errors will occur if the icon symbols
-  ;; are not initted
-  (set-specifier default-toolbar initial-toolbar-spec))
-  
+   icon-list  )
+  )
+
 (defvar initial-toolbar-spec
   '(;;[toolbar-last-win-icon	pop-window-configuration
     ;;(frame-property (selected-frame)
--- a/lwlib/Makefile.in.in	Mon Aug 13 09:47:55 2007 +0200
+++ b/lwlib/Makefile.in.in	Mon Aug 13 09:49:09 2007 +0200
@@ -27,7 +27,10 @@
 
 srcdir=@srcdir@
 
+@SET_MAKE@
 SHELL=/bin/sh
+RM = rm -f
+AR = ar cq
 
 CC=@CC@
 CPP=@CPP@
@@ -36,10 +39,6 @@
 CPPFLAGS=@CPPFLAGS@
 RANLIB=@RANLIB@
 
-RM = rm -f
-AR = ar cq
-@SET_MAKE@
-
 #define NOT_C_CODE
 #include "../src/config.h"
 
@@ -92,7 +91,7 @@
 
 #ifdef ENERGIZE
 ez_dialog:
-	cd energize && $(MAKE) $(MFLAGS)
+	cd energize && $(RECURSIVE_MAKE)
 #endif
 
 .PHONY: mostlyclean clean distclean realclean extraclean
@@ -100,7 +99,7 @@
 	$(RM) liblw.a liblw_pure_*.a *.o *.i core
 clean: mostlyclean
 #ifdef ENERGIZE
-	cd energize && $(MAKE) $(MFLAGS) clean
+	cd energize && $(RECURSIVE_MAKE) clean
 #endif
 distclean: clean
 	$(RM) Makefile Makefile.in config.h TAGS
--- a/lwlib/xlwscrollbar.c	Mon Aug 13 09:47:55 2007 +0200
+++ b/lwlib/xlwscrollbar.c	Mon Aug 13 09:49:09 2007 +0200
@@ -1527,7 +1527,7 @@
   if (w->sb.armed != ARM_NONE)
     {
       int last_value = w->sb.value;
-      int reason     = XmCR_NONE;
+      int reason;
 
       switch (w->sb.armed)
 	{
@@ -1547,6 +1547,8 @@
 	  increment_value (w, w->sb.increment);
 	  reason = XmCR_INCREMENT;
 	  break;
+	default:
+	  reason = XmCR_NONE;
 	}
 
       verify_values (w);
@@ -1606,24 +1608,6 @@
 }
 
 static void
-PageDownOrRight (Widget widget, XEvent *event, String *parms, Cardinal *num_parms)
-{
-  XlwScrollBarWidget w = (XlwScrollBarWidget) widget;
-  w->sb.forced_scroll = FORCED_SCROLL_DOWNRIGHT;
-  Select (widget, event, parms, num_parms);
-  w->sb.forced_scroll = FORCED_SCROLL_NONE;
-}
-
-static void
-PageUpOrLeft (Widget widget, XEvent *event, String *parms, Cardinal *num_parms)
-{
-  XlwScrollBarWidget w = (XlwScrollBarWidget) widget;
-  w->sb.forced_scroll = FORCED_SCROLL_UPLEFT;
-  Select (widget, event, parms, num_parms);
-  w->sb.forced_scroll = FORCED_SCROLL_NONE;
-}
-
-static void
 Select (Widget widget, XEvent *event, String *parms, Cardinal *num_parms)
 {
   XlwScrollBarWidget w = (XlwScrollBarWidget) widget;
@@ -1663,6 +1647,8 @@
 	      break;
 	    }
 	  abort();
+	default:
+	  ; /* Do nothing */
 	}
     }
 
@@ -1711,6 +1697,8 @@
       w->sb.armed = ARM_DOWN;
       redraw_down_arrow (w, True, False);
       break;
+    case BUTTON_NONE:
+      ; /* Do nothing */
     }
 
   verify_values (w);
@@ -1736,6 +1724,24 @@
 }
 
 static void
+PageDownOrRight (Widget widget, XEvent *event, String *parms, Cardinal *num_parms)
+{
+  XlwScrollBarWidget w = (XlwScrollBarWidget) widget;
+  w->sb.forced_scroll = FORCED_SCROLL_DOWNRIGHT;
+  Select (widget, event, parms, num_parms);
+  w->sb.forced_scroll = FORCED_SCROLL_NONE;
+}
+
+static void
+PageUpOrLeft (Widget widget, XEvent *event, String *parms, Cardinal *num_parms)
+{
+  XlwScrollBarWidget w = (XlwScrollBarWidget) widget;
+  w->sb.forced_scroll = FORCED_SCROLL_UPLEFT;
+  Select (widget, event, parms, num_parms);
+  w->sb.forced_scroll = FORCED_SCROLL_NONE;
+}
+
+static void
 Drag (Widget widget, XEvent *event, String *parms, Cardinal *num_parms)
 {
   XlwScrollBarWidget w = (XlwScrollBarWidget) widget;
@@ -1793,6 +1799,8 @@
     case ARM_DOWN:
       redraw_down_arrow (w, False, False);
       break;
+    default:
+      ; /* Do nothing */
     }
 
   XtUngrabKeyboard ((Widget) w, event->xbutton.time);
@@ -1853,6 +1861,8 @@
 	call_callbacks (w, XmCR_DRAG, w->sb.value, mouse_y, event);
       
       break;
+    default:
+      ; /* Do nothing */
     }
   CHECK (w);
 }
@@ -1879,6 +1889,7 @@
 	{
 	case ARM_UP:   redraw_up_arrow   (w, False, False); break;
 	case ARM_DOWN: redraw_down_arrow (w, False, False); break;
+	default: ; /* Do nothing */
 	}
 
       w->sb.armed = ARM_NONE;
--- a/man/Makefile	Mon Aug 13 09:47:55 2007 +0200
+++ b/man/Makefile	Mon Aug 13 09:49:09 2007 +0200
@@ -41,7 +41,7 @@
 srcs = cc-mode cl custom ediff efs external-widget forms gnus \
 	hm--html-mode \
 	hyperbole ilisp info ispell mailcrypt message mh-e oo-browser \
-	pcl-cvs psgml psgml-api rmail standards supercite term \
+	pcl-cvs ph psgml psgml-api rmail standards supercite term \
 	termcap texinfo vhdl-mode viper vm w3 widget xemacs-faq
 
 info = $(srcs:%=../info/%.info)
@@ -95,6 +95,7 @@
 dvi : $(dvi) FORCE
 	for d in $(SUBDIR) ; do (cd $${d} && $(MAKE) $(MFLAGS) $@) ; done
 
+.PHONY: mostlyclean clean distclean realclean extraclean
 mostlyclean:
 	for d in $(SUBDIR) ; do (cd $${d} && $(MAKE) $(MFLAGS) $@) ; done
 	rm -f *.toc *.aux *.log \
--- a/man/custom.texi	Mon Aug 13 09:47:55 2007 +0200
+++ b/man/custom.texi	Mon Aug 13 09:49:09 2007 +0200
@@ -231,7 +231,7 @@
 
 The top level group for the package should itself be member of one or
 more of the standard customization groups.  There exists a group for
-each @emph{finder} keyword.  Press @kbd{C-c p} to see a list of finder
+each @emph{finder} keyword.  Press @kbd{C-h p} to see a list of finder
 keywords, and add you group to each of them, using the @code{:group}
 keyword. 
 
@@ -407,6 +407,16 @@
 @code{regexp} and @code{file} widgets.  I think this can be done in
 XEmacs by adding a display table to the face.
 
+@item
+Use glyphs to draw the @code{customize-browse} tree.
+
+Add echo and balloon help.  You should be able to read the documentation
+simply by moving the mouse pointer above the name.
+
+Add parent links.
+
+Add colors.
+
 @end itemize
 
 @contents
--- a/man/gnats/Makefile	Mon Aug 13 09:47:55 2007 +0200
+++ b/man/gnats/Makefile	Mon Aug 13 09:49:09 2007 +0200
@@ -50,6 +50,7 @@
 	texi2dvi gnats.texi
 	texi2dvi send-pr.texi
 
+.PHONY: mostlyclean clean distclean realclean extraclean
 mostlyclean:
 	rm -f *.toc *.aux *.log *.cp *.cps *.fn *.fns *.tp *.tps \
               *.vr *.vrs *.pg *.pgs *.ky *.kys
--- a/man/gnus.texi	Mon Aug 13 09:47:55 2007 +0200
+++ b/man/gnus.texi	Mon Aug 13 09:49:09 2007 +0200
@@ -1,7 +1,7 @@
 \input texinfo                  @c -*-texinfo-*-
 
 @setfilename gnus
-@settitle Gnus 5.4.62 Manual
+@settitle Gnus 5.4.63 Manual
 @synindex fn cp
 @synindex vr cp
 @synindex pg cp
@@ -309,7 +309,7 @@
 @tex
 
 @titlepage
-@title Gnus 5.4.62 Manual
+@title Gnus 5.4.63 Manual
 
 @author by Lars Magne Ingebrigtsen
 @page
@@ -345,7 +345,7 @@
 spool or your mbox file.  All at the same time, if you want to push your
 luck.
 
-This manual corresponds to Gnus 5.4.62.
+This manual corresponds to Gnus 5.4.63.
 
 @end ifinfo
 
@@ -610,9 +610,9 @@
 also save you some time at startup.  Even if this variable is
 @code{nil}, you can always subscribe to the new groups just by pressing
 @kbd{U} in the group buffer (@pxref{Group Maintenance}).  This variable
-is @code{t} by default.  If you set this variable to @code{always}, then
-Gnus will query the backends for new groups even when you do the @kbd{g}
-command (@pxref{Scanning New Messages}).
+is @code{ask-server} by default.  If you set this variable to
+@code{always}, then Gnus will query the backends for new groups even
+when you do the @kbd{g} command (@pxref{Scanning New Messages}).
 
 @menu
 * Checking New Groups::      Determining what groups are new.
@@ -8511,7 +8511,8 @@
 is run after a connection has been made.  It can be used to send
 commands to the @sc{nntp} server after it has been contacted.  By
 default it sends the command @code{MODE READER} to the server with the
-@code{nntp-send-mode-reader} function.
+@code{nntp-send-mode-reader} function.  This function should always be
+present in this hook.
 
 @item nntp-authinfo-function 
 @vindex nntp-authinfo-function 
@@ -10816,17 +10817,6 @@
 Customize a score file in a visually pleasing manner
 (@code{gnus-score-customize}). 
 
-@item I C-i
-@kindex I C-i (Summary)
-@findex gnus-summary-raise-score
-Increase the score of the current article
-(@code{gnus-summary-raise-score}).
-
-@item L C-l
-@kindex L C-l (Summary)
-@findex gnus-summary-lower-score
-Lower the score of the current article
-(@code{gnus-summary-lower-score}). 
 @end table
 
 The rest of these commands modify the local score file.
@@ -12402,7 +12392,6 @@
 * Buttons::                    Get tendonitis in ten easy steps!
 * Daemons::                    Gnus can do things behind your back.
 * NoCeM::                      How to avoid spam and other fatty foods.
-* Picons::                     How to display pictures of what your reading.
 * Undo::                       Some actions can be undone.
 * Moderation::                 What to do if you're a moderator.
 * XEmacs Enhancements::        There are more pictures and stuff under XEmacs.
@@ -13324,216 +13313,6 @@
 unsubscribed groups (@pxref{Subscription Commands}).
 
 
-@node Picons
-@section Picons
-
-@iftex
-@iflatex
-\gnuspicon{tmp/picons-att.ps}
-\gnuspicon{tmp/picons-berkeley.ps}
-\gnuspicon{tmp/picons-caltech.ps}
-\gnuspicon{tmp/picons-canada.ps}
-\gnuspicon{tmp/picons-cr.ps}
-\gnuspicon{tmp/picons-cygnus.ps}
-\gnuspicon{tmp/picons-gov.ps}
-\gnuspicon{tmp/picons-mit.ps}
-\gnuspicon{tmp/picons-nasa.ps}
-\gnuspicon{tmp/picons-qmw.ps}
-\gnuspicon{tmp/picons-rms.ps}
-\gnuspicon{tmp/picons-ruu.ps}
-@end iflatex
-@end iftex
-
-So...  You want to slow down your news reader even more!  This is a
-good way to do so.  Its also a great way to impress people staring
-over your shoulder as you read news.
-
-@menu
-* Picon Basics::           What are picons and How do I get them.
-* Picon Requirements::     Don't go further if you aren't using XEmacs.
-* Easy Picons::            Displaying Picons---the easy way.
-* Hard Picons::            The way you should do it.  You'll learn something.
-* Picon Configuration::    Other variables you can trash/tweak/munge/play with.
-@end menu
-
-
-@node Picon Basics
-@subsection Picon Basics
-
-What are Picons?  To quote directly from the Picons Web site:
-
-@quotation 
-@dfn{Picons} is short for ``personal icons''.  They're small,
-constrained images used to represent users and domains on the net,
-organized into databases so that the appropriate image for a given
-e-mail address can be found.  Besides users and domains, there are picon
-databases for Usenet newsgroups and weather forecasts.  The picons are
-in either monochrome @code{XBM} format or color @code{XPM} and
-@code{GIF} formats.
-@end quotation
-
-For instructions on obtaining and installing the picons databases, point
-your Web browser at
-@file{http://www.cs.indiana.edu/picons/ftp/index.html}.
-
-@vindex gnus-picons-database
-Gnus expects picons to be installed into a location pointed to by
-@code{gnus-picons-database}.
-
-
-@node Picon Requirements
-@subsection Picon Requirements
-
-To have Gnus display Picons for you, you must be running XEmacs
-19.13 or greater since all other versions of Emacs aren't yet able to
-display images.
-
-Additionally, you must have @code{xpm} support compiled into XEmacs.
-
-@vindex gnus-picons-convert-x-face
-If you want to display faces from @code{X-Face} headers, you must have
-the @code{netpbm} utilities installed, or munge the
-@code{gnus-picons-convert-x-face} variable to use something else.
-
-
-@node Easy Picons
-@subsection Easy Picons
-
-To enable displaying picons, simply put the following line in your
-@file{~/.gnus} file and start Gnus.
-
-@lisp
-(setq gnus-use-picons t)
-(add-hook 'gnus-article-display-hook 'gnus-article-display-picons t)
-(add-hook 'gnus-summary-prepare-hook 'gnus-group-display-picons t)
-(add-hook 'gnus-article-display-hook 'gnus-picons-article-display-x-face)
-@end lisp
-
-
-@node Hard Picons
-@subsection Hard Picons 
-
-Gnus can display picons for you as you enter and leave groups and
-articles.  It knows how to interact with three sections of the picons
-database.  Namely, it can display the picons newsgroup pictures,
-author's face picture(s), and the authors domain.  To enable this
-feature, you need to first decide where to display them.
-
-@table @code 
-
-@item gnus-picons-display-where 
-@vindex gnus-picons-display-where 
-Where the picon images should be displayed.  It is @code{picons} by
-default (which by default maps to the buffer @samp{*Picons*}).  Other
-valid places could be @code{article}, @code{summary}, or
-@samp{*scratch*} for all I care.  Just make sure that you've made the
-buffer visible using the standard Gnus window configuration
-routines---@pxref{Windows Configuration}.
-
-@end table
-
-@iftex
-@iflatex
-\gnuspicon{tmp/picons-seuu.ps}
-\gnuspicon{tmp/picons-stanford.ps}
-\gnuspicon{tmp/picons-sun.ps}
-\gnuspicon{tmp/picons-ubc.ps}
-\gnuspicon{tmp/picons-ufl.ps}
-\gnuspicon{tmp/picons-uio.ps}
-\gnuspicon{tmp/picons-unit.ps}
-\gnuspicon{tmp/picons-upenn.ps}
-\gnuspicon{tmp/picons-wesleyan.ps}
-@end iflatex
-@end iftex
-
-Note: If you set @code{gnus-use-picons} to @code{t}, it will set up your
-window configuration for you to include the @code{picons} buffer.
-
-Now that you've made that decision, you need to add the following
-functions to the appropriate hooks so these pictures will get
-displayed at the right time.
-
-@vindex gnus-article-display-hook
-@vindex gnus-picons-display-where
-@table @code
-@item gnus-article-display-picons
-@findex gnus-article-display-picons
-Looks up and displays the picons for the author and the author's domain
-in the @code{gnus-picons-display-where} buffer.  Should be added to the
-@code{gnus-article-display-hook}.
-
-@item gnus-group-display-picons
-@findex gnus-article-display-picons
-Displays picons representing the current group.  This function should
-be added to the @code{gnus-summary-prepare-hook} or to the
-@code{gnus-article-display-hook} if @code{gnus-picons-display-where}
-is set to @code{article}.
-
-@item gnus-picons-article-display-x-face
-@findex gnus-article-display-picons
-Decodes and displays the X-Face header if present.  This function
-should be added to @code{gnus-article-display-hook}.
-
-@end table
-
-Note:  You must append them to the hook, so make sure to specify 't'
-for the append flag of @code{add-hook}:
-
-@lisp
-(add-hook 'gnus-article-display-hook 'gnus-article-display-picons t)
-@end lisp
-
-
-@node Picon Configuration
-@subsection Picon Configuration
-
-The following variables offer further control over how things are
-done, where things are located, and other useless stuff you really
-don't need to worry about.
-
-@table @code
-@item gnus-picons-database
-@vindex gnus-picons-database
-The location of the picons database.  Should point to a directory
-containing the @file{news}, @file{domains}, @file{users} (and so on)
-subdirectories.  Defaults to @file{/usr/local/faces}.
-
-@item gnus-picons-news-directory
-@vindex gnus-picons-news-directory
-Sub-directory of the faces database containing the icons for
-newsgroups.
-
-@item gnus-picons-user-directories
-@vindex gnus-picons-user-directories
-List of subdirectories to search in @code{gnus-picons-database} for user
-faces.  @code{("local" "users" "usenix" "misc")} is the default.
-
-@item gnus-picons-domain-directories
-@vindex gnus-picons-domain-directories
-List of subdirectories to search in @code{gnus-picons-database} for
-domain name faces.  Defaults to @code{("domains")}.  Some people may
-want to add @samp{unknown} to this list.
-
-@item gnus-picons-convert-x-face
-@vindex gnus-picons-convert-x-face
-The command to use to convert the @code{X-Face} header to an X bitmap
-(@code{xbm}).  Defaults to @code{(format "@{ echo '/* Width=48,
-Height=48 */'; uncompface; @} | icontopbm | pbmtoxbm > %s"
-gnus-picons-x-face-file-name)}
-
-@item gnus-picons-x-face-file-name
-@vindex gnus-picons-x-face-file-name
-Names a temporary file to store the @code{X-Face} bitmap in.  Defaults
-to @code{(format "/tmp/picon-xface.%s.xbm" (user-login-name))}.
-
-@item gnus-picons-buffer
-@vindex gnus-picons-buffer
-The name of the buffer that @code{picons} points to.  Defaults to
-@samp{*Icon Buffer*}.
-
-@end table
-
-
 @node Undo
 @section Undo
 @cindex undo
@@ -13621,7 +13400,342 @@
 @cindex XEmacs
 
 XEmacs is able to display pictures and stuff, so Gnus has taken
-advantage of that.  Relevant variables include:
+advantage of that.
+
+@menu
+* Picons::    How to display pictures of what your reading.
+* Smileys::   Show all those happy faces the way they were meant to be shown.
+* Toolbar::   Click'n'drool.
+* XVarious::  Other XEmacsy Gnusey variables.
+@end menu
+
+
+@node Picons
+@subsection Picons
+
+@iftex
+@iflatex
+\gnuspicon{tmp/picons-att.ps}
+\gnuspicon{tmp/picons-berkeley.ps}
+\gnuspicon{tmp/picons-caltech.ps}
+\gnuspicon{tmp/picons-canada.ps}
+\gnuspicon{tmp/picons-cr.ps}
+\gnuspicon{tmp/picons-cygnus.ps}
+\gnuspicon{tmp/picons-gov.ps}
+\gnuspicon{tmp/picons-mit.ps}
+\gnuspicon{tmp/picons-nasa.ps}
+\gnuspicon{tmp/picons-qmw.ps}
+\gnuspicon{tmp/picons-rms.ps}
+\gnuspicon{tmp/picons-ruu.ps}
+@end iflatex
+@end iftex
+
+So...  You want to slow down your news reader even more!  This is a
+good way to do so.  Its also a great way to impress people staring
+over your shoulder as you read news.
+
+@menu
+* Picon Basics::           What are picons and How do I get them.
+* Picon Requirements::     Don't go further if you aren't using XEmacs.
+* Easy Picons::            Displaying Picons---the easy way.
+* Hard Picons::            The way you should do it.  You'll learn something.
+* Picon Configuration::    Other variables you can trash/tweak/munge/play with.
+@end menu
+
+
+@node Picon Basics
+@subsubsection Picon Basics
+
+What are Picons?  To quote directly from the Picons Web site:
+
+@quotation 
+@dfn{Picons} is short for ``personal icons''.  They're small,
+constrained images used to represent users and domains on the net,
+organized into databases so that the appropriate image for a given
+e-mail address can be found.  Besides users and domains, there are picon
+databases for Usenet newsgroups and weather forecasts.  The picons are
+in either monochrome @code{XBM} format or color @code{XPM} and
+@code{GIF} formats.
+@end quotation
+
+For instructions on obtaining and installing the picons databases, point
+your Web browser at
+@file{http://www.cs.indiana.edu/picons/ftp/index.html}.
+
+@vindex gnus-picons-database
+Gnus expects picons to be installed into a location pointed to by
+@code{gnus-picons-database}.
+
+
+@node Picon Requirements
+@subsubsection Picon Requirements
+
+To have Gnus display Picons for you, you must be running XEmacs
+19.13 or greater since all other versions of Emacs aren't yet able to
+display images.
+
+Additionally, you must have @code{xpm} support compiled into XEmacs.
+
+@vindex gnus-picons-convert-x-face
+If you want to display faces from @code{X-Face} headers, you must have
+the @code{netpbm} utilities installed, or munge the
+@code{gnus-picons-convert-x-face} variable to use something else.
+
+
+@node Easy Picons
+@subsubsection Easy Picons
+
+To enable displaying picons, simply put the following line in your
+@file{~/.gnus} file and start Gnus.
+
+@lisp
+(setq gnus-use-picons t)
+(add-hook 'gnus-article-display-hook 'gnus-article-display-picons t)
+(add-hook 'gnus-summary-prepare-hook 'gnus-group-display-picons t)
+(add-hook 'gnus-article-display-hook 'gnus-picons-article-display-x-face)
+@end lisp
+
+
+@node Hard Picons
+@subsubsection Hard Picons 
+
+Gnus can display picons for you as you enter and leave groups and
+articles.  It knows how to interact with three sections of the picons
+database.  Namely, it can display the picons newsgroup pictures,
+author's face picture(s), and the authors domain.  To enable this
+feature, you need to first decide where to display them.
+
+@table @code 
+
+@item gnus-picons-display-where 
+@vindex gnus-picons-display-where 
+Where the picon images should be displayed.  It is @code{picons} by
+default (which by default maps to the buffer @samp{*Picons*}).  Other
+valid places could be @code{article}, @code{summary}, or
+@samp{*scratch*} for all I care.  Just make sure that you've made the
+buffer visible using the standard Gnus window configuration
+routines---@pxref{Windows Configuration}.
+
+@end table
+
+@iftex
+@iflatex
+\gnuspicon{tmp/picons-seuu.ps}
+\gnuspicon{tmp/picons-stanford.ps}
+\gnuspicon{tmp/picons-sun.ps}
+\gnuspicon{tmp/picons-ubc.ps}
+\gnuspicon{tmp/picons-ufl.ps}
+\gnuspicon{tmp/picons-uio.ps}
+\gnuspicon{tmp/picons-unit.ps}
+\gnuspicon{tmp/picons-upenn.ps}
+\gnuspicon{tmp/picons-wesleyan.ps}
+@end iflatex
+@end iftex
+
+Note: If you set @code{gnus-use-picons} to @code{t}, it will set up your
+window configuration for you to include the @code{picons} buffer.
+
+Now that you've made that decision, you need to add the following
+functions to the appropriate hooks so these pictures will get
+displayed at the right time.
+
+@vindex gnus-article-display-hook
+@vindex gnus-picons-display-where
+@table @code
+@item gnus-article-display-picons
+@findex gnus-article-display-picons
+Looks up and displays the picons for the author and the author's domain
+in the @code{gnus-picons-display-where} buffer.  Should be added to the
+@code{gnus-article-display-hook}.
+
+@item gnus-group-display-picons
+@findex gnus-article-display-picons
+Displays picons representing the current group.  This function should
+be added to the @code{gnus-summary-prepare-hook} or to the
+@code{gnus-article-display-hook} if @code{gnus-picons-display-where}
+is set to @code{article}.
+
+@item gnus-picons-article-display-x-face
+@findex gnus-article-display-picons
+Decodes and displays the X-Face header if present.  This function
+should be added to @code{gnus-article-display-hook}.
+
+@end table
+
+Note:  You must append them to the hook, so make sure to specify 't'
+for the append flag of @code{add-hook}:
+
+@lisp
+(add-hook 'gnus-article-display-hook 'gnus-article-display-picons t)
+@end lisp
+
+
+@node Picon Configuration
+@subsubsection Picon Configuration
+
+The following variables offer further control over how things are
+done, where things are located, and other useless stuff you really
+don't need to worry about.
+
+@table @code
+@item gnus-picons-database
+@vindex gnus-picons-database
+The location of the picons database.  Should point to a directory
+containing the @file{news}, @file{domains}, @file{users} (and so on)
+subdirectories.  Defaults to @file{/usr/local/faces}.
+
+@item gnus-picons-news-directory
+@vindex gnus-picons-news-directory
+Sub-directory of the faces database containing the icons for
+newsgroups.
+
+@item gnus-picons-user-directories
+@vindex gnus-picons-user-directories
+List of subdirectories to search in @code{gnus-picons-database} for user
+faces.  @code{("local" "users" "usenix" "misc")} is the default.
+
+@item gnus-picons-domain-directories
+@vindex gnus-picons-domain-directories
+List of subdirectories to search in @code{gnus-picons-database} for
+domain name faces.  Defaults to @code{("domains")}.  Some people may
+want to add @samp{unknown} to this list.
+
+@item gnus-picons-convert-x-face
+@vindex gnus-picons-convert-x-face
+The command to use to convert the @code{X-Face} header to an X bitmap
+(@code{xbm}).  Defaults to @code{(format "@{ echo '/* Width=48,
+Height=48 */'; uncompface; @} | icontopbm | pbmtoxbm > %s"
+gnus-picons-x-face-file-name)}
+
+@item gnus-picons-x-face-file-name
+@vindex gnus-picons-x-face-file-name
+Names a temporary file to store the @code{X-Face} bitmap in.  Defaults
+to @code{(format "/tmp/picon-xface.%s.xbm" (user-login-name))}.
+
+@item gnus-picons-buffer
+@vindex gnus-picons-buffer
+The name of the buffer that @code{picons} points to.  Defaults to
+@samp{*Icon Buffer*}.
+
+@end table
+
+
+@node Smileys
+@subsection Smileys
+@cindex smileys
+
+@dfn{Smiley} is a package separate from Gnus, but since Gnus is
+currently the only package that uses Smiley, it is documented here.
+
+In short---to use Smiley in Gnus, put the following in your
+@file{.gnus.el} file:
+
+@lisp
+(add-hook 'gnus-article-display-hook 'gnus-smiley-display t)
+@end lisp
+
+Smiley maps text smiley faces---@samp{:-)}, @samp{:-=}, @samp{:-(} and
+the like---to pictures and displays those instead of the text smiley
+faces.  The conversion is controlled by a list of regexps that matches
+text and maps that to file names.
+
+@vindex smiley-nosey-regexp-alist
+@vindex smiley-deformed-regexp-alist
+Smiley supplies two example conversion alists by default:
+@code{smiley-deformed-regexp-alist} (which matches @samp{:)}, @samp{:(}
+and so on), and @code{smiley-nosey-regexp-alist} (which matches
+@samp{:-)}, @samp{:-(} and so on).
+
+The alist used is specified by the @code{smiley-regexp-alist} variable,
+which defaults to the value of @code{smiley-deformed-regexp-alist}.
+
+Here's the default value of @code{smiley-smiley-regexp-alist}:
+
+@lisp
+(setq smiley-nosey-regexp-alist
+      '(("\\(:-+[<«]+\\)\\W" 1 "FaceAngry.xpm")
+        ("\\(:-+\\]+\\)\\W" 1 "FaceGoofy.xpm")
+        ("\\(:-+D\\)\\W" 1 "FaceGrinning.xpm")
+        ("\\(:-+[@}»]+\\)\\W" 1 "FaceHappy.xpm")
+        ("\\(:-*)+\\)\\W" 1 "FaceHappy.xpm")        
+        ("\\(:-+[/\\\"]+\\)\\W" 1 "FaceIronic.xpm")
+        ("\\([8|]-+[|Oo%]\\)\\W" 1 "FaceKOed.xpm")
+        ("\\([:|]-+#+\\)\\W" 1 "FaceNyah.xpm")
+        ("\\(:-+[(@{]+\\)\\W" 1 "FaceSad.xpm")
+        ("\\(:-+[Oo\*]\\)\\W" 1 "FaceStartled.xpm")
+        ("\\(:-+|\\)\\W" 1 "FaceStraight.xpm")
+        ("\\(:-+p\\)\\W" 1 "FaceTalking.xpm")
+        ("\\(:-+d\\)\\W" 1 "FaceTasty.xpm")
+        ("\\(;-+[>)@}»]+\\)\\W" 1 "FaceWinking.xpm")
+        ("\\(:-+[Vvµ]\\)\\W" 1 "FaceWry.xpm")
+        ("\\(][:8B]-[)>]\\)\\W" 1 "FaceDevilish.xpm")
+        ("\\([:|]-+P\\)\\W" 1 "FaceYukky.xpm")))
+@end lisp
+
+The first item in each element is the regexp to be matched; the second
+element is the regexp match group that is to be replaced by the picture;
+and the third element is the name of the file to be displayed.
+
+The following variables customize where Smiley will look for these
+files, as well as the color to be used and stuff:
+
+@table @code
+
+@item smiley-data-directory
+@vindex smiley-data-directory
+Where Smiley will look for smiley faces files.
+
+@item smiley-flesh-color
+@vindex smiley-flesh-color
+Skin color.  The default is @samp{yellow}, which is really racist.
+
+@item smiley-features-color
+@vindex smiley-features-color
+Color of the features of the face.  The default is @samp{black}.
+
+@item smiley-tongue-color
+@vindex smiley-tongue-color
+Color of the tongue.  The default is @samp{red}.
+
+@item smiley-circle-color
+@vindex smiley-circle-color
+Color of the circle around the face.  The default is @samp{black}.
+
+@item smiley-mouse-face
+@vindex smiley-mouse-face
+Face used for mouse highlighting over the smiley face.
+
+@end table
+
+
+@node Toolbar
+@subsection Toolbar
+
+@table @code
+
+@item gnus-use-toolbar
+@vindex gnus-use-toolbar
+If @code{nil}, don't display toolbars.  If non-@code{nil}, it should be
+one of @code{default-toolbar}, @code{top-toolbar}, @code{bottom-toolbar},
+@code{right-toolbar}, or @code{left-toolbar}.
+
+@item gnus-group-toolbar
+@vindex gnus-group-toolbar
+The toolbar in the group buffer.
+
+@item gnus-summary-toolbar
+@vindex gnus-summary-toolbar
+The toolbar in the summary buffer.
+
+@item gnus-summary-mail-toolbar
+@vindex gnus-summary-mail-toolbar
+The toolbar in the summary buffer of mail groups.
+
+@end table
+
+
+@node XVarious
+@subsection Various XEmacs Variables
 
 @table @code
 @item gnus-xmas-glyph-directory
@@ -13642,24 +13756,6 @@
 @code{irish}, @code{sky}, @code{tin}, @code{velvet}, @code{grape},
 @code{labia}, @code{berry}, @code{neutral}, and @code{september}.
 
-@item gnus-use-toolbar
-@vindex gnus-use-toolbar
-If @code{nil}, don't display toolbars.  If non-@code{nil}, it should be
-one of @code{default-toolbar}, @code{top-toolbar}, @code{bottom-toolbar},
-@code{right-toolbar}, or @code{left-toolbar}.
-
-@item gnus-group-toolbar
-@vindex gnus-group-toolbar
-The toolbar in the group buffer.
-
-@item gnus-summary-toolbar
-@vindex gnus-summary-toolbar
-The toolbar in the summary buffer.
-
-@item gnus-summary-mail-toolbar
-@vindex gnus-summary-mail-toolbar
-The toolbar in the summary buffer of mail groups.
-
 @item gnus-xmas-modeline-glyph
 @vindex gnus-xmas-modeline-glyph
 A glyph displayed in all Gnus mode lines.  It is a tiny gnu head by
@@ -15494,7 +15590,7 @@
 
 The backends should be able to switch between several virtual servers.
 The standard backends implement this by keeping an alist of virtual
-server environments that they pull down/pushe up when needed.  
+server environments that they pull down/push up when needed.  
 
 There are two groups of interface functions: @dfn{required functions},
 which must be present, and @dfn{optional functions}, which Gnus will
--- a/man/internals/Makefile	Mon Aug 13 09:47:55 2007 +0200
+++ b/man/internals/Makefile	Mon Aug 13 09:49:09 2007 +0200
@@ -53,6 +53,7 @@
 	else ln -s index.unperm index.texi; \
 	fi
 
+.PHONY: mostlyclean clean distclean realclean extraclean
 mostlyclean:
 	rm -f *.toc *.aux *.log *.cp *.cps *.fn *.fns *.tp *.tps \
               *.vr *.vrs *.pg *.pgs *.ky *.kys
--- a/man/internals/internals.texi	Mon Aug 13 09:47:55 2007 +0200
+++ b/man/internals/internals.texi	Mon Aug 13 09:49:09 2007 +0200
@@ -1819,9 +1819,12 @@
 to the Lisp primitive as displayed in its documentation, modulo the same
 concerns described above for @code{F...} names (in particular,
 underscores in the C arguments become dashes in the Lisp arguments).
-There is one additional kludge: A C argument called @code{defalt}
-becomes the Lisp argument @code{default}.  This deliberate misspelling
-is done because @code{default} is a reserved word in the C language.
+
+There is one additional kludge: A trailing `_' on the C argument is
+discarded when forming the Lisp argument.  This allows C language
+reserved words (like @code{default}) or global symbols (like
+@code{dirname}) to be used as argument names without compiler warnings
+or errors.
 
 A Lisp function with @w{@var{max} = @code{UNEVALLED}} is a
 @w{@dfn{special form}}; its arguments are not evaluated.  Instead it
--- a/man/lispref/Makefile	Mon Aug 13 09:47:55 2007 +0200
+++ b/man/lispref/Makefile	Mon Aug 13 09:49:09 2007 +0200
@@ -67,6 +67,7 @@
 	else ln -s index.unperm index.texi; \
 	fi
 
+.PHONY: mostlyclean clean distclean realclean extraclean
 mostlyclean:
 	rm -f *.toc *.aux *.log *.cp *.cps *.fn *.fns *.tp *.tps \
               *.vr *.vrs *.pg *.pgs *.ky *.kys
--- a/man/lispref/debugging.texi	Mon Aug 13 09:47:55 2007 +0200
+++ b/man/lispref/debugging.texi	Mon Aug 13 09:49:09 2007 +0200
@@ -95,6 +95,18 @@
 errors also can invoke the debugger.  @xref{Processes}.
 @end defopt
 
+@defopt debug-ignored-errors
+This variable specifies certain kinds of errors that should not enter
+the debugger.  Its value is a list of error condition symbols and/or
+regular expressions.  If the error has any of those condition symbols,
+or if the error message matches any of the regular expressions, then
+that error does not enter the debugger, regardless of the value of
+@code{debug-on-error}.
+
+The normal value of this variable lists several errors that happen often
+during editing but rarely result from bugs in Lisp programs.
+@end defopt
+
   To debug an error that happens during loading of the @file{.emacs}
 file, use the option @samp{-debug-init}, which binds
 @code{debug-on-error} to @code{t} while @file{.emacs} is loaded and
--- a/man/message.texi	Mon Aug 13 09:47:55 2007 +0200
+++ b/man/message.texi	Mon Aug 13 09:49:09 2007 +0200
@@ -1,7 +1,7 @@
 \input texinfo                  @c -*-texinfo-*-
 
 @setfilename message
-@settitle Message 5.4.62 Manual
+@settitle Message 5.4.63 Manual
 @synindex fn cp
 @synindex vr cp
 @synindex pg cp
@@ -39,7 +39,7 @@
 @tex
 
 @titlepage
-@title Message 5.4.62 Manual
+@title Message 5.4.63 Manual
 
 @author by Lars Magne Ingebrigtsen
 @page
@@ -79,7 +79,7 @@
 * Key Index::         List of Message mode keys.
 @end menu
 
-This manual corresponds to Message 5.4.62.  Message is distributed with
+This manual corresponds to Message 5.4.63.  Message is distributed with
 the Gnus distribution bearing the same version number as this manual
 has. 
 
@@ -863,6 +863,9 @@
 @item valid-newsgroups
 Check whether the @code{Newsgroups} and @code{Followup-to} headers
 are valid syntactically.
+@item repeated-newsgroups
+Check whether the @code{Newsgroups} and @code{Followup-to} headers
+contains repeated group names.
 @item shorten-followup-to
 Check whether to add a @code{Followup-to} header to shorten the number
 of groups to post to.
--- a/man/new-users-guide/Makefile	Mon Aug 13 09:47:55 2007 +0200
+++ b/man/new-users-guide/Makefile	Mon Aug 13 09:49:09 2007 +0200
@@ -38,6 +38,7 @@
 .texi.dvi :
 	$(TEXI2DVI) $<
 
+.PHONY: mostlyclean clean distclean realclean extraclean
 mostlyclean:
 	rm -f *.toc *.aux *.oaux *.log *.cp *.cps *.fn *.fns *.tp *.tps \
               *.vr *.vrs *.pg *.pgs *.ky *.kys
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/man/ph.texi	Mon Aug 13 09:49:09 2007 +0200
@@ -0,0 +1,574 @@
+\input texinfo.tex
+@c %**start of header
+@setfilename ph.info
+@settitle ph.el Manual
+@iftex
+@afourpaper
+@end iftex
+@c %**end of header
+
+@footnotestyle end
+
+@ifinfo
+This file documents ph.el v2.6
+
+ph.el is part of GNU Emacs.
+
+ph.el is an E-Lisp client interface to the CCSO white pages directory system
+also known as PH/QI
+
+Copyright @copyright{} 1997 Free Software Foundation, Inc.
+
+Permission is granted to make and distribute verbatim
+copies of this manual provided the copyright notice and
+this permission notice are preserved on all copies.
+     
+@ignore
+Permission is granted to process this file through TeX
+and print the results, provided the printed document
+carries a copying permission notice identical to this
+one except for the removal of this paragraph (this
+paragraph not being relevant to the printed manual).
+@end ignore
+
+Permission is granted to copy and distribute modified
+versions of this manual under the conditions for
+verbatim copying and the terms of the ``GNU General
+Public License'', and provided that the entire
+resulting derived work is distributed under the terms
+of a permission notice identical to this one.
+     
+Permission is granted to copy and distribute
+translations of this manual into another language,
+under the above conditions for modified versions,
+except that this permission notice may be stated in a
+translation approved by the Free Software Foundation.
+@end ifinfo
+
+@titlepage
+@title{ph Manual}
+@subtitle{An Emacs client to the CCSO Nameserver}
+@author by Oscar Figueiredo
+@code{1.3}
+
+@page
+@vskip 0pt plus 1fill
+     Copyright @copyright{} 1997 Free Software Foundation, Inc.
+
+     Permission is granted to make and distribute verbatim
+     copies of this manual provided the copyright notice and
+     this permission notice are preserved on all copies.
+     
+     @ignore
+     Permission is granted to process this file through TeX
+     and print the results, provided the printed document
+     carries a copying permission notice identical to this
+     one except for the removal of this paragraph (this
+     paragraph not being relevant to the printed manual).
+     
+     @end ignore
+
+     Permission is granted to copy and distribute modified
+     versions of this manual under the conditions for
+     verbatim copying and the terms of the ``GNU General 
+     Public License'', and provided that the entire
+     resulting derived work is distributed under the terms
+     of a permission notice identical to this one.
+     
+     Permission is granted to copy and distribute
+     translations of this manual into another language,
+     under the above conditions for modified versions,
+     except that this permission notice may be stated in a
+     translation approved by the Free Software Foundation.
+@end titlepage
+
+@ifinfo
+@node     Top, Introduction, (dir), (dir)
+@comment  node-name,  next,         previous, up
+
+
+This manual documents ph.el v2.6, an E-lisp client interface to the CCSO
+PH/QI directory system.
+@end ifinfo
+
+@menu
+* Introduction::                General info about the PH/QI directory system
+* Installation::                How to install the package
+* Usage::                       The various usage possibilities explained
+* Credits::                     Who's done what
+* Variables Index::             
+@end menu
+
+
+
+
+
+@node     Introduction, Installation, Top, Top
+@comment  node-name,   next,  previous,  up
+@chapter Introduction
+
+The Central Computing Services Office (CCSO) of the University of
+Illinois at Urbana Champaign (UIUC) created and freely distributes a
+directory system that is currently in use in more than 300 organizations
+around the world. The system records information about people such as
+their address, phone number, e-mail, academic information or any other
+details it was configured to.
+
+The system consists of two parts: a database server traditionally called
+@code{qi} and a command-line client called
+@code{ph}. @file{ftp://uiarchive.cso.uiuc.edu/pub/packages/ph} is the
+main distribution site.
+@file{http://www.uiuc.edu/cgi-bin/ph/lookup?Query=.} provides a listing
+of the QI servers in activity.
+
+@code{ph.el} provides a client interface to this directory system
+letting you:
+
+@itemize @bullet
+@item 
+query the server through a customizable form
+@item
+expand inline queries in buffers (for instance you can expand a name
+to a mailing address in a mail message buffer)
+@item
+insert server records into your own BBDB database
+(@pxref{Top,,BBDB,bbdb,BBDB Manual})
+@end itemize
+
+The original command-line @code{ph} client that comes with the
+@code{ph/qi} distribution provides additional features like the
+possibility to communicate with the server in login mode which makes it
+possible to change records in the database. This is not implemented in
+this e-lisp client.
+
+@node Installation, Usage, Introduction, Top
+@comment  node-name,  next,  previous,  up
+@chapter Installation
+
+If you are using @code{ph} from your GNU Emacs or XEmacs distribution
+you can skip this section.
+
+@code{ph} should work right out of the box with XEmacs 19.15 and above. 
+It will not work with versions of XEmacs below.
+
+@code{ph} will work with Emacs 19.34 provided you have the @code{custom}
+and @code{widget} libraries by Per Abrahmsen installed. You can get them 
+from @file{http://www.dina.kvl.dk/~abraham/custom/}
+
+When installing @code{ph} yourself you should move @code{ph.el} to a
+proper directory in your @code{load-path} and byte-compile it (see the
+section on byte-compilation in your users manual if you do not know what 
+that means). Install @code{ph.info} into a directory where the info
+system can find it or update your @code{Info-default-directory-list}
+variable. 
+
+Then you can add the following into your @file{.emacs} startup file:
+@lisp
+(require 'ph)
+(eval-after-load 
+ "message"
+ '(define-key message-mode-map [(control ?c) (tab)] 'ph-expand-inline))
+(eval-after-load 
+ "mail"
+ '(define-key mail-mode-map [(control ?c) (tab)] 'ph-expand-inline))
+@end lisp
+
+Upon starting a new session you will find a new @code{Ph} sub-menu in the 
+@code{Tools} menu that will let you access all the interesting @code{ph} 
+functions.
+
+
+
+
+
+
+
+@node Usage, Credits, Installation, Top
+@comment  node-name,  next,  previous,  up
+@chapter Usage
+
+This chapter describes the usage of @code{ph.el}. Most functions are
+available through the @code{Ph} sub-menu of the @code{Tools} sub-menu.
+
+@menu
+* Querying QI Servers::         How queries are performed and handled 
+* Query Form::                  How to use and customize the query form
+* Inline Query Expansion::      How to use and customize inline queries
+* Creating BBDB Records::       How to insert query results into your BBDB
+* The Server Hotlist::          How to use and manage the server hotlist
+@end menu
+
+
+@node Querying QI Servers, Query Form, Usage, Usage
+@comment  node-name,  next,  previous,  up
+@section Querying Servers
+
+@code{ph} basic functionality is to let you query a QI server and return 
+the results back to you. There are several things you may want to
+customize in this process.
+
+
+@menu
+* Selecting a Server::          The first thing to do
+* Return Fields::               How to configure query results
+* Handling Duplicate Fields::   What to do when records have duplicate fields
+@end menu
+
+@node Selecting a Server, Return Fields, Querying QI Servers, Querying QI Servers
+@subsection Selecting a Server
+
+Before doing any query you will need to set the query server, this is
+the name of the host machine running the @code{qi} software. If you do
+not set it in any fashion, @code{ph} will ask you for one when you
+make your first query.
+
+@defvar ph-server
+The name or IP address of the CCSO (PH/QI) server. A port number may be
+specified by appending a colon and a number to the name of the
+server. You will not need this unless your server runs on different port 
+than the usual 105.
+@end defvar
+
+@node Return Fields, Handling Duplicate Fields, Selecting a Server, Querying QI Servers
+@subsection Return Fields
+
+@code{qi} servers are configured to return a default set of fields for
+each record matching a query if the query specifies none. The variable
+@code{ph-default-return-fields} controls the return fields you want for
+your queries.
+
+@defvar ph-default-return-fields
+A list of the default fields to extract from CCSO entries.  If it
+contains @code{all} then all available fields are returned. @code{nil}
+means return the default fields as configured in the server. Default is
+@code{nil}
+@end defvar
+
+The server may return several matching records to a query. Some of the
+records may however not contain all the fields you requested. You can
+chose to discard those records.
+
+@defopt ph-strict-return-matches
+If non-@code{nil}, entries that do not contain all the requested return
+fields are ignored.  Default is @code{t}.
+@end defopt
+
+@node Handling Duplicate Fields,  , Return Fields, Querying QI Servers
+@subsection Handling Duplicate Fields
+
+@code{qi} authorizes records to have different instances of the same
+field. For instance the record of a person may contain several e-mail
+fields containing different e-mail addresses. This is difficult to
+distinguish from fields having multi-line values such as the postal
+address that may contain a line for the street and another one for the
+zip code and city name. In both cases, @code{ph} considers the field be
+duplicated. 
+
+@code{ph} has several methods to deal with duplicate fields. The
+available methods are:
+
+@table @code
+@item list
+Makes a list with the different values of the duplicate field. The
+record keeps only one instance of the field the value of which is a list
+of all the different values. This is the default method that is used to
+handle duplicate fields for which no other method has been specified.
+@item first
+Discards all the duplicate values of the field keeping only the first
+one.
+@item concat
+Concatenates the different values using @code{\n} as a separator. The
+record keeps only one instance of the field the value of which is a
+single multi-line string.
+@item duplicate
+Duplicates the whole record into as many instances as there are different
+values for the field. This is the default for the e-mail field. Thus a
+record containing 3 different e-mail addresses is duplicated into three
+different records each having a single e-mail address. This is
+particularly useful in combination with @code{select} as the method to
+handle multiple matches in inline expansion queries (@pxref{Inline Query
+Expansion}) because you are presented with the 3 addresses in a
+selection buffer
+@end table
+
+Because a method may not be applicable to all fields, the variable
+@code{ph-duplicate-fields-handling-method} lets you specify either a
+default method for all fields or a method for each individual field.
+
+@defvar ph-duplicate-fields-handling-method
+A method to handle entries containing duplicate fields.  This is either
+an alist (@var{field} . @var{method}) or a symbol @var{method}.  The
+alist form of the variable associates a method to an individual field,
+the second form specifies a method applicable to all fields. Available
+methods are: @code{list}, @code{first}, @code{concat}, @code{duplicate}
+duplicates the entire entry into as many instances as different values.
+Defaults to @code{list}.
+@end defvar
+
+
+
+@node Query Form, Inline Query Expansion, Querying QI Servers, Usage
+@comment  node-name,  next,  previous,  up
+@section Query Form
+
+The simplest way to query your directory server is to use the query
+form. You display the query form with the @code{Query Form} menu item or
+by typing @kbd{M-x ph-query-form}. The fields presented in this form are
+defined by the @code{ph-form-fields} variable (unless a non-@code{nil}
+argument is supplied to @code{ph-query-form}).
+
+@defvar ph-form-fields
+A list of fields presented in the query form. You can get a list of
+valid field names with the @code{List Valid Field Names} menu item or
+@kbd{M-x ph-get-field-list}. Defaults to @code{name}, @code{email} and
+@code{phone}.
+@end defvar
+
+@deffn Command ph-query-form get-fields-from-server
+Display a form to query the CCSO PH/QI Nameserver.
+If given a non-nil argument the function first queries the  server 
+for the existing fields and displays a corresponding form.
+@end deffn
+
+Since the names of the fields may not be explicit enough or adapted to
+be directly displayed as prompt strings in the form, the variable
+@code{ph-fieldname-formstring-alist} lets you define prompt strings for
+the various fields.
+
+@defvar ph-fieldname-formstring-alist
+This is an alist mapping CCSO database field names onto prompt strings
+used in query/response forms. Prompt strings for fields that are not in
+this alist are derived by replacing underscores with spaces and
+capitalizing the individual words.
+@end defvar
+
+Upon successful completion the command will display a buffer containing
+the results of the query. The fields that are returned for each record
+are controlled by @code{ph-default-return-fields} (@pxref{Return
+Fields}) 
+
+@node Inline Query Expansion, Creating BBDB Records, Query Form, Usage
+@comment  node-name,  next,  previous,  up
+@section Inline Query Expansion
+
+Instead of using a query form, you may prefer inline expansion. This is
+a powerful method to get completion from your directory server. The most
+common usage is for expanding names to e-mail addresses in mail message
+buffers. The expansion is performed by the command
+@code{ph-expand-inline}. The operation is controlled by the variables
+@code{ph-inline-expansion-format}, @code{ph-inline-query-format-list},
+@code{ph-expanding-overwrites-query} and
+@code{ph-multiple-match-handling-method}
+
+@deffn Command ph-expand-inline replace-p
+Query the server and expand the query string before point.  The query
+string consists of the buffer substring from the point back to the
+preceding comma, colon or beginning of line. If it consists of more than
+one word the variable @code{ph-inline-query-format-list} controls how
+these are mapped onto CCSO database field names.  After querying the
+server for the given string, the expansion specified by
+@code{ph-inline-expansion-format} is inserted in the buffer at point. If
+@var{replace-p} is @code{t} then this expansion replaces the query
+string in the buffer.  If @code{ph-expanding-overwrites-query} is
+non-@code{nil} then the meaning of @var{replace-p} is negated.
+@end deffn
+
+@defvar ph-inline-query-format-list
+Format of an inline expansion query.  If the inline query string
+consists of several words, this list specifies how these individual
+words are associated to CCSO database field names.  If @code{nil} all
+the words will be mapped onto the default CCSO database key (generally
+@code{name}). Default is @code{nil}.
+@end defvar
+
+@defvar ph-inline-expansion-format
+This variable lets you control what is exactly inserted into the buffer
+upon an inline expansion request. It is a list whose first element is a
+string passed to @code{format}. Remaining elements are symbols
+corresponding to CCSO database field names, corresponding field values
+are passed as additional arguments to format. Default is @code{("%s"
+email)} but you may want to consider a value like @code{("%s <%s>" name
+email)}
+@end defvar
+
+@defvar ph-multiple-match-handling-method
+This variable controls what to do when multiple entries match a query
+for an inline expansion.  Possible values are:
+@table @code
+@item first
+The first match is considered as being the only one, the others are
+discarded.
+@item select
+A selection buffer pops-up where you can choose a particular match. This 
+is the default value of the variable.
+@item all
+The expansion uses all records successively
+@item abort
+An error is signaled. The expansion aborts.
+@end table
+
+
+Defaults to @code{select}
+@end defvar
+
+
+
+@node Creating BBDB Records, The Server Hotlist, Inline Query Expansion, Usage
+@comment  node-name,  next,  previous,  up
+@section Creating BBDB Records
+
+With @code{ph}, you can automatically create BBDB records
+(@pxref{Top,,BBDB,bbdb,BBDB Manual}) from records you get from a PH/QI
+server. You do this by moving the point to the appropriate record in a
+query result display buffer and invoking the command
+@code{ph-insert-record-at-point-into-bbdb} with the corresponding
+keyboard binding, @kbd{b} @footnote{This keybinding does not actually
+call @code{ph-insert-record-at-point-into-bbdb} but uses
+@code{ph-try-bbdb-insert} instead.} or with the menu. @code{ph} cannot
+update an existing BBDB record and will signal an error if you try to
+insert a record matching an existing one.
+
+Because the CCSO directory system does not enforce a strict record
+format, local installations of the QI server use different names for the
+record fields and have different ways to organize the
+information. Furthermore BBDB has its own record structure that has
+little to do with what is commonly found on QI servers. For these
+reasons the process of converting a record from its QI format to the
+BBDB format is highly customizable.
+
+@defvar ph-bbdb-conversion-alist
+This is the variable that lets you customize how BBDB fields map to
+PH/QI records. Its value is an alist of cells of the form
+@code{(}@var{bbdb-field} . @var{spec-or-list}@code{)}. @var{bbdb-field} is the name of a field that must be defined in your BBDB
+environment (standard field names are @code{name}, @code{company}, @code{net}, @code{phone},
+@code{address} and @code{notes}). @var{spec-or-list} is either a single
+mapping specification or a list of mapping specifications. Lists of
+mapping specifications are valid for the @code{phone} and
+@code{address} BBDB fields only. @var{spec}s are actually s-expressions
+which are evaluated as follows:
+
+@table @asis
+@item a string 
+evaluates to itself
+@item a symbol
+evaluates to the symbol value. Symbols corresponding to PH/QI fields
+present in the record evaluate to the value of the field in the record
+@item a form
+is evaluated as a function. The argument list may contain PH/QI field
+names which evaluate to the corresponding values in the record. The form
+evaluation should return something appropriate for the particular
+@var{bbdb-field} (see @code{bbdb-create-internal}).
+@code{ph-bbdbify-phone} and @code{ph-bbdbify-address} are provided as
+convenience functions to parse phones and addresses.
+@end table
+@end defvar
+
+The default value of @code{ph-bbdb-conversion-alist} is:
+
+@lisp
+((name . name)
+ (net . email)
+ (address . (ph-bbdbify-address address "Address"))
+ (phone . ((ph-bbdbify-phone phone "Phone")
+           (ph-bbdbify-phone office_phone "Office Phone"))))
+@end lisp
+
+This means that:
+
+@itemize @bullet
+@item 
+the @code{name} field of the BBDB record gets its value
+from the @code{name} field of the PH/QI record
+@item
+the @code{net} field of the BBDB record gets its value
+from the @code{email} field of the PH/QI record
+@item
+the @code{address} field of the BBDB record is obtained by parsing the
+@code{address} field of the PH/QI record with the function
+@code{ph-bbdbify-address}
+@item
+two @code{phone} fields are created (when possible) in the BBDB record.
+The first one has "Phone" for location and its value is obtained by
+parsing the @code{phone} field of the PH/QI record with the function
+@code{ph-bbdbify-phone}. The second one has "Office Phone" for location
+its value is obtained by parsing the @code{office_phone} field of the
+PH/QI record with the function @code{ph-bbdbify-phone}.
+@end itemize
+
+@defun ph-bbdbify-phone @var{phone} @var{location}
+This is a convenience function provided for use in
+@code{ph-bbdb-conversion-alist}. It parses @var{phone} into a vector
+compatible with @code{bbdb-create-internal}. @var{phone} is either a string
+supposedly containing a phone number or a list of such strings which are
+concatenated. @var{location} is used as the phone location for BBDB.
+@end defun
+
+@defun ph-bbdbify-address @var{addr} @var{location}
+This is a convenience function provided for use in
+@code{ph-bbdb-conversion-alist}. It parses @var{addr} into a vector
+compatible with @code{bbdb-create-internal}. @var{addr} should be an
+address string of no more than four lines or a list of lines. The last
+line is searched for the zip code, city and state name. @var{location}
+is used as the phone location for BBDB.
+@end defun
+
+Note that only a subset of the fields you selected with
+@code{ph-default-return-fields} and that are actually displayed may
+actually be inserted as part of the newly created BBDB record.
+
+
+@node The Server Hotlist,  , Creating BBDB Records, Usage
+@comment  node-name,  next,  previous,  up
+@section The Server Hotlist
+
+@code{ph} lets you maintain a list of frequently used servers so that you 
+can easily switch from one to another. This hotlist appears in the
+@code{Server} sub-menu. You select a server in this list by clicking on
+its name. You can add the current server to the list with the command
+@code{ph-bookmark-current-server}. The list is contained in the variable
+@code{ph-server-hotlist} which is stored in and retrieved from the file
+designated by @code{ph-options-file}.
+
+@deffn Command ph-bookmark-server server
+Add @var{server} to the hotlist of servers
+@end deffn
+
+@deffn Command ph-bookmark-current-server
+Add the current server to the hotlist of servers
+@end deffn
+
+@defvar ph-options-file
+The name of a file where @code{ph} stores its internal variables
+(currently only the hotlist is stored there). @code{ph} will try to load 
+that file upon initialization so, if you choose a file name
+different from the defaults @file{~/.ph-options}, be sure to set this
+variable to the appropriate value @emph{before} @code{ph} is itself
+loaded.
+@end defvar
+
+There is currently no way to remove a server from the list other than
+editing directly the @code{ph-options-file}.
+
+
+
+@node Credits, Variables Index, Usage, Top
+@comment  node-name,  next,  previous,  up
+@chapter Credits
+
+The original CCSO Nameserver software (@code{ph} & @code{qi}) was
+written at the University of Illinois at Urbana Champaign.
+
+The Emacs client @code{ph.el} was written and is maintained by Oscar
+Figueiredo.
+
+Thanks to Soren Dayton for his suggestions, his enthusiasm and his help
+in testing and proofreading the code and docs.
+
+@node Variables Index,  , Credits, Top
+@comment  node-name,  next,  previous,  up
+@unnumbered Variables Index
+
+@printindex vr
+
+@contents
+@bye
--- a/man/tm/Makefile	Mon Aug 13 09:47:55 2007 +0200
+++ b/man/tm/Makefile	Mon Aug 13 09:49:09 2007 +0200
@@ -47,6 +47,7 @@
 .texi.dvi :
 	$(TEXI2DVI) $<
 
+.PHONY: mostlyclean clean distclean realclean extraclean
 mostlyclean:
 	rm -f *.toc *.aux *.oaux *.log *.cp *.cps *.fn *.fns *.tp *.tps \
               *.vr *.vrs *.pg *.pgs *.ky *.kys
--- a/man/w3.texi	Mon Aug 13 09:47:55 2007 +0200
+++ b/man/w3.texi	Mon Aug 13 09:49:09 2007 +0200
@@ -12,7 +12,7 @@
 @c site: http://www.cs.indiana.edu/elisp/w3/docs.html
 @c
 @setfilename w3.info
-@settitle Emacs/W3 v3.0.93 User's Manual
+@settitle Emacs/W3 v3.0.94 User's Manual
 @iftex
 @finalout
 @end iftex
@@ -90,7 +90,7 @@
 @t{w3-beta@@indiana.edu} mailing list with any suggestions.
 @xref{Reporting Bugs}
 
-This manual corresponds to Emacs/W3 v3.0.93
+This manual corresponds to Emacs/W3 v3.0.94
 
 @menu
 * Getting Started::             Getting up and running with Emacs/W3
--- a/man/widget.texi	Mon Aug 13 09:47:55 2007 +0200
+++ b/man/widget.texi	Mon Aug 13 09:49:09 2007 +0200
@@ -13,7 +13,7 @@
 @comment  node-name,  next,  previous,  up
 @top The Emacs Widget Library
 
-Version: 1.9940
+Version: 1.9951
 
 @menu
 * Introduction::                
--- a/man/xemacs/Makefile	Mon Aug 13 09:47:55 2007 +0200
+++ b/man/xemacs/Makefile	Mon Aug 13 09:49:09 2007 +0200
@@ -43,6 +43,7 @@
 ../../info/$(NAME).info: $(srcs)
 	makeinfo -o $@ $(NAME).texi
 
+.PHONY: mostlyclean clean distclean realclean extraclean
 mostlyclean:
 	rm -f *.toc *.aux *.oaux *.log *.cp *.cps *.fn *.fns *.tp *.tps \
               *.vr *.vrs *.pg *.pgs *.ky *.kys
--- a/nt/config.h	Mon Aug 13 09:47:55 2007 +0200
+++ b/nt/config.h	Mon Aug 13 09:49:09 2007 +0200
@@ -435,17 +435,6 @@
    for the lib-src programs. */
 #undef EMACS_CONFIGURATION
 
-/* Load in the conversion definitions if this system
-   needs them and the source file being compiled has not
-   said to inhibit this.  There should be no need for you
-   to alter these lines.  */
-
-#ifdef SHORTNAMES
-#ifndef NO_SHORTNAMES
-#include "../shortnames/remap.h"
-#endif /* not NO_SHORTNAMES */
-#endif /* SHORTNAMES */
-
 /* Define REL_ALLOC if you want to use the relocating allocator for
    buffer space. */
 #undef REL_ALLOC
--- a/pkg-src/tree-x/Makefile.in.in	Mon Aug 13 09:47:55 2007 +0200
+++ b/pkg-src/tree-x/Makefile.in.in	Mon Aug 13 09:49:09 2007 +0200
@@ -34,6 +34,9 @@
 
 build_top=../..
 
+cflags  = -I${build_top}/src $(CPPFLAGS) $(c_switch_all)
+ldflags = $(ld_switch_all) -lXaw $(ld_libs_all)
+
 #ifdef USE_GNU_MAKE
 vpath %.c @srcdir@
 vpath %.h @srcdir@
@@ -51,13 +54,10 @@
 all : xoobr
 
 xoobr: $(objs)
-	$(CC) $(CFLAGS) $(objs) $(ldflags) -o $@
-
-cflags  = $(CFLAGS) -I${build_top}/src $(CPPFLAGS) $(c_switch_all)
-ldflags = $(LDFLAGS) $(ld_switch_all) -lXaw $(ld_libs_all)
+	$(CC) $(CFLAGS) $(LDFLAGS) $(objs) $(ldflags) -o $@
 
 .c.o :
-	${CC} -c $(cflags) $<
+	$(CC) $(CFLAGS) $(cflags) -c $<
 
 install: $(progs)
 	../../lib-src/make-path ${archlibdir}
@@ -76,9 +76,6 @@
 extraclean: distclean
 	$(RM) *~ \#*
 
-distclean: clean
-	$(RM) Makefile.in Makefile
-
 size:
 	wc *.c *.h
 
--- a/pkg-src/tree-x/dbl.h	Mon Aug 13 09:47:55 2007 +0200
+++ b/pkg-src/tree-x/dbl.h	Mon Aug 13 09:49:09 2007 +0200
@@ -44,9 +44,9 @@
 
 /* we need to remember which pixels and planes we allocated           */
 
-   int       mask;
-   long      pixels[DBL_MAX_COLORS];
-   long      planes[DBL_MAX_PLANES];
+   int           mask;
+   unsigned long pixels[DBL_MAX_COLORS];
+   unsigned long planes[DBL_MAX_PLANES];
 
 /* the pixel values one should use when drawing to the viewports      */
 
--- a/pkg-src/tree-x/input.c	Mon Aug 13 09:47:55 2007 +0200
+++ b/pkg-src/tree-x/input.c	Mon Aug 13 09:49:09 2007 +0200
@@ -4,6 +4,9 @@
  * ----------------------------------------------------------------------------
  */
 
+/* SunOS 5.4+ way to ask for all functions in header files. */
+#define __EXTENSIONS__ 1
+
 #include <ctype.h>
 #include <string.h>
 #include <stdlib.h>
--- a/pkg-src/tree-x/intf.c	Mon Aug 13 09:47:55 2007 +0200
+++ b/pkg-src/tree-x/intf.c	Mon Aug 13 09:49:09 2007 +0200
@@ -1228,7 +1228,7 @@
       SetupTree(TheTree);
     }
     break;
-#endif COMMENT
+#endif /* COMMENT */
   case LAYOUT_MENU_SPACING:
     dlgLevelValue = TreeParentDistance;
     dlgSiblingValue = TreeBorderSize;
--- a/src/ChangeLog	Mon Aug 13 09:47:55 2007 +0200
+++ b/src/ChangeLog	Mon Aug 13 09:49:09 2007 +0200
@@ -1,3 +1,26 @@
+1997-07-10  Hrvoje Niksic  <hniksic@srce.hr>
+
+	* fileio.c (Finsert_file_contents_internal): Handle non-regular
+ 	files.
+
+1997-07-12  Steven L Baur  <steve@altair.xemacs.org>
+
+	* Makefile.in.in (LOCK_OBJ): Only include filelock.[co] when
+	CLASH_DETECTION is defined.
+
+1997-07-11  Steven L Baur  <steve@altair.xemacs.org>
+
+	* emacs.c (main_1): Spelling fix.
+
+1997-07-10  Steven L Baur  <steve@altair.xemacs.org>
+
+	* Makefile.in.in (dump-elcs): Shouldn't use SATISFIED hack.
+	(xemacs-no-site-file): Not supported any more.
+	(binary): New dependency for dumping XEmacs.
+	(xemacs): Attempt to be a little smarter about not dumping a new
+	XEmacs if it is not needed.
+	(temacs): Remove `xemacs' after success.
+
 1997-07-09  Hrvoje Niksic  <hniksic@srce.hr>
 
 	* extents.c: Allow non-symbol properties of extents.
--- a/src/Makefile.in.in	Mon Aug 13 09:47:55 2007 +0200
+++ b/src/Makefile.in.in	Mon Aug 13 09:49:09 2007 +0200
@@ -22,15 +22,17 @@
 
 ## Synched up with: Not synched with FSF.
 
-@SET_MAKE@
-
 all: xemacs
-.PHONY : all release dump-elc dump-elcs all-elc all-elcs lint
+.PHONY : all release dump-elc dump-elcs all-elc all-elcs lint binary
 
 ## For performance and consistency, no built-in rules.
 .SUFFIXES:
 .SUFFIXES: .c .o .i .h
 
+@SET_MAKE@
+SHELL=/bin/sh
+RM = rm -f
+
 lispdir = ${srcdir}/../lisp/
 libsrc = ../lib-src/
 etcdir = ../etc/
@@ -42,6 +44,7 @@
 CFLAGS=@CFLAGS@
 CPPFLAGS=@CPPFLAGS@
 LDFLAGS=@LDFLAGS@
+RECURSIVE_MAKE=@RECURSIVE_MAKE@
 
 c_switch_general=@c_switch_general@
 c_switch_window_system=@c_switch_window_system@
@@ -56,17 +59,12 @@
 extra_objs=@extra_objs@
 LN_S=@LN_S@
 
-ld_switch_call_shared=@ld_switch_call_shared@
 ld_switch_shared=@ld_switch_shared@
 start_files=@start_files@
 start_flags=@start_flags@
 LD=@ld@
 lib_gcc=@lib_gcc@
 
-## just to be sure the sh is used
-SHELL=/bin/sh
-
-#define NO_SHORTNAMES
 #define NOT_C_CODE
 #include "config.h"
 
@@ -109,10 +107,6 @@
 quantify_libs = /local/lib/quantify_stubs.a
 #endif /* QUANTIFY */
 
-#ifdef SHORTNAMES
-SHORT= shortnames
-#endif
-
 #ifdef HAVE_NATIVE_SOUND
 sound_cflags=@sound_cflags@
 #endif
@@ -123,8 +117,7 @@
 lwlib_libs = ../lwlib/liblw.a
 lwlib_deps = $(lwlib_libs)
 $(lwlib_libs) :
-	cd ../lwlib && ${MAKE} ${MFLAGS}
-## LWLIB_LDFLAGS  = -L../lwlib
+	cd ../lwlib && $(RECURSIVE_MAKE)
 
 x_objs=balloon_help.o balloon-x.o console-x.o device-x.o event-Xt.o frame-x.o\
  glyphs-x.o objects-x.o redisplay-x.o xgccache.o xselect.o
@@ -141,7 +134,7 @@
 
 cppflags = $(CPPFLAGS) -Demacs -I. $(c_switch_all)
 cflags   = $(CFLAGS) $(cppflags)
-ldflags  = -L. $(ld_switch_all)
+ldflags  = $(ld_switch_all)
 
 .c.o:
 	$(CC) -c $(cflags) $<
@@ -161,6 +154,12 @@
 energize_objs = energize.o $(freecheck_objs)
 #endif /* ENERGIZE */
 
+#ifdef CLASH_DETECTION
+LOCK_OBJ = filelock.o
+#else
+LOCK_OBJ =
+#endif /* CLASH_DETECTION */
+
 ## lastfile must follow all files whose initialized data areas should
 ## be dumped as pure by dump-emacs.
 
@@ -175,7 +174,7 @@
  editfns.o elhash.o emacs.o\
  $(energize_objs) eval.o events.o $(extra_objs)\
  event-stream.o extents.o faces.o\
- fileio.o filelock.o filemode.o floatfns.o fns.o font-lock.o\
+ fileio.o $(LOCK_OBJ) filemode.o floatfns.o fns.o font-lock.o\
  frame.o general.o getloadavg.o glyphs.o\
  $(gui_objs) hash.o indent.o insdel.o intl.o\
  keymap.o $(RTC_patch_objs) lread.o lstream.o\
@@ -285,7 +284,7 @@
 	else true; fi
 	@touch SATISFIED
 	-$(DUMPENV) ./temacs -nl -batch -l loadup.el dump
-	@if test ! -f SATISFIED; then $(MAKE) $@; fi
+	@if test ! -f SATISFIED; then $(RECURSIVE_MAKE) $@; fi
 	@$(RM) SATISFIED
 #else /* ! defined (HAVE_SHM) */
 	-if [ -w ${srcdir}/../lisp ]; then \
@@ -293,7 +292,7 @@
 	else true; fi
 	@touch SATISFIED
 	-$(DUMPENV) ./temacs -batch -l loadup.el dump
-	@if test ! -f SATISFIED; then $(MAKE) $@; fi
+	@if test ! -f SATISFIED; then $(RECURSIVE_MAKE) $@; fi
 	@$(RM) SATISFIED
 #endif /* ! defined (HAVE_SHM) */
 	touch release
@@ -301,16 +300,20 @@
 
 FRC.DOC:
 
-xemacs: temacs ${libsrc}DOC $(mo_file) ${other_files} dump-elcs
+FRC.xemacs:
+
+xemacs: temacs ${libsrc}DOC $(mo_file) ${other_files} FRC.xemacs
+	@touch NOBYTECOMPILE
+	-${DUMPENV} ./temacs -batch -l ../prim/update-elc.el
+	if test -f NOBYTECOMPILE || test ! -f xemacs; then \
+		$(RECURSIVE_MAKE) binary; \
+	fi
+	@$(RM) NOBYTECOMPILE
+
+binary: temacs
 	@touch SATISFIED
 	-$(DUMPENV) ./temacs -batch -l loadup.el dump
-	@if test ! -f SATISFIED; then $(MAKE) $@; fi
-	@$(RM) SATISFIED
-
-xemacs-no-site-file: temacs ${libsrc}DOC $(mo_file) ${other_files} dump-elcs
-	@touch SATISFIED
-	-$(DUMPENV) ./temacs -batch -l loadup.el dump no-site-file
-	@if test ! -f SATISFIED; then $(MAKE) $@; fi
+	@if test ! -f SATISFIED; then $(RECURSIVE_MAKE) $@; fi
 	@$(RM) SATISFIED
 
 obj_src = $(objs:.o=.c)
@@ -318,7 +321,7 @@
 #ifdef DYNODUMP
 dynodump_deps = ../dynodump/dynodump.so
 ../dynodump/dynodump.so:
-	cd ../dynodump && ${MAKE} ${MFLAGS}
+	cd ../dynodump && $(RECURSIVE_MAKE)
 #endif /* DYNODUMP */
 
 ${libsrc}DOC: temacs
@@ -333,13 +336,10 @@
 dump_elcs: dump-elcs
 
 dump-elcs: temacs
-	@touch SATISFIED
 	-${DUMPENV} ./temacs -batch -l ../prim/update-elc.el
-	@if test ! -f SATISFIED; then $(MAKE) $@; fi
-	@$(RM) SATISFIED
 
 all-elc all-elcs:
-	cd .. && $(MAKE) all-elc $(MFLAGS)
+	cd .. && $(RECURSIVE_MAKE) all-elc
 
 #ifdef I18N3
 
@@ -363,15 +363,15 @@
 	cd ${mo_dir} && ${msgfmt} -o emacs.mo emacs.po
 
 ${libsrc}make-msgfile:
-	cd ${libsrc} && ${MAKE} ${MFLAGS} make-msgfile
+	cd ${libsrc} && $(RECURSIVE_MAKE) make-msgfile
 
 ${libsrc}make-po:
-	cd ${libsrc} && ${MAKE} ${MFLAGS} make-po
+	cd ${libsrc} && $(RECURSIVE_MAKE) make-po
 
 #endif /* I18N3 */
 
 ${libsrc}make-docfile:
-	cd ${libsrc} && ${MAKE} ${MFLAGS} make-docfile
+	cd ${libsrc} && $(RECURSIVE_MAKE) make-docfile
 
 ## Lint Section
 LINT.c=$(LINT) $(LINTFLAGS) $(LINTINCLUDES)
@@ -384,21 +384,23 @@
 ## end of Lint Section
 
 temacs_deps=\
- $(LOCALCPP) $(SHORT) $(start_files) ${objs} ${otherobjs}\
+ $(LOCALCPP) $(start_files) ${objs} ${otherobjs}\
  $(lwlib_deps) $(dynodump_deps) prefix-args
 
 temacs_link_args=\
- ${start_flags} ${ldflags} $(ld_switch_call_shared)\
+ ${start_flags} ${ldflags}\
  -o $@ ${start_files} ${objs} ${otherobjs} ${LIBES}
 
 temacs: $(temacs_deps)
-	$(LD) $(temacs_link_args)
+	if $(LD) $(temacs_link_args); then \
+		$(RM) xemacs; \
+	fi
 
 rtc_patch.o:
 	rtc_patch_area -o $@
 
 rtcmacs: $(temacs_deps) rtc_patch.o
-	$(RM) temacs; $(MAKE) $(MAKE_FLAGS) temacs RTC_patch_objs=rtc_patch.o
+	$(RM) temacs; $(RECURSIVE_MAKE) temacs RTC_patch_objs=rtc_patch.o
 	mv temacs rtcmacs
 
 rtcrun: rtcmacs
@@ -518,11 +520,6 @@
 prefix-args: ${srcdir}/prefix-args.c config.h
 	$(CC) $(cflags) ${srcdir}/prefix-args.c -o prefix-args
 
-#ifdef SHORTNAMES
-shortnames:
-	cd ${shortnamesdir} && ${MAKE} ${MFLAGS}
-#endif
-
 config.h: ${srcdir}/config.h.in
 puresize_adjust.h: ${srcdir}/puresize.h
 paths.h: ${srcdir}/paths.h.in
--- a/src/abbrev.c	Mon Aug 13 09:47:55 2007 +0200
+++ b/src/abbrev.c	Mon Aug 13 09:49:09 2007 +0200
@@ -90,7 +90,7 @@
   struct Lisp_Char_Table *chartab = XCHAR_TABLE (buf->mirror_syntax_table);
   struct Lisp_String *abbrev;
   struct Lisp_Vector *obvec;
-  struct Lisp_Symbol *sym;
+  struct Lisp_Symbol *sym = NULL;
   Charcount abbrev_length;
   Lisp_Object tail;
   int i, found;
--- a/src/alloc.c	Mon Aug 13 09:47:55 2007 +0200
+++ b/src/alloc.c	Mon Aug 13 09:49:09 2007 +0200
@@ -197,9 +197,7 @@
 int
 purified (Lisp_Object obj)
 {
-  if (!POINTER_TYPE_P (XGCTYPE (obj)))
-    return (0);
-  return (PURIFIED (XPNTR (obj)));
+  return !POINTER_TYPE_P (XGCTYPE (obj)) ? 0 : PURIFIED (XPNTR (obj));
 }
 
 int
@@ -214,7 +212,7 @@
   if (pure_lossage)
     {
       pure_lossage += size;
-      return (0);
+      return 0;
     }
   else if (pureptr + size > get_PURESIZE())
     {
@@ -222,10 +220,10 @@
       /* when we're done. */
       /* message ("\nERROR:  Pure Lisp storage exhausted!\n"); */
       pure_lossage = size;
-      return (0);
+      return 0;
     }
   else
-    return (1);
+    return 1;
 }
 
 
@@ -464,7 +462,7 @@
   val = xmalloc (len);
   if (val == 0) return 0;
   memcpy (val, str, len);
-  return (val);
+  return val;
 }
 
 #ifdef NEED_STRDUP
@@ -489,7 +487,7 @@
       xfree (p);
       memory_full ();
     }
-  return (p);
+  return p;
 }
 
 
@@ -534,7 +532,7 @@
   lcheader->free = 0;
   all_lcrecords = lcheader;
   INCREMENT_CONS_COUNTER (size, implementation->name);
-  return (lcheader);
+  return lcheader;
 }
 
 #if 0 /* Presently unused */
@@ -1038,7 +1036,7 @@
 list1 (Lisp_Object obj0)
 {
   /* This cannot GC. */
-  return (Fcons (obj0, Qnil));
+  return Fcons (obj0, Qnil);
 }
 
 Lisp_Object
@@ -1123,7 +1121,7 @@
   float_next (f) = ((struct Lisp_Float *) -1);
   float_data (f) = float_value;
   XSETFLOAT (val, f);
-  return (val);
+  return val;
 }
 
 #endif /* LISP_FLOAT_TYPE */
@@ -1154,7 +1152,7 @@
   p->size = sizei;
   vector_next (p) = all_vectors;
   XSETVECTOR (all_vectors, p);
-  return (p);
+  return p;
 }
 
 Lisp_Object
@@ -1180,14 +1178,14 @@
         goto fill;
     }
     memset (vector_data (p), travesty[0], length * sizeof (Lisp_Object));
-    return (vector);
+    return vector;
   }
  fill:
 #endif
   for (elt = 0; elt < length; elt++)
     vector_data(p)[elt] = init;
 
-  return (vector);
+  return vector;
 }
 
 DEFUN ("make-vector", Fmake_vector, 2, 2, 0, /*
@@ -1199,7 +1197,7 @@
   if (!INTP (length) || XINT (length) < 0)
     length = wrong_type_argument (Qnatnump, length);
 
-  return (make_vector (XINT (length), init));
+  return make_vector (XINT (length), init);
 }
 
 DEFUN ("vector", Fvector, 0, MANY, 0, /*
@@ -1218,7 +1216,7 @@
   for (elt = 0; elt < nargs; elt++)
     vector_data(p)[elt] = args[elt];
 
-  return (vector);
+  return vector;
 }
 
 Lisp_Object
@@ -1342,7 +1340,7 @@
      functions might not set them. */
   p->bits[BIT_VECTOR_LONG_STORAGE (sizei) - 1] = 0;
   XSETBIT_VECTOR (all_bit_vectors, p);
-  return (p);
+  return p;
 }
 
 Lisp_Object
@@ -1373,7 +1371,7 @@
 	p->bits[num_longs - 1] &= (1 << bits_in_last) - 1;
     }
 
-  return (bit_vector);
+  return bit_vector;
 }
 
 Lisp_Object
@@ -1404,7 +1402,7 @@
   if (!INTP (length) || XINT (length) < 0)
     length = wrong_type_argument (Qnatnump, length);
 
-  return (make_bit_vector (XINT (length), init));
+  return make_bit_vector (XINT (length), init);
 }
 
 DEFUN ("bit-vector", Fbit_vector, 0, MANY, 0, /*
@@ -1426,7 +1424,7 @@
   for (elt = 0; elt < nargs; elt++)
     set_bit_vector_bit (p, elt, !ZEROP (args[elt]));
 
-  return (bit_vector);
+  return bit_vector;
 }
 
 
@@ -1469,7 +1467,7 @@
   b->annotated = Qnil;
 #endif
   XSETCOMPILED_FUNCTION (new, b);
-  return (new);
+  return new;
 }
 
 DEFUN ("make-byte-code", Fmake_byte_code, 4, MANY, 0, /*
@@ -1633,7 +1631,7 @@
     else
       b->doc_and_interactive = doc_string;
 
-    return (val);
+    return val;
   }
 }
 
@@ -1696,7 +1694,7 @@
   e->flags.end_open = 1;  /* default is for endpoints to behave like markers */
   e->flags.detachable = 1;
 
-  return (e);
+  return e;
 }
 
 
@@ -1818,7 +1816,7 @@
 
 #define CHARS_TO_STRING_CHAR(x) \
   ((struct string_chars *) \
-   (((char *) (x)) - (slot_offset (struct string_chars, chars))))
+   (((char *) (x)) - (slot_offset (struct string_chars, chars[0]))))
 
 
 struct string_chars
@@ -1911,7 +1909,7 @@
   set_string_byte (s, length, 0);
 
   XSETSTRING (val, s);
-  return (val);
+  return val;
 }
 
 #ifdef VERIFY_STRING_CHARS_INTEGRITY
@@ -2106,7 +2104,7 @@
 	    ptr[k++] = str[j];
       }
   }
-  return (val);
+  return val;
 }
 
 /* Take some raw memory, which MUST already be in internal format,
@@ -2123,7 +2121,7 @@
   
   val = make_uninit_string (length);
   memcpy (XSTRING_DATA (val), contents, length);
-  return (val);
+  return val;
 }
 
 /* Take some raw memory, encoded in some external data format,
@@ -2360,12 +2358,12 @@
 	  s = XSYMBOL (tem)->name;
 	  if (!PURIFIED (s)) abort ();
 	  XSETSTRING (new, s);
-	  return (new);
+	  return new;
 	}
     }
 
   if (!check_purespace (size))
-    return (make_string (data, length));
+    return make_string (data, length);
 
   s = (struct Lisp_String *) (PUREBEG + pureptr);
   set_string_length (s, length);
@@ -2392,7 +2390,7 @@
   s->plist = Fpurecopy (plist);
 
   XSETSTRING (new, s);
-  return (new);
+  return new;
 }
 
 
@@ -2407,7 +2405,7 @@
   /* We've made (at least) Qnil now, and Vobarray will soon be set up. */
   symbols_initialized = 1;
 
-  return (name);
+  return name;
 }
 
 
@@ -2417,7 +2415,7 @@
   Lisp_Object new;
 
   if (!check_purespace (sizeof (struct Lisp_Cons)))
-    return (Fcons (Fpurecopy (car), Fpurecopy (cdr)));
+    return Fcons (Fpurecopy (car), Fpurecopy (cdr));
 
   XSETCONS (new, PUREBEG + pureptr);
   pureptr += sizeof (struct Lisp_Cons);
@@ -2425,7 +2423,7 @@
 
   XCAR (new) = Fpurecopy (car);
   XCDR (new) = Fpurecopy (cdr);
-  return (new);
+  return new;
 }
 
 Lisp_Object
@@ -2474,7 +2472,7 @@
   }
 
   if (!check_purespace (sizeof (struct Lisp_Float)))
-    return (make_float (num));
+    return make_float (num);
 
   f = (struct Lisp_Float *) (PUREBEG + pureptr);
   set_lheader_implementation (&(f->lheader), lrecord_float);
@@ -2484,7 +2482,7 @@
   float_next (f) = ((struct Lisp_Float *) -1);
   float_data (f) = num;
   XSETFLOAT (val, f);
-  return (val);
+  return val;
 }
 
 #endif /* LISP_FLOAT_TYPE */
@@ -2499,18 +2497,18 @@
   init = Fpurecopy (init);
 
   if (!check_purespace (size))
-    return (make_vector (len, init));
+    return make_vector (len, init);
 
   XSETVECTOR (new, PUREBEG + pureptr);
   pureptr += size;
   bump_purestat (&purestat_vector_all, size);
 
-  XVECTOR (new)->size = len;
+  XVECTOR_LENGTH (new) = len;
 
   for (size = 0; size < len; size++)
-    vector_data (XVECTOR (new))[size] = init;
-
-  return (new);
+    XVECTOR_DATA (new)[size] = init;
+
+  return new;
 }
 
 #if 0
@@ -2525,7 +2523,7 @@
 
   set_lheader_implementation (header, implementation);
   header->next = 0;
-  return (header);
+  return header;
 }
 #endif
 
@@ -2540,11 +2538,11 @@
 {
   int i;
   if (!purify_flag)
-    return (obj);
+    return obj;
 
   if (!POINTER_TYPE_P (XTYPE (obj))
       || PURIFIED (XPNTR (obj)))
-    return (obj);
+    return obj;
 
   switch (XTYPE (obj))
     {
@@ -2562,8 +2560,8 @@
         struct Lisp_Vector *o = XVECTOR (obj);
         Lisp_Object new = make_pure_vector (vector_length (o), Qnil);
         for (i = 0; i < vector_length (o); i++)
-	  vector_data (XVECTOR (new))[i] = Fpurecopy (o->contents[i]);
-        return (new);
+	  XVECTOR_DATA (new)[i] = Fpurecopy (o->contents[i]);
+        return new;
       }
 
     default:
@@ -2580,7 +2578,7 @@
             n->arglist = Fpurecopy (o->arglist);
             n->doc_and_interactive = Fpurecopy (o->doc_and_interactive);
 	    n->maxdepth = o->maxdepth;
-            return (new);
+            return new;
           }
 #ifdef LISP_FLOAT_TYPE
         else if (FLOATP (obj))
@@ -2590,7 +2588,7 @@
           signal_simple_error ("Can't purecopy %S", obj);
       }
     }
-  return (obj);
+  return obj;
 }
 
 
@@ -2948,11 +2946,11 @@
   /*tail_recurse: */
   if (!POINTER_TYPE_P (XTYPE (obj))
       || !PURIFIED (XPNTR (obj)))
-    return (total);
+    return total;
 
   /* symbol's sizes are accounted for separately */
   if (SYMBOLP (obj))
-    return (total);
+    return total;
 
   switch (XTYPE (obj))
     {
@@ -3057,7 +3055,7 @@
     default:
       abort ();
     }
-  return (total);
+  return total;
 }
 #endif /* PURESTAT */
 
@@ -3099,7 +3097,7 @@
       lrecord_implementations_table[type_index] = implementation;
       *(implementation->lrecord_type_index) = type_index;
     }
-  return (type_index);
+  return type_index;
 }
 
 /* stats on lcrecords in use - kinda kludgy */
@@ -3798,7 +3796,7 @@
     case Lisp_String:
       return XMARKBIT (XSTRING (obj)->plist);
     case Lisp_Vector:
-      return (vector_length (XVECTOR (obj)) < 0);
+      return XVECTOR_LENGTH (obj) < 0;
 #ifndef LRECORD_SYMBOL
     case Lisp_Symbol:
       return XMARKBIT (XSYMBOL (obj)->plist);
@@ -4202,7 +4200,7 @@
   /* C doesn't have local functions (or closures, or GC, or readable syntax,
      or portable numeric datatypes, or bit-vectors, or characters, or
      arrays, or exceptions, or ...) */
-  return (cons3 (intern (name), make_int (value), tail));
+  return cons3 (intern (name), make_int (value), tail);
 }
 
 #define HACK_O_MATIC(type, name, pl)					\
@@ -4332,7 +4330,7 @@
   ret[3] = make_int (gc_count_string_total_size);
   ret[4] = make_int (gc_count_vector_total_size);
   ret[5] = pl;
-  return (Flist (6, ret));
+  return Flist (6, ret);
 }
 #undef HACK_O_MATIC
 
@@ -4345,7 +4343,7 @@
 */
        ())
 {
-  return (make_int (consing_since_gc));
+  return make_int (consing_since_gc);
 }
   
 DEFUN ("memory-limit", Fmemory_limit, 0, 0, "", /*
@@ -4355,7 +4353,7 @@
 */
        ())
 {
-  return (make_int ((EMACS_INT) sbrk (0) / 1024));
+  return make_int ((EMACS_INT) sbrk (0) / 1024);
 }
 
 
@@ -4363,13 +4361,13 @@
 int
 object_dead_p (Lisp_Object obj)
 {
-  return ((BUFFERP (obj) && !BUFFER_LIVE_P (XBUFFER (obj))) ||
-	  (FRAMEP (obj) && !FRAME_LIVE_P (XFRAME (obj))) ||
-	  (WINDOWP (obj) && !WINDOW_LIVE_P (XWINDOW (obj))) ||
-	  (DEVICEP (obj) && !DEVICE_LIVE_P (XDEVICE (obj))) ||
+  return ((BUFFERP  (obj) && !BUFFER_LIVE_P  (XBUFFER  (obj))) ||
+	  (FRAMEP   (obj) && !FRAME_LIVE_P   (XFRAME   (obj))) ||
+	  (WINDOWP  (obj) && !WINDOW_LIVE_P  (XWINDOW  (obj))) ||
+	  (DEVICEP  (obj) && !DEVICE_LIVE_P  (XDEVICE  (obj))) ||
 	  (CONSOLEP (obj) && !CONSOLE_LIVE_P (XCONSOLE (obj))) ||
-	  (EVENTP (obj) && !EVENT_LIVE_P (XEVENT (obj))) ||
-	  (EXTENTP (obj) && !EXTENT_LIVE_P (XEXTENT (obj))));
+	  (EVENTP   (obj) && !EVENT_LIVE_P   (XEVENT   (obj))) ||
+	  (EXTENTP  (obj) && !EXTENT_LIVE_P  (XEXTENT  (obj))));
 	  
 }
 
--- a/src/bytecode.c	Mon Aug 13 09:47:55 2007 +0200
+++ b/src/bytecode.c	Mon Aug 13 09:49:09 2007 +0200
@@ -30,7 +30,7 @@
 hacked on by jwz@netscape.com 17-jun-91
   o  added a compile-time switch to turn on simple sanity checking;
   o  put back the obsolete byte-codes for error-detection;
-  o  added a new instruction, unbind_all, which I will use for 
+  o  added a new instruction, unbind_all, which I will use for
      tail-recursion elimination;
   o  made temp_output_buffer_show be called with the right number
      of args;
@@ -50,11 +50,11 @@
 #include "syntax.h"
 
 /*
- * define BYTE_CODE_SAFE to enable some minor sanity checking (useful for 
+ * define BYTE_CODE_SAFE to enable some minor sanity checking (useful for
  * debugging the byte compiler...)  Somewhat surprisingly, defining this
  * makes Fbyte_code about 8% slower.
  *
- * define BYTE_CODE_METER to enable generation of a byte-op usage histogram. 
+ * define BYTE_CODE_METER to enable generation of a byte-op usage histogram.
  */
 #define BYTE_CODE_SAFE
 /* #define BYTE_CODE_METER */
@@ -66,8 +66,7 @@
 int byte_metering_on;
 
 #define METER_2(code1, code2) \
-  XINT (XVECTOR (vector_data (XVECTOR (Vbyte_code_meter))[(code1)]) \
-	->contents[(code2)])
+  XINT (XVECTOR_DATA (XVECTOR_DATA (Vbyte_code_meter)[(code1)])[(code2)])
 
 #define METER_1(code) METER_2 (0, (code))
 
@@ -283,9 +282,9 @@
   REGISTER Lisp_Object *stackp;
   Lisp_Object *stacke;
   REGISTER Lisp_Object v1, v2;
-  REGISTER Lisp_Object *vectorp = vector_data (XVECTOR (vector));
+  REGISTER Lisp_Object *vectorp = XVECTOR_DATA (vector);
 #ifdef BYTE_CODE_SAFE
-  REGISTER int const_length = vector_length (XVECTOR (vector));
+  REGISTER int const_length = XVECTOR_LENGTH (vector);
 #endif
   REGISTER Emchar *massaged_code;
   int massaged_code_len;
@@ -315,13 +314,13 @@
 				      massaged_code);
   massaged_code[massaged_code_len] = 0;
   pc = 0;
-  
+
   while (1)
     {
 #ifdef BYTE_CODE_SAFE
       if (stackp > stacke)
-	error ("Byte code stack overflow (byte compiler bug), pc %d, depth %d",
-	       pc, stacke - stackp);
+	error ("Byte code stack overflow (byte compiler bug), pc %d, depth %ld",
+	       pc, (long) (stacke - stackp));
       if (stackp < stack)
 	error ("Byte code stack underflow (byte compiler bug), pc %d",
 	       pc);
@@ -1188,7 +1187,7 @@
   {
     int i = 256;
     while (i--)
-      vector_data (XVECTOR (Vbyte_code_meter))[i] =
+      XVECTOR_DATA (Vbyte_code_meter)[i] =
 	make_vector (256, Qzero);
   }
 #endif
--- a/src/callint.c	Mon Aug 13 09:47:55 2007 +0200
+++ b/src/callint.c	Mon Aug 13 09:49:09 2007 +0200
@@ -183,7 +183,7 @@
   if (NILP (tem) || (XBUFFER (tem) != current_buffer))
     error ("The mark is not set now");
 
-  return (marker_position (current_buffer->mark));
+  return marker_position (current_buffer->mark);
 }
 
 static Lisp_Object
@@ -196,7 +196,7 @@
   /* Fformat no longer smashes its arg vector, so no need to copy it. */
   
   if (!strchr ((char *) XSTRING_DATA (s), '%'))
-    return (s);
+    return s;
   GCPRO1 (s);
   RETURN_UNGCPRO (emacs_doprnt_string_lisp (0, s, 0, nargs, args));
 }
@@ -243,11 +243,12 @@
 
   if (!NILP (keys))
     {
-      int i;
+      int i, len;
 
       CHECK_VECTOR (keys);
-      for (i = 0; i < vector_length (XVECTOR (keys)); i++)
-	CHECK_LIVE_EVENT (vector_data (XVECTOR (keys))[i]);
+      len = XVECTOR_LENGTH (keys);
+      for (i = 0; i < len; i++)
+	CHECK_LIVE_EVENT (XVECTOR_DATA (keys)[i]);
     }
 
   /* Save this now, since use of minibuffer will clobber it. */
@@ -330,7 +331,7 @@
       if (EQ (record_flag, Qlambda)) /* XEmacs addition */
 	{
 	  UNGCPRO;
-	  return (specs);
+	  return specs;
 	}
       if (!NILP (record_flag) || i != num_input_chars)
 	{
@@ -504,7 +505,7 @@
     {
       /* Interactive function or no arguments; just call it */
       if (EQ (record_flag, Qlambda))
-	return (Qnil);
+	return Qnil;
       if (!NILP (record_flag))
 	{
 	  Vcommand_history = Fcons (list1 (function), Vcommand_history);
@@ -520,7 +521,7 @@
       }
       if (set_zmacs_region_stays)
 	zmacs_region_stays = 1;
-      return (unbind_to (speccount, fun));
+      return unbind_to (speccount, fun);
     }
 
   /* Read interactive arguments */
@@ -928,7 +929,7 @@
     UNGCPRO;
     if (set_zmacs_region_stays)
       zmacs_region_stays = 1;
-    return (unbind_to (speccount, fun));
+    return unbind_to (speccount, fun);
   }
 }
 
@@ -952,7 +953,7 @@
   else
     val = 1;
 
-  return (make_int (val));
+  return make_int (val);
 
 }
 
--- a/src/config.h.in	Mon Aug 13 09:47:55 2007 +0200
+++ b/src/config.h.in	Mon Aug 13 09:49:09 2007 +0200
@@ -54,6 +54,9 @@
    for the lib-src programs. */
 #undef EMACS_CONFIGURATION
 
+/* The configuration options.  This is exported to Lisp. */
+#undef EMACS_CONFIG_OPTIONS
+
 /* The version info from version.sh. Used in #pragma ident in emacs.c */
 #undef EMACS_MAJOR_VERSION
 #undef EMACS_MINOR_VERSION
@@ -65,6 +68,9 @@
 /* Used to identify the XEmacs version in stack traces. */
 #undef CANONICAL_VERSION
 
+/* Allow the configurer to specify (additional) package directories. */
+#undef PACKAGE_PATH
+
 /* This will be removed in 19.15. */
 /* Hah!  Try 20.3 ... */
 /* Hah!  Try never ... */
@@ -164,9 +170,8 @@
 
 #undef HAVE_LONG_FILE_NAMES
 
-#ifdef HAVE_LONG_FILE_NAMES
-#define CLASH_DETECTION
-#endif
+/* Use lock files to detect multiple edits of the same file? */
+#undef CLASH_DETECTION
 
 #undef HAVE_LIBKSTAT
 #undef HAVE_LIBINTL
@@ -467,28 +472,6 @@
 #define SYSTEM_MALLOC
 #endif
 
-#if 0 /* RMSmacs */
-/* These typedefs shouldn't appear when alloca.s or Makefile.in
-   includes config.h.  */
-#ifndef NOT_C_CODE
-#ifndef SPECIAL_EMACS_INT
-typedef long EMACS_INT;
-typedef unsigned long EMACS_UINT;
-#endif
-#endif
-#endif /* 0 */
-
-/* Load in the conversion definitions if this system
-   needs them and the source file being compiled has not
-   said to inhibit this.  There should be no need for you
-   to alter these lines. */
-
-#ifdef SHORTNAMES
-#ifndef NO_SHORTNAMES
-#include "../shortnames/remap.h"
-#endif /* not NO_SHORTNAMES */
-#endif /* SHORTNAMES */
-
 /* Use the relocating allocator for buffer space? */
 #undef REL_ALLOC
 
--- a/src/data.c	Mon Aug 13 09:47:55 2007 +0200
+++ b/src/data.c	Mon Aug 13 09:49:09 2007 +0200
@@ -279,7 +279,7 @@
 */
        (object))
 {
-  return (CONSP (object) || NILP (object)) ? Qt : Qnil;
+  return CONSP (object) || NILP (object) ? Qt : Qnil;
 }
 
 DEFUN ("nlistp", Fnlistp, 1, 1, 0, /*
@@ -287,7 +287,7 @@
 */
        (object))
 {
-  return (CONSP (object) || NILP (object)) ? Qnil : Qt;
+  return CONSP (object) || NILP (object) ? Qnil : Qt;
 }
 
 DEFUN ("symbolp", Fsymbolp, 1, 1, 0, /*
@@ -589,7 +589,7 @@
   if (CHARP    (object)) return Qcharacter;
   if (STRINGP  (object)) return Qstring;
   if (VECTORP  (object)) return Qvector;
-  
+
   assert (LRECORDP (object));
   return intern (XRECORD_LHEADER (object)->implementation->name);
 }
@@ -685,7 +685,7 @@
 Lisp_Object
 indirect_function (Lisp_Object object, int errorp)
 {
-  Lisp_Object tortoise = object; 
+  Lisp_Object tortoise = object;
   Lisp_Object hare     = object;
 
   for (;;)
@@ -700,7 +700,7 @@
       tortoise = XSYMBOL (tortoise)->function;
 
       if (EQ (hare, tortoise))
-	return (Fsignal (Qcyclic_function_indirection, list1 (object)));
+	return Fsignal (Qcyclic_function_indirection, list1 (object));
     }
 
   if (UNBOUNDP (hare) && errorp)
@@ -743,8 +743,8 @@
     }
   if (VECTORP (array))
     {
-      if (idxval >= vector_length (XVECTOR (array))) goto lose;
-      return vector_data (XVECTOR (array))[idxval];
+      if (idxval >= XVECTOR_LENGTH (array)) goto lose;
+      return XVECTOR_DATA (array)[idxval];
     }
   else if (BIT_VECTORP (array))
     {
@@ -754,13 +754,13 @@
   else if (STRINGP (array))
     {
       if (idxval >= string_char_length (XSTRING (array))) goto lose;
-      return (make_char (string_char (XSTRING (array), idxval)));
+      return make_char (string_char (XSTRING (array), idxval));
     }
 #ifdef LOSING_BYTECODE
   else if (COMPILED_FUNCTIONP (array))
     {
       /* Weird, gross compatibility kludge */
-      return (Felt (array, idx));
+      return Felt (array, idx);
     }
 #endif
   else
@@ -793,8 +793,8 @@
 
   if (VECTORP (array))
     {
-      if (idxval >= vector_length (XVECTOR (array))) goto lose;
-      vector_data (XVECTOR (array))[idxval] = newval;
+      if (idxval >= XVECTOR_LENGTH (array)) goto lose;
+      XVECTOR_DATA (array)[idxval] = newval;
     }
   else if (BIT_VECTORP (array))
     {
@@ -837,14 +837,14 @@
 {
   assert (b->flags.interactivep);
   if (b->flags.documentationp && b->flags.domainp)
-    return (XCAR (XCDR (b->doc_and_interactive)));
+    return XCAR (XCDR (b->doc_and_interactive));
   else if (b->flags.documentationp)
-    return (XCDR (b->doc_and_interactive));
+    return XCDR (b->doc_and_interactive);
   else if (b->flags.domainp)
-    return (XCAR (b->doc_and_interactive));
+    return XCAR (b->doc_and_interactive);
 
   /* if all else fails... */
-  return (b->doc_and_interactive);
+  return b->doc_and_interactive;
 }
 
 /* Caller need not check flags.documentationp first */
@@ -854,13 +854,13 @@
   if (! b->flags.documentationp)
     return Qnil;
   else if (b->flags.interactivep && b->flags.domainp)
-    return (XCAR (b->doc_and_interactive));
+    return XCAR (b->doc_and_interactive);
   else if (b->flags.interactivep)
-    return (XCAR (b->doc_and_interactive));
+    return XCAR (b->doc_and_interactive);
   else if (b->flags.domainp)
-    return (XCAR (b->doc_and_interactive));
+    return XCAR (b->doc_and_interactive);
   else
-    return (b->doc_and_interactive);
+    return b->doc_and_interactive;
 }
 
 /* Caller need not check flags.domainp first */
@@ -870,13 +870,13 @@
   if (! b->flags.domainp)
     return Qnil;
   else if (b->flags.documentationp && b->flags.interactivep)
-    return (XCDR (XCDR (b->doc_and_interactive)));
+    return XCDR (XCDR (b->doc_and_interactive));
   else if (b->flags.documentationp)
-    return (XCDR (b->doc_and_interactive));
+    return XCDR (b->doc_and_interactive);
   else if (b->flags.interactivep)
-    return (XCDR (b->doc_and_interactive));
+    return XCDR (b->doc_and_interactive);
   else
-    return (b->doc_and_interactive);
+    return b->doc_and_interactive;
 }
 
 #ifdef COMPILED_FUNCTION_ANNOTATION_HACK
@@ -913,7 +913,7 @@
        (function))
 {
   CHECK_COMPILED_FUNCTION (function);
-  return (XCOMPILED_FUNCTION (function)->bytecodes);
+  return XCOMPILED_FUNCTION (function)->bytecodes;
 }
 
 DEFUN ("compiled-function-constants", Fcompiled_function_constants, 1, 1, 0, /*
@@ -922,7 +922,7 @@
        (function))
 {
   CHECK_COMPILED_FUNCTION (function);
-  return (XCOMPILED_FUNCTION (function)->constants);
+  return XCOMPILED_FUNCTION (function)->constants;
 }
 
 DEFUN ("compiled-function-stack-depth", Fcompiled_function_stack_depth, 1, 1, 0, /*
@@ -931,7 +931,7 @@
        (function))
 {
   CHECK_COMPILED_FUNCTION (function);
-  return (make_int (XCOMPILED_FUNCTION (function)->maxdepth));
+  return make_int (XCOMPILED_FUNCTION (function)->maxdepth);
 }
 
 DEFUN ("compiled-function-arglist", Fcompiled_function_arglist, 1, 1, 0, /*
@@ -940,7 +940,7 @@
        (function))
 {
   CHECK_COMPILED_FUNCTION (function);
-  return (XCOMPILED_FUNCTION (function)->arglist);
+  return XCOMPILED_FUNCTION (function)->arglist;
 }
 
 DEFUN ("compiled-function-interactive", Fcompiled_function_interactive, 1, 1, 0, /*
@@ -984,7 +984,7 @@
        (function))
 {
   CHECK_COMPILED_FUNCTION (function);
-  return (compiled_function_annotation (XCOMPILED_FUNCTION (function)));
+  return compiled_function_annotation (XCOMPILED_FUNCTION (function));
 }
 
 #endif /* COMPILED_FUNCTION_ANNOTATION_HACK */
@@ -998,7 +998,7 @@
   CHECK_COMPILED_FUNCTION (function);
   if (!XCOMPILED_FUNCTION (function)->flags.domainp)
     return Qnil;
-  return (compiled_function_domain (XCOMPILED_FUNCTION (function)));
+  return compiled_function_domain (XCOMPILED_FUNCTION (function));
 }
 
 
@@ -1031,7 +1031,7 @@
 	}
     }
 #endif /* LISP_FLOAT_TYPE */
-      
+
   switch (comparison)
     {
     case equal:         return XINT (num1) == XINT (num2) ? Qt : Qnil;
@@ -1178,10 +1178,10 @@
 
 #ifdef LISP_FLOAT_TYPE
   if (FLOATP (number))
-    return (float_data (XFLOAT (number)) == 0.0) ? Qt : Qnil;
+    return float_data (XFLOAT (number)) == 0.0 ? Qt : Qnil;
 #endif /* LISP_FLOAT_TYPE */
 
-  return (XINT (number) == 0) ? Qt : Qnil;
+  return XINT (number) == 0 ? Qt : Qnil;
 }
 
 /* Convert between a 32-bit value and a cons of two 16-bit values.
@@ -1230,16 +1230,11 @@
       char pigbuf[350];	/* see comments in float_to_string */
 
       float_to_string (pigbuf, float_data (XFLOAT (num)));
-      return build_string (pigbuf);      
+      return build_string (pigbuf);
     }
 #endif /* LISP_FLOAT_TYPE */
 
-  if (sizeof (int) == sizeof (EMACS_INT))
-    sprintf (buffer, "%d", XINT (num));
-  else if (sizeof (long) == sizeof (EMACS_INT))
-    sprintf (buffer, "%ld", (long) XINT (num));
-  else
-    abort ();
+  sprintf (buffer, "%ld", (long) (XINT (num)));
   return build_string (buffer);
 }
 
@@ -1323,7 +1318,7 @@
 	  p++;
 	}
       else if (*p == '+')
-	p++;  
+	p++;
       while (1)
 	{
 	  digit = digit_to_number (*p++, b);
@@ -1334,7 +1329,7 @@
       return make_int (negative * v);
     }
 }
-  
+
 enum arithop
   { Aadd, Asub, Amult, Adiv, Alogand, Alogior, Alogxor, Amax, Amin };
 
@@ -1346,7 +1341,7 @@
 {
   REGISTER Lisp_Object val;
   double next;
-  
+
   for (; argnum < nargs; argnum++)
     {
       /* using args[argnum] as argument to CHECK_INT_OR_FLOAT_... */
@@ -1439,8 +1434,8 @@
 
 #ifdef LISP_FLOAT_TYPE
       if (FLOATP (val)) /* time to do serious math */
-	return (float_arith_driver ((double) accum, argnum, code,
-				    nargs, args));
+	return float_arith_driver ((double) accum, argnum, code,
+				   nargs, args);
 #endif /* LISP_FLOAT_TYPE */
       args[argnum] = val;    /* runs into a compiler bug. */
       next = XINT (args[argnum]);
@@ -1523,7 +1518,7 @@
   if (ZEROP (num2))
     Fsignal (Qarith_error, Qnil);
 
-  return (make_int (XINT (num1) % XINT (num2)));
+  return make_int (XINT (num1) % XINT (num2));
 }
 
 /* Note, ANSI *requires* the presence of the fmod() library routine.
@@ -1536,7 +1531,7 @@
 {
   if (f2 < 0.0)
     f2 = -f2;
-  return (f1 - f2 * floor (f1/f2));
+  return f1 - f2 * floor (f1/f2);
 }
 #endif /* ! HAVE_FMOD */
 
@@ -1564,12 +1559,12 @@
       if (f2 == 0)
 	Fsignal (Qarith_error, Qnil);
 
-      f1 = fmod (f1, f2); 
+      f1 = fmod (f1, f2);
 
       /* If the "remainder" comes out with the wrong sign, fix it.  */
       if (f2 < 0 ? f1 > 0 : f1 < 0)
 	f1 += f2;
-      return (make_float (f1));
+      return make_float (f1);
     }
 #else /* not LISP_FLOAT_TYPE */
   CHECK_INT_OR_FLOAT_COERCE_CHAR_OR_MARKER (x);
@@ -1581,14 +1576,14 @@
 
   if (i2 == 0)
     Fsignal (Qarith_error, Qnil);
-  
+
   i1 %= i2;
 
   /* If the "remainder" comes out with the wrong sign, fix it.  */
   if (i2 < 0 ? i1 > 0 : i1 < 0)
     i1 += i2;
 
-  return (make_int (i1));
+  return make_int (i1);
 }
 
 
@@ -1686,10 +1681,10 @@
 
 #ifdef LISP_FLOAT_TYPE
   if (FLOATP (number))
-    return (make_float (1.0 + float_data (XFLOAT (number))));
+    return make_float (1.0 + float_data (XFLOAT (number)));
 #endif /* LISP_FLOAT_TYPE */
 
-  return (make_int (XINT (number) + 1));
+  return make_int (XINT (number) + 1);
 }
 
 DEFUN ("1-", Fsub1, 1, 1, 0, /*
@@ -1702,10 +1697,10 @@
 
 #ifdef LISP_FLOAT_TYPE
   if (FLOATP (number))
-    return (make_float (-1.0 + (float_data (XFLOAT (number)))));
+    return make_float (-1.0 + (float_data (XFLOAT (number))));
 #endif /* LISP_FLOAT_TYPE */
 
-  return (make_int (XINT (number) - 1));
+  return make_int (XINT (number) - 1);
 }
 
 DEFUN ("lognot", Flognot, 1, 1, 0, /*
@@ -1714,7 +1709,7 @@
        (number))
 {
   CHECK_INT (number);
-  return (make_int (~XINT (number)));
+  return make_int (~XINT (number));
 }
 
 
@@ -1753,7 +1748,7 @@
 {
   if (print_readably)
     error ("printing unreadable object #<weak-list>");
-      
+
   write_c_string ("#<weak-list ", printcharfun);
   print_internal (encode_weak_list_type (XWEAK_LIST (obj)->type),
 		  printcharfun, 0);
@@ -1768,8 +1763,8 @@
   struct weak_list *w1 = XWEAK_LIST (o1);
   struct weak_list *w2 = XWEAK_LIST (o2);
 
-  return (w1->type == w2->type) &&
-    internal_equal (w1->list, w2->list, depth + 1);
+  return ((w1->type == w2->type) &&
+	  internal_equal (w1->list, w2->list, depth + 1));
 }
 
 static unsigned long
@@ -2027,7 +2022,7 @@
 		     process cases where a cons points to itself, or
 		     where cons A points to cons B, which points to
 		     cons A.) */
-		 
+
 		  rest2 = XCDR (rest2);
 		  if (go_tortoise)
 		    tortoise = XCDR (tortoise);
--- a/src/database.c	Mon Aug 13 09:47:55 2007 +0200
+++ b/src/database.c	Mon Aug 13 09:49:09 2007 +0200
@@ -86,7 +86,7 @@
   Lisp_Object fname;
   XEMACS_DB_TYPE type;
   int mode;
-  int ackcess;
+  int access_;
   int dberrno;
   void *db_handle;
   DB_FUNCS *funcs;
@@ -117,14 +117,14 @@
 
   dbase->fname = Qnil;
   dbase->db_handle = NULL;
-  dbase->ackcess = 0;
+  dbase->access_ = 0;
   dbase->mode = 0;
   dbase->dberrno = 0;
   dbase->type = DB_UNKNOWN;
 #ifdef MULE
   dbase->coding_system = Fget_coding_system (Qbinary);
 #endif
-  return (dbase);
+  return dbase;
 }
 
 static Lisp_Object
@@ -133,7 +133,7 @@
   struct database_struct *dbase = XDATABASE (obj);
 
   ((markobj) (dbase->fname));
-  return (Qnil);
+  return Qnil;
 }
 
 static void
@@ -153,8 +153,8 @@
       CONST char *perms;
       
       perms = (!dbase->db_handle)        ? "closed"    :
-	(dbase->ackcess & O_WRONLY) ? "writeonly" :
-	  (dbase->ackcess & O_RDWR)   ? "readwrite" : "readonly";
+	(dbase->access_ & O_WRONLY) ? "writeonly" :
+	  (dbase->access_ & O_RDWR)   ? "readwrite" : "readonly";
       
       type = dbase->funcs->get_type (dbase);
       subtype = dbase->funcs->get_subtype (dbase);
@@ -196,7 +196,7 @@
   else
     signal_simple_error ("Attempting to access closed database", obj);
 
-  return (Qnil);
+  return Qnil;
 }
 
 DEFUN ("database-type", Fdatabase_type, 1, 1, 0, /*
@@ -221,7 +221,7 @@
   CHECK_DATABASE (obj);
   db = XDATABASE (obj);
   
-  return (intern (db->funcs->get_subtype (db)));
+  return intern (db->funcs->get_subtype (db));
 }
 
 DEFUN ("database-live-p", Fdatabase_live_p, 1, 1, 0, /*
@@ -233,7 +233,7 @@
   CHECK_DATABASE (obj);
   db = XDATABASE (obj);
 
-  return (DATABASE_LIVE_P (db) ? Qt : Qnil);
+  return DATABASE_LIVE_P (db) ? Qt : Qnil;
 }
 
 DEFUN ("database-file-name", Fdatabase_file_name, 1, 1, 0, /*
@@ -244,7 +244,7 @@
   struct database_struct *db;
   CHECK_DATABASE (obj);
   db = XDATABASE (obj);
-  return (db->fname);
+  return db->fname;
 }
 
 DEFUN ("databasep", Fdatabasep, 1, 1, 0, /*
@@ -252,7 +252,7 @@
 */
        (obj))
 {
-  return ((DATABASEP (obj)) ? Qt : Qnil);
+  return DATABASEP (obj) ? Qt : Qnil;
 }
 
 #ifdef HAVE_DBM
@@ -312,32 +312,32 @@
   datum keydatum;
   keydatum.dptr = (char *) XSTRING_DATA (key);
   keydatum.dsize = XSTRING_LENGTH (key);
-  return (dbm_delete (db->db_handle, keydatum));
+  return dbm_delete (db->db_handle, keydatum);
 }
 
 static Lisp_Object
 dbm_lisp_type (struct database_struct *db)
 {
-  return (Qdbm);
+  return Qdbm;
 }
 
 static CONST char *
 dbm_type (struct database_struct *db)
 {
-  return ("dbm");
+  return "dbm";
 }
 
 static CONST char *
 dbm_subtype (struct database_struct *db)
 {
-  return ("nil");
+  return "nil";
 }
 
 static void *
-new_dbm_file (CONST char *file, Lisp_Object subtype, int ackcess, int mode)
+new_dbm_file (CONST char *file, Lisp_Object subtype, int access_, int mode)
 {
   DBM *db = NULL;
-  db = dbm_open ((char *) file, ackcess, mode);
+  db = dbm_open ((char *) file, access_, mode);
   return (void *) db;
 }
 
@@ -374,13 +374,13 @@
 static Lisp_Object
 berkdb_lisp_type (struct database_struct *db)
 {
-  return (Qberkeley_db);
+  return Qberkeley_db;
 }
 
 static CONST char *
 berkdb_type (struct database_struct *db)
 {
-  return ("berkeley");
+  return "berkeley";
 }
 
 static CONST char *
@@ -389,22 +389,22 @@
   DB *temp = (DB *)db->db_handle;
 
   if (!temp)
-    return ("nil");
+    return "nil";
   
   switch (temp->type)
     {
     case DB_BTREE:
-      return ("btree");
+      return "btree";
     case DB_HASH:
-      return ("hash");
+      return "hash";
     case DB_RECNO:
-      return ("recno");
+      return "recno";
     }
-  return ("unknown");
+  return "unknown";
 }
 
 static void *
-berkdb_open (CONST char *file, Lisp_Object subtype, int ackcess, int mode)
+berkdb_open (CONST char *file, Lisp_Object subtype, int access_, int mode)
 {
   DB *db;
   DBTYPE real_subtype;
@@ -418,7 +418,7 @@
   else
     signal_simple_error ("Unsupported subtype", subtype);
 
-  db = dbopen (file, ackcess, mode, real_subtype, NULL);
+  db = dbopen (file, access_, mode, real_subtype, NULL);
 
   return (void *) db;
 }
@@ -442,10 +442,10 @@
   status = dbp->get (dbp, &keydatum, &valdatum, 0);
 
   if (!status)
-    return (make_string (valdatum.data, valdatum.size));
+    return make_string (valdatum.data, valdatum.size);
 
   db->dberrno = (status == 1) ? -1 : errno;
-  return (Qnil);
+  return Qnil;
 }
 
 static int
@@ -543,7 +543,7 @@
   
   CHECK_DATABASE (obj);
   db = XDATABASE (obj);
-  return (db->funcs->last_error (db));
+  return db->funcs->last_error (db);
 }
 
 DEFUN ("open-database", Fmake_database, 1, 5, 0, /*
@@ -551,7 +551,7 @@
 access rights ACCESS and permissions MODE.  ACCESS can be any
 combination of 'r' 'w' and '+', for read, write, and creation flags.
 */
-       (file, type, subtype, ackcess, mode))
+       (file, type, subtype, access_, mode))
 {
   Lisp_Object retval = Qnil;
   int modemask;
@@ -563,15 +563,15 @@
 
   CHECK_STRING (file);
 
-  if (NILP (ackcess))
+  if (NILP (access_))
     {
       accessmask = O_RDWR | O_CREAT;
     }
   else
     {
       char *acc;
-      CHECK_STRING (ackcess);
-      acc = (char *) XSTRING_DATA (ackcess);
+      CHECK_STRING (access_);
+      acc = (char *) XSTRING_DATA (access_);
       
       if (strchr (acc, '+'))
 	accessmask |= O_CREAT;
@@ -620,7 +620,7 @@
 #endif
   
   signal_simple_error ("Unsupported database type", type);
-  return (Qnil);
+  return Qnil;
 
  db_done:
   db = funcblock->open_file ((char *) XSTRING_DATA (file), subtype,
@@ -628,19 +628,19 @@
   
   if (!db)
     {
-      return (Qnil);
+      return Qnil;
     }
   
   dbase = new_database ();
   dbase->fname = file;
   dbase->type = the_type;
   dbase->mode = modemask;
-  dbase->ackcess = accessmask;
+  dbase->access_ = accessmask;
   dbase->db_handle = db;
   dbase->funcs = funcblock;
   XSETDATABASE (retval, dbase);
 
-  return (retval);
+  return retval;
 }
 
 DEFUN ("put-database", Fputdatabase, 3, 4, 0, /*
@@ -684,7 +684,7 @@
 Find value for KEY in DATABASE.
 If there is no corresponding value, return DEFAULT (defaults to nil).
 */
-       (key, dbase, defalt))
+       (key, dbase, default_))
 {
   Lisp_Object retval;
   struct database_struct *db;
@@ -697,7 +697,7 @@
 
   retval = db->funcs->get (db, key);
 
-  return (NILP (retval) ? defalt : retval);
+  return NILP (retval) ? default_ : retval;
 }
 
 DEFUN ("map-database", Fmapdatabase, 2, 2, 0, /*
--- a/src/dired.c	Mon Aug 13 09:47:55 2007 +0200
+++ b/src/dired.c	Mon Aug 13 09:49:09 2007 +0200
@@ -58,7 +58,7 @@
   Bytecount dirname_length;
   Lisp_Object list, name, dirfilename = Qnil;
   Lisp_Object handler;
-  struct re_pattern_buffer *bufp;
+  struct re_pattern_buffer *bufp = NULL;
 
   char statbuf [MAXNAMLEN+2];
   char *statbuf_tail;
@@ -299,7 +299,7 @@
 #else
   value = stat (fullname, st_addr);
 #endif
-  return (value);
+  return value;
 }
 
 static Lisp_Object
--- a/src/doc.c	Mon Aug 13 09:47:55 2007 +0200
+++ b/src/doc.c	Mon Aug 13 09:49:09 2007 +0200
@@ -171,7 +171,7 @@
   int minsize;
   EMACS_INT position;
   Lisp_Object file, tem;
-  Lisp_Object name_reloc;
+  Lisp_Object name_reloc = Qnil;
 
   if (INTP (filepos))
     {
@@ -700,7 +700,7 @@
 "This is usually because some files were preloaded by loaddefs.el or\n"
 "site-load.el, but were not passed to make-docfile by Makefile.\n");
   UNGCPRO;
-  return (NILP (Fcdr (closure)) ? Qt : Qnil);
+  return NILP (Fcdr (closure)) ? Qt : Qnil;
 }
 
 
@@ -936,7 +936,7 @@
     tem = str;
   xfree (buf);
   UNGCPRO;
-  return (tem);
+  return tem;
 }
 
 
--- a/src/elhash.c	Mon Aug 13 09:47:55 2007 +0200
+++ b/src/elhash.c	Mon Aug 13 09:49:09 2007 +0200
@@ -67,7 +67,7 @@
       return Qnil;
     }
   ((markobj) (table->zero_entry));
-  return (table->harray);
+  return table->harray;
 }
   
 static void
@@ -86,7 +86,7 @@
 	    table->type == HASHTABLE_VALUE_CAR_WEAK ? "value-car-weak " :
 	    ""),
            table->fullness,
-           (vector_length (XVECTOR (table->harray)) / LISP_OBJECTS_PER_HENTRY),
+           XVECTOR_LENGTH (table->harray) / LISP_OBJECTS_PER_HENTRY,
            table->header.uid);
   write_c_string (buf, printcharfun);
 }
@@ -95,12 +95,11 @@
 ht_copy_to_c (struct hashtable_struct *ht,
               c_hashtable c_table)
 {
-  int len;
+  int len = XVECTOR_LENGTH (ht->harray);
 
-  c_table->harray = (void *) vector_data (XVECTOR (ht->harray));
+  c_table->harray = (void *) XVECTOR_DATA (ht->harray);
   c_table->zero_set = (!GC_UNBOUNDP (ht->zero_entry));
   c_table->zero_entry = LISP_TO_VOID (ht->zero_entry);
-  len = vector_length (XVECTOR (ht->harray));
   if (len < 0)
     {
       /* #### if alloc.c mark_object() changes, this must change too. */
@@ -111,8 +110,8 @@
       assert (gc_in_progress);
       len = -1 - len;
     }
-  c_table->size = len/LISP_OBJECTS_PER_HENTRY;
-  c_table->fullness = ht->fullness;
+  c_table->size          = len/LISP_OBJECTS_PER_HENTRY;
+  c_table->fullness      = ht->fullness;
   c_table->hash_function = ht->hash_function;
   c_table->test_function = ht->test_function;
   XSETHASHTABLE (c_table->elisp_table, ht);
@@ -126,7 +125,7 @@
   /* C is truly hateful */
   void *vec_addr
     = ((char *) c_table->harray 
-       - ((char *) &(dummy.contents) - (char *) &dummy));
+       - ((char *) &(dummy.contents[0]) - (char *) &dummy));
 
   XSETVECTOR (ht->harray, vec_addr);
   if (c_table->zero_set)
@@ -142,24 +141,24 @@
 {
   struct hashtable_struct *table
     = alloc_lcrecord (sizeof (struct hashtable_struct), lrecord_hashtable);
-  table->harray = Qnil;
-  table->zero_entry = Qunbound;
-  table->fullness = 0;
+  table->harray        = Qnil;
+  table->zero_entry    = Qunbound;
+  table->fullness      = 0;
   table->hash_function = 0;
   table->test_function = 0;
-  return (table);
+  return table;
 }
 
-char *
+void *
 elisp_hvector_malloc (unsigned int bytes, Lisp_Object table)
 {
   Lisp_Object new_vector;
   struct hashtable_struct *ht;
 
   ht = XHASHTABLE (table);
-  assert (bytes > vector_length (XVECTOR (ht->harray)) * sizeof (Lisp_Object));
+  assert (bytes > XVECTOR_LENGTH (ht->harray) * sizeof (Lisp_Object));
   new_vector = make_vector ((bytes / sizeof (Lisp_Object)), Qzero);
-  return ((char *) (vector_data (XVECTOR (new_vector))));
+  return (void *) XVECTOR_DATA (new_vector);
 }
 
 void
@@ -170,9 +169,8 @@
   Lisp_Object current_vector = ht->harray;
 #endif
 
-  assert (((void *) vector_data (XVECTOR (current_vector))) == ptr);
+  assert (((void *) XVECTOR_DATA (current_vector)) == ptr);
   ht->harray = Qnil;            /* Let GC do its job */
-  return;
 }
 
 
@@ -181,7 +179,7 @@
 */
        (obj))
 {
-  return ((HASHTABLEP (obj)) ? Qt : Qnil);
+  return HASHTABLEP (obj) ? Qt : Qnil;
 }
 
 
@@ -291,7 +289,7 @@
   else
     table->next_weak = Qunbound;
 
-  return (result);
+  return result;
 }
 
 static enum hashtable_test_fun
@@ -366,7 +364,7 @@
       Vall_weak_hashtables = result;
     }
 
-  return (result);
+  return result;
 }
 
 
@@ -374,7 +372,7 @@
 Find hash value for KEY in TABLE.
 If there is no corresponding value, return DEFAULT (defaults to nil).
 */
-       (key, table, defalt))
+       (key, table, default_))
 {
   CONST void *vval;
   struct _C_hashtable htbl;
@@ -388,7 +386,7 @@
       return val;
     }
   else 
-    return defalt;
+    return default_;
 }
 
 
@@ -430,7 +428,7 @@
       ht_copy_from_c (&htbl, XHASHTABLE (table));
       UNGCPRO;
     }
-  return (val);
+  return val;
 }
 
 DEFUN ("clrhash", Fclrhash, 1, 1, 0, /*
@@ -454,7 +452,7 @@
   struct _C_hashtable htbl;
   CHECK_HASHTABLE (table);
   ht_copy_to_c (XHASHTABLE (table), &htbl);
-  return (make_int (htbl.fullness));
+  return make_int (htbl.fullness);
 }
 
 
@@ -759,8 +757,8 @@
   CVOID_TO_LISP (keytem, key);
   CVOID_TO_LISP (valuetem, contents);
 
-  return (! ((*fmh->obj_marked_p) (keytem) &&
-	     (*fmh->obj_marked_p) (valuetem)));
+  return ! ((*fmh->obj_marked_p) (keytem) &&
+	    (*fmh->obj_marked_p) (valuetem));
 }
 
 void
@@ -856,7 +854,7 @@
       CONST struct lrecord_implementation
 	*imp = XRECORD_LHEADER (obj)->implementation;
       if (imp->hash)
-	return ((imp->hash) (obj, depth));
+	return (imp->hash) (obj, depth);
     }
 
   return LISP_HASH (obj);
--- a/src/elhash.h	Mon Aug 13 09:47:55 2007 +0200
+++ b/src/elhash.h	Mon Aug 13 09:49:09 2007 +0200
@@ -51,10 +51,8 @@
 
 Lisp_Object Fmake_hashtable (Lisp_Object size, Lisp_Object test_fun);
 Lisp_Object Fcopy_hashtable (Lisp_Object old_table);
-Lisp_Object Fgethash (Lisp_Object obj, Lisp_Object table, 
-		      Lisp_Object defalt);
-Lisp_Object Fputhash (Lisp_Object obj, Lisp_Object val, 
-		      Lisp_Object table);
+Lisp_Object Fgethash (Lisp_Object obj, Lisp_Object table, Lisp_Object default_);
+Lisp_Object Fputhash (Lisp_Object obj, Lisp_Object val, Lisp_Object table);
 Lisp_Object Fremhash (Lisp_Object obj, Lisp_Object table);
 Lisp_Object Fhashtable_fullness (Lisp_Object table);
 
@@ -64,20 +62,20 @@
 
 void elisp_maphash (void (*fn) (CONST void *key, void *contents,
 				void *extra_arg),
-		    Lisp_Object table, 
+		    Lisp_Object table,
 		    void *extra_arg);
 
 void elisp_map_remhash (int (*fn) (CONST void *key,
 				   CONST void *contents,
 				   void *extra_arg),
-			Lisp_Object table, 
+			Lisp_Object table,
 			void *extra_arg);
 
 int finish_marking_weak_hashtables (int (*obj_marked_p) (Lisp_Object),
 					   void (*markobj) (Lisp_Object));
 void prune_weak_hashtables (int (*obj_marked_p) (Lisp_Object));
 
-char *elisp_hvector_malloc (unsigned int, Lisp_Object);
+void *elisp_hvector_malloc (unsigned int, Lisp_Object);
 void elisp_hvector_free (void *ptr, Lisp_Object table);
 
 #endif /* _XEMACS_ELHASH_H_ */
--- a/src/emacs.c	Mon Aug 13 09:47:55 2007 +0200
+++ b/src/emacs.c	Mon Aug 13 09:49:09 2007 +0200
@@ -397,7 +397,7 @@
 argmatch (char **argv, int argc, char *sstr, char *lstr,
 	  int minlen, char **valptr, int *skipptr)
 {
-  char *p;
+  char *p = NULL;
   int arglen;
   char *arg;
 
@@ -1410,7 +1410,7 @@
 #endif
   init_console_stream (); /* Create the first console */
 
-  /* try to get the actually pathname of the exec file we are running */
+  /* try to get the actual pathname of the exec file we are running */
   {
     Vinvocation_name = Fcar (Vcommand_line_args);
     Vinvocation_directory = Vinvocation_name;
@@ -2017,7 +2017,7 @@
   /* Tell malloc where start of impure now is */
   /* Also arrange for warnings when nearly out of space.  */
 #ifndef SYSTEM_MALLOC
-  memory_warnings (&my_edata, malloc_warning);
+  memory_warnings (my_edata, malloc_warning);
 #endif
   UNGCPRO;
   map_out_data (XSTRING_DATA (intoname));
@@ -2082,7 +2082,7 @@
   /* Tell malloc where start of impure now is */
   /* Also arrange for warnings when nearly out of space.  */
 #ifndef SYSTEM_MALLOC
-  memory_warnings (&my_edata, malloc_warning);
+  memory_warnings (my_edata, malloc_warning);
 #endif
 
   UNGCPRO;
@@ -2115,7 +2115,7 @@
        conversion is applied everywhere.  Don't worry about memory
        leakage because this call only happens once. */
     unexec ((char *) intoname_ext, (char *) symname_ext,
-	    (uintptr_t) &my_edata,
+	    (uintptr_t) my_edata,
 	    0, 0);
   }
 #endif /* not MSDOS and EMX */
@@ -2135,7 +2135,7 @@
 #endif
 
 Lisp_Object
-decode_env_path (CONST char *evarname, CONST char *defalt)
+decode_env_path (CONST char *evarname, CONST char *default_)
 {
   REGISTER CONST char *path = 0;
   REGISTER CONST char *p;
@@ -2144,9 +2144,9 @@
   if (evarname)
     path = (char *) egetenv (evarname);
   if (!path)
-    path = defalt;
+    path = default_;
   if (!path)
-    return (Qnil);
+    return Qnil;
 
 #if defined (MSDOS) || defined (WIN32)
   dostounix_filename (path);
@@ -2173,7 +2173,7 @@
 */
        ())
 {
-  return ((noninteractive) ? Qt : Qnil);
+  return noninteractive ? Qt : Qnil;
 }
 
 /* This flag is useful to define if you're under a debugger; this way, you
--- a/src/emacsfns.h	Mon Aug 13 09:47:55 2007 +0200
+++ b/src/emacsfns.h	Mon Aug 13 09:49:09 2007 +0200
@@ -610,7 +610,6 @@
 						     Lisp_Object class,
 						     Error_behavior errb);
 Lisp_Object Fprogn (Lisp_Object args);
-Lisp_Object Fstrerror (Lisp_Object errnum);
 Lisp_Object Fcommandp (Lisp_Object obj);
 Lisp_Object Feval (Lisp_Object form);
 Lisp_Object Fapply (int nargs, Lisp_Object *args);
@@ -846,7 +845,7 @@
 Lisp_Object Fset_extent_priority (Lisp_Object extent, Lisp_Object pri);
 Lisp_Object Fset_extent_property (Lisp_Object,Lisp_Object,Lisp_Object);
 Lisp_Object Fextent_property (Lisp_Object extent, Lisp_Object,
-			      Lisp_Object defalt);
+			      Lisp_Object default_);
 Lisp_Object Fextent_properties (Lisp_Object extent);
 Lisp_Object Fforce_highlight_extent (Lisp_Object extent,
 				     Lisp_Object flag);
@@ -985,7 +984,7 @@
 Lisp_Object Fstring_lessp (Lisp_Object s1, Lisp_Object s2);
 Lisp_Object string_getprop (struct Lisp_String *s,
 			    Lisp_Object property,
-			    Lisp_Object defalt);
+			    Lisp_Object default_);
 void string_putprop (struct Lisp_String *s, Lisp_Object property,
 		     Lisp_Object value);
 void bump_string_modiff (Lisp_Object str);
@@ -1056,13 +1055,13 @@
 Lisp_Object Fcopy_tree (Lisp_Object arg, Lisp_Object vecp);
 Lisp_Object Fplist_put (Lisp_Object plist, Lisp_Object prop, Lisp_Object val);
 Lisp_Object Fplist_get (Lisp_Object plist, Lisp_Object prop,
-			Lisp_Object defalt);
+			Lisp_Object default_);
 Lisp_Object Fcanonicalize_plist (Lisp_Object plist,
 				 Lisp_Object infected_with_hemorrhagic_fever);
 Lisp_Object Flax_plist_put (Lisp_Object plist, Lisp_Object prop,
 			    Lisp_Object val);
 Lisp_Object Flax_plist_get (Lisp_Object plist, Lisp_Object prop,
-			    Lisp_Object defalt);
+			    Lisp_Object default_);
 Lisp_Object Flax_plist_remprop (Lisp_Object plist, Lisp_Object prop);
 Lisp_Object Fcanonicalize_lax_plist (Lisp_Object plist,
 				     Lisp_Object
@@ -1119,7 +1118,7 @@
 Lisp_Object Fdelete_frame (Lisp_Object frame, Lisp_Object force);
 Lisp_Object Fset_frame_properties (Lisp_Object frame, Lisp_Object plist);
 Lisp_Object Fframe_property (Lisp_Object frame, Lisp_Object property,
-			     Lisp_Object defalt);
+			     Lisp_Object default_);
 Lisp_Object Fset_frame_pointer (Lisp_Object frame, Lisp_Object pointer);
 
 extern Lisp_Object Vcreate_frame_hook, Qcreate_frame_hook;
@@ -1580,7 +1579,7 @@
 Lisp_Object Fput_range_table (Lisp_Object start, Lisp_Object end,
 			      Lisp_Object val, Lisp_Object table);
 Lisp_Object Fget_range_table (Lisp_Object pos, Lisp_Object table,
-			      Lisp_Object defalt);
+			      Lisp_Object default_);
 Lisp_Object Fclear_range_table (Lisp_Object table);
 void put_range_table (Lisp_Object table, EMACS_INT first,
 		      EMACS_INT last, Lisp_Object val);
@@ -1588,7 +1587,7 @@
 int unified_range_table_bytes_used (void *unrangetab);
 void unified_range_table_copy_data (Lisp_Object rangetab, void *dest);
 Lisp_Object unified_range_table_lookup (void *unrangetab, EMACS_INT pos,
-					Lisp_Object defalt);
+					Lisp_Object default_);
 int unified_range_table_nentries (void *unrangetab);
 void unified_range_table_get_range (void *unrangetab, int offset,
 				    EMACS_INT *min, EMACS_INT *max,
@@ -1660,7 +1659,7 @@
 /* Defined in specifier.c */
 Lisp_Object Fspecifier_instance (Lisp_Object specifier,
 				 Lisp_Object locale,
-				 Lisp_Object defalt,
+				 Lisp_Object default_,
 				 Lisp_Object no_fallback);
 Lisp_Object Fspecifier_specs (Lisp_Object specifier,
 			      Lisp_Object locale,
--- a/src/energize.c	Mon Aug 13 09:47:55 2007 +0200
+++ b/src/energize.c	Mon Aug 13 09:49:09 2007 +0200
@@ -922,7 +922,7 @@
     }
   }
 #endif 
-  return (char_pos);
+  return char_pos;
 }
 
 #else /* !I18N4 */
@@ -2318,27 +2318,27 @@
     }
   else if (VECTORP (selection))
     {
-      int i;
+      int i, len;
       EId data;
       conn->header->data |= CEChasObjectSelection;
 
       /* writes the length */
-      data = vector_length (XVECTOR (selection));
+      data = len = XVECTOR_LENGTH (selection);
       CWrite (conn, EId, &data);
 
       /* writes the elements */
-      for (i = 0; i < vector_length (XVECTOR (selection)); i++)
+      for (i = 0; i < len; i++)
 	{
-	  if (CONSP (vector_data (XVECTOR (selection)) [i]))
-	    data = lisp_to_word (vector_data (XVECTOR (selection)) [i]);
+	  if (CONSP (XVECTOR_DATA (selection) [i]))
+	    data = lisp_to_word (XVECTOR_DATA (selection) [i]);
 	  else
-	    data = XINT (vector_data (XVECTOR (selection)) [i]);
+	    data = XINT (XVECTOR_DATA (selection) [i]);
 	  CWrite (conn, EId, &data);
 	}
     }
   else if (CONSP (selection))
     {
-      Lisp_Object type = Fcar (selection);
+      Lisp_Object type  = Fcar (selection);
       Lisp_Object value = Fcdr (selection);
       if (EQ (type, intern ("ENERGIZE_OBJECT"))
 	  && STRINGP (value))
@@ -4878,8 +4878,8 @@
   else if (!strcmp (name, "help"))
     {
       Lisp_Object v = Fmake_vector (make_int (3), Qt);
-      vector_data (XVECTOR (v)) [0] = build_string ("ok");
-      vector_data (XVECTOR (v)) [1] = list1 (Qignore);
+      XVECTOR_DATA (v) [0] = build_string ("ok");
+      XVECTOR_DATA (v) [1] = list1 (Qignore);
       Fpopup_dialog_box (list2 (build_string ("dbx_editmode_help"), v));
     }
   else if (!strcmp (name, "ok"))
@@ -5109,8 +5109,8 @@
   else if (!strcmp (name, "help"))
     {
       Lisp_Object v = Fmake_vector (3, Qt);
-      vector_data (XVECTOR (v)) [0] = build_string ("ok");
-      vector_data (XVECTOR (v)) [1] = list1 (Qignore);
+      XVECTOR_DATA (v) [0] = build_string ("ok");
+      XVECTOR_DATA (v) [1] = list1 (Qignore);
       Fpopup_dialog_box (list2 (build_string ("dbx_search_help"), v));
       return;
     }
--- a/src/eval.c	Mon Aug 13 09:47:55 2007 +0200
+++ b/src/eval.c	Mon Aug 13 09:49:09 2007 +0200
@@ -289,7 +289,7 @@
   ((markobj) (b->annotated));
 #endif
   /* tail-recurse on constants */
-  return (b->constants);
+  return b->constants;
 }
 
 static int
@@ -419,7 +419,7 @@
   /* This is falsified by call_debugger */
   Lisp_Object v = call_debugger (list2 (Qexit, val));
 
-  return ((!UNBOUNDP (v)) ? v : val);
+  return !UNBOUNDP (v) ? v : val;
 }
 
 /* Called when debug-on-call behavior is called for.  Enter the debugger
@@ -483,7 +483,7 @@
   /* This function can GC */
   Lisp_Object tail;
   int first_string = 1;
-  Lisp_Object error_message;
+  Lisp_Object error_message = Qnil;
 
   for (tail = Vdebug_ignored_errors; CONSP (tail); tail = XCDR (tail))
     {
@@ -515,7 +515,7 @@
 static Lisp_Object
 backtrace_259 (Lisp_Object stream)
 {
-  return (Fbacktrace (stream, Qt));
+  return Fbacktrace (stream, Qt);
 }
 
 /* An error was signalled.  Maybe call the debugger, if the `debug-on-error'
@@ -631,7 +631,7 @@
 
   UNGCPRO;
   Vcondition_handlers = all_handlers;
-  return (unbind_to (speccount, val));
+  return unbind_to (speccount, val);
 }
 
 
@@ -1356,12 +1356,12 @@
     {
       /* Throw works by a longjmp that comes right here.  */
       if (threw) *threw = 1;
-      return (c.val);
+      return c.val;
     }
   c.val = (*func) (arg);
   if (threw) *threw = 0;
   catchlist = c.next;
-  return (c.val);
+  return c.val;
 }
 
 
@@ -1553,7 +1553,7 @@
     Vcondition_handlers = victim->cdr;
 
   free_cons (victim);
-  return (Qnil);
+  return Qnil;
 }
 
 static Lisp_Object
@@ -1570,7 +1570,7 @@
     Vcondition_handlers = victim->cdr;
 
   free_cons (victim);
-  return (Qnil);
+  return Qnil;
 }
 
 /* Split out from condition_case_3 so that primitive C callers
@@ -1664,7 +1664,7 @@
   if (SETJMP (c.jmp))
     {
       /* throw does ungcpro, etc */
-      return ((*hfun) (c.val, harg));
+      return (*hfun) (c.val, harg);
     }
 
   record_unwind_protect (condition_case_unwind, c.tag);
@@ -1692,7 +1692,7 @@
   catchlist = c.next;
   Vcondition_handlers = XCDR (c.tag);
 
-  return (unbind_to (speccount, c.val));
+  return unbind_to (speccount, c.val);
 }
 
 static Lisp_Object
@@ -1713,7 +1713,7 @@
   int speccount;
 
   if (NILP (var))
-    return (Fprogn (Fcdr (val))); /* tailcall */
+    return Fprogn (Fcdr (val)); /* tailcall */
 
   speccount = specpdl_depth_counter;
   specbind (var, Fcar (val));
@@ -1824,7 +1824,7 @@
 
   /* Caller should have GC-protected args */
   tem = Ffuncall (nargs - 1, args + 1);
-  return (unbind_to (speccount, tem));
+  return unbind_to (speccount, tem);
 }
 
 static int
@@ -1833,12 +1833,12 @@
   if (EQ (type, Qt))
     /* (condition-case c # (t c)) catches -all- signals
      *   Use with caution! */
-    return (1);
+    return 1;
   else
     {
       if (SYMBOLP (type))
 	{
-	  return (!NILP (Fmemq (type, conditions)));
+	  return !NILP (Fmemq (type, conditions));
 	}
       else if (CONSP (type))
 	{
@@ -1863,7 +1863,7 @@
      returns.  So, since this feature is not very useful,
      take it out.  */
   /* Have called debugger; return value to signaller  */
-  return (value);
+  return value;
 #else  /* But the reality is that that stinks, because: */
   /* GACK!!! Really want some way for debug-on-quit errors
      to be continuable!! */
@@ -1955,7 +1955,7 @@
           NUNGCPRO;
 #if 0
           if (!EQ (tem, Qsignal))
-            return (return_from_signal (tem));
+            return return_from_signal (tem);
 #endif
           /* If handler didn't throw, try another handler */
           Vcondition_handlers = all_handlers;
@@ -1968,7 +1968,7 @@
       else if (EQ (handler_data, Qt))
 	{
           UNGCPRO;
-          return (Fthrow (handlers, Fcons (sig, data)));
+          return Fthrow (handlers, Fcons (sig, data));
 	}
       /* `error' is used similarly to the way `t' is used, but in
          addition it invokes the debugger if debug_on_error.
@@ -1983,10 +1983,10 @@
 
           UNGCPRO;
           if (!UNBOUNDP (tem))
-            return (return_from_signal (tem));
+            return return_from_signal (tem);
 
           tem = Fcons (sig, data);
-          return (Fthrow (handlers, tem));
+          return Fthrow (handlers, tem);
         }
       else
 	{
@@ -2006,11 +2006,11 @@
 					      &debugger_entered);
                   UNGCPRO;
 		  if (!UNBOUNDP (tem))
-                    return (return_from_signal (tem));
+                    return return_from_signal (tem);
 
                   /* Doesn't return */
                   tem = Fcons (Fcons (sig, data), Fcdr (clause));
-                  return (Fthrow (handlers, tem));
+                  return Fthrow (handlers, tem);
                 }
 	    }
 	}
@@ -2090,8 +2090,8 @@
 call_with_suspended_errors_1 (Lisp_Object opaque_arg)
 {
   Lisp_Object *kludgy_args = (Lisp_Object *) get_opaque_ptr (opaque_arg);
-  return (primitive_funcall ((lisp_fn_t) get_opaque_ptr (kludgy_args[0]),
-			     XINT (kludgy_args[1]), kludgy_args + 2));
+  return primitive_funcall ((lisp_fn_t) get_opaque_ptr (kludgy_args[0]),
+			    XINT (kludgy_args[1]), kludgy_args + 2);
 }
 
 static Lisp_Object
@@ -2512,18 +2512,6 @@
 }
 
 
-DEFUN ("strerror", Fstrerror, 1, 1, 0, /*
-Return the error string associated with integer ERRNUM.
-This function is an interface to strerror(3).
-The returned string may or may not be translated.
-*/
-       (errnum))
-{
-  CHECK_INT (errnum);
-  return build_ext_string (strerror (XINT (errnum)), FORMAT_NATIVE);
-}
-
-
 /**********************************************************************/
 /*                            User commands                           */
 /**********************************************************************/
@@ -2631,7 +2619,7 @@
       final = Fcall_interactively (cmd, record, keys);
 
       POP_BACKTRACE (backtrace);
-      return (final);
+      return final;
     }
   else if (STRINGP (final) || VECTORP (final))
     {
@@ -3019,7 +3007,7 @@
             val = do_debug_on_exit (val);
 	  POP_BACKTRACE (backtrace);
 	  UNGCPRO;
-          return (val);
+          return val;
 	}
 
       else
@@ -3078,7 +3066,7 @@
   if (backtrace.debug_on_exit)
     val = do_debug_on_exit (val);
   POP_BACKTRACE (backtrace);
-  return (val);
+  return val;
 }
 
 
@@ -3516,7 +3504,7 @@
     tem = do_debug_on_exit (tem);
   /* Don't do it again when we return to eval.  */
   backtrace_list->debug_on_exit = 0;
-  return (tem);
+  return tem;
 }
 
 /* Apply a Lisp function FUN to the NARGS evaluated arguments in ARG_VECTOR
@@ -3897,7 +3885,7 @@
   Lisp_Object args[2];
 
   if (NILP (arg))
-    return (Ffuncall (1, &fn));
+    return Ffuncall (1, &fn);
   GCPRO1 (args[0]);
   gcpro1.nvars = 2;
   args[0] = fn;
@@ -4445,7 +4433,7 @@
     {
       tem = XSYMBOL (function)->function;
       if (NILP (tem) || UNBOUNDP (tem))
-	return (Qnil);
+	return Qnil;
     }
 
   GCPRO2 (opaque, function);
@@ -4493,7 +4481,7 @@
     {
       tem = XSYMBOL (function)->function;
       if (NILP (tem) || UNBOUNDP (tem))
-	return (Qnil);
+	return Qnil;
     }
 
   GCPRO4 (cons, opaque, function, object);
@@ -4530,7 +4518,7 @@
     {
       tem = XSYMBOL (function)->function;
       if (NILP (tem) || UNBOUNDP (tem))
-	return (Qnil);
+	return Qnil;
     }
 
   GCPRO5 (cons, opaque, function, object1, object2);
@@ -4619,7 +4607,7 @@
     Fset_buffer (current);
     UNGCPRO;
   }
-  return (symbol);
+  return symbol;
 }
 
 static Lisp_Object
@@ -4652,7 +4640,7 @@
       Fset_buffer (current);
       UNGCPRO;
     }
-  return (symbol);
+  return symbol;
 }
 
 
@@ -4759,14 +4747,14 @@
 
   UNGCPRO;
 
-  return (value);
+  return value;
 }
 
 
 int
 specpdl_depth (void)
 {
-  return (specpdl_depth_counter);
+  return specpdl_depth_counter;
 }
 
 
@@ -5122,7 +5110,6 @@
   DEFSUBR (Fcall_with_condition_handler);
   DEFSUBR (Fsignal);
   DEFSUBR (Finteractive_p);
-  DEFSUBR (Fstrerror);
   DEFSUBR (Fcommandp);
   DEFSUBR (Fcommand_execute);
   DEFSUBR (Fautoload);
--- a/src/event-Xt.c	Mon Aug 13 09:47:55 2007 +0200
+++ b/src/event-Xt.c	Mon Aug 13 09:49:09 2007 +0200
@@ -1821,7 +1821,7 @@
 {
   struct frame *f;
   Widget w;
-  stderr_out ("   window: 0x%x", (int) window);
+  stderr_out ("   window: 0x%x", window);
   w = XtWindowToWidget (display, window);
   if (w)
     stderr_out (" %s", w->core.widget_class->core_class.class_name);
--- a/src/event-stream.c	Mon Aug 13 09:47:55 2007 +0200
+++ b/src/event-stream.c	Mon Aug 13 09:49:09 2007 +0200
@@ -141,10 +141,10 @@
 
 /* The frame that was current when the last command was started. */
 Lisp_Object Vlast_selected_frame;
- 
+
 /* The buffer that was current when the last command was started.  */
 Lisp_Object last_point_position_buffer;
- 
+
 /* A (16bit . 16bit) representation of the time of the last-command-event.
  */
 Lisp_Object Vlast_input_time;
@@ -215,7 +215,7 @@
    *  after the last command completed.  Threaded. */
   /* #### NYI */
   Lisp_Object prefix_events;
-  /* Qnil, or a Lisp_Event representing event in the current 
+  /* Qnil, or a Lisp_Event representing event in the current
    *  keymap-lookup sequence.  Subsequent events are threaded via
    *  the event's next slot */
   Lisp_Object current_events;
@@ -615,7 +615,7 @@
 
   format_event_object (buf, XEVENT (event), 1);
   len = strlen (buf);
-  
+
   if (len + buf_index + 4 > command_builder->echo_buf_length)
     return;
   e = command_builder->echo_buf + buf_index;
@@ -651,7 +651,7 @@
   if (echo_area_active (f) && !EQ (Qcommand, echo_area_status (f)))
     return;
 
-  if (minibuf_level == 0 
+  if (minibuf_level == 0
       && echo_keystrokes > 0)
     {
       if (!no_snooze)
@@ -762,7 +762,7 @@
 {
   keystrokes_since_auto_save = 0;
 }
-  
+
 /* Make an auto save happen as soon as possible at command level.  */
 
 void
@@ -874,7 +874,7 @@
 	{
 	  if (XEVENT_TYPE (event) != eval_event
 	      && XEVENT_TYPE (event) != magic_eval_event)
-	    return (1);
+	    return 1;
 	}
     }
   return 0;
@@ -886,7 +886,7 @@
 */
   ())
 {
-  return ((detect_input_pending ()) ? Qt : Qnil);
+  return detect_input_pending () ? Qt : Qnil;
 }
 
 
@@ -951,12 +951,12 @@
 remove_low_level_timeout (struct low_level_timeout **timeout_list, int id)
 {
   struct low_level_timeout *t, *prev;
-  
+
   /* find it */
-  
+
   for (t = *timeout_list, prev = NULL; t && t->id != id; t = t->next)
     prev = t;
-  
+
   if (!t)
     return; /* couldn't find it */
 
@@ -980,7 +980,7 @@
   else
     {
       EMACS_TIME current_time;
-      
+
       /* The time to block is the difference between the first
 	 (earliest) timer on the queue and the current time.
 	 If that is negative, then the timer will fire immediately
@@ -1140,7 +1140,7 @@
   id = timeout->id;
   *function = timeout->function;
   *object = timeout->object;
-  
+
   /* Remove this one from the list of pending timeouts */
   *timeout_list = delq_no_quit_and_free_cons (op, *timeout_list);
 
@@ -1179,7 +1179,7 @@
     }
   else
     free_managed_opaque (Vtimeout_free_list, op);
-  
+
   UNGCPRO;
   return id;
 }
@@ -1761,7 +1761,7 @@
 }
 
 /* Called from the window-system-specific code when we receive a
-   notification that the focus lies on a particular frame. 
+   notification that the focus lies on a particular frame.
    Argument is a cons: (frame . (device . in-p)) where in-p is non-nil
    for focus-in.
  */
@@ -1848,7 +1848,7 @@
   return in_single_console;
 }
 
-/* the number of keyboard characters read.  callint.c wants this. 
+/* the number of keyboard characters read.  callint.c wants this.
  */
 Charcount num_input_chars;
 
@@ -1863,7 +1863,7 @@
 
   GCPRO1 (target_event);
   investigate_frame_change ();
-    
+
   if (allow_queued && !NILP (command_event_queue))
     {
       Lisp_Object event = dequeue_command_event ();
@@ -1895,7 +1895,7 @@
 	  e->event.timeout.id_number =
 	    event_stream_resignal_wakeup (e->event.timeout.interval_id, 0,
 					  &tristan, &isolde);
-	  
+
 	  e->event.timeout.function = tristan;
 	  e->event.timeout.object = isolde;
 #ifdef DEBUG_XEMACS
@@ -2083,7 +2083,7 @@
     {
       Lisp_Object e = Vunread_command_event;
       Vunread_command_event = Qnil;
-      
+
       if (!EVENTP (e) || !command_event_p (e))
 	{
 	  signal_error (Qwrong_type_argument,
@@ -2102,7 +2102,7 @@
 	}
 #endif
     }
-  
+
   /* If we're executing a keyboard macro, take the next event from that,
      and update this-command-keys and recent-keys.
      Note that the unread-command-events take precedence over kbd macros.
@@ -2194,7 +2194,7 @@
     }
   if (! EQ (event, Vlast_input_event))
     Fcopy_event (event, Vlast_input_event);
-      
+
   /* last-input-char and last-input-time are derived from
      last-input-event.
      Note that last-input-char will never have its high-bit set, in an
@@ -2242,7 +2242,7 @@
 
  RETURN:
   UNGCPRO;
-  return (event);
+  return event;
 }
 
 DEFUN ("next-command-event", Fnext_command_event, 0, 2, 0, /*
@@ -2285,7 +2285,7 @@
         execute_internal_event (event);
     }
   UNGCPRO;
-  return (event);
+  return event;
 }
 
 static void
@@ -2392,14 +2392,14 @@
    recursive_sit_for to Qt, and use this unwind protect to reset it to
    Qnil upon exit.  When recursive_sit_for is Qt, calling sit-for will
    cause it to return immediately.
-   
+
    All of these routines install timeouts, so we clear the installed
    timeout as well.
 
    Note: It's very easy to break the desired behaviours of these
    3 routines.  If you make any changes to anything in this area, run
    the regression tests at the bottom of the file.  -- dmoore */
-   
+
 
 static Lisp_Object
 sit_for_unwind (Lisp_Object timeout_id)
@@ -2434,7 +2434,7 @@
   struct gcpro gcpro1, gcpro2;
   Lisp_Object event  = Qnil;
   Lisp_Object result = Qnil;
-  int timeout_id;
+  int timeout_id = -1;
   int timeout_enabled = 0;
   int done = 0;
   struct buffer *old_buffer = current_buffer;
@@ -2653,14 +2653,14 @@
       EVENT_CHAIN_LOOP (event, command_event_queue)
 	{
 	  if (command_event_p (event))
-	    return (Qnil);
+	    return Qnil;
 	}
     }
 
   /* If we're in a macro, or noninteractive, or early in temacs, then
      don't wait. */
   if (noninteractive || !NILP (Vexecuting_macro))
-    return (Qnil);
+    return Qnil;
 
   /* Recusive call from a filter function or timeout handler. */
   if (!NILP(recursive_sit_for))
@@ -2739,7 +2739,7 @@
 	    enqueue_command_event (Fcopy_event (event, Qnil));
 	    break;
 	  }
-          
+
 	case timeout_event:
 	  /* We execute the event even if it's ours, and notice that it's
 	     happened above. */
@@ -2768,7 +2768,7 @@
     Fdeallocate_event (event);
 
   UNGCPRO;
-  return (result);
+  return result;
 }
 
 /* This handy little function is used by xselect.c and energize.c to
@@ -2817,14 +2817,14 @@
     return;
 
   /* This function can GC */
-  switch (XEVENT_TYPE (event)) 
+  switch (XEVENT_TYPE (event))
     {
     case empty_event:
       return;
 
     case eval_event:
       {
-	call1 (XEVENT (event)->event.eval.function, 
+	call1 (XEVENT (event)->event.eval.function,
 	       XEVENT (event)->event.eval.object);
 	return;
       }
@@ -2862,7 +2862,7 @@
 	else if (readstatus == -1 && errno == EAGAIN)
 	  ;
 #endif /* EAGAIN */
-	else if ((readstatus == 0 && 
+	else if ((readstatus == 0 &&
 		  /* Note that we cannot distinguish between no input
 		     available now and a closed pipe.
 		     With luck, a closed pipe will be accompanied by
@@ -2981,7 +2981,7 @@
   Lisp_Object event0 = builder->current_events;
 
   if (NILP (event0))
-    return (Qnil);
+    return Qnil;
 
   return event_binding (event0, 1);
 }
@@ -2996,11 +2996,11 @@
 			int has_normal_binding_p)
 {
   Lisp_Object suffix;
-      
+
   EVENT_CHAIN_LOOP (suffix, builder->munge_me[munge].first_mungeable_event)
     {
       Lisp_Object result = munging_key_map_event_binding (suffix, munge);
-      
+
       if (!NILP (result))
 	{
 	  if (KEYMAPP (result))
@@ -3024,7 +3024,7 @@
 
 	  if (KEYMAPP (result))
 	    return result;
-	  
+
 	  if (VECTORP (result) || STRINGP (result))
 	    {
 	      Lisp_Object new_chain =
@@ -3106,7 +3106,7 @@
     {
       Lisp_Object fn  = XEVENT (evee)->event.eval.function;
       Lisp_Object arg = XEVENT (evee)->event.eval.object;
-      return (list2 (fn, arg));
+      return list2 (fn, arg);
     }
 
   else if (XEVENT_TYPE (evee) == misc_user_event)
@@ -3145,13 +3145,13 @@
     {
       Lisp_Object terminal = builder->most_current_event;
       struct key_data* key = & XEVENT (terminal)->event.key;
-      Emchar c;
+      Emchar c = 0;
       if ((key->modifiers & MOD_SHIFT)
           || (CHAR_OR_CHAR_INTP (key->keysym)
               && ((c = XCHAR_OR_CHAR_INT (key->keysym)), c >= 'A' && c <= 'Z')))
         {
           struct Lisp_Event terminal_copy = *XEVENT (terminal);
-          
+
           if (key->modifiers & MOD_SHIFT)
             key->modifiers &= (~ MOD_SHIFT);
           else
@@ -3173,7 +3173,7 @@
   if (!NILP (Vprefix_help_command) &&
       event_matches_key_specifier_p (XEVENT (builder->most_current_event),
 				     Vhelp_char))
-    return (Vprefix_help_command);
+    return Vprefix_help_command;
 
 #ifdef HAVE_XIM
   /* If keysym is a non-ASCII char, bind it to self-insert-char by default. */
@@ -3185,7 +3185,7 @@
         return Vcomposed_character_default_binding;
     }
 #endif /* HAVE_XIM */
-  
+
   /* If we read extra events attempting to match a function key but end
      up failing, then we release those events back to the command loop
      and fail on the original lookup.  The released events will then be
@@ -3193,12 +3193,12 @@
   if (!NILP (builder->last_non_munged_event))
     {
       Lisp_Object event0 = builder->last_non_munged_event;
-      
+
       /* Put the commands back on the event queue. */
       enqueue_event_chain (XEVENT_NEXT (event0),
 			   &command_event_queue,
 			   &command_event_queue_tail);
-      
+
       /* Then remove them from the command builder. */
       XSET_EVENT_NEXT (event0, Qnil);
       builder->most_current_event = event0;
@@ -3218,7 +3218,7 @@
 
    This means that Vthis_command_keys is really about "input read since the
    last command was executed" rather than about "what keys invoked this
-   command."  This is a little counterintuitive, but that's the way it 
+   command."  This is a little counterintuitive, but that's the way it
    has always worked.
 
    As an extra kink, the function read-key-sequence resets/updates the
@@ -3263,7 +3263,7 @@
       return make_vector (0, Qnil);
     }
 
-  if (NILP (vector_data (XVECTOR (Vrecent_keys_ring))[recent_keys_ring_index]))
+  if (NILP (XVECTOR_DATA (Vrecent_keys_ring)[recent_keys_ring_index]))
     /* This means the vector has not yet wrapped */
     {
       nkeys = recent_keys_ring_index;
@@ -3289,16 +3289,16 @@
 
   for (i = 0, j = start; i < nkeys; i++)
   {
-    Lisp_Object e = vector_data (XVECTOR (Vrecent_keys_ring))[j];
+    Lisp_Object e = XVECTOR_DATA (Vrecent_keys_ring)[j];
 
     if (NILP (e))
       abort ();
-    vector_data (XVECTOR (val))[i] = Fcopy_event (e, Qnil);
+    XVECTOR_DATA (val)[i] = Fcopy_event (e, Qnil);
     if (++j >= recent_keys_ring_size)
       j = 0;
   }
   UNGCPRO;
-  return (val);
+  return val;
 }
 
 
@@ -3334,7 +3334,7 @@
       return size;
     }
 
-  if (NILP (vector_data (XVECTOR (Vrecent_keys_ring))[recent_keys_ring_index]))
+  if (NILP (XVECTOR_DATA (Vrecent_keys_ring)[recent_keys_ring_index]))
     /* This means the vector has not yet wrapped */
     {
       nkeys = recent_keys_ring_index;
@@ -3353,8 +3353,7 @@
 
   for (i = 0, j = start; i < min; i++)
     {
-      vector_data (XVECTOR (new_vector))[i]
-	= vector_data (XVECTOR (Vrecent_keys_ring))[j];
+      XVECTOR_DATA (new_vector)[i] = XVECTOR_DATA (Vrecent_keys_ring)[j];
       if (++j >= recent_keys_ring_size)
 	j = 0;
     }
@@ -3446,19 +3445,24 @@
 extract_vector_nth_mouse_event (Lisp_Object vector, int n)
 {
   int i;
-
-  for (i = 0; i < vector_length (XVECTOR (vector)); i++)
+  int len = XVECTOR_LENGTH (vector);
+
+  for (i = 0; i < len; i++)
     {
-      Lisp_Object event = vector_data (XVECTOR (vector))[i];
-      if (EVENTP (event)
-	  && (XEVENT_TYPE (event) == button_press_event
-	      || XEVENT_TYPE (event) == button_release_event
-	      || XEVENT_TYPE (event) == misc_user_event))
-	{
-	  if (!n)
-	    return event;
-	  n--;
-	}
+      Lisp_Object event = XVECTOR_DATA (vector)[i];
+      if (EVENTP (event))
+	switch (XEVENT_TYPE (event))
+	  {
+	  case button_press_event :
+	  case button_release_event :
+	  case misc_user_event :
+	    if (n == 0)
+	      return event;
+	    n--;
+	    break;
+	  default:
+	    continue;
+	  }
     }
 
   return Qnil;
@@ -3472,12 +3476,12 @@
   if (NILP (Vrecent_keys_ring))
     Vrecent_keys_ring = make_vector (recent_keys_ring_size, Qnil);
 
-  e = vector_data (XVECTOR (Vrecent_keys_ring)) [recent_keys_ring_index];
+  e = XVECTOR_DATA (Vrecent_keys_ring) [recent_keys_ring_index];
 
   if (NILP (e))
     {
       e = Fmake_event ();
-      vector_data (XVECTOR (Vrecent_keys_ring)) [recent_keys_ring_index] = e;
+      XVECTOR_DATA (Vrecent_keys_ring) [recent_keys_ring_index] = e;
     }
   Fcopy_event (event, e);
   if (++recent_keys_ring_index == recent_keys_ring_size)
@@ -3498,9 +3502,9 @@
   vector = make_vector (n, Qnil);
   n = 0;
   EVENT_CHAIN_LOOP (event, command_builder->current_events)
-    vector_data (XVECTOR (vector))[n++] = event;
+    XVECTOR_DATA (vector)[n++] = event;
   reset_command_builder_event_chain (command_builder);
-  return (vector);
+  return vector;
 }
 
 
@@ -3551,7 +3555,7 @@
 	e = XEVENT (recent);
 	if (e->event_type == key_press_event)
 	  e->event.key.modifiers |= MOD_META;
-	else if (e->event_type == button_press_event 
+	else if (e->event_type == button_press_event
 		 || e->event_type == button_release_event)
 	  e->event.button.modifiers |= MOD_META;
 	else
@@ -3647,7 +3651,7 @@
       Vlast_command_event = Fmake_event ();
       error ("Someone deallocated the last-command-event!");
     }
-  
+
   if (! EQ (event, Vlast_command_event))
     Fcopy_event (event, Vlast_command_event);
 
@@ -3684,7 +3688,7 @@
 
     if (XEVENT (event)->event_type == misc_user_event)
       {
-	call1 (XEVENT (event)->event.eval.function, 
+	call1 (XEVENT (event)->event.eval.function,
 	       XEVENT (event)->event.eval.object);
       }
     else
@@ -3766,7 +3770,7 @@
   if (NILP (win))
     return;
 #endif
-  
+
   if (! zmacs_region_stays
       && (!MINI_WINDOW_P (XWINDOW (win))
           || EQ (zmacs_region_buffer (), WINDOW_BUFFER (XWINDOW (win)))))
@@ -3860,7 +3864,7 @@
     Fselect_console (console);
 
   command_builder = XCOMMAND_BUILDER (XCONSOLE (console)->command_builder);
-  switch (XEVENT (event)->event_type) 
+  switch (XEVENT (event)->event_type)
     {
     case button_press_event:
     case button_release_event:
@@ -3938,7 +3942,7 @@
 	    XCONSOLE (console)->defining_kbd_macro = Qnil;
 	    XCONSOLE (console)->prefix_arg = Qnil;
 	    /* Don't complain about undefined button-release events */
-	    if (XEVENT_TYPE (terminal) != button_release_event) 
+	    if (XEVENT_TYPE (terminal) != button_release_event)
 	      {
 		Lisp_Object keys =
 		  current_events_into_vector (command_builder);
@@ -4039,7 +4043,7 @@
 	break;
       }
     }
-  return (Qnil);
+  return Qnil;
 }
 
 DEFUN ("read-key-sequence", Fread_key_sequence, 1, 3, 0, /*
@@ -4144,15 +4148,15 @@
   int len;
 
   if (NILP (Vthis_command_keys))
-    return (make_vector (0, Qnil));
+    return make_vector (0, Qnil);
 
   len = event_chain_count (Vthis_command_keys);
 
   result = make_vector (len, Qnil);
   len = 0;
   EVENT_CHAIN_LOOP (event, Vthis_command_keys)
-    vector_data (XVECTOR (result))[len++] = Fcopy_event (event, Qnil);
-  return (result);
+    XVECTOR_DATA (result)[len++] = Fcopy_event (event, Qnil);
+  return result;
 }
 
 DEFUN ("reset-this-command-lengths", Freset_this_command_lengths, 0, 0, 0, /*
@@ -4191,7 +4195,7 @@
 	  Emchar ch = XCHAR (keysym);
 	  Bufbyte str[MAX_EMCHAR_LEN];
 	  Bytecount len;
-	  
+
 	  len = set_charptr_emchar (str, ch);
 	  Lstream_write (XLSTREAM (Vdribble_file), str, len);
 	}
@@ -4317,7 +4321,7 @@
   Vthis_command_keys_tail = Qnil;
 
   num_input_chars = 0;
- 
+
   command_event_queue = Qnil;
   staticpro (&command_event_queue);
   command_event_queue_tail = Qnil;
@@ -4559,7 +4563,7 @@
 
 #ifdef HAVE_XIM
   DEFVAR_LISP ("Vcomposed_character_default_binding",
-               &Vretry_undefined_key_binding_unshifted /* 
+               &Vretry_undefined_key_binding_unshifted /*
 The default keybinding to use for key events from composed input.
 Window systems frequently have ways to allow the user to compose
 single characters in a language using multiple keystrokes.
--- a/src/events.c	Mon Aug 13 09:47:55 2007 +0200
+++ b/src/events.c	Mon Aug 13 09:49:09 2007 +0200
@@ -161,7 +161,7 @@
   if (print_readably)
     error ("printing unreadable object #<event>");
 
-  switch (XEVENT (obj)->event_type) 
+  switch (XEVENT (obj)->event_type)
     {
     case key_press_event:
       print_event_1 ("#<keypress-event ", obj, printcharfun);
@@ -217,7 +217,7 @@
       }
   write_c_string (">", printcharfun);
 }
-  
+
 static int
 event_equal (Lisp_Object o1, Lisp_Object o2, int depth)
 {
@@ -231,13 +231,13 @@
     {
     case process_event:
       return EQ (e1->event.process.process, e2->event.process.process);
-    
+
     case timeout_event:
       return (!NILP (Fequal (e1->event.timeout.function,
 			     e2->event.timeout.function)) &&
 	      !NILP (Fequal (e1->event.timeout.object,
 			     e2->event.timeout.object)));
-    
+
     case key_press_event:
       return (EQ (e1->event.key.keysym, e2->event.key.keysym) &&
 	      (e1->event.key.modifiers == e2->event.key.modifiers));
@@ -306,11 +306,11 @@
     {
     case process_event:
       return HASH2 (hash, LISP_HASH (e->event.process.process));
-    
+
     case timeout_event:
       return HASH3 (hash, internal_hash (e->event.timeout.function, depth + 1),
 		    internal_hash (e->event.timeout.object, depth + 1));
-    
+
     case key_press_event:
       return HASH3 (hash, LISP_HASH (e->event.key.keysym),
 		    e->event.key.modifiers);
@@ -406,25 +406,26 @@
   assert (XEVENT_TYPE (event) <= last_event_type);
 
 #if 0
-  {  
-    int i;
+  {
+    int i, len;
     extern Lisp_Object Vlast_command_event;
     extern Lisp_Object Vlast_input_event, Vunread_command_event;
     extern Lisp_Object Vthis_command_keys, Vrecent_keys_ring;
 
-    if (EQ (event, Vlast_command_event))
-      abort ();
-    if (EQ (event, Vlast_input_event))
+    if (EQ (event, Vlast_command_event) ||
+	EQ (event, Vlast_input_event)   ||
+	EQ (event, Vunread_command_event))
       abort ();
-    if (EQ (event, Vunread_command_event))
-      abort ();
-    for (i = 0; i < XVECTOR (Vthis_command_keys)->size; i++)
-      if (EQ (event, vector_data (XVECTOR (Vthis_command_keys)) [i]))
+
+    len = XVECTOR_LENGTH (Vthis_command_keys);
+    for (i = 0; i < len; i++)
+      if (EQ (event, XVECTOR_DATA (Vthis_command_keys) [i]))
 	abort ();
     if (!NILP (Vrecent_keys_ring))
       {
-	for (i = 0; i < XVECTOR (Vrecent_keys_ring)->size; i++)
-	  if (EQ (event, vector_data (XVECTOR (Vrecent_keys_ring)) [i]))
+	int recent_ring_len = XVECTOR_LENGTH (Vrecent_keys_ring);
+	for (i = 0; i < recent_ring_len; i++)
+	  if (EQ (event, XVECTOR_DATA (Vrecent_keys_ring) [i]))
 	    abort ();
       }
   }
@@ -464,7 +465,7 @@
 
     *XEVENT (event2) = *XEVENT (event1);
     XSET_EVENT_NEXT (event2, save_next);
-    return (event2);
+    return event2;
   }
 }
 
@@ -520,7 +521,7 @@
 
 /* Remove an event off the head of a chain of events and return it.
    HEAD points to the first event in the chain, TAIL to the last event. */
-   
+
 Lisp_Object
 dequeue_event (Lisp_Object *head, Lisp_Object *tail)
 {
@@ -635,9 +636,9 @@
     case button_press_event:
     case button_release_event:
     case misc_user_event:
-      return (1);
+      return 1;
     default:
-      return (0);
+      return 0;
     }
 }
 
@@ -692,7 +693,7 @@
     k = QKdelete;
   else if (c == ' ')
     k = QKspace;
-  
+
   event->event_type	     = key_press_event;
   event->timestamp	     = 0; /* #### */
   event->channel	     = make_console (con);
@@ -751,7 +752,7 @@
 	/* reject Control-Shift- keys */
 	if (c >= 'A' && c <= 'Z' && !allow_extra_modifiers)
 	  return -1;
-      
+
       if (c >= '@' && c <= '_')
 	c -= '@';
       else if (c == ' ')  /* C-space and C-@ are the same. */
@@ -799,7 +800,7 @@
 			  !NILP (allow_extra_modifiers),
 			  !NILP (allow_meta),
 			  !NILP (allow_non_ascii));
-  return (c < 0 ? Qnil : make_char (c));
+  return c < 0 ? Qnil : make_char (c);
 }
 
 DEFUN ("character-to-event", Fcharacter_to_event, 1, 4, 0, /*
@@ -861,7 +862,7 @@
     }
   else
     {
-      Lisp_Object keystroke = vector_data (XVECTOR (seq))[n];
+      Lisp_Object keystroke = XVECTOR_DATA (seq)[n];
       if (EVENTP (keystroke))
 	Fcopy_event (keystroke, event);
       else
@@ -1042,7 +1043,7 @@
   if (NILP (next_event))
     {
       XSET_EVENT_NEXT (event, Qnil);
-      return (Qnil);
+      return Qnil;
     }
 
   CHECK_LIVE_EVENT (next_event);
@@ -1051,9 +1052,9 @@
     {
       QUIT;
       if (EQ (ev, event))
-	signal_error (Qerror, 
+	signal_error (Qerror,
 		      list3 (build_string ("Cyclic event-next"),
-			     event, 
+			     event,
 			     next_event));
     }
   XSET_EVENT_NEXT (event, next_event);
@@ -1328,7 +1329,7 @@
 
    OBJ_X, OBJ_Y, OBJ1, and OBJ2 are as in pixel_to_glyph_translation().
 */
-   
+
 static int
 event_pixel_translation (Lisp_Object event, int *char_x, int *char_y,
 			 int *obj_x, int *obj_y,
@@ -1339,30 +1340,30 @@
   int pix_x = 0;
   int pix_y = 0;
   int result;
-  Lisp_Object frame;
+  Lisp_Object frame = Qnil;
 
   int ret_x, ret_y, ret_obj_x, ret_obj_y;
   struct window *ret_w;
   Bufpos ret_bufp, ret_closest;
   Charcount ret_modeline_closest;
   Lisp_Object ret_obj1, ret_obj2;
-  
+
   CHECK_LIVE_EVENT (event);
-  if (XEVENT (event)->event_type == pointer_motion_event)
+  frame = XEVENT (event)->channel;
+  switch (XEVENT (event)->event_type)
     {
+    case pointer_motion_event :
       pix_x = XEVENT (event)->event.motion.x;
       pix_y = XEVENT (event)->event.motion.y;
-      frame = XEVENT (event)->channel;
-    }
-  else if (XEVENT (event)->event_type == button_press_event ||
-	   XEVENT (event)->event_type == button_release_event)
-    {
+      break;
+    case button_press_event :
+    case button_release_event :
       pix_x = XEVENT (event)->event.button.x;
       pix_y = XEVENT (event)->event.button.y;
-      frame = XEVENT (event)->channel;
+      break;
+    default:
+      dead_wrong_type_argument (Qmouse_event_p, event);
     }
-  else
-    wrong_type_argument (Qmouse_event_p, event);
 
   result = pixel_to_glyph_translation (XFRAME (frame), pix_x, pix_y,
 				       &ret_x, &ret_y, &ret_obj_x, &ret_obj_y,
@@ -1388,8 +1389,7 @@
 #endif
      ))
     abort ();
-  if (!NILP (ret_obj2) && !(EXTENTP (ret_obj2)
-			    || CONSP (ret_obj2)))
+  if (!NILP (ret_obj2) && !(EXTENTP (ret_obj2) || CONSP (ret_obj2)))
     abort ();
 
   if (char_x)
@@ -1678,10 +1678,10 @@
   switch (XEVENT (event)->event_type)
     {
     case timeout_event:
-      return (XEVENT (event)->event.timeout.function);
+      return XEVENT (event)->event.timeout.function;
     case misc_user_event:
     case eval_event:
-      return (XEVENT (event)->event.eval.function);
+      return XEVENT (event)->event.eval.function;
     default:
       return wrong_type_argument (intern ("timeout-or-eval-event-p"), event);
     }
@@ -1698,10 +1698,10 @@
   switch (XEVENT (event)->event_type)
     {
     case timeout_event:
-      return (XEVENT (event)->event.timeout.object);
+      return XEVENT (event)->event.timeout.object;
     case misc_user_event:
     case eval_event:
-      return (XEVENT (event)->event.eval.object);
+      return XEVENT (event)->event.eval.object;
     default:
       event = wrong_type_argument (intern ("timeout-or-eval-event-p"), event);
       goto again;
@@ -1729,7 +1729,7 @@
     case process_event:
       props = Fcons (Qprocess, Fcons (e->event.process.process, props));
       break;
-    
+
     case timeout_event:
       props = Fcons (Qobject, Fcons (Fevent_object (event), props));
       props = Fcons (Qfunction, Fcons (Fevent_function (event), props));
--- a/src/extents.c	Mon Aug 13 09:47:55 2007 +0200
+++ b/src/extents.c	Mon Aug 13 09:49:09 2007 +0200
@@ -133,7 +133,7 @@
       whether the endpoints of an extents are open or closed.
       But for our purposes, it greatly simplifies things to treat
       all extents as having closed endpoints.
-   
+
    First, define >, <, <=, etc. as applied to extents to mean
      comparison according to the display order.  Comparison between an
      extent E and an index I means comparison between E and the range
@@ -155,7 +155,7 @@
    Let R be a range.
    Let F be the first extent overlapping R.
    Let L be the last extent overlapping R.
-   
+
    Theorem 1: R(1) lies between L and L(next), i.e. L <= R(1) < L(next).
 
    This follows easily from the definition of display order.  The
@@ -214,7 +214,7 @@
 #include <config.h>
 #include "lisp.h"
 
-#include "buffer.h" 
+#include "buffer.h"
 #include "debug.h"
 #include "device.h"
 #include "elhash.h"
@@ -747,7 +747,7 @@
 	 of the list), so NEWPOS must round down. */
       unsigned int newpos = (left + right) >> 1;
       e = EXTENT_GAP_ARRAY_AT (ga, newpos);
-      
+
       if (endp ? EXTENT_E_LESS (e, extent) : EXTENT_LESS (e, extent))
 	left = newpos+1;
       else
@@ -936,7 +936,7 @@
   ((markobj) (data->children));
   ((markobj) (data->read_only));
   ((markobj) (data->mouse_face));
-  return (data->parent);
+  return data->parent;
 }
 
 void
@@ -1094,7 +1094,7 @@
   else
     CHECK_LIVE_BUFFER_OR_STRING (object);
   return object;
-}  
+}
 
 EXTENT
 extent_ancestor_1 (EXTENT e)
@@ -1147,7 +1147,7 @@
 buffer_or_string_extent_info_force (Lisp_Object object)
 {
   struct extent_info *info = buffer_or_string_extent_info (object);
-  
+
   if (!info)
     {
       Lisp_Object extent_info;
@@ -1547,7 +1547,7 @@
    extent_endpoint().  If you want the value as a buffer position,
    use extent_endpoint_bufpos(). */
 
-static Bytind 
+static Bytind
 extent_endpoint_bytind (EXTENT extent, int endp)
 {
   assert (EXTENT_LIVE_P (extent));
@@ -1604,7 +1604,7 @@
     }
 
   /* now mark the extent itself. */
-  
+
   object = extent_object (extent);
 
   if (!BUFFERP (object) || extent_detached_p (extent))
@@ -1805,7 +1805,7 @@
 
 static void
 extent_detach (EXTENT extent)
-{ 
+{
   Extent_List *el;
 
   if (extent_detached_p (extent))
@@ -1911,7 +1911,7 @@
 static Lisp_Object
 map_extents_unwind (Lisp_Object obj)
 {
-  struct map_extents_struct *closure = 
+  struct map_extents_struct *closure =
     (struct map_extents_struct *) get_opaque_ptr (obj);
   free_opaque_ptr (obj);
   if (closure->range)
@@ -2094,7 +2094,7 @@
 #else
 	Stack_Of_Extents *soe = buffer_or_string_stack_of_extents_force (obj);
 	int numsoe;
-	
+
 	/* Move the SOE to the closer end of the range.  This dictates
 	   whether we map over start positions or end positions. */
 	range_endp = 0;
@@ -2129,7 +2129,7 @@
 	  }
       }
 #endif
-      
+
   /* ---------- Now loop over the extents. ---------- */
 
     /* We combine the code for the two stages because much of it
@@ -2395,7 +2395,7 @@
   int i;
   Memind adjust_to = (Memind) (to + gapsize);
   Bytecount amount = - numdel - movegapsize;
-  Memind oldsoe, newsoe;
+  Memind oldsoe = 0, newsoe = 0;
   Stack_Of_Extents *soe = buffer_or_string_stack_of_extents (object);
 
 #ifdef ERROR_CHECK_EXTENTS
@@ -2626,7 +2626,7 @@
   CONST EXTENT bar = * (CONST EXTENT *) dumpty;
   if (extent_priority (foo) < extent_priority (bar))
     return -1;
-  return (extent_priority (foo) > extent_priority (bar));
+  return extent_priority (foo) > extent_priority (bar);
 }
 
 static void
@@ -2801,14 +2801,14 @@
 	{
 	  Lisp_Object glyph = extent_begin_glyph (e);
 	  struct glyph_block gb;
-	  
+
 	  gb.glyph = glyph;
 	  gb.extent = Qnil;
 	  XSETEXTENT (gb.extent, e);
 	  Dynarr_add (ef->begin_glyphs, gb);
 	}
     }
-  
+
   /* Determine the end glyphs at POS. */
   for (i = 0; i < extent_list_num_els (sel); i++)
     {
@@ -2817,7 +2817,7 @@
 	{
 	  Lisp_Object glyph = extent_end_glyph (e);
 	  struct glyph_block gb;
-	  
+
 	  gb.glyph = glyph;
 	  gb.extent = Qnil;
 	  XSETEXTENT (gb.extent, e);
@@ -2894,7 +2894,7 @@
   /* Now merge the faces together into a single face.  The code to
      do this is in faces.c because it involves manipulating faces. */
   return get_extent_fragment_face_cache_index (w, ef);
-}	  
+}
 
 
 /************************************************************************/
@@ -2936,16 +2936,16 @@
 
   ((markobj) (extent_object (extent)));
   ((markobj) (extent_no_chase_normal_field (extent, face)));
-  return (extent->plist);
+  return extent->plist;
 }
 
 static char *
-print_extent_1 (char *buf, Lisp_Object extent_obj)
-{
-  EXTENT ext = XEXTENT (extent_obj);
+print_extent_1 (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
+{
+  EXTENT ext = XEXTENT (obj);
   EXTENT anc = extent_ancestor (ext);
-  char *bp = buf;
   Lisp_Object tail;
+  char buf[64], *bp = buf;
 
   /* Retrieve the ancestor and use it, for faster retrieval of properties */
 
@@ -2955,8 +2955,8 @@
     sprintf (bp, "detached");
   else
     {
-      Bufpos from = XINT (Fextent_start_position (extent_obj));
-      Bufpos to = XINT (Fextent_end_position (extent_obj));
+      Bufpos from = XINT (Fextent_start_position (obj));
+      Bufpos to = XINT (Fextent_end_position (obj));
       sprintf (bp, "%d, %d", from, to);
     }
   bp += strlen (bp);
@@ -2974,51 +2974,38 @@
       extent_unique_p (anc) ||
       extent_duplicable_p (anc) || !NILP (extent_invisible (anc)))
     *bp++ = ' ';
+  *bp = '\0';
+  write_c_string (buf, printcharfun);
 
   tail = extent_plist_slot (anc);
 
   for (; !NILP (tail); tail = Fcdr (Fcdr (tail)))
     {
-      struct Lisp_String *k;
       Lisp_Object v = XCAR (XCDR (tail));
       if (NILP (v)) continue;
-      if (!SYMBOLP (XCAR (tail)))
-	{
-	  /* ### Fix this! */
-	  strcpy (bp, "non-symbol ");
-	  bp += 11;
-	  continue;
-	}
-      k = XSYMBOL (XCAR (tail))->name;
-      memcpy (bp, (char *) string_data (k), string_length (k));
-      bp += string_length (k);
-      *bp++ = ' ';
+      print_internal (XCAR (tail), printcharfun, escapeflag);
+      write_c_string (" ", printcharfun);
     }
 
-  sprintf (bp, "0x%lx", (long) ext);
-  bp += strlen (bp);
-
-  *bp++ = 0;
-  return buf;
+  sprintf (buf, "0x%lx", (long) ext);
+  write_c_string (buf, printcharfun);
 }
 
 static void
 print_extent (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
 {
-  char buf2[256];
-
   if (escapeflag)
     {
       CONST char *title = "";
       CONST char *name = "";
       CONST char *posttitle = "";
       Lisp_Object obj2 = Qnil;
-	  
+
       /* Destroyed extents have 't' in the object field, causing
 	 extent_object() to abort (maybe). */
       if (EXTENT_LIVE_P (XEXTENT (obj)))
 	obj2 = extent_object (XEXTENT (obj));
-      
+
       if (NILP (obj2))
 	title = "no buffer";
       else if (BUFFERP (obj2))
@@ -3041,29 +3028,27 @@
 	  posttitle = "\"";
 	  name = (char *) XSTRING_DATA (obj2);
 	}
-      
+
       if (print_readably)
 	{
 	  if (!EXTENT_LIVE_P (XEXTENT (obj)))
 	    error ("printing unreadable object #<destroyed extent>");
 	  else
-	    error ("printing unreadable object #<extent %s>",
-		   print_extent_1 (buf2, obj));
+	    error ("printing unreadable object #<extent 0x%lx>",
+		   (long)XEXTENT (obj));
 	}
-      
+
       if (!EXTENT_LIVE_P (XEXTENT (obj)))
 	write_c_string ("#<destroyed extent", printcharfun);
       else
 	{
-	  char buf[256];
+	  char *buf = alloca (strlen (title) + strlen (name)
+			      + strlen (posttitle));
 	  write_c_string ("#<extent ", printcharfun);
-	  if (extent_detached_p (XEXTENT (obj)))
-	    sprintf (buf, "%s from %s%s%s",
-		     print_extent_1 (buf2, obj), title, name, posttitle);
-	  else
-	    sprintf (buf, "%s in %s%s%s",
-		     print_extent_1 (buf2, obj),
-		     title, name, posttitle);
+	  print_extent_1 (obj, printcharfun, escapeflag);
+	  write_c_string (extent_detached_p (XEXTENT (obj))
+			  ? " from " : " in ", printcharfun);
+	  sprintf (buf, "%s%s%s", title, name, posttitle);
 	  write_c_string (buf, printcharfun);
 	}
     }
@@ -3107,9 +3092,9 @@
   }
 
   /* compare the random elements of the plists. */
-  return (!plists_differ (extent_no_chase_plist (e1),
-			  extent_no_chase_plist (e2),
-			  0, 0, depth + 1));
+  return !plists_differ (extent_no_chase_plist (e1),
+			 extent_no_chase_plist (e2),
+			 0, 0, depth + 1);
 }
 
 static int
@@ -3215,7 +3200,7 @@
       signal_simple_error ("extent doesn't belong to a buffer or string",
 			   extent_obj);
     }
-  
+
   if (extent_detached_p (extent) && (flags & DE_MUST_BE_ATTACHED))
     {
       signal_simple_error ("extent cannot be detached", extent_obj);
@@ -3246,7 +3231,7 @@
     return Qt;
   return Qnil;
 }
- 
+
 DEFUN ("extent-live-p", Fextent_live_p, 1, 1, 0, /*
 T if OBJECT is an extent and the extent has not been destroyed.
 */
@@ -3326,9 +3311,9 @@
     next = extent_first (decode_buffer_or_string (extent));
 
   if (!next)
-    return (Qnil);
+    return Qnil;
   XSETEXTENT (val, next);
-  return (val);
+  return val;
 }
 
 DEFUN ("previous-extent", Fprevious_extent, 1, 1, 0, /*
@@ -3348,9 +3333,9 @@
     prev = extent_last (decode_buffer_or_string (extent));
 
   if (!prev)
-    return (Qnil);
+    return Qnil;
   XSETEXTENT (val, prev);
-  return (val);
+  return val;
 }
 
 #ifdef DEBUG_XEMACS
@@ -3371,9 +3356,9 @@
     next = extent_e_first (decode_buffer_or_string (extent));
 
   if (!next)
-    return (Qnil);
+    return Qnil;
   XSETEXTENT (val, next);
-  return (val);
+  return val;
 }
 
 DEFUN ("previous-e-extent", Fprevious_e_extent, 1, 1, 0, /*
@@ -3393,9 +3378,9 @@
     prev = extent_e_last (decode_buffer_or_string (extent));
 
   if (!prev)
-    return (Qnil);
+    return Qnil;
   XSETEXTENT (val, prev);
-  return (val);
+  return val;
 }
 
 #endif
@@ -3630,7 +3615,7 @@
 make_extent_internal (Lisp_Object object, Bytind from, Bytind to)
 {
   EXTENT extent;
-  
+
   extent = make_extent_detached (object);
   set_extent_endpoints (extent, from, to, Qnil);
   return extent;
@@ -3670,7 +3655,7 @@
 	add_extent_to_children_list (XEXTENT (parent), extent);
       }
   }
-      
+
   /* #### it's still unclear to me that this Energize-specific junk
      needs to be in here.  Just use the general mechanisms, or fix
      them up! --ben */
@@ -3685,8 +3670,8 @@
   return e;
 }
 
-static void 
-destroy_extent (EXTENT extent) 
+static void
+destroy_extent (EXTENT extent)
 {
   Lisp_Object rest, nextrest, children;
   Lisp_Object extent_obj = Qnil;
@@ -3828,7 +3813,7 @@
 
   if (NILP (start) && NILP (end))
     return Fdetach_extent (extent);
-      
+
   get_buffer_or_string_range_byte (buffer_or_string, start, end, &s, &e,
 				   GB_ALLOW_PAST_ACCESSIBLE);
 
@@ -4228,7 +4213,7 @@
 /*             extent-at           */
 /* ------------------------------- */
 
-/* find "smallest" matching extent containing pos -- (flag == 0) means 
+/* find "smallest" matching extent containing pos -- (flag == 0) means
    all extents match, else (EXTENT_FLAGS (extent) & flag) must be true;
    for more than one matching extent with precisely the same endpoints,
    we choose the last extent in the extents_list.
@@ -4345,7 +4330,7 @@
   closure.best_match = 0;
   closure.prop = property;
   closure.before = before;
-  
+
   map_extents_bytind (at_flag == EXTENT_AT_BEFORE ? position - 1 : position,
 		      at_flag == EXTENT_AT_AFTER ? position + 1 : position,
 		      extent_at_mapper, (void *) &closure, object, 0,
@@ -4491,7 +4476,7 @@
   int length;
   Lisp_Object object;
 };
-   
+
 /*   A region of length LENGTH was just inserted at OPOINT.  Modify all
      of the extents as required for the insertion, based on their
      start-open/end-open properties.
@@ -4500,9 +4485,9 @@
 static int
 process_extents_for_insertion_mapper (EXTENT extent, void *arg)
 {
-  struct process_extents_for_insertion_arg *closure = 
+  struct process_extents_for_insertion_arg *closure =
     (struct process_extents_for_insertion_arg *) arg;
-  Memind indecks = buffer_or_string_bytind_to_memind (closure->object,
+  Memind indice = buffer_or_string_bytind_to_memind (closure->object,
 						      closure->opoint);
 
   /* When this function is called, one end of the newly-inserted text should
@@ -4510,11 +4495,11 @@
      the insertion overlaps any existing extent, something is wrong.
    */
 #ifdef ERROR_CHECK_EXTENTS
-  if (extent_start (extent) > indecks &&
-      extent_start (extent) < indecks + closure->length)
+  if (extent_start (extent) > indice &&
+      extent_start (extent) < indice + closure->length)
     abort ();
-  if (extent_end (extent) > indecks &&
-      extent_end (extent) < indecks + closure->length)
+  if (extent_end (extent) > indice &&
+      extent_end (extent) < indice + closure->length)
     abort ();
 #endif
 
@@ -4534,11 +4519,11 @@
 
     new_start = extent_start (extent);
     new_end = extent_end (extent);
-    if (indecks == extent_start (extent) && extent_start_open_p (extent) &&
+    if (indice == extent_start (extent) && extent_start_open_p (extent) &&
 	/* coerce zero-length () extents to [) */
 	new_start != new_end)
       new_start += closure->length;
-    if (indecks == extent_end (extent) && !extent_end_open_p (extent))
+    if (indice == extent_end (extent) && !extent_end_open_p (extent))
       new_end += closure->length;
     set_extent_endpoints_1 (extent, new_start, new_end);
   }
@@ -4555,7 +4540,7 @@
   closure.opoint = opoint;
   closure.length = length;
   closure.object = object;
-  
+
   map_extents_bytind (opoint, opoint + length,
 		      process_extents_for_insertion_mapper,
 		      (void *) &closure, object, 0,
@@ -4580,7 +4565,7 @@
 static int
 process_extents_for_deletion_mapper (EXTENT extent, void *arg)
 {
-  struct process_extents_for_deletion_arg *closure = 
+  struct process_extents_for_deletion_arg *closure =
     (struct process_extents_for_deletion_arg *) arg;
 
   /* If the extent lies completely within the range that
@@ -4686,7 +4671,7 @@
      We try to avoid consing except when necessary, so we have
      a reusable list.
   */
-  
+
   if (thelen < len)
     {
       cons = Vextent_face_reusable_list;
@@ -5035,13 +5020,13 @@
 
  detached           Removes the extent from its buffer; setting this is
                     the same as calling `detach-extent'.
-                    
+
  destroyed          Removes the extent from its buffer, and makes it
                     unusable in the future; this is the same calling
                     `delete-extent'.
-                    
+
  priority           Change redisplay priority; same as `set-extent-priority'.
-                    
+
  start-open         Whether the set of characters within the extent is
                     treated being open on the left, that is, whether
                     the start position is an exclusive, rather than
@@ -5049,7 +5034,7 @@
                     inserted exactly at the beginning of the extent
                     will remain outside of the extent; otherwise they
                     will go into the extent, extending it.
-                    
+
  end-open           Whether the set of characters within the extent is
                     treated being open on the right, that is, whether
                     the end position is an exclusive, rather than
@@ -5057,12 +5042,12 @@
                     inserted exactly at the end of the extent will
                     remain outside of the extent; otherwise they will
                     go into the extent, extending it.
-                    
+
                     By default, extents have the `end-open' but not the
                     `start-open' property set.
-                    
+
  read-only          Text within this extent will be unmodifiable.
-                    
+
  detachable         Whether the extent gets detached (as with
                     `detach-extent') when all the text within the
                     extent is deleted.  This is true by default.  If
@@ -5072,7 +5057,7 @@
                     automatically removed if both the `start-open' and
                     `end-open' properties are set, since zero-length
                     extents open on both ends are not allowed.)
-              
+
  face               The face in which to display the text.  Setting
                     this is the same as calling `set-extent-face'.
 
@@ -5086,7 +5071,7 @@
 		    setting a `mouse-face' property of `highlight'.
 		    Reading this property returns non-nil if
 		    the extent has a non-nil `mouse-face' property.
-                    
+
  duplicable         Whether this extent should be copied into strings,
                     so that kill, yank, and undo commands will restore
                     or copy it.  `duplicable' extents are copied from
@@ -5097,7 +5082,7 @@
                     When `insert' or a similar function inserts the
                     string into a buffer, the extents are copied back
                     into the buffer.
-                    
+
  unique             Meaningful only in conjunction with `duplicable'.
                     When this is set, there may be only one instance
                     of this extent attached at a time: if it is copied
@@ -5105,7 +5090,7 @@
                     not copied.  If, however, it is killed (removed
                     from the buffer) and then yanked, it will be
                     re-attached at the new position.
-                    
+
  invisible          If the value is non-nil, text under this extent
                     may be treated as not present for the purpose of
                     redisplay, or may be displayed using an ellipsis
@@ -5113,11 +5098,11 @@
                     and `invisible-text-glyph'.  In all cases,
                     however, the text is still visible to other
                     functions that examine a buffer's text.
-                   
+
  keymap             This keymap is consulted for mouse clicks on this
                     extent, or keypresses made while point is within the
                     extent.
-                    
+
  copy-function      This is a hook that is run when a duplicable extent
                     is about to be copied from a buffer to a string (or
                     the kill ring).  It is called with three arguments,
@@ -5125,7 +5110,7 @@
                     which are being copied.  If this function returns
                     nil, then the extent will not be copied; otherwise
                     it will.
-                    
+
  paste-function     This is a hook that is run when a duplicable extent is
                     about to be copied from a string (or the kill ring)
                     into a buffer.  It is called with three arguments,
@@ -5137,22 +5122,22 @@
                     If this function returns nil, no extent will be
                     inserted.  Otherwise, there will be an extent
                     covering the range in question.
-                    
+
                     If the original extent is not attached to a buffer,
                     then it will be re-attached at this range.
                     Otherwise, a copy will be made, and that copy
                     attached here.
-                    
+
                     The copy-function and paste-function are meaningful
                     only for extents with the `duplicable' flag set,
                     and if they are not specified, behave as if `t' was
                     the returned value.  When these hooks are invoked,
                     the current buffer is the buffer which the extent
                     is being copied from/to, respectively.
-                    
+
  begin-glyph        A glyph to be displayed at the beginning of the extent,
                     or nil.
-                    
+
  end-glyph          A glyph to be displayed at the end of the extent,
                     or nil.
 
@@ -5198,7 +5183,7 @@
     Fset_extent_mouse_face (extent, value);
   /* Obsolete: */
   else if (EQ (property, Qhighlight))
-    Fset_extent_mouse_face (extent, Qhighlight); 
+    Fset_extent_mouse_face (extent, Qhighlight);
   else if (EQ (property, Qbegin_glyph_layout))
     Fset_extent_begin_glyph_layout (extent, value);
   else if (EQ (property, Qend_glyph_layout))
@@ -5244,16 +5229,15 @@
 Return EXTENT's value for property PROPERTY.
 See `set-extent-property' for the built-in property names.
 */
-       (extent, property, defalt))
+       (extent, property, default_))
 {
   EXTENT e = decode_extent (extent, 0);
 
   if      (EQ (property, Qdetached))
-    return (extent_detached_p (e) ? Qt : Qnil);
+    return extent_detached_p (e) ? Qt : Qnil;
   else if (EQ (property, Qdestroyed))
-    return (!EXTENT_LIVE_P (e) ? Qt : Qnil);
-#define RETURN_FLAG(flag) \
-  return (extent_normal_field (e, flag) ? Qt : Qnil)
+    return !EXTENT_LIVE_P (e) ? Qt : Qnil;
+#define RETURN_FLAG(flag) return extent_normal_field (e, flag) ? Qt : Qnil
   else if (EQ (property, Qstart_open))	 RETURN_FLAG (start_open);
   else if (EQ (property, Qend_open))	 RETURN_FLAG (end_open);
   else if (EQ (property, Qunique))	 RETURN_FLAG (unique);
@@ -5262,9 +5246,9 @@
 #undef RETURN_FLAG
   /* Support (but don't document...) the obvious antonyms. */
   else if (EQ (property, Qstart_closed))
-    return (extent_start_open_p (e) ? Qnil : Qt);
+    return extent_start_open_p (e) ? Qnil : Qt;
   else if (EQ (property, Qend_closed))
-    return (extent_end_open_p (e) ? Qnil : Qt);
+    return extent_end_open_p (e) ? Qnil : Qt;
   else if (EQ (property, Qpriority))
     return make_int (extent_priority (e));
   else if (EQ (property, Qread_only))
@@ -5297,7 +5281,7 @@
       value = external_plist_get (extent_plist_addr (e), property, 0,
 				  ERROR_ME);
       if (UNBOUNDP (value))
-	return defalt;
+	return default_;
       return value;
     }
 }
@@ -5377,7 +5361,7 @@
 /*		    	     highlighting      				*/
 /************************************************************************/
 
-/* The display code looks into the Vlast_highlighted_extent variable to 
+/* The display code looks into the Vlast_highlighted_extent variable to
    correctly display highlighted extents.  This updates that variable,
    and marks the appropriate buffers as needing some redisplay.
  */
@@ -5432,7 +5416,7 @@
   if (EXTENTP (extent_obj) && NILP (extent_mouse_face (XEXTENT (extent_obj))))
     return Qnil;
   else
-    return (Fforce_highlight_extent (extent_obj, highlight_p));
+    return Fforce_highlight_extent (extent_obj, highlight_p);
 }
 
 
@@ -5491,7 +5475,7 @@
      Qpaste_function);
 }
 
-static void   
+static void
 update_extent (EXTENT extent, Bytind from, Bytind to)
 {
   set_extent_endpoints (extent, from, to, Qnil);
@@ -5528,7 +5512,7 @@
     {
       Bytind exstart = extent_endpoint_bytind (extent, 0);
       Bytind exend = extent_endpoint_bytind (extent, 1);
-      
+
       if (exend < new_start || exstart > new_end)
 	goto copy_it;
       else
@@ -5599,11 +5583,11 @@
 add_string_extents_mapper (EXTENT extent, void *arg)
 {
   /* This function can GC */
-  struct add_string_extents_arg *closure = 
+  struct add_string_extents_arg *closure =
     (struct add_string_extents_arg *) arg;
   Bytecount start = extent_endpoint_bytind (extent, 0) - closure->from;
   Bytecount end = extent_endpoint_bytind (extent, 1) - closure->from;
-  
+
   if (extent_duplicable_p (extent))
     {
       EXTENT e;
@@ -5626,7 +5610,7 @@
 
 /* Add the extents in buffer BUF from OPOINT to OPOINT+LENGTH to
    the string STRING. */
-void 
+void
 add_string_extents (Lisp_Object string, struct buffer *buf, Bytind opoint,
 		    Bytecount length)
 {
@@ -5640,7 +5624,7 @@
   closure.string = string;
   buffer = make_buffer (buf);
   GCPRO2 (buffer, string);
-  map_extents_bytind (opoint, opoint + length, add_string_extents_mapper, 
+  map_extents_bytind (opoint, opoint + length, add_string_extents_mapper,
 		      (void *) &closure, buffer, 0,
 		      /* ignore extents that just abut the region */
 		      ME_END_CLOSED | ME_ALL_EXTENTS_OPEN |
@@ -5662,7 +5646,7 @@
 splice_in_string_extents_mapper (EXTENT extent, void *arg)
 {
   /* This function can GC */
-  struct splice_in_string_extents_arg *closure = 
+  struct splice_in_string_extents_arg *closure =
     (struct splice_in_string_extents_arg *) arg;
   /* BASE_START and BASE_END are the limits in the buffer of the string
      that was just inserted.
@@ -5699,7 +5683,7 @@
    length LENGTH) into buffer BUF at OPOINT.  Do whatever is necessary
    to get the string's extents into the buffer. */
 
-void 
+void
 splice_in_string_extents (Lisp_Object string, struct buffer *buf,
 			  Bytind opoint, Bytecount length, Bytecount pos)
 {
@@ -5714,7 +5698,7 @@
   closure.buffer = buffer;
   GCPRO2 (buffer, string);
   map_extents_bytind (pos, pos + length,
-		      splice_in_string_extents_mapper, 
+		      splice_in_string_extents_mapper,
 		      (void *) &closure, string, 0,
 		      /* ignore extents that just abut the region */
 		      ME_END_CLOSED | ME_ALL_EXTENTS_OPEN |
@@ -5737,11 +5721,11 @@
   Lisp_Object parent_in_question;
   EXTENT found_extent;
 };
-  
+
 static int
 copy_string_extents_1_mapper (EXTENT extent, void *arg)
 {
-  struct copy_string_extents_1_arg *closure = 
+  struct copy_string_extents_1_arg *closure =
     (struct copy_string_extents_1_arg *) arg;
 
   return 0;
@@ -5750,7 +5734,7 @@
 static int
 copy_string_extents_mapper (EXTENT extent, void *arg)
 {
-  struct copy_string_extents_arg *closure = 
+  struct copy_string_extents_arg *closure =
     (struct copy_string_extents_arg *) arg;
   Bytecount old_start, old_end;
   Bytecount new_start, new_end;
@@ -5779,7 +5763,7 @@
    NEW_STRING came from the section of the same length starting at
    OLD_POS in OLD_STRING.  Copy the extents as appropriate. */
 
-void 
+void
 copy_string_extents (Lisp_Object new_string, Lisp_Object old_string,
 		     Bytecount new_pos, Bytecount old_pos,
 		     Bytecount length)
@@ -5962,7 +5946,7 @@
 
   Lisp_Object object = closure->object;
   Lisp_Object value = closure->value;
-  Bytind e_start, e_end; 
+  Bytind e_start, e_end;
   Bytind start = closure->start;
   Bytind end   = closure->end;
   Lisp_Object extent, e_val;
@@ -6122,7 +6106,7 @@
 put_text_prop_openness_mapper (EXTENT e, void *arg)
 {
   struct put_text_prop_arg *closure = (struct put_text_prop_arg *) arg;
-  Bytind e_start, e_end; 
+  Bytind e_start, e_end;
   Bytind start = closure->start;
   Bytind end   = closure->end;
   Lisp_Object extent;
@@ -6292,7 +6276,7 @@
       Lisp_Object value = Fcar (XCDR (props));
       changed |= put_text_prop (s, e, object, prop, value, 1);
     }
-  return (changed ? Qt : Qnil);
+  return changed ? Qt : Qnil;
 }
 
 
@@ -6320,7 +6304,7 @@
       Lisp_Object value = Fcar (XCDR (props));
       changed |= put_text_prop (s, e, object, prop, value, 0);
     }
-  return (changed ? Qt : Qnil);
+  return changed ? Qt : Qnil;
 }
 
 DEFUN ("remove-text-properties", Fremove_text_properties, 3, 4, 0, /*
@@ -6344,7 +6328,7 @@
       Lisp_Object prop = XCAR (props);
       changed |= put_text_prop (s, e, object, prop, Qnil, 1);
     }
-  return (changed ? Qt : Qnil);
+  return changed ? Qt : Qnil;
 }
 
 /* Whenever a text-prop extent is pasted into a buffer (via `yank' or `insert'
@@ -6356,8 +6340,8 @@
    (since text-prop extents must partition, not overlap).
 
    The lisp implementation of this was probably fast enough, but since I moved
-   the rest of the put-text-prop code here, I moved this as well for 
-   completeness. 
+   the rest of the put-text-prop code here, I moved this as well for
+   completeness.
  */
 DEFUN ("text-prop-extent-paste-function",
        Ftext_prop_extent_paste_function, 3, 3, 0, /*
@@ -6513,7 +6497,7 @@
 				  Fextent_property (extent, prop, Qnil))))
 	return make_int (bpos);
     }
-  
+
   /* I think it's more sensible for this function to return nil always
      in this situation and it used to do it this way, but it's been changed
      for FSF compatibility. */
--- a/src/faces.c	Mon Aug 13 09:47:55 2007 +0200
+++ b/src/faces.c	Mon Aug 13 09:49:09 2007 +0200
@@ -115,7 +115,7 @@
 
   ((markobj) (face->charsets_warned_about));
 
-  return (face->plist);
+  return face->plist;
 }
 
 static void
@@ -339,7 +339,7 @@
 face_validate (Lisp_Object data, Error_behavior errb)
 {
   int name_seen = 0;
-  Lisp_Object valw;
+  Lisp_Object valw = Qnil;
 
   data = Fcdr (data); /* skip over Qface */
   while (!NILP (data))
@@ -528,9 +528,9 @@
       for (; !NILP (values); values = XCDR (values))
 	{
 	  Lisp_Object value = XCDR (XCAR (values));
-	  if (VECTORP (value) && XVECTOR (value)->size)
+	  if (VECTORP (value) && XVECTOR_LENGTH (value))
 	    {
-	      if (EQ (Ffind_face (vector_data (XVECTOR (value))[0]), inh_face))
+	      if (EQ (Ffind_face (XVECTOR_DATA (value)[0]), inh_face))
 		Fset_specifier_dirty_flag
 		  (FACE_PROPERTY_SPECIFIER (inh_face, property));
 	    }
@@ -641,7 +641,7 @@
 */
        (object))
 {
-  return (FACEP (object) ? Qt : Qnil);
+  return FACEP (object) ? Qt : Qnil;
 }
 
 DEFUN ("find-face", Ffind_face, 1, 1, 0, /*
@@ -686,7 +686,7 @@
 */
        (face))
 {
-  return (XFACE (Fget_face (face))->name);
+  return XFACE (Fget_face (face))->name;
 }
 
 DEFUN ("built-in-face-specifiers", Fbuilt_in_face_specifiers, 0, 0, 0, /*
@@ -1076,12 +1076,12 @@
       for (i = 0; i < cachel->nfaces; i++)
 	{
 	  struct face_cachel *oth;
-	  
+
 	  oth = Dynarr_atp (w->face_cachels,
 			    FACE_CACHEL_FINDEX_UNSAFE (cachel, i));
 	  /* Tout le monde aime la recursion */
 	  ensure_face_cachel_contains_charset (oth, domain, charset);
-	  
+
 	  if (oth->font_specified[offs])
 	    {
 	      new_val = oth->font[offs];
@@ -1135,12 +1135,12 @@
 			     Lisp_Object domain, unsigned char *charsets)
 {
   int i;
-  
+
   for (i = 0; i < NUM_LEADING_BYTES; i++)
     if (charsets[i])
       {
 	Lisp_Object charset;
-	
+
 	charset = CHARSET_BY_LEADING_BYTE (i + MIN_LEADING_BYTE);
 	assert (CHARSETP (charset));
 	ensure_face_cachel_contains_charset (cachel, domain, charset);
@@ -1153,7 +1153,7 @@
 				      struct font_metric_info *fm)
 {
   int i;
-  
+
   fm->width = 1;
   fm->height = fm->ascent = 1;
   fm->descent = 0;
@@ -1166,7 +1166,7 @@
 	  Lisp_Object charset;
 	  Lisp_Object font_instance;
 	  struct Lisp_Font_Instance *fi;
-	
+
 	  charset = CHARSET_BY_LEADING_BYTE (i + MIN_LEADING_BYTE);
 	  assert (CHARSETP (charset));
 	  font_instance = FACE_CACHEL_FONT (cachel, charset);
@@ -1216,7 +1216,7 @@
       }									     \
     cachel->field##_specified = (bound || default_face);		     \
   } while (0)
-      
+
       FROB (foreground);
       FROB (background);
       FROB (display_table);
@@ -1514,7 +1514,7 @@
 {
   struct face_cachel cachel;
   int len = Dynarr_length (ef->extents);
-  face_index findex;
+  face_index findex = 0;
   Lisp_Object window = Qnil;
   XSETWINDOW (window, w);
 
@@ -1550,7 +1550,7 @@
 		{
 		  findex = get_builtin_face_cache_index (w, one_face);
 		  merge_face_cachel_data (w, findex, &cachel);
-		  
+
 		  /* code duplication here but there's no clean
 		     way to avoid it. */
 		  if (cachel.nfaces >= NUM_STATIC_CACHEL_FACES)
@@ -1565,7 +1565,7 @@
 		}
 	      face = XCDR (face);
 	    }
-      
+
 	  if (has_findex)
 	    {
 	      if (cachel.nfaces >= NUM_STATIC_CACHEL_FACES)
@@ -1604,7 +1604,7 @@
      {
        Arg av[10];
        int ac = 0;
-     
+
        if (EQ (name, Qforeground))
 	 {
 	   Lisp_Object color = FACE_FOREGROUND (Vdefault_face, frame);
@@ -1688,7 +1688,7 @@
   else if (EQ (locale, Qglobal) || EQ (locale, Qfallback))
     {
       Lisp_Object frmcons, devcons, concons;
-      
+
       FRAME_LOOP_NO_BREAK (frmcons, devcons, concons)
 	update_EmacsFrame (XCAR (frmcons), name);
     }
@@ -1734,11 +1734,11 @@
   else
     {
       Lisp_Object devcons, concons;
-      
+
       DEVICE_LOOP_NO_BREAK (devcons, concons)
 	MARK_DEVICE_FRAMES_FACES_CHANGED (XDEVICE (XCAR (devcons)));
     }
-  
+
   update_faces_inheritance (face, property);
   XFACE (face)->dirty = 1;
 }
@@ -1975,7 +1975,7 @@
 #endif
     set_specifier_fallback (Fget (Vdefault_face, Qfont, Qnil), inst_list);
   }
-  
+
   set_specifier_fallback (Fget (Vdefault_face, Qunderline, Qnil),
 			 list1 (Fcons (Qnil, Qnil)));
   set_specifier_fallback (Fget (Vdefault_face, Qstrikethru, Qnil),
--- a/src/fileio.c	Mon Aug 13 09:47:55 2007 +0200
+++ b/src/fileio.c	Mon Aug 13 09:49:09 2007 +0200
@@ -249,7 +249,7 @@
 restore_point_unwind (Lisp_Object point_marker)
 {
   BUF_SET_PT (current_buffer, marker_position (point_marker));
-  return (Fset_marker (point_marker, Qnil, Qnil));
+  return Fset_marker (point_marker, Qnil, Qnil);
 }
 
 /* Versions of read() and write() that allow quitting out of the actual
@@ -354,7 +354,7 @@
 	    {
 	      Lisp_Object handler = XCDR (elt);
 	      if (NILP (Fmemq (handler, inhibited_handlers)))
-		return (handler);
+		return handler;
 	    }
 	}
       QUIT;
@@ -368,7 +368,7 @@
   /* This function can call lisp */
   Lisp_Object result = call2 (fn, arg0, arg1);
   CHECK_STRING (result);
-  return (result);
+  return result;
 }
 
 static Lisp_Object
@@ -378,7 +378,7 @@
   Lisp_Object result = call2 (fn, arg0, arg1);
   if (!NILP (result))
     CHECK_STRING (result);
-  return (result);
+  return result;
 }
 
 static Lisp_Object
@@ -388,7 +388,7 @@
   /* This function can call lisp */
   Lisp_Object result = call3 (fn, arg0, arg1, arg2);
   CHECK_STRING (result);
-  return (result);
+  return result;
 }
 
 
@@ -412,8 +412,7 @@
      call the corresponding file handler.  */
   handler = Ffind_file_name_handler (file, Qfile_name_directory);
   if (!NILP (handler))
-    return (call2_check_string_or_nil (handler, Qfile_name_directory,
-				       file));
+    return call2_check_string_or_nil (handler, Qfile_name_directory, file);
 
 #ifdef FILE_SYSTEM_CASE
   file = FILE_SYSTEM_CASE (file);
@@ -479,8 +478,7 @@
      call the corresponding file handler.  */
   handler = Ffind_file_name_handler (file, Qfile_name_nondirectory);
   if (!NILP (handler))
-    return (call2_check_string (handler, Qfile_name_nondirectory,
-				file));
+    return call2_check_string (handler, Qfile_name_nondirectory, file);
 
   beg = XSTRING_DATA (file);
   end = p = beg + XSTRING_LENGTH (file);
@@ -615,8 +613,7 @@
      call the corresponding file handler.  */
   handler = Ffind_file_name_handler (file, Qfile_name_as_directory);
   if (!NILP (handler))
-    return (call2_check_string (handler, Qfile_name_as_directory,
-				file));
+    return call2_check_string (handler, Qfile_name_as_directory, file);
 
   buf = (char *) alloca (XSTRING_LENGTH (file) + 10);
   return build_string (file_name_as_directory
@@ -806,8 +803,7 @@
      call the corresponding file handler.  */
   handler = Ffind_file_name_handler (directory, Qdirectory_file_name);
   if (!NILP (handler))
-    return (call2_check_string (handler, Qdirectory_file_name,
-				directory));
+    return call2_check_string (handler, Qdirectory_file_name, directory);
 #ifdef VMS
   /* 20 extra chars is insufficient for VMS, since we might perform a
      logical name translation. an equivalence string can be up to 255
@@ -857,7 +853,7 @@
 An initial `~USER/' expands to USER's home directory.
 See also the function `substitute-in-file-name'.
 */
-       (name, defalt))
+       (name, default_))
 {
   /* This function can GC.  GC checked 1997.04.06. */
   Bufbyte *nm;
@@ -888,13 +884,12 @@
      call the corresponding file handler.  */
   handler = Ffind_file_name_handler (name, Qexpand_file_name);
   if (!NILP (handler))
-    return (call3_check_string (handler, Qexpand_file_name, name,
-				defalt));
-
-  /* Use the buffer's default-directory if DEFALT is omitted.  */
-  if (NILP (defalt))
-    defalt = current_buffer->directory;
-  if (NILP (defalt))		/* this should be a meaningful error */
+    return call3_check_string (handler, Qexpand_file_name, name, default_);
+
+  /* Use the buffer's default-directory if DEFAULT_ is omitted.  */
+  if (NILP (default_))
+    default_ = current_buffer->directory;
+  if (NILP (default_))		/* this should be a meaningful error */
     {
       /* #### If we had a minibuffer-only frame up then current_buffer
 	 is likely to not have a directory setting.  We should
@@ -905,22 +900,22 @@
 			     make_buffer (current_buffer));
     }
   else
-    CHECK_STRING (defalt);
-
-  if (!NILP (defalt))
+    CHECK_STRING (default_);
+
+  if (!NILP (default_))
     {
       struct gcpro gcpro1;
 
-      GCPRO1 (defalt);		/* might be current_buffer->directory */
-      handler = Ffind_file_name_handler (defalt, Qexpand_file_name);
+      GCPRO1 (default_);	/* might be current_buffer->directory */
+      handler = Ffind_file_name_handler (default_, Qexpand_file_name);
       UNGCPRO;
       if (!NILP (handler))
-	return call3 (handler, Qexpand_file_name, name, defalt);
+	return call3 (handler, Qexpand_file_name, name, default_);
     }
 
-  /* Make sure DEFALT is properly expanded.
+  /* Make sure DEFAULT_ is properly expanded.
      It would be better to do this down below where we actually use
-     defalt.  Unfortunately, calling Fexpand_file_name recursively
+     default_.  Unfortunately, calling Fexpand_file_name recursively
      could invoke GC, and the strings might be relocated.  This would
      be annoying because we have pointers into strings lying around
      that would need adjusting, and people would add new pointers to
@@ -928,16 +923,16 @@
      Putting this call here avoids all that crud.
 
      The EQ test avoids infinite recursion.  */
-  if (! NILP(defalt) && !EQ (defalt, name)
+  if (! NILP(default_) && !EQ (default_, name)
       /* This saves time in a common case.  */
-      && ! (XSTRING_LENGTH (defalt) >= 3
-	    && (IS_DIRECTORY_SEP (XSTRING_BYTE (defalt, 0))
-		|| IS_DEVICE_SEP (XSTRING_BYTE (defalt, 1)))))
+      && ! (XSTRING_LENGTH (default_) >= 3
+	    && (IS_DIRECTORY_SEP (XSTRING_BYTE (default_, 0))
+		|| IS_DEVICE_SEP (XSTRING_BYTE (default_, 1)))))
     {
       struct gcpro gcpro1;
 
-      GCPRO1 (defalt);		/* may be current_buffer->directory */
-      defalt = Fexpand_file_name (defalt, Qnil);
+      GCPRO1 (default_);	/* may be current_buffer->directory */
+      default_ = Fexpand_file_name (default_, Qnil);
       UNGCPRO;
     }
 
@@ -1194,9 +1189,9 @@
       && drive == -1
 #endif /* DOS_NT */
       && !newdir
-      && STRINGP (defalt))
+      && STRINGP (default_))
     {
-      newdir = XSTRING_DATA (defalt);
+      newdir = XSTRING_DATA (default_);
     }
 
 #ifdef DOS_NT
@@ -1382,7 +1377,7 @@
 No component of the resulting pathname will be a symbolic link, as
  in the realpath() function.
 */
-       (filename, defalt))
+       (filename, default_))
 {
   /* This function can GC.  GC checked 1997.04.06. */
   Lisp_Object expanded_name;
@@ -1391,7 +1386,7 @@
 
   CHECK_STRING (filename);
 
-  expanded_name = Fexpand_file_name (filename, defalt);
+  expanded_name = Fexpand_file_name (filename, default_);
 
   if (!STRINGP (expanded_name))
     return Qnil;
@@ -1401,11 +1396,10 @@
   UNGCPRO;
 
   if (!NILP (handler))
-    return (call2_check_string (handler, Qfile_truename,
-				expanded_name));
+    return call2_check_string (handler, Qfile_truename, expanded_name);
 
 #ifdef VMS
-  return (expanded_name);
+  return expanded_name;
 #else
   {
     char resolved_path[MAXPATHLEN];
@@ -1527,8 +1521,8 @@
      call the corresponding file handler.  */
   handler = Ffind_file_name_handler (string, Qsubstitute_in_file_name);
   if (!NILP (handler))
-    return (call2_check_string_or_nil (handler, Qsubstitute_in_file_name,
-				       string));
+    return call2_check_string_or_nil (handler, Qsubstitute_in_file_name,
+				      string);
 
   nm = XSTRING_DATA (string);
 #ifdef MSDOS
@@ -1978,35 +1972,35 @@
 DEFUN ("make-directory-internal", Fmake_directory_internal, 1, 1, 0, /*
 Create a directory.  One argument, a file name string.
 */
-       (dirname))
+       (dirname_))
 {
   /* This function can GC.  GC checked 1997.04.06. */
   char dir [MAXPATHLEN];
   Lisp_Object handler;
   struct gcpro gcpro1;
 
-  CHECK_STRING (dirname);
-  dirname = Fexpand_file_name (dirname, Qnil);
-
-  GCPRO1 (dirname);
-  handler = Ffind_file_name_handler (dirname, Qmake_directory_internal);
+  CHECK_STRING (dirname_);
+  dirname_ = Fexpand_file_name (dirname_, Qnil);
+
+  GCPRO1 (dirname_);
+  handler = Ffind_file_name_handler (dirname_, Qmake_directory_internal);
   UNGCPRO;
   if (!NILP (handler))
-    return (call2 (handler, Qmake_directory_internal, dirname));
-
-  if (XSTRING_LENGTH (dirname) > (sizeof (dir) - 1))
+    return (call2 (handler, Qmake_directory_internal, dirname_));
+
+  if (XSTRING_LENGTH (dirname_) > (sizeof (dir) - 1))
     {
       return Fsignal (Qfile_error,
 		      list3 (build_translated_string ("Creating directory"),
 			     build_translated_string ("pathame too long"),
-			     dirname));
+			     dirname_));
     }
-  strncpy (dir, (char *) XSTRING_DATA (dirname),
-	   XSTRING_LENGTH (dirname) + 1);
+  strncpy (dir, (char *) XSTRING_DATA (dirname_),
+	   XSTRING_LENGTH (dirname_) + 1);
 
 #ifndef VMS
-  if (dir [XSTRING_LENGTH (dirname) - 1] == '/')
-    dir [XSTRING_LENGTH (dirname) - 1] = 0;
+  if (dir [XSTRING_LENGTH (dirname_) - 1] == '/')
+    dir [XSTRING_LENGTH (dirname_) - 1] = 0;
 #endif
 
 #ifdef WINDOWSNT
@@ -2014,7 +2008,7 @@
 #else
   if (mkdir (dir, 0777) != 0)
 #endif
-    report_file_error ("Creating directory", list1 (dirname));
+    report_file_error ("Creating directory", list1 (dirname_));
 
   return Qnil;
 }
@@ -2022,25 +2016,25 @@
 DEFUN ("delete-directory", Fdelete_directory, 1, 1, "FDelete directory: ", /*
 Delete a directory.  One argument, a file name or directory name string.
 */
-       (dirname))
+       (dirname_))
 {
   /* This function can GC.  GC checked 1997.04.06. */
   Lisp_Object handler;
   struct gcpro gcpro1;
 
-  CHECK_STRING (dirname);
-
-  GCPRO1 (dirname);
-  dirname = Fexpand_file_name (dirname, Qnil);
-  dirname = Fdirectory_file_name (dirname);
-
-  handler = Ffind_file_name_handler (dirname, Qdelete_directory);
+  CHECK_STRING (dirname_);
+
+  GCPRO1 (dirname_);
+  dirname_ = Fexpand_file_name (dirname_, Qnil);
+  dirname_ = Fdirectory_file_name (dirname_);
+
+  handler = Ffind_file_name_handler (dirname_, Qdelete_directory);
   UNGCPRO;
   if (!NILP (handler))
-    return (call2 (handler, Qdelete_directory, dirname));
-
-  if (rmdir ((char *) XSTRING_DATA (dirname)) != 0)
-    report_file_error ("Removing directory", list1 (dirname));
+    return (call2 (handler, Qdelete_directory, dirname_));
+
+  if (rmdir ((char *) XSTRING_DATA (dirname_)) != 0)
+    report_file_error ("Removing directory", list1 (dirname_));
 
   return Qnil;
 }
@@ -2939,14 +2933,6 @@
   if ( (!NILP (beg) || !NILP (end)) && !NILP (visit) )
     error ("Attempt to visit less than an entire file");
 
-  if (!NILP (beg))
-    CHECK_INT (beg);
-  else
-    beg = Qzero;
-
-  if (!NILP (end))
-    CHECK_INT (end);
-
   fd = -1;
 
 #ifndef APOLLO
@@ -2971,7 +2957,12 @@
      least signal an error.  */
   if (!S_ISREG (st.st_mode))
     {
-      if (NILP (visit))
+      not_regular = 1;
+
+      if (!NILP (visit))
+	goto notfound;
+
+      if (!NILP (replace) || !NILP (beg) || !NILP (end))
 	{
 	  end_multiple_change (buf, mc_count);
 
@@ -2979,14 +2970,17 @@
 			  list2 (build_translated_string("not a regular file"),
 				 filename));
 	}
-      else
-	{
-	  not_regular = 1;
-	  goto notfound;
-	}
     }
 #endif
 
+  if (!NILP (beg))
+    CHECK_INT (beg);
+  else
+    beg = Qzero;
+
+  if (!NILP (end))
+    CHECK_INT (end);
+
   if (fd < 0)
     if ((fd = open ((char *) XSTRING_DATA (filename), O_RDONLY, 0)) < 0)
       goto badopen;
@@ -3003,9 +2997,12 @@
 
   if (NILP (end))
     {
-      end = make_int (st.st_size);
-      if (XINT (end) != st.st_size)
-	error ("maximum buffer size exceeded");
+      if (!not_regular)
+	{
+	  end = make_int (st.st_size);
+	  if (XINT (end) != st.st_size)
+	    error ("Maximum buffer size exceeded");
+	}
     }
 
   /* If requested, replace the accessible part of the buffer
@@ -3131,7 +3128,20 @@
     }
 #endif /* FSFMACS_SPEEDY_INSERT */
 
-  total = XINT (end) - XINT (beg);
+  if (!not_regular)
+    {
+      Lisp_Object temp;
+
+      total = XINT (end) - XINT (beg);
+
+      /* Make sure point-max won't overflow after this insertion.  */
+      XSETINT (temp, total);
+      if (total != XINT (temp))
+	error ("Maximum buffer size exceeded");
+    }
+  else
+    /* For a special file, all we can do is guess.  */
+    total = READ_BUF_SIZE;
 
   if (XINT (beg) != 0
 #ifdef FSFMACS_SPEEDY_INSERT
--- a/src/fns.c	Mon Aug 13 09:47:55 2007 +0200
+++ b/src/fns.c	Mon Aug 13 09:49:09 2007 +0200
@@ -176,7 +176,7 @@
   else
     {
       struct Lisp_Compiled_Function *b = XCOMPILED_FUNCTION (seq);
-      
+
       return (b->flags.interactivep ? COMPILED_INTERACTIVE :
 	      b->flags.domainp      ? COMPILED_DOMAIN :
 	      COMPILED_DOC_STRING)
@@ -208,7 +208,7 @@
   if (STRINGP (obj))
     return make_int (string_char_length (XSTRING (obj)));
   else if (VECTORP (obj))
-    return make_int (vector_length (XVECTOR (obj)));
+    return make_int (XVECTOR_LENGTH (obj));
   else if (BIT_VECTORP (obj))
     return make_int (bit_vector_length (XBIT_VECTOR (obj)));
   else if (CONSP (obj))
@@ -219,11 +219,11 @@
 	  tail = Fcdr (tail);
 	}
 
-      return (make_int (i));
+      return make_int (i);
     }
   else if (NILP (obj))
     {
-      return (Qzero);
+      return Qzero;
     }
   else
     {
@@ -369,7 +369,7 @@
 #endif /* not I18N2, or MULE */
     /* Can't do i < len2 because then comparison between "foo" and "foo^@"
        won't work right in I18N2 case */
-    return ((end < len2) ? Qt : Qnil);
+    return end < len2 ? Qt : Qnil;
   }
 }
 
@@ -610,7 +610,7 @@
           check_losing_bytecode ("concat", seq);
           args[argnum] = wrong_type_argument (Qsequencep, seq);
 	}
-      
+
       if (args_mse)
         {
           if (STRINGP (seq))
@@ -722,7 +722,7 @@
 		  INC_CHARPTR (string_source_ptr);
 		}
 	      else if (VECTORP (seq))
-                elt = vector_data (XVECTOR (seq))[thisindex];
+                elt = XVECTOR_DATA (seq)[thisindex];
 	      else if (BIT_VECTORP (seq))
 		elt = make_int (bit_vector_bit (XBIT_VECTOR (seq),
 						thisindex));
@@ -740,7 +740,7 @@
 	      tail = XCDR (tail);
 	    }
 	  else if (VECTORP (val))
-	    vector_data (XVECTOR (val))[toindex++] = elt;
+	    XVECTOR_DATA (val)[toindex++] = elt;
 	  else if (BIT_VECTORP (val))
 	    {
 	      CHECK_BIT (elt);
@@ -778,7 +778,7 @@
   if (!NILP (prev))
     XCDR (prev) = last_tail;
 
-  RETURN_UNGCPRO (val);  
+  RETURN_UNGCPRO (val);
 }
 
 DEFUN ("copy-alist", Fcopy_alist, 1, 1, 0, /*
@@ -834,15 +834,15 @@
     }
   else if (VECTORP (arg) && ! NILP (vecp))
     {
-      int i = vector_length (XVECTOR (arg));
+      int i = XVECTOR_LENGTH (arg);
       int j;
       arg = Fcopy_sequence (arg);
       for (j = 0; j < i; j++)
 	{
-	  Lisp_Object elt = vector_data (XVECTOR (arg)) [j];
+	  Lisp_Object elt = XVECTOR_DATA (arg) [j];
 	  QUIT;
 	  if (CONSP (elt) || VECTORP (elt))
-	    vector_data (XVECTOR (arg)) [j] = Fcopy_tree (elt, vecp);
+	    XVECTOR_DATA (arg) [j] = Fcopy_tree (elt, vecp);
 	}
     }
   return arg;
@@ -870,7 +870,7 @@
   val = make_string (XSTRING_DATA (string) + bfr, bto - bfr);
   /* Copy any applicable extent information into the new string: */
   copy_string_extents (val, string, 0, bfr, bto - bfr);
-  return (val);
+  return val;
 }
 
 DEFUN ("subseq", Fsubseq, 2, 3, 0, /*
@@ -898,7 +898,7 @@
       check_losing_bytecode ("subseq", seq);
       seq = wrong_type_argument (Qsequencep, seq);
     }
-  
+
   len = XINT (Flength (seq));
   CHECK_INT (from);
   f = XINT (from);
@@ -913,7 +913,7 @@
       if (t < 0)
 	t = len + t;
     }
-  
+
   if (!(0 <= f && f <= t && t <= len))
     args_out_of_range_3 (seq, make_int (f), make_int (t));
 
@@ -921,8 +921,8 @@
     {
       Lisp_Object result = make_vector (t - f, Qnil);
       int i;
-      Lisp_Object *in_elts = vector_data (XVECTOR (seq));
-      Lisp_Object *out_elts = vector_data (XVECTOR (result));
+      Lisp_Object *in_elts  = XVECTOR_DATA (seq);
+      Lisp_Object *out_elts = XVECTOR_DATA (result);
 
       for (i = f; i < t; i++)
 	out_elts[i - f] = in_elts[i];
@@ -998,7 +998,7 @@
        * #### sequences, and does error- (bounds-) checking.
        */
       if (CONSP (tem))
-	return (XCAR (tem));
+	return XCAR (tem);
       else
 #if 1
 	/* This is The Way It Has Always Been. */
@@ -1011,7 +1011,7 @@
   else if (STRINGP (seq)
            || VECTORP (seq)
            || BIT_VECTORP (seq))
-    return (Faref (seq, n));
+    return Faref (seq, n);
 #ifdef LOSING_BYTECODE
   else if (COMPILED_FUNCTIONP (seq))
     {
@@ -1027,20 +1027,20 @@
         switch (idx)
           {
           case COMPILED_ARGLIST:
-            return (b->arglist);
+            return b->arglist;
           case COMPILED_BYTECODE:
-            return (b->bytecodes);
+            return b->bytecodes;
           case COMPILED_CONSTANTS:
-            return (b->constants);
+            return b->constants;
           case COMPILED_STACK_DEPTH:
-            return (make_int (b->maxdepth));
+            return make_int (b->maxdepth);
           case COMPILED_DOC_STRING:
-	    return (compiled_function_documentation (b));
+	    return compiled_function_documentation (b);
           case COMPILED_DOMAIN:
-	    return (compiled_function_domain (b));
+	    return compiled_function_domain (b);
           case COMPILED_INTERACTIVE:
 	    if (b->flags.interactivep)
-	      return (compiled_function_interactive (b));
+	      return compiled_function_interactive (b);
 	    /* if we return nil, can't tell interactive with no args
 	       from noninteractive. */
 	    goto lose;
@@ -1747,14 +1747,14 @@
   return new;
 }
 
-static Lisp_Object list_merge (Lisp_Object org_l1, Lisp_Object org_l2, 
-                               Lisp_Object lisp_arg, 
+static Lisp_Object list_merge (Lisp_Object org_l1, Lisp_Object org_l2,
+                               Lisp_Object lisp_arg,
                                int (*pred_fn) (Lisp_Object, Lisp_Object,
                                                Lisp_Object lisp_arg));
 
 Lisp_Object
 list_sort (Lisp_Object list,
-           Lisp_Object lisp_arg, 
+           Lisp_Object lisp_arg,
            int (*pred_fn) (Lisp_Object, Lisp_Object,
                            Lisp_Object lisp_arg))
 {
@@ -1783,7 +1783,7 @@
 
 
 static int
-merge_pred_function (Lisp_Object obj1, Lisp_Object obj2, 
+merge_pred_function (Lisp_Object obj1, Lisp_Object obj2,
                      Lisp_Object pred)
 {
   Lisp_Object tmp;
@@ -1798,7 +1798,7 @@
   tmp = call2 (pred, obj1, obj2);
   unbind_to (speccount, Qnil);
 
-  if (NILP (tmp)) 
+  if (NILP (tmp))
     return -1;
   else
     return 1;
@@ -1816,7 +1816,7 @@
 }
 
 Lisp_Object
-merge (Lisp_Object org_l1, Lisp_Object org_l2, 
+merge (Lisp_Object org_l1, Lisp_Object org_l2,
        Lisp_Object pred)
 {
   return list_merge (org_l1, org_l2, pred, merge_pred_function);
@@ -1824,8 +1824,8 @@
 
 
 static Lisp_Object
-list_merge (Lisp_Object org_l1, Lisp_Object org_l2, 
-            Lisp_Object lisp_arg, 
+list_merge (Lisp_Object org_l1, Lisp_Object org_l2,
+            Lisp_Object lisp_arg,
             int (*pred_fn) (Lisp_Object, Lisp_Object, Lisp_Object lisp_arg))
 {
   Lisp_Object value;
@@ -1842,7 +1842,7 @@
   /* It is sufficient to protect org_l1 and org_l2.
      When l1 and l2 are updated, we copy the new values
      back into the org_ vars.  */
-  
+
   GCPRO4 (org_l1, org_l2, lisp_arg, value);
 
   while (1)
@@ -1897,7 +1897,7 @@
    NIL_MEANS_NOT_PRESENT is as in `plists-eq' etc.
    LAXP means use `equal' for comparisons.
  */
-int 
+int
 plists_differ (Lisp_Object a, Lisp_Object b, int nil_means_not_present,
 	       int laxp, int depth)
 {
@@ -2072,7 +2072,7 @@
 		    Lisp_Object value)
 {
   Lisp_Object tail = *plist;
-  
+
   for (; !NILP (tail); tail = XCDR (XCDR (tail)))
     {
       struct Lisp_Cons *c = XCONS (tail);
@@ -2185,7 +2185,7 @@
   /* Note that our "fixing" may be more brutal than necessary,
      but it's the user's own problem, not ours. if they went in and
      manually fucked up a plist. */
-  
+
   for (i = 0; i < 2; i++)
     {
       /* This is a standard iteration of a defensive-loop-checking
@@ -2354,11 +2354,11 @@
 corresponding to the given PROP, or DEFAULT if PROP is not
 one of the properties on the list.
 */
-       (plist, prop, defalt))           /* Cant spel in C */
+       (plist, prop, default_))
 {
   Lisp_Object val = external_plist_get (&plist, prop, 0, ERROR_ME);
   if (UNBOUNDP (val))
-    return defalt;
+    return default_;
   return val;
 }
 
@@ -2422,7 +2422,7 @@
 
   return Qnil;
 }
-  
+
 DEFUN ("valid-plist-p", Fvalid_plist_p, 1, 1, 0, /*
 Given a plist, return non-nil if its format is correct.
 If it returns nil, `check-valid-plist' will signal an error when given
@@ -2500,11 +2500,11 @@
 corresponding to the given PROP, or DEFAULT if PROP is not one of the
 properties on the list.
 */
-       (lax_plist, prop, defalt))           /* Cant spel in C */
+       (lax_plist, prop, default_))
 {
   Lisp_Object val = external_plist_get (&lax_plist, prop, 1, ERROR_ME);
   if (UNBOUNDP (val))
-    return defalt;
+    return default_;
   return val;
 }
 
@@ -2628,12 +2628,12 @@
    invalid property list structure */
 
 static Lisp_Object
-symbol_getprop (Lisp_Object sym, Lisp_Object propname, Lisp_Object defalt)
+symbol_getprop (Lisp_Object sym, Lisp_Object propname, Lisp_Object default_)
 {
   Lisp_Object val = external_plist_get (&XSYMBOL (sym)->plist, propname,
 					0, ERROR_ME);
   if (UNBOUNDP (val))
-    return defalt;
+    return default_;
   return val;
 }
 
@@ -2672,12 +2672,12 @@
 
 Lisp_Object
 string_getprop (struct Lisp_String *s, Lisp_Object property,
-		Lisp_Object defalt)
+		Lisp_Object default_)
 {
   Lisp_Object val = external_plist_get (string_plist_ptr (s), property, 0,
 					ERROR_ME);
   if (UNBOUNDP (val))
-    return defalt;
+    return default_;
   return val;
 }
 
@@ -2704,22 +2704,22 @@
 Return the value of OBJECT's PROPNAME property.
 This is the last VALUE stored with `(put OBJECT PROPNAME VALUE)'.
 If there is no such property, return optional third arg DEFAULT
-(which defaults to `nil').  OBJECT can be a symbol, face, extent,
+\(which defaults to `nil').  OBJECT can be a symbol, face, extent,
 or string.  See also `put', `remprop', and `object-plist'.
 */
-(object, propname, defalt))           /* Cant spel in C */
+       (object, propname, default_))
 {
   Lisp_Object val;
 
   /* Various places in emacs call Fget() and expect it not to quit,
      so don't quit. */
-  
+
   /* It's easiest to treat symbols specially because they may not
      be an lrecord */
   if (SYMBOLP (object))
-    val = symbol_getprop (object, propname, defalt);
+    val = symbol_getprop (object, propname, default_);
   else if (STRINGP (object))
-    val = string_getprop (XSTRING (object), propname, defalt);
+    val = string_getprop (XSTRING (object), propname, default_);
   else if (LRECORDP (object))
     {
       CONST struct lrecord_implementation
@@ -2728,7 +2728,7 @@
 	{
 	  val = (imp->getprop) (object, propname);
 	  if (UNBOUNDP (val))
-	    val = defalt;
+	    val = default_;
 	}
       else
 	goto noprops;
@@ -2869,7 +2869,7 @@
   if (EQ_WITH_EBOLA_NOTICE (o1, o2))
     return 1;
   /* Note that (equal 20 20.0) should be nil */
-  else if (XTYPE (o1) != XTYPE (o2)) 
+  else if (XTYPE (o1) != XTYPE (o2))
     return 0;
   else if (CONSP (o1))
     {
@@ -2883,15 +2883,15 @@
 #ifndef LRECORD_VECTOR
   else if (VECTORP (o1))
     {
-      int indecks;
-      int len = vector_length (XVECTOR (o1));
-      if (len != vector_length (XVECTOR (o2)))
+      int indice;
+      int len = XVECTOR_LENGTH (o1);
+      if (len != XVECTOR_LENGTH (o2))
 	return 0;
-      for (indecks = 0; indecks < len; indecks++)
+      for (indice = 0; indice < len; indice++)
 	{
 	  Lisp_Object v1, v2;
-	  v1 = vector_data (XVECTOR (o1)) [indecks];
-	  v2 = vector_data (XVECTOR (o2)) [indecks];
+	  v1 = XVECTOR_DATA (o1) [indice];
+	  v2 = XVECTOR_DATA (o2) [indice];
 	  if (!internal_equal (v1, v2, depth + 1))
             return 0;
 	}
@@ -2939,7 +2939,7 @@
   if (HACKEQ_UNSAFE (o1, o2))
     return 1;
   /* Note that (equal 20 20.0) should be nil */
-  else if (XTYPE (o1) != XTYPE (o2)) 
+  else if (XTYPE (o1) != XTYPE (o2))
     return 0;
   else if (CONSP (o1))
     {
@@ -2953,16 +2953,15 @@
 #ifndef LRECORD_VECTOR
   else if (VECTORP (o1))
     {
-      int indecks;
-      int len = vector_length (XVECTOR (o1));
-      if (len != vector_length (XVECTOR (o2)))
+      int indice;
+      int len = XVECTOR_LENGTH (o1);
+      if (len != XVECTOR_LENGTH (o2))
 	return 0;
-      for (indecks = 0; indecks < len; indecks++)
+      for (indice = 0; indice < len; indice++)
 	{
-	  Lisp_Object v1, v2;
-	  v1 = vector_data (XVECTOR (o1)) [indecks];
-	  v2 = vector_data (XVECTOR (o2)) [indecks];
-	  if (!internal_old_equal (v1, v2, depth + 1))
+	  if (!internal_old_equal (XVECTOR_DATA (o1) [indice],
+				   XVECTOR_DATA (o2) [indice],
+				   depth + 1))
             return 0;
 	}
       return 1;
@@ -2988,7 +2987,7 @@
 	/* EQ-ness of the objects was noticed above */
 	return 0;
       else
-	return ((imp1->equal) (o1, o2, depth));
+	return (imp1->equal) (o1, o2, depth);
     }
 
   return 0;
@@ -3030,7 +3029,7 @@
  retry:
   if (STRINGP (array))
     {
-      Charcount size;
+      Charcount len;
       Charcount i;
       Emchar charval;
       struct Lisp_String *s;
@@ -3038,32 +3037,32 @@
       CHECK_IMPURE (array);
       charval = XCHAR (item);
       s = XSTRING (array);
-      size = string_char_length (s);
-      for (i = 0; i < size; i++)
+      len = string_char_length (s);
+      for (i = 0; i < len; i++)
 	set_string_char (s, i, charval);
       bump_string_modiff (array);
     }
   else if (VECTORP (array))
     {
       Lisp_Object *p;
-      int size;
+      int len;
       int i;
       CHECK_IMPURE (array);
-      size = vector_length (XVECTOR (array));
-      p = vector_data (XVECTOR (array));
-      for (i = 0; i < size; i++)
+      len = XVECTOR_LENGTH (array);
+      p = XVECTOR_DATA (array);
+      for (i = 0; i < len; i++)
 	p[i] = item;
     }
   else if (BIT_VECTORP (array))
     {
       struct Lisp_Bit_Vector *v;
-      int size;
+      int len;
       int i;
       CHECK_BIT (item);
       CHECK_IMPURE (array);
       v = XBIT_VECTOR (array);
-      size = bit_vector_length (v);
-      for (i = 0; i < size; i++)
+      len = bit_vector_length (v);
+      for (i = 0; i < len; i++)
 	set_bit_vector_bit (v, i, XINT (item));
     }
   else
@@ -3100,9 +3099,11 @@
      callers out by protecting the args ourselves to save them
      a lot of temporary-variable grief. */
 
+ again:
+
   GCPRO1 (args[0]);
   gcpro1.nvars = nargs;
-	 
+
   val = Qnil;
 
   for (argnum = 0; argnum < nargs; argnum++)
@@ -3116,7 +3117,10 @@
       if (argnum + 1 == nargs) break;
 
       if (!CONSP (tem))
-	tem = wrong_type_argument (Qlistp, tem);
+	{
+	  tem = wrong_type_argument (Qlistp, tem);
+	  goto again;
+	}
 
       while (CONSP (tem))
 	{
@@ -3170,7 +3174,7 @@
     {
       for (i = 0; i < leni; i++)
 	{
-	  dummy = vector_data (XVECTOR (seq))[i];
+	  dummy = XVECTOR_DATA (seq)[i];
 	  result = call1 (fn, dummy);
 	  if (vals)
 	    vals[i] = result;
@@ -3235,7 +3239,7 @@
 
   for (i = len - 1; i >= 0; i--)
     args[i + i] = args[i];
-      
+
   for (i = 1; i < nargs; i += 2)
     args[i] = sep;
 
@@ -3358,7 +3362,7 @@
 	  featurep_emacs_version = XINT (Vemacs_major_version) +
 	    (XINT (Vemacs_minor_version) / 100.0);
 	}
-      return (featurep_emacs_version >= d) ? Qt : Qnil;
+      return featurep_emacs_version >= d ? Qt : Qnil;
     }
   else if (CONSP(fexp))
     {
--- a/src/frame.c	Mon Aug 13 09:47:55 2007 +0200
+++ b/src/frame.c	Mon Aug 13 09:49:09 2007 +0200
@@ -170,7 +170,7 @@
 {
   struct frame *frm = XFRAME (obj);
   char buf[200];
-  
+
   if (print_readably)
     error ("printing unreadable object #<frame %s 0x%x>",
            XSTRING_DATA (frm->name), frm->header.uid);
@@ -297,7 +297,7 @@
 
   if (!NILP (mini_window))
     CHECK_LIVE_WINDOW (mini_window);
-  
+
   if (!NILP (mini_window)
       && !EQ (DEVICE_CONSOLE (XDEVICE (device)),
 	      FRAME_CONSOLE (XFRAME (XWINDOW (mini_window)->frame))))
@@ -564,9 +564,9 @@
 {
   if (NILP (frame))
     return selected_frame ();
-  
+
   CHECK_LIVE_FRAME (frame);
-  return (XFRAME (frame));
+  return XFRAME (frame);
 }
 
 struct frame *
@@ -735,7 +735,7 @@
   return do_switch_frame (frame, no_enter, 0);
 }
 
-/* A load of garbage. */  
+/* A load of garbage. */
 xxDEFUN ("ignore-event", Fignore_event, 0, 0, "", /*
 Do nothing, but preserve any prefix argument already specified.
 This is a suitable binding for iconify-frame and make-frame-visible.
@@ -814,7 +814,7 @@
 */
        (frame))
 {
-  return (FRAME_ROOT_WINDOW (decode_frame (frame)));
+  return FRAME_ROOT_WINDOW (decode_frame (frame));
 }
 
 DEFUN ("frame-selected-window", Fframe_selected_window, 0, 1, 0, /*
@@ -823,7 +823,7 @@
 */
        (frame))
 {
-  return (FRAME_SELECTED_WINDOW (decode_frame (frame)));
+  return FRAME_SELECTED_WINDOW (decode_frame (frame));
 }
 
 void
@@ -862,7 +862,7 @@
 */
        (frame))
 {
-  return (FRAME_DEVICE (decode_frame (frame)));
+  return FRAME_DEVICE (decode_frame (frame));
 }
 
 int
@@ -939,7 +939,7 @@
 	    && !FRAME_MINIBUF_ONLY_P (f));
   if (EQ (type, Qinvisible_iconic_nomini))
     return !FRAME_VISIBLE_P (f) && !FRAME_MINIBUF_ONLY_P (f);
-  
+
   return 1;
 }
 
@@ -1011,7 +1011,7 @@
 #endif
 
 		  /* Decide whether this frame is eligible to be returned.  */
-		  
+
 		  /* If we've looped all the way around without finding any
 		     eligible frames, return the original frame.  */
 		  if (EQ (f, frame))
@@ -1020,7 +1020,7 @@
 		  if (frame_matches_frametype (f, frametype))
 		    return f;
 		}
-	      
+
 	      if (EQ (frame, f))
 		passed++;
 	    }
@@ -1064,10 +1064,10 @@
       DEVICE_FRAME_LOOP (frmcons, XDEVICE (device))
 	{
 	  Lisp_Object f = XCAR (frmcons);
-	  
+
 	  if (EQ (frame, f) && !NILP (prev))
 	    return prev;
-	  
+
 	  /* Decide whether this frame is eligible to be returned,
 	     according to frametype.  */
 
@@ -1133,7 +1133,7 @@
 {
   XSETFRAME (frame, decode_frame (frame));
 
-  return (next_frame (frame, frametype, console));
+  return next_frame (frame, frametype, console);
 }
 
 DEFUN ("previous-frame", Fprevious_frame, 0, 3, 0, /*
@@ -1151,7 +1151,7 @@
 {
   XSETFRAME (frame, decode_frame (frame));
 
-  return (prev_frame (frame, frametype, console));
+  return prev_frame (frame, frametype, console);
 }
 
 /* Return any frame for which PREDICATE is non-zero, or return Qnil
@@ -1419,7 +1419,7 @@
 	    }
 	  /*
 	   * If the new frame we just selected is on a different
-	   * device then we still need to change DEVICE_SELECTED_FRAME(d) 
+	   * device then we still need to change DEVICE_SELECTED_FRAME(d)
 	   * to a live frame, if there are any left on this device.
 	   */
 	  if (!EQ (device, FRAME_DEVICE(XFRAME(next))))
@@ -1493,9 +1493,9 @@
   if (EQ (frame, CONSOLE_LAST_NONMINIBUF_FRAME (con)))
     {
       Lisp_Object frmcons, devcons;
-      
+
       set_console_last_nonminibuf_frame (con, Qnil);
-      
+
       CONSOLE_FRAME_LOOP_NO_BREAK (frmcons, devcons, con)
 	{
 	  Lisp_Object ecran = XCAR (frmcons);
@@ -1907,12 +1907,9 @@
 */
        (frame))
 {
-  int visible;
-  
   struct frame *f = decode_frame (frame);
-  visible = FRAMEMETH_OR_GIVEN (f, frame_visible_p, (f), f->visible);
-  return ( visible ? ( visible > 0 ? Qt : Qhidden )
-			     : Qnil);
+  int visible = FRAMEMETH_OR_GIVEN (f, frame_visible_p, (f), f->visible);
+  return visible ? ( visible > 0 ? Qt : Qhidden ) : Qnil;
 }
 
 DEFUN ("frame-totally-visible-p", Fframe_totally_visible_p, 0, 1, 0, /*
@@ -1923,7 +1920,7 @@
 {
   struct frame *f = decode_frame (frame);
   return (FRAMEMETH_OR_GIVEN (f, frame_totally_visible_p, (f), f->visible)
-			      ? Qt : Qnil);
+	  ? Qt : Qnil);
 }
 
 DEFUN ("frame-iconified-p", Fframe_iconified_p, 0, 1, 0, /*
@@ -1939,7 +1936,7 @@
   if (f->visible)
     return Qnil;
   f->iconified = FRAMEMETH_OR_GIVEN (f, frame_iconified_p, (f), 0);
-  return (f->iconified ? Qt : Qnil);
+  return f->iconified ? Qt : Qnil;
 }
 
 DEFUN ("visible-frame-list", Fvisible_frame_list, 0, 1, 0, /*
@@ -2036,7 +2033,7 @@
       if (FRAME_HAS_MINIBUF_P (f) || FRAME_MINIBUF_ONLY_P (f))
 	signal_simple_error
 	  ("Can't change the surrogate minibuffer of a frame with its own minibuffer", frame);
-      
+
       /* Install the chosen minibuffer window, with proper buffer.  */
       f->minibuffer_window = val;
     }
@@ -2241,12 +2238,12 @@
 	call3 (Qset_specifier, Fsymbol_value (prop), val, frame);
       if (SYMBOLP (prop) && !NILP (Fget (prop, Qconst_glyph_variable, Qnil)))
 	call3 (Qset_glyph_image, Fsymbol_value (prop), val, frame);
-      if (VECTORP (prop) && vector_length (XVECTOR (prop)) == 2)
+      if (VECTORP (prop) && XVECTOR_LENGTH (prop) == 2)
 	{
-	  Lisp_Object face_prop = vector_data (XVECTOR (prop))[1];
+	  Lisp_Object face_prop = XVECTOR_DATA (prop)[1];
 	  CHECK_SYMBOL (face_prop);
 	  call4 (Qset_face_property,
-		 Fget_face (vector_data (XVECTOR (prop))[0]),
+		 Fget_face (XVECTOR_DATA (prop)[0]),
 		 face_prop, val, frame);
 	}
     }
@@ -2274,7 +2271,7 @@
 				    Qconst_specifier))
 	  || (SYMBOLP (prop) && !NILP (Fget (prop, Qconst_glyph_variable,
 					     Qnil)))
-	  || (VECTORP (prop) && vector_length (XVECTOR (prop)) == 2)
+	  || (VECTORP (prop) && XVECTOR_LENGTH (prop) == 2)
 	  || FRAMEMETH_OR_GIVEN (f, internal_frame_property_p, (f, prop), 0))
 	*tailp = *next_tailp;
       tailp = next_tailp;
@@ -2290,7 +2287,7 @@
 Return FRAME's value for property PROPERTY.
 See `set-frame-properties' for the built-in property names.
 */
-       (frame, property, defalt))
+       (frame, property, default_))
 {
   struct frame *f = decode_frame (frame);
 
@@ -2301,7 +2298,7 @@
 #define FROB(propprop, value) 	\
 do {				\
   if (EQ (property, propprop))	\
-      return (value);		\
+      return value;		\
 } while (0)
 
   FROB (Qname, f->name);
@@ -2321,20 +2318,20 @@
 
   if (SYMBOLP (property) && EQ (Fbuilt_in_variable_type (property),
 				Qconst_specifier))
-    return Fspecifier_instance (Fsymbol_value (property), frame, defalt, Qnil);
+    return Fspecifier_instance (Fsymbol_value (property), frame, default_, Qnil);
   if (SYMBOLP (property) && !NILP (Fget (property, Qconst_glyph_variable,
 					 Qnil)))
     {
       Lisp_Object glyph = Fsymbol_value (property);
       CHECK_GLYPH (glyph);
-      return Fspecifier_instance (XGLYPH_IMAGE (glyph), frame, defalt, Qnil);
+      return Fspecifier_instance (XGLYPH_IMAGE (glyph), frame, default_, Qnil);
     }
-  if (VECTORP (property) && vector_length (XVECTOR (property)) == 2)
+  if (VECTORP (property) && XVECTOR_LENGTH (property) == 2)
     {
-      Lisp_Object face_prop = vector_data (XVECTOR (property))[1];
+      Lisp_Object face_prop = XVECTOR_DATA (property)[1];
       CHECK_SYMBOL (face_prop);
       return call3 (Qface_property_instance,
-		    Fget_face (vector_data (XVECTOR (property))[0]),
+		    Fget_face (XVECTOR_DATA (property)[0]),
 		    face_prop, frame);
     }
 
@@ -2348,7 +2345,7 @@
     value = external_plist_get (&f->plist, property, 1, ERROR_ME);
     if (!UNBOUNDP (value))
       return value;
-    return defalt;
+    return default_;
   }
 }
 
@@ -2363,7 +2360,7 @@
   struct gcpro gcpro1;
 
   GCPRO1 (result);
-  
+
 #define FROB(propprop, value)				\
 do {							\
   Lisp_Object temtem = (value);				\
@@ -2411,7 +2408,7 @@
        (frame))
 {
   struct frame *f = decode_frame (frame);
-  return (make_int (f->pixheight));
+  return make_int (f->pixheight);
 }
 
 DEFUN ("frame-pixel-width", Fframe_pixel_width, 0, 1, 0, /*
@@ -2420,7 +2417,7 @@
        (frame))
 {
   struct frame *f = decode_frame (frame);
-  return (make_int (f->pixwidth));
+  return make_int (f->pixwidth);
 }
 
 DEFUN ("frame-name", Fframe_name, 0, 1, 0, /*
@@ -2429,7 +2426,7 @@
 */
        (frame))
 {
-  return (decode_frame (frame)->name);
+  return decode_frame (frame)->name;
 }
 
 DEFUN ("frame-modified-tick", Fframe_modified_tick, 0, 1, 0, /*
@@ -2465,8 +2462,8 @@
   struct frame *f = decode_frame (frame);
   XSETFRAME (frame, f);
   CHECK_INT (rows);
-  
-  internal_set_frame_size (f, FRAME_WIDTH (f), XINT (rows), 
+
+  internal_set_frame_size (f, FRAME_WIDTH (f), XINT (rows),
 			   !NILP (pretend));
   return frame;
 }
@@ -2561,7 +2558,7 @@
       *pixel_height = *char_height * cph + bdr + obh;
     }
 }
-		     
+
 /* This takes the size in pixels of the text area, and returns the number
    of characters that will fit there, taking into account the internal
    border width, and the pixel width of the line terminator glyphs (which
@@ -2704,7 +2701,7 @@
 
 	  XWINDOW (FRAME_MINIBUF_WINDOW (f))->pixel_top =
 	    new_pixheight - minibuf_height + FRAME_TOP_BORDER_END (f);
-	  
+
 	  set_window_pixheight (FRAME_MINIBUF_WINDOW (f), minibuf_height, 0);
 	}
       else
--- a/src/glyphs.c	Mon Aug 13 09:47:55 2007 +0200
+++ b/src/glyphs.c	Mon Aug 13 09:49:09 2007 +0200
@@ -3,7 +3,7 @@
    Copyright (C) 1995 Tinker Systems
    Copyright (C) 1995, 1996 Ben Wing
    Copyright (C) 1995 Sun Microsystems
-   
+
 This file is part of XEmacs.
 
 XEmacs is free software; you can redistribute it and/or modify it
@@ -237,15 +237,14 @@
 	      pos = XCAR (XCDR (XCDR (mapping)));
 	      CHECK_INT (pos);
 	      if (XINT (pos) < 0 ||
-		  XINT (pos) >= vector_length (XVECTOR (typevec)))
+		  XINT (pos) >= XVECTOR_LENGTH (typevec))
 		args_out_of_range_3
-		  (pos, Qzero, make_int
-		   (vector_length (XVECTOR (typevec)) - 1));
+		  (pos, Qzero, make_int (XVECTOR_LENGTH (typevec) - 1));
 	    }
-	  
+
 	  newvec = Fcopy_sequence (typevec);
 	  if (INTP (pos))
-	    vector_data (XVECTOR (newvec))[XINT (pos)] = exp;
+	    XVECTOR_DATA (newvec)[XINT (pos)] = exp;
 	  GCPRO1 (newvec);
 	  image_validate (newvec);
 	  UNGCPRO;
@@ -289,7 +288,7 @@
 	 skip it. */
       if (!(dest_mask &
 	    IIFORMAT_METH (decode_image_instantiator_format
-			   (vector_data (XVECTOR (typevec))[0], ERROR_ME),
+			   (XVECTOR_DATA (typevec)[0], ERROR_ME),
 			   possible_dest_types, ())))
 	continue;
       if (fast_string_match (exp, 0, data, 0, -1, 0, ERROR_ME, 0) >= 0)
@@ -298,7 +297,7 @@
 	    {
 	      int pos = XINT (XCAR (XCDR (XCDR (mapping))));
 	      Lisp_Object newvec = Fcopy_sequence (typevec);
-	      vector_data (XVECTOR (newvec))[pos] = data;
+	      XVECTOR_DATA (newvec)[pos] = data;
 	      return newvec;
 	    }
 	  else
@@ -309,19 +308,19 @@
   /* Oh well. */
   signal_simple_error ("Unable to interpret glyph instantiator",
 		       data);
-  
+
   return Qnil;
 }
 
 Lisp_Object
 find_keyword_in_vector_or_given (Lisp_Object vector, Lisp_Object keyword,
-				 Lisp_Object defalt)
+				 Lisp_Object default_)
 {
   Lisp_Object *elt;
   int instantiator_len;
 
-  elt = vector_data (XVECTOR (vector));
-  instantiator_len = vector_length (XVECTOR (vector));
+  elt = XVECTOR_DATA (vector);
+  instantiator_len = XVECTOR_LENGTH (vector);
 
   elt++;
   instantiator_len--;
@@ -334,7 +333,7 @@
       instantiator_len -= 2;
     }
 
-  return defalt;
+  return default_;
 }
 
 Lisp_Object
@@ -394,7 +393,7 @@
   Lisp_Object temp_buffer;
   struct gcpro gcpro1;
   Lisp_Object data;
-  
+
   specbind (Qinhibit_quit, Qt);
   record_unwind_protect (Fset_buffer, Fcurrent_buffer ());
   temp_buffer = Fget_buffer_create (build_string (" *pixmap conversion*"));
@@ -423,8 +422,8 @@
 Lisp_Object
 tagged_vector_to_alist (Lisp_Object vector)
 {
-  Lisp_Object *elt = vector_data (XVECTOR (vector));
-  int len = vector_length (XVECTOR (vector));
+  Lisp_Object *elt = XVECTOR_DATA (vector);
+  int len = XVECTOR_LENGTH (vector);
   Lisp_Object result = Qnil;
 
   assert (len & 1);
@@ -475,8 +474,8 @@
      longer exist (e.g. w3 pixmaps are almost always from temporary
      files). */
   instantiator = IIFORMAT_METH_OR_GIVEN
-    (decode_image_instantiator_format
-     (vector_data (XVECTOR (instantiator))[0], ERROR_ME),
+    (decode_image_instantiator_format (XVECTOR_DATA (instantiator)[0],
+				       ERROR_ME),
      normalize, (instantiator, contype), instantiator);
 
   return instantiator;
@@ -496,8 +495,8 @@
   GCPRO1 (ii);
   {
     struct image_instantiator_methods *meths =
-      decode_image_instantiator_format
-	(vector_data (XVECTOR (instantiator))[0], ERROR_ME);
+      decode_image_instantiator_format (XVECTOR_DATA (instantiator)[0],
+					ERROR_ME);
 
     if (!HAS_IIFORMAT_METH_P (meths, instantiate))
       signal_simple_error
@@ -556,7 +555,7 @@
 
   MAYBE_DEVMETH (XDEVICE (i->device), mark_image_instance, (i, markobj));
 
-  return (i->device);
+  return i->device;
 }
 
 static void
@@ -616,7 +615,8 @@
 	  write_c_string (" @", printcharfun);
 	  if (!NILP (IMAGE_INSTANCE_PIXMAP_HOTSPOT_X (ii)))
 	    {
-	      sprintf (buf, "%d", XINT (IMAGE_INSTANCE_PIXMAP_HOTSPOT_X (ii)));
+	      sprintf (buf, "%ld", 
+		       (long) XINT (IMAGE_INSTANCE_PIXMAP_HOTSPOT_X (ii)));
 	      write_c_string (buf, printcharfun);
 	    }
 	  else
@@ -624,7 +624,8 @@
 	  write_c_string (",", printcharfun);
 	  if (!NILP (IMAGE_INSTANCE_PIXMAP_HOTSPOT_Y (ii)))
 	    {
-	      sprintf (buf, "%d", XINT (IMAGE_INSTANCE_PIXMAP_HOTSPOT_Y (ii)));
+	      sprintf (buf, "%ld", 
+		       (long) XINT (IMAGE_INSTANCE_PIXMAP_HOTSPOT_Y (ii)));
 	      write_c_string (buf, printcharfun);
 	    }
 	  else
@@ -984,8 +985,7 @@
   data = normalize_image_instantiator (data, DEVICE_TYPE (XDEVICE (device)),
 				       make_int (dest_mask));
   GCPRO1 (data);
-  if (VECTORP (data)
-	   && EQ (vector_data (XVECTOR (data))[0], Qinherit))
+  if (VECTORP (data) && EQ (XVECTOR_DATA (data)[0], Qinherit))
     signal_simple_error ("inheritance not allowed here", data);
   ii = instantiate_image_instantiator (device, device, data,
 				       Qnil, Qnil, dest_mask);
@@ -1065,7 +1065,7 @@
 */
        (object))
 {
-  return (IMAGE_INSTANCEP (object) ? Qt : Qnil);
+  return IMAGE_INSTANCEP (object) ? Qt : Qnil;
 }
 
 DEFUN ("image-instance-type", Fimage_instance_type, 1, 1, 0, /*
@@ -1085,7 +1085,7 @@
        (image_instance))
 {
   CHECK_IMAGE_INSTANCE (image_instance);
-  return (XIMAGE_INSTANCE_NAME (image_instance));
+  return XIMAGE_INSTANCE_NAME (image_instance);
 }
 
 DEFUN ("image-instance-string", Fimage_instance_string, 1, 1, 0, /*
@@ -1096,7 +1096,7 @@
 {
   CHECK_IMAGE_INSTANCE (image_instance);
   if (XIMAGE_INSTANCE_TYPE (image_instance) == IMAGE_TEXT)
-    return (XIMAGE_INSTANCE_TEXT_STRING (image_instance));
+    return XIMAGE_INSTANCE_TEXT_STRING (image_instance);
   else
     return Qnil;
 }
@@ -1152,7 +1152,7 @@
     case IMAGE_MONO_PIXMAP:
     case IMAGE_COLOR_PIXMAP:
     case IMAGE_POINTER:
-      return (make_int (XIMAGE_INSTANCE_PIXMAP_DEPTH (image_instance)));
+      return make_int (XIMAGE_INSTANCE_PIXMAP_DEPTH (image_instance));
 
     default:
       return Qnil;
@@ -1171,7 +1171,7 @@
     case IMAGE_MONO_PIXMAP:
     case IMAGE_COLOR_PIXMAP:
     case IMAGE_POINTER:
-      return (make_int (XIMAGE_INSTANCE_PIXMAP_HEIGHT (image_instance)));
+      return make_int (XIMAGE_INSTANCE_PIXMAP_HEIGHT (image_instance));
 
     default:
       return Qnil;
@@ -1190,7 +1190,7 @@
     case IMAGE_MONO_PIXMAP:
     case IMAGE_COLOR_PIXMAP:
     case IMAGE_POINTER:
-      return (make_int (XIMAGE_INSTANCE_PIXMAP_WIDTH (image_instance)));
+      return make_int (XIMAGE_INSTANCE_PIXMAP_WIDTH (image_instance));
 
     default:
       return Qnil;
@@ -1359,8 +1359,8 @@
 {
   Lisp_Object face;
 
-  assert (XVECTOR (inst)->size == 3);
-  face = vector_data (XVECTOR (inst))[2];
+  assert (XVECTOR_LENGTH (inst) == 3);
+  face = XVECTOR_DATA (inst)[2];
   if (!FACEP (face))
     inst = vector3 (Qinherit, Q_face, Fget_face (face));
   return inst;
@@ -1528,11 +1528,11 @@
 			       instantiator, device);
     }
   else if (VECTORP (instantiator)
-	   && EQ (vector_data (XVECTOR (instantiator))[0], Qinherit))
+	   && EQ (XVECTOR_DATA (instantiator)[0], Qinherit))
     {
-      assert (XVECTOR (instantiator)->size == 3);
+      assert (XVECTOR_LENGTH (instantiator) == 3);
       return (FACE_PROPERTY_INSTANCE
-	      (Fget_face (vector_data (XVECTOR (instantiator))[2]),
+	      (Fget_face (XVECTOR_DATA (instantiator)[2]),
 	       Qbackground_pixmap, domain, 0, depth));
     }
   else
@@ -1631,8 +1631,8 @@
     return;
   else if (VECTORP (instantiator))
     {
-      Lisp_Object *elt = vector_data (XVECTOR (instantiator));
-      int instantiator_len = XVECTOR (instantiator)->size;
+      Lisp_Object *elt = XVECTOR_DATA (instantiator);
+      int instantiator_len = XVECTOR_LENGTH (instantiator);
       struct image_instantiator_methods *meths;
       Lisp_Object already_seen = Qnil;
       struct gcpro gcpro1;
@@ -1922,7 +1922,7 @@
 */
        (object))
 {
-  return (IMAGE_SPECIFIERP (object) ? Qt : Qnil);
+  return IMAGE_SPECIFIERP (object) ? Qt : Qnil;
 }
 
 
@@ -1956,7 +1956,7 @@
   ((markobj) (glyph->baseline));
   ((markobj) (glyph->face));
 
-  return (glyph->plist);
+  return glyph->plist;
 }
 
 static void
@@ -2118,7 +2118,7 @@
   Lisp_Object obj = Qnil;
   struct Lisp_Glyph *g =
     alloc_lcrecord (sizeof (struct Lisp_Glyph), lrecord_glyph);
-  
+
   g->type = type;
   g->image = Fmake_specifier (Qimage);
   switch (g->type)
@@ -2299,18 +2299,18 @@
         Lisp_Object private_face = XGLYPH_FACE(glyph);
 
 	if (!NILP (private_face))
-	  return (redisplay_frame_text_width_string (XFRAME (frame),
-						     private_face,
-						     0, str, 0, -1));
+	  return redisplay_frame_text_width_string (XFRAME (frame),
+						    private_face,
+						    0, str, 0, -1);
 	else
 	if (!NILP (frame_face))
-	  return (redisplay_frame_text_width_string (XFRAME (frame),
-						     frame_face,
-						     0, str, 0, -1));
+	  return redisplay_frame_text_width_string (XFRAME (frame),
+						    frame_face,
+						    0, str, 0, -1);
 	else
-	  return (redisplay_text_width_string (XWINDOW (window),
-					       window_findex,
-					       0, str, 0, -1));
+	  return redisplay_text_width_string (XWINDOW (window),
+					      window_findex,
+					      0, str, 0, -1);
       }
 
     case IMAGE_MONO_PIXMAP:
@@ -2341,7 +2341,7 @@
   XSETWINDOW (window, decode_window (window));
   CHECK_GLYPH (glyph);
 
-  return (make_int (glyph_width (glyph, Qnil, DEFAULT_INDEX, window)));
+  return make_int (glyph_width (glyph, Qnil, DEFAULT_INDEX, window));
 }
 
 #define RETURN_ASCENT	0
@@ -2401,7 +2401,7 @@
 	ensure_face_cachel_complete (cachel, window, charsets);
 
 	face_cachel_charset_font_metric_info (cachel, charsets, &fm);
-	
+
 	if (function == RETURN_ASCENT)
 	  return fm.ascent;
 	else if (function == RETURN_DESCENT)
@@ -2470,7 +2470,7 @@
   XSETWINDOW (window, decode_window (window));
   CHECK_GLYPH (glyph);
 
-  return (make_int (glyph_ascent (glyph, Qnil, DEFAULT_INDEX, window)));
+  return make_int (glyph_ascent (glyph, Qnil, DEFAULT_INDEX, window));
 }
 
 DEFUN ("glyph-descent", Fglyph_descent, 1, 2, 0, /*
@@ -2483,7 +2483,7 @@
   XSETWINDOW (window, decode_window (window));
   CHECK_GLYPH (glyph);
 
-  return (make_int (glyph_descent (glyph, Qnil, DEFAULT_INDEX, window)));
+  return make_int (glyph_descent (glyph, Qnil, DEFAULT_INDEX, window));
 }
 
 /* This is redundant but I bet a lot of people expect it to exist. */
@@ -2497,7 +2497,7 @@
   XSETWINDOW (window, decode_window (window));
   CHECK_GLYPH (glyph);
 
-  return (make_int (glyph_height (glyph, Qnil, DEFAULT_INDEX, window)));
+  return make_int (glyph_height (glyph, Qnil, DEFAULT_INDEX, window));
 }
 
 #undef RETURN_ASCENT
@@ -2547,10 +2547,10 @@
   if (!GLYPHP (glyph))
     return 0;
   else
-    return (!NILP (specifier_instance_no_quit
-		   (GLYPH_CONTRIB_P (XGLYPH (glyph)), Qunbound, domain,
-		    /* #### look into ERROR_ME_NOT */
-		    ERROR_ME_NOT, 0, Qzero)));
+    return !NILP (specifier_instance_no_quit
+		  (GLYPH_CONTRIB_P (XGLYPH (glyph)), Qunbound, domain,
+		   /* #### look into ERROR_ME_NOT */
+		   ERROR_ME_NOT, 0, Qzero));
 }
 
 static void
@@ -2730,11 +2730,11 @@
   Lisp_Object tem = Qnil;
 
   tem = WINDOW_FACE_CACHEL_DISPLAY_TABLE (w, findex);
-  if (VECTORP (tem) && XVECTOR (tem)->size == DISP_TABLE_SIZE)
+  if (VECTORP (tem) && XVECTOR_LENGTH (tem) == DISP_TABLE_SIZE)
     return XVECTOR (tem);
 
   tem = w->display_table;
-  if (VECTORP (tem) && XVECTOR (tem)->size == DISP_TABLE_SIZE)
+  if (VECTORP (tem) && XVECTOR_LENGTH (tem) == DISP_TABLE_SIZE)
     return XVECTOR (tem);
 
   return 0;
--- a/src/glyphs.h	Mon Aug 13 09:47:55 2007 +0200
+++ b/src/glyphs.h	Mon Aug 13 09:49:09 2007 +0200
@@ -193,7 +193,7 @@
 				    Lisp_Object keyword);
 Lisp_Object find_keyword_in_vector_or_given (Lisp_Object vector,
 					     Lisp_Object keyword,
-					     Lisp_Object defalt);
+					     Lisp_Object default_);
 void check_valid_string (Lisp_Object data);
 void check_valid_int (Lisp_Object data);
 DECLARE_DOESNT_RETURN (incompatible_image_types (Lisp_Object instantiator,
--- a/src/gui-x.c	Mon Aug 13 09:47:55 2007 +0200
+++ b/src/gui-x.c	Mon Aug 13 09:49:09 2007 +0200
@@ -104,8 +104,8 @@
       closure.markobj = markobj;
       lw_map_widget_values (data->id, mark_widget_value_mapper, &closure);
     }
-  
-  return (data->last_menubar_buffer);
+
+  return data->last_menubar_buffer;
 }
 
 /* This is like FRAME_MENUBAR_DATA (f), but contains an alist of
@@ -141,7 +141,7 @@
 int
 popup_handled_p (LWLIB_ID id)
 {
-  return (NILP (assq_no_quit (make_int (id), Vpopup_callbacks)));
+  return NILP (assq_no_quit (make_int (id), Vpopup_callbacks));
 }
 
 /* menu_item_descriptor_to_widget_value() et al. mallocs a
@@ -344,7 +344,7 @@
 	    : xstrdup ("shadowDoubleEtchedIn"));
   else if (*p == ':')
     return xstrdup (p+1);
-    
+
   return NULL;
 }
 
@@ -367,8 +367,8 @@
   Lisp_Object keys       = Qnil;
   Lisp_Object style      = Qnil;
   Lisp_Object config_tag = Qnil;
-  int length = vector_length (XVECTOR (desc));
-  Lisp_Object *contents = vector_data (XVECTOR (desc));
+  int length = XVECTOR_LENGTH (desc);
+  Lisp_Object *contents = XVECTOR_DATA (desc);
   int plist_p;
   int selected_spec = 0, included_spec = 0;
 
@@ -418,7 +418,7 @@
 	  else if (EQ (key, Q_config))	 config_tag = val;
 	  else if (EQ (key, Q_filter))
 	    signal_simple_error(":filter keyword not permitted on leaf nodes", desc);
-	  else 
+	  else
 	    signal_simple_error_2 ("unknown menu item keyword", key, desc);
 	}
     }
@@ -515,7 +515,7 @@
 #if 0
       wv->value = wv->name;
       wv->name = "value";
-#endif 
+#endif
     }
   else
     signal_simple_error_2 ("unknown style", style, desc);
--- a/src/hash.c	Mon Aug 13 09:47:55 2007 +0200
+++ b/src/hash.c	Mon Aug 13 09:49:09 2007 +0200
@@ -32,17 +32,16 @@
 
 #endif /* !emacs */
 
-#include <string.h>
 #include "hash.h"
 #include "elhash.h"
 
-static CONST int 
+static CONST int
 primes []={
   13,
-  29, 37, 47, 59, 71, 89, 107, 131, 163, 197, 239, 293, 353, 431, 521, 631, 
-  761, 919, 1103, 1327, 1597, 1931, 2333, 2801, 3371, 4049, 4861, 5839, 7013, 
-  8419, 10103, 12143, 14591, 17519, 21023, 25229, 30293, 36353, 43627, 52361, 
-  62851, 75431, 90523, 108631, 130363, 156437, 187751, 225307, 270371, 324449, 
+  29, 37, 47, 59, 71, 89, 107, 131, 163, 197, 239, 293, 353, 431, 521, 631,
+  761, 919, 1103, 1327, 1597, 1931, 2333, 2801, 3371, 4049, 4861, 5839, 7013,
+  8419, 10103, 12143, 14591, 17519, 21023, 25229, 30293, 36353, 43627, 52361,
+  62851, 75431, 90523, 108631, 130363, 156437, 187751, 225307, 270371, 324449,
   389357, 467237, 560689, 672827, 807403, 968897, 1162687, 1395263, 1674319,
   2009191, 2411033, 2893249
 };
@@ -52,7 +51,7 @@
 /* from base/generic-hash.cc, and hence from Dragon book, p436 */
 unsigned long
 string_hash (CONST void *xv)
-{ 
+{
   unsigned int h = 0;
   unsigned int g;
   unsigned CONST char *x = (unsigned CONST char *) xv;
@@ -71,7 +70,7 @@
 
 unsigned long
 memory_hash (CONST void *xv, int size)
-{ 
+{
   unsigned int h = 0;
   unsigned int g;
   unsigned CONST char *x = (unsigned CONST char *) xv;
@@ -89,7 +88,7 @@
   return h;
 }
 
-static int 
+static int
 string_eq (CONST void *st1v, CONST void *st2v)
 {
   CONST char *st1 = (CONST char *)st1v;
@@ -104,7 +103,7 @@
 }
 
 
-static unsigned int 
+static unsigned int
 prime_size (unsigned int size)
 {
   unsigned int i;
@@ -125,18 +124,18 @@
   hentry *harray = hash->harray;
   int (*test_function) (CONST void *, CONST void *) = hash->test_function;
   unsigned int hsize = hash->size;
-  unsigned int hcode_initial = 
+  unsigned int hcode_initial =
     (hash->hash_function)?(hash->hash_function(key)):((unsigned long) key);
   unsigned int hcode = hcode_initial % hsize;
   hentry *e = &harray [hcode];
   CONST void *e_key = e->key;
 
-  if (!key) 
+  if (!key)
     {
       *ret_value = hash->zero_entry;
       return (void *) hash->zero_set;
     }
-    
+
   if ((e_key)?
       (KEYS_DIFFER_P (e_key, key, test_function)):
       (e->contents == NULL_ENTRY))
@@ -149,7 +148,7 @@
           if (hcode >= hsize) hcode = hcode - hsize;
           e = &harray [hcode];
           e_key = e->key;
-        } 
+        }
       while ((e_key)?
              (KEYS_DIFFER_P (e_key, key, test_function)):
              (e->contents == NULL_ENTRY));
@@ -159,7 +158,7 @@
   return e->key;
 }
 
-void 
+void
 clrhash (c_hashtable hash)
 {
   memset (hash->harray, 0, sizeof (hentry) * hash->size);
@@ -211,7 +210,7 @@
   return res;
 }
 
-c_hashtable 
+c_hashtable
 make_strings_hashtable (unsigned int hsize)
 {
   return make_general_hashtable (hsize, string_hash, string_eq);
@@ -249,9 +248,9 @@
       dest->size = src->size;
 #ifdef emacs
       if (!NILP (dest->elisp_table))
-        dest->harray = 
-          (hentry *) elisp_hvector_malloc
-            (sizeof (hentry) * dest->size, dest->elisp_table);
+        dest->harray = (hentry *)
+	  elisp_hvector_malloc (sizeof (hentry) * dest->size,
+				dest->elisp_table);
       else
 #endif
         dest->harray = (hentry *) xmalloc (sizeof (hentry) * dest->size);
@@ -263,7 +262,7 @@
   dest->test_function = src->test_function;
   memcpy (dest->harray, src->harray, sizeof (hentry) * dest->size);
 }
-  
+
 static void
 grow_hashtable (c_hashtable hash, unsigned int new_size)
 {
@@ -283,8 +282,7 @@
 						  hash->elisp_table);
   else
 #endif
-    new_harray =
-      (hentry *) xmalloc (sizeof (hentry) * new_hsize);
+    new_harray = (hentry *) xmalloc (sizeof (hentry) * new_hsize);
 
   hash->size = new_hsize;
   hash->harray = new_harray;
@@ -316,7 +314,7 @@
     grow_hashtable (hash, comfortable_size + 1);
 }
 
-void 
+void
 puthash (CONST void *key, void *cont, c_hashtable hash)
 {
   unsigned int hsize = hash->size;
@@ -325,16 +323,16 @@
   hentry *harray;
   CONST void *e_key;
   hentry *e;
-  unsigned int hcode_initial = 
+  unsigned int hcode_initial =
     (hash->hash_function)?(hash->hash_function(key)):((unsigned long) key);
   unsigned int hcode;
   unsigned int incr = 0;
   unsigned int h2;
   CONST void *oldcontents;
 
-  if (!key) 
+  if (!key)
     {
-      hash->zero_entry = cont;      
+      hash->zero_entry = cont;
       hash->zero_set = 1;
       return;
     }
@@ -350,7 +348,7 @@
   h2 = hsize - 2;
 
   hcode = hcode_initial % hsize;
-  
+
   e_key = harray [hcode].key;
   if (e_key && (KEYS_DIFFER_P (e_key, key, test_function)))
     {
@@ -361,7 +359,7 @@
           hcode = hcode + incr;
           if (hcode >= hsize) hcode = hcode - hsize;
           e_key = harray [hcode].key;
-        } 
+        }
       while (e_key && (KEYS_DIFFER_P (e_key, key, test_function)));
     }
   oldcontents = harray [hcode].contents;
@@ -409,19 +407,19 @@
     }
 }
 
-void 
+void
 remhash (CONST void *key, c_hashtable hash)
 {
   hentry *harray = hash->harray;
   int (*test_function) (CONST void*, CONST void*) = hash->test_function;
   unsigned int hsize = hash->size;
-  unsigned int hcode_initial = 
+  unsigned int hcode_initial =
     (hash->hash_function)?(hash->hash_function(key)):((unsigned long) key);
   unsigned int hcode = hcode_initial % hsize;
   hentry *e = &harray [hcode];
   CONST void *e_key = e->key;
 
-  if (!key) 
+  if (!key)
     {
       hash->zero_entry = 0;
       hash->zero_set = 0;
@@ -453,13 +451,13 @@
     }
 }
 
-void 
+void
 maphash (maphash_function mf, c_hashtable hash, void *arg)
 {
   hentry *e;
   hentry *limit;
-  
-  if (hash->zero_set) 
+
+  if (hash->zero_set)
     ((*mf) (0, hash->zero_entry, arg));
 
   for (e = hash->harray, limit = e + hash->size; e < limit; e++)
@@ -469,12 +467,12 @@
     }
 }
 
-void 
+void
 map_remhash (remhash_predicate predicate, c_hashtable hash, void *arg)
 {
   hentry *e;
   hentry *limit;
-  
+
   if (hash->zero_set && ((*predicate) (0, hash->zero_entry, arg)))
     {
       hash->zero_set = 0;
--- a/src/hash.h	Mon Aug 13 09:47:55 2007 +0200
+++ b/src/hash.h	Mon Aug 13 09:49:09 2007 +0200
@@ -61,7 +61,7 @@
 void free_hashtable (c_hashtable hash);
 
 /* returns a hentry whose key is 0 if the entry does not exist in hashtable */
-CONST void *gethash (CONST void *key, c_hashtable hash, 
+CONST void *gethash (CONST void *key, c_hashtable hash,
 		     CONST void **ret_value);
 
 /* key should be different from 0 */
@@ -70,16 +70,15 @@
 /* delete the entry which key is key */
 void remhash (CONST void *key, c_hashtable hash);
 
-typedef void (*maphash_function) (CONST void* key, void* contents, 
-                                  void* arg);
+typedef void (*maphash_function) (CONST void* key, void* contents, void* arg);
 
 typedef int (*remhash_predicate) (CONST void* key, CONST void* contents,
                                   void* arg);
 
-typedef void (*generic_hashtable_op) (c_hashtable table, 
+typedef void (*generic_hashtable_op) (c_hashtable table,
                                       void *arg1, void *arg2, void *arg3);
 
-/* calls mf with the following arguments:  key, contents, arg; for every 
+/* calls mf with the following arguments:  key, contents, arg; for every
    entry in the hashtable */
 void maphash (maphash_function fn, c_hashtable hash, void* arg);
 
@@ -87,7 +86,7 @@
 void map_remhash (remhash_predicate predicate, c_hashtable hash, void *arg);
 
 /* copies all the entries of src into dest -- dest is modified as needed
-   so it is as big as src. */ 
+   so it is as big as src. */
 void copy_hash (c_hashtable dest, c_hashtable src);
 
 /* makes sure that hashtable can hold at least needed_size entries */
--- a/src/indent.c	Mon Aug 13 09:47:55 2007 +0200
+++ b/src/indent.c	Mon Aug 13 09:49:09 2007 +0200
@@ -217,7 +217,7 @@
 */
        (buffer))
 {
-  return (make_int (current_column (decode_buffer (buffer, 0))));
+  return make_int (current_column (decode_buffer (buffer, 0)));
 }
 
 
@@ -287,7 +287,7 @@
   if (opoint > 0)
     BUF_SET_PT (buf, opoint);
 
-  return (make_int (mincol));
+  return make_int (mincol);
 }
 
 int
@@ -358,7 +358,7 @@
   int tab_width = XINT (buf->tab_width);
 
   int prev_col = 0;
-  Emchar c;
+  Emchar c = 0;
 
   XSETBUFFER (buffer, buf);
   if (tab_width <= 0 || tab_width > 1000) tab_width = 8;
@@ -576,7 +576,7 @@
 	}
 
       if (ret_vpos) *ret_vpos = cur_line;
-      return (ret_pt);
+      return ret_pt;
     }
   else if (vtarget < 0)
     {
@@ -584,12 +584,12 @@
 	{
 	  if (ret_vpos) *ret_vpos = -elt;
 	  /* #### This should be BUF_BEGV (b), right? */
-	  return (Dynarr_atp (w->line_start_cache, 0)->start);
+	  return Dynarr_atp (w->line_start_cache, 0)->start;
 	}
       else
 	{
 	  if (ret_vpos) *ret_vpos = vtarget;
-	  return (Dynarr_atp (w->line_start_cache, elt + vtarget)->start);
+	  return Dynarr_atp (w->line_start_cache, elt + vtarget)->start;
 	}
     }
   else
@@ -598,7 +598,7 @@
          of the beginning of the current line. */
       if (ret_vpos) *ret_vpos = 0;
 
-      return (Dynarr_atp (w->line_start_cache, elt)->start);
+      return Dynarr_atp (w->line_start_cache, elt)->start;
     }
 
   RETURN_NOT_REACHED(0)	/* shut up compiler */
--- a/src/keymap.c	Mon Aug 13 09:47:55 2007 +0200
+++ b/src/keymap.c	Mon Aug 13 09:49:09 2007 +0200
@@ -267,7 +267,7 @@
   ((markobj) (keymap->sub_maps_cache));
   ((markobj) (keymap->default_binding));
   ((markobj) (keymap->name));
-  return (keymap->table);
+  return keymap->table;
 }
   
 static void
@@ -330,14 +330,14 @@
 	      free_cons (victim);
 	    }
 	  UNGCPRO;
-	  return (result);
+	  return result;
 	}
       if (NILP (tail))
 	{
 	  if (stack_depth == 0)
 	    {
 	      UNGCPRO;
-	      return (Qnil);          /* Nothing found */
+	      return Qnil;          /* Nothing found */
 	    }
 	  stack_depth--;
 	  if (CONSP (malloc_bites))
@@ -429,19 +429,13 @@
   if (modifiers == 0)
     return frob;
   frob = Fcons (frob, Qnil);
-  if (modifiers & MOD_SHIFT)
-    frob = Fcons (Qshift, frob);
-  if (modifiers & MOD_ALT)
-    frob = Fcons (Qalt, frob);
-  if (modifiers & MOD_HYPER)
-    frob = Fcons (Qhyper, frob);
-  if (modifiers & MOD_SUPER)
-    frob = Fcons (Qsuper, frob);
-  if (modifiers & MOD_CONTROL)
-    frob = Fcons (Qcontrol, frob);
-  if (modifiers & MOD_META)
-    frob = Fcons (Qmeta, frob);
-  return (frob);
+  if (modifiers & MOD_SHIFT)   frob = Fcons (Qshift,   frob);
+  if (modifiers & MOD_ALT)     frob = Fcons (Qalt,     frob);
+  if (modifiers & MOD_HYPER)   frob = Fcons (Qhyper,   frob);
+  if (modifiers & MOD_SUPER)   frob = Fcons (Qsuper,   frob);
+  if (modifiers & MOD_CONTROL) frob = Fcons (Qcontrol, frob);
+  if (modifiers & MOD_META)    frob = Fcons (Qmeta,    frob);
+  return frob;
 }
 
 static Lisp_Object
@@ -463,7 +457,7 @@
       str[count] = 0;
       keysym = intern ((char *) str);
     }
-  return (control_meta_superify (keysym, modifiers));
+  return control_meta_superify (keysym, modifiers);
 }
 
 
@@ -502,7 +496,7 @@
       Lisp_Object submap = Fgethash (MAKE_MODIFIER_HASH_KEY (MOD_META),
                                      k->table, Qnil);
       if (NILP (submap))
-        return (Qnil);
+        return Qnil;
       k = XKEYMAP (submap);
       modifiers &= ~MOD_META;
     }
@@ -512,10 +506,10 @@
       Lisp_Object submap = Fgethash (MAKE_MODIFIER_HASH_KEY (modifiers),
                                      k->table, Qnil);
       if (NILP (submap))
-        return (Qnil);
+        return Qnil;
       k = XKEYMAP (submap);
     }
-  return (Fgethash (keysym, k->table, Qnil));
+  return Fgethash (keysym, k->table, Qnil);
 }
 
 static void
@@ -629,7 +623,7 @@
   /* Invalidate cache */
   k->sub_maps_cache = Qt;
   keymap_store_internal (MAKE_MODIFIER_HASH_KEY (modifiers), k, submap);
-  return (submap);
+  return submap;
 }
 
 
@@ -744,7 +738,7 @@
 				     map_keymap_sort_predicate);
       UNGCPRO;
     }
-  return (k->sub_maps_cache);
+  return k->sub_maps_cache;
 }
 
 
@@ -776,7 +770,7 @@
       keymap->inverse_table = Fmake_hashtable (make_int (size * 3 / 4), Qnil);
     }
   keymap->name = Qnil;
-  return (result);
+  return result;
 }
 
 DEFUN ("make-keymap", Fmake_keymap, 0, 1, 0, /*
@@ -823,7 +817,7 @@
        (keymap))
 {
   keymap = get_keymap (keymap, 1, 1);
-  return (Fcopy_sequence (XKEYMAP (keymap)->parents));
+  return Fcopy_sequence (XKEYMAP (keymap)->parents);
 }
 
   
@@ -831,7 +825,7 @@
 static Lisp_Object
 traverse_keymaps_noop (Lisp_Object keymap, void *arg)
 {
-  return (Qnil);
+  return Qnil;
 }
 
 DEFUN ("set-keymap-parents", Fset_keymap_parents, 2, 2, 0, /*
@@ -871,7 +865,7 @@
   keymap_tick++;
   XKEYMAP (keymap)->parents = Fcopy_sequence (parents);
   UNGCPRO;
-  return (parents);
+  return parents;
 }
 
 DEFUN ("set-keymap-name", Fset_keymap_name, 2, 2, 0, /*
@@ -884,7 +878,7 @@
   keymap = get_keymap (keymap, 1, 1);
 
   XKEYMAP (keymap)->name = new_name;
-  return (new_name);
+  return new_name;
 }
 
 DEFUN ("keymap-name", Fkeymap_name, 1, 1, 0, /*
@@ -896,7 +890,7 @@
 {
   keymap = get_keymap (keymap, 1, 1);
 
-  return (XKEYMAP (keymap)->name);
+  return XKEYMAP (keymap)->name;
 }
 
 DEFUN ("set-keymap-prompt", Fset_keymap_prompt, 2, 2, 0, /*
@@ -912,13 +906,13 @@
     CHECK_STRING (new_prompt);
 
   XKEYMAP (keymap)->prompt = new_prompt;
-  return (new_prompt);
+  return new_prompt;
 }
 
 static Lisp_Object
 keymap_prompt_mapper (Lisp_Object keymap, void *arg)
 {
-  return (XKEYMAP (keymap)->prompt);
+  return XKEYMAP (keymap)->prompt;
 }
 
 
@@ -935,10 +929,9 @@
   keymap = get_keymap (keymap, 1, 1);
   prompt = XKEYMAP (keymap)->prompt;
   if (!NILP (prompt) || NILP (use_inherited))
-    return (prompt);
+    return prompt;
   else
-    return (traverse_keymaps (keymap, Qnil,
-			      keymap_prompt_mapper, 0));
+    return traverse_keymaps (keymap, Qnil, keymap_prompt_mapper, 0);
 }
 
 DEFUN ("set-keymap-default-binding", Fset_keymap_default_binding, 2, 2, 0, /*
@@ -954,7 +947,7 @@
   keymap = get_keymap (keymap, 1, 1);
   
   XKEYMAP (keymap)->default_binding = command;
-  return (command);
+  return command;
 }
 
 DEFUN ("keymap-default-binding", Fkeymap_default_binding, 1, 1, 0, /*
@@ -968,7 +961,7 @@
 {
   /* This function can GC */
   keymap = get_keymap (keymap, 1, 1);
-  return (XKEYMAP (keymap)->default_binding);
+  return XKEYMAP (keymap)->default_binding;
 }
 
 DEFUN ("keymapp", Fkeymapp, 1, 1, 0, /*
@@ -979,7 +972,7 @@
 {
   /* This function can GC */
   Lisp_Object tem = get_keymap (object, 0, 1);
-  return ((KEYMAPP (tem)) ? Qt : Qnil);
+  return KEYMAPP (tem) ? Qt : Qnil;
 }
 
 /* Check that OBJECT is a keymap (after dereferencing through any
@@ -1035,7 +1028,7 @@
 
  tail_recurse:
   if (!CONSP (object))
-    return (object);
+    return object;
 
   {
     struct gcpro gcpro1;
@@ -1060,7 +1053,7 @@
       else if (CONSP (idx))
 	{
 	  if (!INTP (XCDR (idx)))
-	    return (Qnil);
+	    return Qnil;
 	  indirection.keysym = XCAR (idx);
 	  indirection.modifiers = XINT (XCDR (idx));
 	}
@@ -1072,10 +1065,9 @@
       else
 	{
 	  /* Random junk */
-	  return (Qnil);
+	  return Qnil;
 	}
-      return (raw_lookup_key (map, &indirection, 1, 0,
-			      accept_default));
+      return raw_lookup_key (map, &indirection, 1, 0, accept_default);
     }
   else if (STRINGP (XCAR (object)))
     {
@@ -1089,7 +1081,7 @@
   else
     {
       /* Anything else is really the value.  */
-      return (object);
+      return object;
     }
 }
 
@@ -1098,9 +1090,9 @@
                  int accept_default)
 {
   /* This function can GC */
-  return (get_keyelt (keymap_lookup_directly (keymap,
-                                              key->keysym, key->modifiers),
-                      accept_default));
+  return get_keyelt (keymap_lookup_directly (keymap,
+					     key->keysym, key->modifiers),
+		     accept_default);
 }
 
 
@@ -1231,7 +1223,7 @@
 	}
     }
   UNGCPRO;
-  return (fullness);
+  return fullness;
 }
 
 DEFUN ("keymap-fullness", Fkeymap_fullness, 1, 1, 0, /*
@@ -1240,8 +1232,7 @@
        (keymap))
 {
   /* This function can GC */
-  return (make_int (keymap_fullness
-		       (get_keymap (keymap, 1, 1))));
+  return make_int (keymap_fullness (get_keymap (keymap, 1, 1)));
 }
 
 
@@ -1697,8 +1688,7 @@
     {
       new_keys = make_vector (indx, Qnil);
       for (i = 0; i < indx; i++)
-	vector_data (XVECTOR (new_keys)) [i] =
-	  vector_data (XVECTOR (keys)) [i];
+	XVECTOR_DATA (new_keys) [i] = XVECTOR_DATA (keys) [i];
     }
   else
     abort ();
@@ -1822,27 +1812,27 @@
   /* This function can GC */
   int idx;
   int metized = 0;
-  int size;
+  int len;
   int ascii_hack;
   struct gcpro gcpro1, gcpro2, gcpro3;
 
   if (VECTORP (keys))
-    size = vector_length (XVECTOR (keys));
+    len = XVECTOR_LENGTH (keys);
   else if (STRINGP (keys))
-    size = string_char_length (XSTRING (keys));
+    len = string_char_length (XSTRING (keys));
   else if (CHAR_OR_CHAR_INTP (keys) || SYMBOLP (keys) || CONSP (keys))
     {
       if (!CONSP (keys)) keys = list1 (keys);
-      size = 1;
+      len = 1;
       keys = make_vector (1, keys); /* this is kinda sleazy. */
     }
   else
     {
       keys = wrong_type_argument (Qsequencep, keys);
-      size = XINT (Flength (keys));
+      len = XINT (Flength (keys));
     }
-  if (size == 0)
-    return (Qnil);
+  if (len == 0)
+    return Qnil;
 
   GCPRO3 (keymap, keys, def);
 
@@ -1869,13 +1859,13 @@
       if (STRINGP (keys))
 	c = make_char (string_char (XSTRING (keys), idx));
       else
-	c = vector_data (XVECTOR (keys)) [idx];
+	c = XVECTOR_DATA (keys) [idx];
 
       define_key_parser (c, &raw_key1);
 
       if (!metized && ascii_hack && meta_prefix_char_p (&raw_key1))
 	{
-	  if (idx == (size - 1))
+	  if (idx == (len - 1))
 	    {
 	      /* This is a hack to prevent a binding for the meta-prefix-char
 		 from being made in a map which already has a non-empty "meta"
@@ -1935,7 +1925,7 @@
       if (raw_key1.modifiers & MOD_META)
 	ensure_meta_prefix_char_keymapp (keys, idx, keymap);
 
-      if (++idx == size)
+      if (++idx == len)
 	{
 	  keymap_store (keymap, &raw_key1, def);
 	  if (ascii_hack && !NILP (raw_key2.keysym))
@@ -2004,8 +1994,7 @@
   c.keys_so_far = keys_so_far;
   c.accept_default = accept_default;
 
-  return (traverse_keymaps (keymap, Qnil, raw_lookup_key_mapper,
-			    &c));
+  return traverse_keymaps (keymap, Qnil, raw_lookup_key_mapper, &c);
 }
 
 static Lisp_Object
@@ -2090,7 +2079,7 @@
     }
   if (accept_default && NILP (cmd))
     cmd = XKEYMAP (k)->default_binding;
-  return (cmd);
+  return cmd;
 }
 
 /* Value is number if `keys' is too long; NIL if valid but has no definition.*/
@@ -2116,8 +2105,7 @@
     {
       define_key_parser (keys[i], &(raw_keys[i]));
     }
-  return (raw_lookup_key (keymap, raw_keys, nkeys, 0,
-			  accept_default));
+  return raw_lookup_key (keymap, raw_keys, nkeys, 0, accept_default);
 }
 
 static Lisp_Object
@@ -2164,7 +2152,7 @@
 	break;
     }
   UNGCPRO;
-  return (tem);
+  return tem;
 }
 
 DEFUN ("lookup-key", Flookup_key, 2, 3, 0, /*
@@ -2182,8 +2170,8 @@
   if (VECTORP (keys))
     {
       return lookup_keys (keymap,
-			  vector_length (XVECTOR (keys)),
-                          vector_data (XVECTOR (keys)),
+			  XVECTOR_LENGTH (keys),
+                          XVECTOR_DATA (keys),
                           !NILP (accept_default));
     }
   else if (SYMBOLP (keys) || CHAR_OR_CHAR_INTP (keys) || CONSP (keys))
@@ -2210,8 +2198,8 @@
           Emchar n = string_char (XSTRING (keys), i);
 	  define_key_parser (make_char (n), &(raw_keys[i]));
 	}
-      return (raw_lookup_key (keymap, raw_keys, length, 0,
-                              !NILP (accept_default)));
+      return raw_lookup_key (keymap, raw_keys, length, 0,
+			     !NILP (accept_default));
     }
 }
 
@@ -2278,9 +2266,9 @@
     terminal = event_chain_tail (keys);
   else if (VECTORP (keys))
     {
-      int len = vector_length (XVECTOR (keys));
+      int len = XVECTOR_LENGTH (keys);
       if (len > 0)
-	terminal = vector_data (XVECTOR (keys))[len - 1];
+	terminal = XVECTOR_DATA (keys)[len - 1];
     }
 
   if (EVENTP (terminal))
@@ -2404,7 +2392,7 @@
     else
       maps[nmaps] = Vcurrent_global_map;
     UNGCPRO;
-    return (nmaps + 1);
+    return nmaps + 1;
   }
 }
 
@@ -2465,11 +2453,11 @@
 	  if (!NILP (val) && !UNBOUNDP (val))
 	    {
 	      Lisp_Object map = get_keymap (XCDR (assoc), 0, 1);
-	      return (map);
+	      return map;
 	    }
 	}
     }
-  return (Qnil);
+  return Qnil;
 }
 
 static void
@@ -2517,7 +2505,7 @@
       nmaps = get_relevant_keymaps (event_or_keys, nmaps, gubbish);
     }
   UNGCPRO;
-  return (Flist (nmaps, gubbish));
+  return Flist (nmaps, gubbish);
 }
 
 DEFUN ("key-binding", Fkey_binding, 1, 2, 0, /*
@@ -2563,8 +2551,7 @@
   UNGCPRO;
 
   if (EVENTP (keys))           /* unadvertised "feature" for the future */
-    return (lookup_events (keys, nmaps, maps,
-			   !NILP (accept_default)));
+    return lookup_events (keys, nmaps, maps, !NILP (accept_default));
 
   for (i = 0; i < nmaps; i++)
     {
@@ -2573,12 +2560,12 @@
       if (INTP (tem))
 	{
 	  /* Too long in some local map means don't look at global map */
-	  return (Qnil);
+	  return Qnil;
 	}
       else if (!NILP (tem))
-	return (tem);
+	return tem;
     }
-  return (Qnil);
+  return Qnil;
 }
 
 static Lisp_Object
@@ -2627,8 +2614,8 @@
   nmaps = get_relevant_keymaps (event0, countof (maps), maps);
   if (nmaps > countof (maps))
     nmaps = countof (maps);
-  return (process_event_binding_result
-	  (lookup_events (event0, nmaps, maps, accept_default)));
+  return process_event_binding_result (lookup_events (event0, nmaps, maps,
+						      accept_default));
 }
 
 /* Attempts to find a function key mapping corresponding to the
@@ -2705,7 +2692,7 @@
 */
        ())
 {
-  return (Vcurrent_global_map);
+  return Vcurrent_global_map;
 }
 
 
@@ -2835,7 +2822,7 @@
 
   /* all symbols (non-ASCIIs) come after characters (ASCIIs) */
   if (XTYPE (obj1) != XTYPE (obj2))
-    return (SYMBOLP (obj2) ? 1 : -1);
+    return SYMBOLP (obj2) ? 1 : -1;
 
   if (! bit1 && CHARP (obj1)) /* they're both ASCII */
     {
@@ -2843,30 +2830,28 @@
       int o2 = XCHAR (obj2);
       if (o1 == o2 &&		/* If one started out as a symbol and the */
 	  sym1_p != sym2_p)	/* other didn't, the symbol comes last. */
-	return (sym2_p ? 1 : -1);
-
-      return ((o1 < o2) ? 1 : -1); /* else just compare them */
+	return sym2_p ? 1 : -1;
+
+      return o1 < o2 ? 1 : -1;	/* else just compare them */
     }
 
   /* else they're both symbols.  If they're both buckys, then order them. */
   if (bit1 && bit2)
-    return ((bit1 < bit2) ? 1 : -1);
+    return bit1 < bit2 ? 1 : -1;
   
   /* if only one is a bucky, then it comes later */
   if (bit1 || bit2)
-    return (bit2 ? 1 : -1);
+    return bit2 ? 1 : -1;
 
   /* otherwise, string-sort them. */
   {
     char *s1 = (char *) string_data (XSYMBOL (obj1)->name);
     char *s2 = (char *) string_data (XSYMBOL (obj2)->name);
-    return (
 #ifdef I18N2
-	    (0 > strcoll (s1, s2))
+    return 0 > strcoll (s1, s2) ? 1 : -1;
 #else
-	    (0 > strcmp (s1, s2))
+    return 0 > strcmp  (s1, s2) ? 1 : -1;
 #endif
-	    ? 1 : -1);
   }
 }
 
@@ -3031,6 +3016,7 @@
       Lisp_Object cmd = get_keyelt (contents, 1);
       Lisp_Object vec;
       int j;
+      int len;
       struct key_data key;
       key.keysym = keysym;
       key.modifiers = modifiers;
@@ -3041,10 +3027,11 @@
       if (!KEYMAPP (cmd))
 	abort ();
 
-      vec = make_vector (vector_length (XVECTOR (thisseq)) + 1, Qnil);
-      for (j = 0; j < vector_length (XVECTOR (thisseq)); j++)
-	vector_data (XVECTOR (vec)) [j] = vector_data (XVECTOR (thisseq)) [j];
-      vector_data (XVECTOR (vec)) [j] = make_key_description (&key, 1);
+      vec = make_vector (XVECTOR_LENGTH (thisseq) + 1, Qnil);
+      len = XVECTOR_LENGTH (thisseq);
+      for (j = 0; j < len; j++)
+	XVECTOR_DATA (vec) [j] = XVECTOR_DATA (thisseq) [j];
+      XVECTOR_DATA (vec) [j] = make_key_description (&key, 1);
 
       nconc2 (closure->tail, list1 (Fcons (vec, cmd)));
     }
@@ -3065,7 +3052,7 @@
 				   0,
 				   closure);
     }
-  return (Qnil);
+  return Qnil;
 }
 
 
@@ -3114,7 +3101,7 @@
 	{
 	  struct key_data key;
 	  define_key_parser (Faref (prefix, make_int (iii)), &key);
-	  vector_data (XVECTOR (p))[iii] = make_key_description (&key, 1);
+	  XVECTOR_DATA (p)[iii] = make_key_description (&key, 1);
 	}
       NUNGCPRO;
       prefix = p;
@@ -3137,7 +3124,7 @@
     }
  RETURN:
   UNGCPRO;
-  return (accessible_keymaps);
+  return accessible_keymaps;
 }
 
 
@@ -3171,7 +3158,7 @@
 	  Lisp_Object s2 = Fsingle_key_description
 	    (((STRINGP (keys))
 	      ? make_char (string_char (XSTRING (keys), i))
-	      : vector_data (XVECTOR (keys))[i]));
+	      : XVECTOR_DATA (keys)[i]));
 
 	  if (i == 0)
 	    string = s2;
@@ -3181,7 +3168,7 @@
 	      string = concat2 (string, concat2 (Vsingle_space_string, s2));
 	    }
 	}
-      return (string);
+      return string;
     }
   return Fkey_description (wrong_type_argument (Qsequencep, keys));
 }
@@ -3211,7 +3198,7 @@
 	}
       else
 	format_event_object (buf, XEVENT (key), 1);
-      return (build_string (buf));
+      return build_string (buf);
     }
 
   if (CONSP (key))
@@ -3442,9 +3429,8 @@
 {
   Lisp_Object result = make_vector (count, Qnil);
   while (count--)
-    vector_data (XVECTOR (result)) [count] =
-      make_key_description (&(keys[count]), 1);
-  return (result);
+    XVECTOR_DATA (result) [count] = make_key_description (&(keys[count]), 1);
+  return result;
 }
 
 
@@ -3558,7 +3544,7 @@
 	    {
 	      if (!firstonly) abort ();
 	      format_raw_keys (so_far, keys_count + 1, target_buffer);
-	      return (make_int (1));
+	      return make_int (1);
 	    }
 	  else if (firstonly)
 	    return raw_keys_to_keys (so_far, keys_count + 1);
@@ -3653,10 +3639,10 @@
 	if (!firstonly)
 	  result = nconc2 (lower, result);
 	else if (!NILP (lower))
-	  return (lower);
+	  return lower;
       }
     }
-  return (result);
+  return result;
 }
 
 
@@ -3706,7 +3692,7 @@
 
   if (c.keys_so_far_malloced)
     xfree (c.keys_so_far);
-  return (result);
+  return result;
 }
 
 
@@ -3729,7 +3715,7 @@
   /* This function can GC */
   describe_map_tree (map, NILP (all), shadow, prefix,
 		     !NILP (mouse_only_p));
-  return (Qnil);
+  return Qnil;
 }
 
 
@@ -3889,13 +3875,13 @@
   struct describe_map_shadow_closure *c = arg;
 
   if (EQ (map, c->self))
-    return (Qzero);              /* Not shadowed; terminate search */
-  else if (!NILP (keymap_lookup_directly (map,
-                                          c->raw_key->keysym,
-                                          c->raw_key->modifiers)))
-    return (Qt);
+    return Qzero;		/* Not shadowed; terminate search */
+  if (!NILP (keymap_lookup_directly (map,
+				     c->raw_key->keysym,
+				     c->raw_key->modifiers)))
+    return Qt;
   else
-    return (Qnil);
+    return Qnil;
 }
      
 
@@ -3903,7 +3889,7 @@
 keymap_lookup_inherited_mapper (Lisp_Object km, void *arg)
 {
   struct key_data *k = arg;
-  return (keymap_lookup_directly (km, k->keysym, k->modifiers));
+  return keymap_lookup_directly (km, k->keysym, k->modifiers);
 }
 
 
@@ -3983,7 +3969,7 @@
   bit1 = XINT (XCDR (obj1));
   bit2 = XINT (XCDR (obj2));
   if (bit1 != bit2)
-    return ((bit1 < bit2) ? 1 : -1);
+    return bit1 < bit2 ? 1 : -1;
   else
     return map_keymap_sort_predicate (obj1, obj2, pred);
 }
@@ -4050,7 +4036,7 @@
   map_keymap (XKEYMAP (keymap)->table,
               0, /* don't sort: we'll do it later */
               describe_map_mapper, describe_map_closure);
-  return (Qnil);
+  return Qnil;
 }
 
 
--- a/src/lisp.h	Mon Aug 13 09:47:55 2007 +0200
+++ b/src/lisp.h	Mon Aug 13 09:49:09 2007 +0200
@@ -540,13 +540,13 @@
   /* Format used for input from the terminal.  This should be controlled
      by the `keyboard-coding-system' variable. */
   FORMAT_KEYBOARD,
-  
+
   /* Format used for the external Unix environment -- argv[], stuff
      from getenv(), stuff from the /etc/passwd file, etc.
 
      Perhaps should be the same as FORMAT_FILENAME. */
   FORMAT_OS,
-  
+
   /* Compound-text format.  This is the standard X format used for
      data stored in properties, selections, and the like.  This is
      an 8-bit no-lock-shift ISO2022 coding system. */
@@ -628,31 +628,31 @@
 {
   /* Integer.  XINT(obj) is the integer value. */
   Lisp_Int                    /* 0  DTP-FIXNUM */
-  
+
   /* XRECORD_LHEADER (object) points to a struct lrecord_header
      lheader->implementation determines the type (and GC behaviour)
      of the object. */
   ,Lisp_Record                /* 1  DTP-OTHER-POINTER */
-  
+
   /* Cons.  XCONS (object) points to a struct Lisp_Cons. */
   ,Lisp_Cons                  /* 2  DTP-LIST */
-  
+
   /* LRECORD_STRING is NYI */
   /* String.  XSTRING (object) points to a struct Lisp_String.
      The length of the string, and its contents, are stored therein. */
   ,Lisp_String                /* 3  DTP-STRING */
-  
+
 #ifndef LRECORD_VECTOR
   /* Vector of Lisp objects.  XVECTOR(object) points to a struct Lisp_Vector.
      The length of the vector, and its contents, are stored therein. */
   ,Lisp_Vector                /* 4  DTP-SIMPLE-ARRAY */
 #endif
-  
+
 #ifndef LRECORD_SYMBOL
   /* Symbol.  XSYMBOL (object) points to a struct Lisp_Symbol. */
   ,Lisp_Symbol
 #endif /* !LRECORD_SYMBOL */
-  
+
   ,Lisp_Char			/* 5 DTP-CHAR */
 };
 
@@ -735,7 +735,7 @@
 
 #define UNBOUNDP(val) EQ (val, Qunbound)
 #define GC_UNBOUNDP(val) GC_EQ (val, Qunbound)
-  
+
 /*********** cons ***********/
 
 /* In a cons, the markbit of the car is the gc mark bit */
@@ -939,9 +939,12 @@
 #endif
 
 #define vector_length(v) ((v)->size)
+#define XVECTOR_LENGTH(s) vector_length (XVECTOR (s))
 #define vector_data(v) ((v)->contents)
+#define XVECTOR_DATA(s) vector_data (XVECTOR (s))
 #define vector_next(v) ((v)->contents[(v)->size])
 
+
 /*********** bit vector ***********/
 
 #if (LONGBITS < 16)
@@ -1569,7 +1572,7 @@
    and its `val' points to some argument or local variable of the function.
    On exit to the function, the chain is set back to the value it had on
    entry.  This way, no link remains in the chain when the stack frame
-   containing the link disappears. 
+   containing the link disappears.
 
    Every function that can call Feval must protect in this fashion all
    Lisp_Object variables whose contents will be used again. */
--- a/src/lread.c	Mon Aug 13 09:47:55 2007 +0200
+++ b/src/lread.c	Mon Aug 13 09:49:09 2007 +0200
@@ -63,7 +63,7 @@
    this silliness. */
 static int new_backquote_flag, old_backquote_flag;
 Lisp_Object Qbackquote, Qbacktick, Qcomma, Qcomma_at, Qcomma_dot;
-#endif 
+#endif
 Lisp_Object Qvariable_domain;	/* I18N3 */
 Lisp_Object Vvalues, Vstandard_input, Vafter_load_alist;
 Lisp_Object Qcurrent_load_list;
@@ -229,7 +229,7 @@
     {
       Emchar c;
       struct buffer *b = XBUFFER (readcharfun);
- 
+
       if (!BUFFER_LIVE_P (b))
         error ("Reading from killed buffer");
 
@@ -342,7 +342,7 @@
 
 
 
-static void readevalloop (Lisp_Object readcharfun, 
+static void readevalloop (Lisp_Object readcharfun,
                           Lisp_Object sourcefile,
                           Lisp_Object (*evalfun) (Lisp_Object),
                           int printflag);
@@ -392,12 +392,12 @@
 void
 ebolify_bytecode_constants (Lisp_Object vector)
 {
-  int len = vector_length (XVECTOR (vector));
+  int len = XVECTOR_LENGTH (vector);
   int i;
 
   for (i = 0; i < len; i++)
     {
-      Lisp_Object el = vector_data (XVECTOR (vector))[i];
+      Lisp_Object el = XVECTOR_DATA (vector)[i];
 
       /* We don't check for `eq', `equal', and the others that have
 	 bytecode opcodes.  This might lose if someone passes #'eq or
@@ -420,7 +420,7 @@
 	el = Qold_rassq;
       if (EQ (el, Qrassoc))
 	el = Qold_rassoc;
-      vector_data (XVECTOR (vector))[i] = el;
+      XVECTOR_DATA (vector)[i] = el;
     }
 }
 
@@ -605,7 +605,7 @@
       char *foundstr;
       int foundlen;
 
-      fd = locate_file (Vload_path, file, 
+      fd = locate_file (Vload_path, file,
                         ((!NILP (nosuffix)) ? "" :
 			 load_ignore_elc_files ? ".el:" :
 			 ".elc:.el:"),
@@ -760,7 +760,7 @@
       }
     else
       load_byte_code_version = 100; /* no Ebolification needed */
-	    
+
     readevalloop (lispstream, file, Feval, 0);
 #ifdef MULE
     if (!NILP (used_codesys))
@@ -803,7 +803,7 @@
 
   if (!noninteractive)
     PRINT_LOADING_MESSAGE ("done");
-    
+
   UNGCPRO;
   return Qt;
 }
@@ -852,7 +852,7 @@
     }
   if (!(NILP (mode) || (INTP (mode) && XINT (mode) >= 0)))
     mode = wrong_type_argument (Qnatnump, mode);
-  locate_file (path_list, filename, 
+  locate_file (path_list, filename,
                ((NILP (suffixes)) ? "" :
 		(char *) (XSTRING_DATA (suffixes))),
 	       &tp, (NILP (mode) ? R_OK : XINT (mode)));
@@ -925,22 +925,22 @@
   want_size = strlen (suffix) + XSTRING_LENGTH (filename) + 1;
   if (fn_size < want_size)
     fn = (char *) alloca (fn_size = 100 + want_size);
-  
+
   nsuffix = suffix;
-  
+
   /* Loop over suffixes.  */
   while (1)
     {
       char *esuffix = (char *) strchr (nsuffix, ':');
       int lsuffix = ((esuffix) ? (esuffix - nsuffix) : strlen (nsuffix));
-      
+
       /* Concatenate path element/specified name with the suffix.  */
-      strncpy (fn, (char *) XSTRING_DATA (filename), 
+      strncpy (fn, (char *) XSTRING_DATA (filename),
 	       XSTRING_LENGTH (filename));
       fn[XSTRING_LENGTH (filename)] = 0;
       if (lsuffix != 0)  /* Bug happens on CCI if lsuffix is 0.  */
 	strncat (fn, nsuffix, lsuffix);
-      
+
       /* Ignore file if it's a directory.  */
       if (stat (fn, &st) >= 0
 	  && (st.st_mode & S_IFMT) != S_IFDIR)
@@ -954,35 +954,35 @@
 #else
 	    fd = open (fn, O_RDONLY, 0);
 #endif
-	  
+
 	  if (fd >= 0)
 	    {
 	      /* We succeeded; return this descriptor and filename.  */
 	      if (storeptr)
 		*storeptr = build_string (fn);
 	      UNGCPRO;
-	      
+
 /* XXX FIX ME
    Not sure about this on NT yet.  Do nothing for now.
    --marcpa */
-#ifndef DOS_NT	      
+#ifndef DOS_NT
 	      /* If we actually opened the file, set close-on-exec flag
 		 on the new descriptor so that subprocesses can't whack
 		 at it.  */
 	      if (mode < 0)
 		(void) fcntl (fd, F_SETFD, FD_CLOEXEC);
 #endif
-	      
+
 	      return fd;
 	    }
 	}
-      
+
       /* Advance to next suffix.  */
       if (esuffix == 0)
 	break;
       nsuffix += lsuffix + 1;
     }
-  
+
   UNGCPRO;
   return -1;
 }
@@ -1015,7 +1015,7 @@
       if (absolute)
 	break;
     }
-  
+
   UNGCPRO;
   return -1;
 }
@@ -1031,26 +1031,26 @@
   char *fn = buf;
   CONST char *nsuffix;
   Lisp_Object suffixtab = Qnil;
-  
+
   /* Calculate maximum size of any filename made from
      this path element/specified file name and any possible suffix.  */
   want_size = strlen (suffix) + XSTRING_LENGTH (str) + 1;
   if (fn_size < want_size)
     fn = (char *) alloca (fn_size = 100 + want_size);
-  
+
   nsuffix = suffix;
-  
+
   while (1)
     {
       char *esuffix = (char *) strchr (nsuffix, ':');
       int lsuffix = ((esuffix) ? (esuffix - nsuffix) : strlen (nsuffix));
-      
+
       /* Concatenate path element/specified name with the suffix.  */
       strncpy (fn, (char *) XSTRING_DATA (str), XSTRING_LENGTH (str));
       fn[XSTRING_LENGTH (str)] = 0;
       if (lsuffix != 0)  /* Bug happens on CCI if lsuffix is 0.  */
 	strncat (fn, nsuffix, lsuffix);
-      
+
       suffixtab = Fcons (build_string (fn), suffixtab);
       /* Advance to next suffix.  */
       if (esuffix == 0)
@@ -1221,7 +1221,7 @@
 
 	  /*  If we're loading, remove it. */
 	  if (loading)
-	    {	  
+	    {
 	      if (NILP (prev))
 		Vload_history = Fcdr (tail);
 	      else
@@ -1275,7 +1275,7 @@
 #endif /* 0 */
 
 static void
-readevalloop (Lisp_Object readcharfun, 
+readevalloop (Lisp_Object readcharfun,
               Lisp_Object sourcename,
               Lisp_Object (*evalfun) (Lisp_Object),
               int printflag)
@@ -1483,9 +1483,9 @@
 #ifndef standalone
   if (EQ (stream, Qread_char))
     {
-      Lisp_Object val = call1 (Qread_from_minibuffer, 
+      Lisp_Object val = call1 (Qread_from_minibuffer,
 			       build_translated_string ("Lisp expression: "));
-      return (Fcar (Fread_from_string (val, Qnil, Qnil)));
+      return Fcar (Fread_from_string (val, Qnil, Qnil));
     }
 #endif
 
@@ -1539,12 +1539,12 @@
 {  /* used as unwind-protect function in read0() */
   int *counter = (int *) get_opaque_ptr (ptr);
   if (--*counter < 0)
-    *counter = 0;  
+    *counter = 0;
   free_opaque_ptr (ptr);
   return Qnil;
 }
 
-#endif 
+#endif
 
 /* Use this for recursive reads, in contexts where internal tokens
    are not allowed.  See also read1(). */
@@ -1600,10 +1600,10 @@
 #define hyper_modifier (0x100000)
 #define shift_modifier (0x200000)
 /* fsf uses a different modifiers for meta and control.  Possibly
-   byte_compiled code will still work fsfmacs, though... --Stig 
+   byte_compiled code will still work fsfmacs, though... --Stig
 
    #define ctl_modifier   (0x400000)
-   #define meta_modifier  (0x800000)	
+   #define meta_modifier  (0x800000)
 */
 #define FSF_LOSSAGE(mask)						\
       if (puke_on_fsf_keys || ((c = readchar (readcharfun)) != '-'))	\
@@ -1637,8 +1637,8 @@
       if (c == '?')
 	return 0177;
       else
-        return (c & (0200 | 037));
-      
+        return c & (0200 | 037);
+
     case '0':
     case '1':
     case '2':
@@ -1733,7 +1733,7 @@
   Lstream_put_emchar (XLSTREAM (Vread_buffer_stream), 0);
   Lstream_flush (XLSTREAM (Vread_buffer_stream));
 
-  return (Lstream_byte_count (XLSTREAM (Vread_buffer_stream)) - 1);
+  return Lstream_byte_count (XLSTREAM (Vread_buffer_stream)) - 1;
 }
 
 static Lisp_Object parse_integer (CONST Bufbyte *buf, Bytecount len, int base);
@@ -1788,10 +1788,10 @@
 		  number = atol (read_buffer);
 		else
 		  abort ();
-		return (make_int (number));
+		return make_int (number);
 	      }
 #else
-              return (parse_integer ((Bufbyte *) read_ptr, len, 10));
+              return parse_integer ((Bufbyte *) read_ptr, len, 10);
 #endif
 	    }
 	}
@@ -1804,7 +1804,7 @@
   {
     Lisp_Object sym;
     if (uninterned_symbol)
-      sym = (Fmake_symbol ((purify_flag) 
+      sym = (Fmake_symbol ((purify_flag)
 			   ? make_pure_pname ((Bufbyte *) read_ptr, len, 0)
 			   : make_string ((Bufbyte *) read_ptr, len)));
     else
@@ -1820,7 +1820,7 @@
 	   have packages and then this will be reworked.  --Stig. */
 	XSYMBOL (sym)->value = sym;
       }
-    return (sym);
+    return sym;
   }
 }
 
@@ -1859,7 +1859,7 @@
 	c = c - 'a' + 10;
       else
 	goto loser;
-    
+
       if (c < 0 || c >= base)
 	goto loser;
 
@@ -1875,16 +1875,16 @@
       goto overflow;
     if (XINT (result) != ((negativland) ? -num : num))
       goto overflow;
-    return (result);
+    return result;
   }
  overflow:
-  return Fsignal (Qinvalid_read_syntax, 
+  return Fsignal (Qinvalid_read_syntax,
                   list3 (build_translated_string
 			 ("Integer constant overflow in reader"),
                          make_string (buf, len),
                          make_int (base)));
  loser:
-  return Fsignal (Qinvalid_read_syntax, 
+  return Fsignal (Qinvalid_read_syntax,
                   list3 (build_translated_string
 			 ("Invalid integer constant in reader"),
                          make_string (buf, len),
@@ -1984,6 +1984,7 @@
   Lisp_Object list = Qnil;
   Lisp_Object orig_list = Qnil;
   Lisp_Object already_seen = Qnil;
+  int keyword_count;
   struct structure_type *st;
   struct gcpro gcpro1, gcpro2;
 
@@ -2002,44 +2003,41 @@
 	(continuable_syntax_error
 	 ("structures must have alternating keyword/value pairs"));
   }
-  
+
   st = recognized_structure_type (XCAR (list));
   if (!st)
-    {
-      RETURN_UNGCPRO (Fsignal (Qinvalid_read_syntax,
-			       list2 (build_translated_string
-				      ("unrecognized structure type"),
-				      XCAR (list))));
-    }
+    RETURN_UNGCPRO (Fsignal (Qinvalid_read_syntax,
+			     list2 (build_translated_string
+				    ("unrecognized structure type"),
+				    XCAR (list))));
 
   list = Fcdr (list);
+  keyword_count = Dynarr_length (st->keywords);
   while (!NILP (list))
     {
       Lisp_Object keyword, value;
       int i;
-      struct structure_keyword_entry *en;
-      
+      struct structure_keyword_entry *en = NULL;
+
       keyword = Fcar (list);
       list = Fcdr (list);
       value = Fcar (list);
       list = Fcdr (list);
-      
+
       if (!NILP (memq_no_quit (keyword, already_seen)))
-	{
-	  RETURN_UNGCPRO (Fsignal (Qinvalid_read_syntax,
-				   list2 (build_translated_string
-					  ("structure keyword already seen"),
-					  keyword)));
-	}
-
-      for (i = 0; i < Dynarr_length (st->keywords); i++)
+	RETURN_UNGCPRO (Fsignal (Qinvalid_read_syntax,
+				 list2 (build_translated_string
+					("structure keyword already seen"),
+					keyword)));
+
+      for (i = 0; i < keyword_count; i++)
 	{
 	  en = Dynarr_atp (st->keywords, i);
 	  if (EQ (keyword, en->keyword))
 	    break;
 	}
 
-      if (i == Dynarr_length (st->keywords))
+      if (i == keyword_count)
 	RETURN_UNGCPRO (Fsignal (Qinvalid_read_syntax,
 				   list2 (build_translated_string
 					  ("unrecognized structure keyword"),
@@ -2056,14 +2054,13 @@
     }
 
   if (st->validate && ! (st->validate) (orig_list, ERROR_ME))
-    RETURN_UNGCPRO
-      (Fsignal (Qinvalid_read_syntax,
-		list2 (build_translated_string
-		       ("invalid structure initializer"),
-		       orig_list)));
+    RETURN_UNGCPRO (Fsignal (Qinvalid_read_syntax,
+			     list2 (build_translated_string
+				    ("invalid structure initializer"),
+				    orig_list)));
 
   RETURN_UNGCPRO ((st->instantiate) (XCDR (orig_list)));
-}  
+}
 
 
 static Lisp_Object read_compiled_function (Lisp_Object readcharfun,
@@ -2097,7 +2094,7 @@
 	/* Ignore whitespace and control characters */
 	if (c <= 040)
 	  goto retry;
-	return (c);
+	return c;
       }
 
     case ';':
@@ -2114,10 +2111,7 @@
 static Lisp_Object
 list2_pure (int pure, Lisp_Object a, Lisp_Object b)
 {
-  if (pure)
-    return (pure_cons (a, pure_cons (b, Qnil)));
-  else
-    return (list2 (a, b));
+  return pure ? pure_cons (a, pure_cons (b, Qnil)) : list2 (a, b);
 }
 #endif
 
@@ -2126,7 +2120,7 @@
    encountered a misplaced token (e.g. a right bracket, right paren,
    or dot followed by a non-number).  To filter this stuff out,
    use read0(). */
-  
+
 static Lisp_Object
 read1 (Lisp_Object readcharfun)
 {
@@ -2213,12 +2207,12 @@
 	return read_list (readcharfun, ')', 1, 1);
       }
     case '[':
-      return (read_vector (readcharfun, ']'));
+      return read_vector (readcharfun, ']');
 
     case ')':
     case ']':
       /* #### - huh? these don't do what they seem... */
-      return (noseeum_cons (Qunbound, make_char (c)));
+      return noseeum_cons (Qunbound, make_char (c));
     case '.':
       {
 #ifdef LISP_FLOAT_TYPE
@@ -2231,17 +2225,17 @@
 
 	/* Can't use isdigit on Emchars */
 	if (c < '0' || c > '9')
-	  return (noseeum_cons (Qunbound, make_char ('.')));
+	  return noseeum_cons (Qunbound, make_char ('.'));
 
 	/* Note that read_atom will loop
 	   at least once, assuring that we will not try to UNREAD
            two characters in a row.
 	   (I think this doesn't matter anymore because there should
 	   be no more danger in unreading multiple characters) */
-        return (read_atom (readcharfun, '.', 0));
+        return read_atom (readcharfun, '.', 0);
 
 #else /* ! LISP_FLOAT_TYPE */
-	return (noseeum_cons (Qunbound, make_char ('.')));
+	return noseeum_cons (Qunbound, make_char ('.'));
 #endif /* ! LISP_FLOAT_TYPE */
       }
 
@@ -2258,18 +2252,18 @@
 #endif
             /* "#["-- byte-code constant syntax */
             /* purecons #[...] syntax */
-	  case '[': return (read_compiled_function (readcharfun, ']'
-                                                    /*, purify_flag */ ));
+	  case '[': return read_compiled_function (readcharfun, ']'
+						   /*, purify_flag */ );
             /* "#:"-- quasi-implemented gensym syntax */
-	  case ':': return (read_atom (readcharfun, -1, 1));
+	  case ':': return read_atom (readcharfun, -1, 1);
             /* #'x => (function x) */
-	  case '\'': return (list2 (Qfunction, read0 (readcharfun)));
+	  case '\'': return list2 (Qfunction, read0 (readcharfun));
 #if 0
 	    /* RMS uses this syntax for fat-strings.
 	       If we use it for vectors, then obscure bugs happen.
 	     */
             /* "#(" -- Scheme/CL vector syntax */
-	  case '(': return (read_vector (readcharfun, ')'));
+	  case '(': return read_vector (readcharfun, ')');
 #endif
 #if 0 /* FSFmacs */
 	  case '(':
@@ -2283,8 +2277,8 @@
 		{
 		  if (CONSP (tmp) && UNBOUNDP (XCAR (tmp)))
 		    free_cons (XCONS (tmp));
-		  return (Fsignal (Qinvalid_read_syntax,
-				   list1 (build_string ("#"))));
+		  return Fsignal (Qinvalid_read_syntax,
+				   list1 (build_string ("#")));
 		}
 	      GCPRO1 (tmp);
 	      /* Read the intervals and their properties.  */
@@ -2293,7 +2287,7 @@
 		  Lisp_Object beg, end, plist;
 		  Emchar ch;
 		  int invalid = 0;
-		  
+
 		  beg = read1 (readcharfun);
 		  if (CONSP (beg) && UNBOUNDP (XCAR (beg)))
 		    {
@@ -2360,15 +2354,15 @@
 	    }
 	  case '$': return Vload_file_name_internal;
             /* bit vectors */
-	  case '*': return (read_bit_vector (readcharfun));
+	  case '*': return read_bit_vector (readcharfun);
             /* #o10 => 8 -- octal constant syntax */
-	  case 'o': return (read_integer (readcharfun, 8));
+	  case 'o': return read_integer (readcharfun, 8);
             /* #xdead => 57005 -- hex constant syntax */
-	  case 'x': return (read_integer (readcharfun, 16));
+	  case 'x': return read_integer (readcharfun, 16);
             /* #b010 => 2 -- binary constant syntax */
-	  case 'b': return (read_integer (readcharfun, 2));
+	  case 'b': return read_integer (readcharfun, 2);
             /* #s(foobar key1 val1 key2 val2) -- structure syntax */
-	  case 's': return (read_structure (readcharfun));
+	  case 's': return read_structure (readcharfun);
 	  case '<':
 	    {
 	      unreadchar (readcharfun, c);
@@ -2449,7 +2443,7 @@
 	       future, then commas should be invalid read syntax
 	       outside of backquotes anywhere they're found (i.e.
 	       they must be quoted in symbols) -- Stig */
-	    return (read_atom (readcharfun, c, 0));
+	    return read_atom (readcharfun, c, 0);
 	  }
       }
 #endif
@@ -2463,7 +2457,7 @@
 
 	if (c == '\\')
 	  c = read_escape (readcharfun);
-	return (make_char (c));
+	return make_char (c);
       }
 
     case '\"':
@@ -2501,7 +2495,7 @@
 	   return zero instead.  This is for doc strings
 	   that we are really going to find in lib-src/DOC.nn.nn  */
 	if (purify_flag && NILP (Vdoc_file_name) && cancel)
-	  return (Qzero);
+	  return Qzero;
 
 	Lstream_flush (XLSTREAM (Vread_buffer_stream));
 #if 0 /* FSFmacs defun hack */
@@ -2523,7 +2517,7 @@
 	/* Ignore whitespace and control characters */
 	if (c <= 040)
 	  goto retry;
-	return (read_atom (readcharfun, c, 0));
+	return read_atom (readcharfun, c, 0);
       }
     }
 }
@@ -2543,7 +2537,7 @@
 {
   int state = 0;
   CONST Bufbyte *ucp = (CONST Bufbyte *) cp;
-  
+
   if (*ucp == '+' || *ucp == '-')
     ucp++;
 
@@ -2605,7 +2599,7 @@
       ch = reader_nextchar (readcharfun);
 
       if (ch == terminator)
-	return (state);
+	return state;
       else
 	unreadchar (readcharfun, ch);
 #ifdef FEATUREP_SYNTAX
@@ -2619,7 +2613,7 @@
 }
 
 
-struct read_list_state 
+struct read_list_state
   {
     Lisp_Object head;
     Lisp_Object tail;
@@ -2640,7 +2634,7 @@
     {
       Lisp_Object tem = elt;
       Emchar ch;
-      
+
       elt = XCDR (elt);
       free_cons (XCONS (tem));
       tem = Qnil;
@@ -2708,7 +2702,7 @@
   s->tail = elt;
  done:
   s->length++;
-  return (s);
+  return s;
 }
 
 
@@ -2809,9 +2803,9 @@
 	    }
 	}
     }
-	  
+
   UNGCPRO;
-  return (s.head);
+  return s.head;
 }
 
 static Lisp_Object
@@ -2831,7 +2825,7 @@
   s.length = 0;
   s.allow_dotted_lists = 0;
   GCPRO2 (s.head, s.tail);
-  
+
   (void) sequence_reader (readcharfun,
                           terminator,
                           &s,
@@ -2847,7 +2841,7 @@
 #endif
     s.head = make_vector (len, Qnil);
 
-  for (i = 0, p = &(vector_data (XVECTOR (s.head))[0]);
+  for (i = 0, p = &(XVECTOR_DATA (s.head)[0]);
        i < len;
        i++, p++)
   {
@@ -2862,13 +2856,13 @@
     tem = otem->cdr;
     free_cons (otem);
   }
-  return (s.head);
+  return s.head;
 }
 
 static Lisp_Object
 read_compiled_function (Lisp_Object readcharfun, Emchar terminator)
 {
-  /* Accept compiled functions at read-time so that we don't 
+  /* Accept compiled functions at read-time so that we don't
      have to build them at load-time. */
   Lisp_Object stuff;
   Lisp_Object make_byte_code_args[COMPILED_DOMAIN + 1];
@@ -2941,7 +2935,7 @@
    handle things. */
 #if 0
 #ifndef WINDOWSNT
-  /* When Emacs is invoked over network shares on NT, PATH_LOADSEARCH is 
+  /* When Emacs is invoked over network shares on NT, PATH_LOADSEARCH is
      almost never correct, thereby causing a warning to be printed out that 
      confuses users.  Since PATH_LOADSEARCH is always overriden by the
      EMACSLOADPATH environment variable below, disable the warning on NT.  */
--- a/src/lstream.c	Mon Aug 13 09:47:55 2007 +0200
+++ b/src/lstream.c	Mon Aug 13 09:49:09 2007 +0200
@@ -160,8 +160,8 @@
   Lstream *lstr = XLSTREAM (obj);
   char buf[200];
 
-  sprintf (buf, "#<INTERNAL EMACS BUG (%s lstream) 0x%x>",
-	   lstr->imp->name, (EMACS_INT) lstr);
+  sprintf (buf, "#<INTERNAL EMACS BUG (%s lstream) 0x%p>",
+	   lstr->imp->name, lstr);
   write_c_string (buf, printcharfun);
 }
 
--- a/src/m/7300.h	Mon Aug 13 09:47:55 2007 +0200
+++ b/src/m/7300.h	Mon Aug 13 09:49:09 2007 +0200
@@ -25,10 +25,6 @@
    operating system this machine is likely to run.
    USUAL-OPSYS="usg5-2-2"  */
 
-/* Supposedly now these machines have flexnames.
-
-/* # define SHORTNAMES */
-
 /* XINT must explicitly sign-extend */
 
 #define EXPLICIT_SIGN_EXTEND
--- a/src/m/altos.h	Mon Aug 13 09:47:55 2007 +0200
+++ b/src/m/altos.h	Mon Aug 13 09:49:09 2007 +0200
@@ -44,7 +44,6 @@
 #undef TERMINFO
 
 #undef CANNOT_DUMP
-#undef SHORTNAMES
 #define TERMCAP
 
 #define LIBS_TERMCAP "-ltermlib"
--- a/src/m/iris4d.h	Mon Aug 13 09:47:55 2007 +0200
+++ b/src/m/iris4d.h	Mon Aug 13 09:49:09 2007 +0200
@@ -118,7 +118,7 @@
 
 #undef LIBS_MACHINE
 /* -lsun in case using Yellow Pages for passwords.  */
-#define LIBS_MACHINE "-lmld"
+/* #define LIBS_MACHINE "-lmld" */ /* mrb */
 #define LIBS_DEBUG
 
 /* Define this if you have a fairly recent system,
--- a/src/m/iris5d.h	Mon Aug 13 09:47:55 2007 +0200
+++ b/src/m/iris5d.h	Mon Aug 13 09:49:09 2007 +0200
@@ -117,7 +117,7 @@
 
 #undef LIBS_MACHINE
 /* -lsun in case using Yellow Pages for passwords.  */
-#define LIBS_MACHINE "-lsun -lmld"
+/* #define LIBS_MACHINE "-lsun -lmld" */ /* mrb */
 #define LIBS_DEBUG
 
 /* Define this if you have a fairly recent system,
--- a/src/m/mips-siemens.h	Mon Aug 13 09:47:55 2007 +0200
+++ b/src/m/mips-siemens.h	Mon Aug 13 09:49:09 2007 +0200
@@ -129,7 +129,8 @@
 
 /* Alter some of the options used when linking.  */
 
-#define LIBS_MACHINE "-lmld"
+#undef LIBS_MACHINE
+/* #define LIBS_MACHINE "-lmld" */ /* mrb */
 #define START_FILES "pre-crt0.o /usr/ccs/lib/crt1.o /usr/ccs/lib/crti.o /usr/ccs/lib/values-Xt.o"
 
 #ifdef LIB_STANDARD
--- a/src/m/mips.h	Mon Aug 13 09:47:55 2007 +0200
+++ b/src/m/mips.h	Mon Aug 13 09:49:09 2007 +0200
@@ -128,7 +128,8 @@
   
 #else /* not BSD */
 
-#define LIBS_MACHINE "-lmld"
+#undef LIBS_MACHINE
+/* #define LIBS_MACHINE "-lmld" */ /* mrb */
 #define LD_SWITCH_MACHINE "-D 800000 -g3"
 #define START_FILES "pre-crt0.o /usr/lib/crt1.o"
 #define LIB_STANDARD "-lbsd -lc /usr/lib/crtn.o"
--- a/src/m/mips4.h	Mon Aug 13 09:47:55 2007 +0200
+++ b/src/m/mips4.h	Mon Aug 13 09:49:09 2007 +0200
@@ -42,7 +42,7 @@
    The -L is used to force second -lc to find the sysv version
    of libc.a, which is needed because the BSD libc.a
    doesn't have _ctype.  */
-#define LIB_STANDARD "-lmld -lc /lib/crtn.o -L/usr/lib -lc"
+#define LIB_STANDARD "-lc /lib/crtn.o -L/usr/lib -lc"
 
 
 #define COFF
--- a/src/m/news-risc.h	Mon Aug 13 09:47:55 2007 +0200
+++ b/src/m/news-risc.h	Mon Aug 13 09:49:09 2007 +0200
@@ -8,7 +8,8 @@
 
 /* NEWS-OS 5.0.2 */
 
-#define LIBS_MACHINE "-lmld"
+#undef LIBS_MACHINE
+/* #define LIBS_MACHINE "-lmld" */ /* mrb */
 
 #ifdef __GNUC__
 #define C_DEBUG_SWITCH "-g"
@@ -45,7 +46,7 @@
 /* Don't use the definitions in m/mips.h.  */
 #undef LINKER
 #undef LIBS_MACHINE
-#define LIBS_MACHINE "-lmld"
+/* #define LIBS_MACHINE "-lmld" */ /* mrb */
 
 #undef KERNEL_FILE
 #define KERNEL_FILE "/vmunix"
--- a/src/m/nu.h	Mon Aug 13 09:47:55 2007 +0200
+++ b/src/m/nu.h	Mon Aug 13 09:49:09 2007 +0200
@@ -53,10 +53,6 @@
 
 #define SWITCH_ENUM_BUG 1
 
-/* The NU machine has a compiler that can handle long names.  */
-
-#undef SHORTNAMES
-
 /* Specify alignment requirement for start of text and data sections
    in the executable file.  */
 
--- a/src/m/sgi-challenge.h	Mon Aug 13 09:47:55 2007 +0200
+++ b/src/m/sgi-challenge.h	Mon Aug 13 09:49:09 2007 +0200
@@ -128,7 +128,7 @@
 
 #undef LIBS_MACHINE
 /* -lsun in case using Yellow Pages for passwords.  */
-#define LIBS_MACHINE "-lsun -lmld"
+/* #define LIBS_MACHINE "-lsun -lmld" */ /* mrb */
 #define LIBS_DEBUG
 
 /* Define this if you have a fairly recent system,
--- a/src/macros.c	Mon Aug 13 09:47:55 2007 +0200
+++ b/src/macros.c	Mon Aug 13 09:49:09 2007 +0200
@@ -118,8 +118,8 @@
       int size = con->kbd_macro_end;
       con->last_kbd_macro = make_vector (size, Qnil);
       for (i = 0; i < con->kbd_macro_end; i++)
-	vector_data (XVECTOR (con->last_kbd_macro)) [i] =
-	  vector_data (XVECTOR (con->kbd_macro_builder)) [i];
+	XVECTOR_DATA (con->last_kbd_macro) [i] =
+	  XVECTOR_DATA (con->kbd_macro_builder) [i];
       con->defining_kbd_macro = Qnil;
       MARK_MODELINE_CHANGED;
       message ("Keyboard macro defined");
@@ -144,18 +144,17 @@
 {
   struct console *con = event_console_or_selected (event);
 
-  if (con->kbd_macro_ptr == XVECTOR (con->kbd_macro_builder)->size)
+  if (con->kbd_macro_ptr == XVECTOR_LENGTH (con->kbd_macro_builder))
     {
       int i;
-      int old_size = XVECTOR (con->kbd_macro_builder)->size;
+      int old_size = XVECTOR_LENGTH (con->kbd_macro_builder);
       int new_size = old_size * 2;
       Lisp_Object new = make_vector (new_size, Qnil);
       for (i = 0; i < old_size; i++)
-	vector_data (XVECTOR (new)) [i] =
-	  vector_data (XVECTOR (con->kbd_macro_builder)) [i];
+	XVECTOR_DATA (new) [i] = XVECTOR_DATA (con->kbd_macro_builder) [i];
       con->kbd_macro_builder = new;
     }
-  vector_data (XVECTOR (con->kbd_macro_builder)) [con->kbd_macro_ptr++] =
+  XVECTOR_DATA (con->kbd_macro_builder) [con->kbd_macro_ptr++] =
     Fcopy_event (event, Qnil);
 }
 
--- a/src/md5.c	Mon Aug 13 09:47:55 2007 +0200
+++ b/src/md5.c	Mon Aug 13 09:49:09 2007 +0200
@@ -143,10 +143,10 @@
 void
 MD5Update (MD5_CTX *context, CONST unsigned char *input, unsigned int inputLen)
 {
-  unsigned int i, indecks, partLen;
+  unsigned int i, indice, partLen;
 
   /* Compute number of bytes mod 64 */
-  indecks = (unsigned int)((context->count[0] >> 3) & 0x3F);
+  indice = (unsigned int)((context->count[0] >> 3) & 0x3F);
 
   /* Update number of bits */
   if ((context->count[0] += ((UINT4)inputLen << 3))
@@ -154,25 +154,25 @@
     context->count[1]++;
   context->count[1] += ((UINT4)inputLen >> 29);
 
-  partLen = 64 - indecks;
+  partLen = 64 - indice;
 
   /* Transform as many times as possible. */
   if (inputLen >= partLen)
     {
-      MD5_memcpy ((POINTER)&context->buffer[indecks], (CONST POINTER)input,
+      MD5_memcpy ((POINTER)&context->buffer[indice], (CONST POINTER)input,
 		  partLen);
       MD5Transform (context->state, context->buffer);
 
       for (i = partLen; i + 63 < inputLen; i += 64)
 	MD5Transform (context->state, &input[i]);
 
-      indecks = 0;
+      indice = 0;
     }
   else
     i = 0;
 
   /* Buffer remaining input */
-  MD5_memcpy ((POINTER)&context->buffer[indecks], (CONST POINTER)&input[i],
+  MD5_memcpy ((POINTER)&context->buffer[indice], (CONST POINTER)&input[i],
 	      inputLen-i);
 }
 
@@ -182,15 +182,15 @@
 MD5Final (unsigned char digest[16], MD5_CTX *context)
 {
   unsigned char bits[8];
-  unsigned int indecks, padLen;
+  unsigned int indice, padLen;
 
   /* Save number of bits */
   Encode (bits, context->count, 8);
 
   /* Pad out to 56 mod 64.
 */
-  indecks = (unsigned int)((context->count[0] >> 3) & 0x3f);
-  padLen = (indecks < 56) ? (56 - indecks) : (120 - indecks);
+  indice = (unsigned int)((context->count[0] >> 3) & 0x3f);
+  padLen = (indice < 56) ? (56 - indice) : (120 - indice);
   MD5Update (context, PADDING, padLen);
 
   /* Append length (before padding) */
@@ -364,7 +364,7 @@
    will get sent over the wire in an external form that is different
    from their internal representation, and thus their MD5 hash would
    be different. */
-     
+
 DEFUN ("md5", Fmd5, 1, 3, 0, /*
 Return the MD5 (a secure message digest algorithm) of an object.
 OBJECT is either a string or a buffer.
@@ -377,7 +377,7 @@
   unsigned char digest[16];
   unsigned char thehash[32];
   int i;
-  
+
   MDInit (&context);
 
   if (NILP (object))
--- a/src/menubar-x.c	Mon Aug 13 09:47:55 2007 +0200
+++ b/src/menubar-x.c	Mon Aug 13 09:49:09 2007 +0200
@@ -144,7 +144,7 @@
       if (STRINGP (XCAR (desc)))
 	{
 	  Lisp_Object key, val;
-	  Lisp_Object include_p, hook_fn = Qnil, config_tag = Qnil;
+	  Lisp_Object include_p = Qnil, hook_fn = Qnil, config_tag = Qnil;
 	  int included_spec = 0;
 	  wv->type = CASCADE_TYPE;
 	  wv->enabled = 1;
--- a/src/minibuf.c	Mon Aug 13 09:47:55 2007 +0200
+++ b/src/minibuf.c	Mon Aug 13 09:49:09 2007 +0200
@@ -127,7 +127,7 @@
   else
     {
       CHECK_STRING (preprompt);
-  
+
       Vminibuf_preprompt = LISP_GETTEXT (preprompt);
     }
   return Qnil;
@@ -152,7 +152,7 @@
 			  noseeum_cons (make_int (minibuf_level), Qnil)));
   Vminibuf_prompt = LISP_GETTEXT (prompt);
 
-  /* NOTE: Here (or somewhere around here), in FSFmacs 19.30, 
+  /* NOTE: Here (or somewhere around here), in FSFmacs 19.30,
      choose_minibuf_frame() is called.  This is the only
      place in FSFmacs that it's called any more -- there's
      also a call in xterm.c, but commented out, and 19.28
@@ -173,7 +173,7 @@
   enough, because minibuf_window isn't really exported to Lisp.
 
   The comment above choose_minibuf_frame() reads:
-  
+
   Put minibuf on currently selected frame's minibuffer.
   We do this whenever the user starts a new minibuffer
   or when a minibuffer exits.  */
@@ -181,13 +181,13 @@
   minibuf_window = FRAME_MINIBUF_WINDOW (selected_frame ());
 
   run_hook (Qminibuffer_setup_hook);
-    
+
   minibuf_level++;
   clear_echo_area (selected_frame (), Qnil, 0);
 
   val = call_command_loop (Qt);
 
-  return (unbind_to (speccount, val));
+  return unbind_to (speccount, val);
 }
 
 
@@ -260,10 +260,10 @@
 	  if (STRINGP (re)
 	      && (fast_string_match (re, nonreloc, reloc, offset,
 				     length, 0, ERROR_ME, 0) < 0))
-	    return (1);
+	    return 1;
 	}
     }
-  return (0);
+  return 0;
 }
 
 
@@ -273,8 +273,8 @@
                      Lisp_Object pred, Lisp_Object completion)
 {
   if (regexp_ignore_completion_p (0, completion_string, 0, -1))
-    return (1);
-  
+    return 1;
+
   /* Ignore this element if there is a predicate
      and the predicate doesn't like it. */
   if (!NILP (pred))
@@ -285,9 +285,9 @@
     else
       tem = call1 (pred, completion);
     if (NILP (tem))
-      return (1);
+      return 1;
   }
-  return (0);
+  return 0;
 }
 
 
@@ -320,8 +320,8 @@
   Charcount bestmatchsize = 0;
   int list;
   int indice = 0;
-  int obsize = 0;
   int matchcount = 0;
+  int obsize;
   Lisp_Object bucket;
   Charcount slength, blength;
 
@@ -350,8 +350,13 @@
   tail = alist;
   if (!list)
     {
-      obsize = vector_length (XVECTOR (alist));
-      bucket = vector_data (XVECTOR (alist))[indice];
+      obsize = XVECTOR_LENGTH (alist);
+      bucket = XVECTOR_DATA (alist)[indice];
+    }
+  else /* warning suppression */
+    {
+      obsize = 0;
+      bucket = Qnil;
     }
 
   while (1)
@@ -392,7 +397,7 @@
 	    break;
 	  else
 	    {
-	      bucket = vector_data (XVECTOR (alist))[indice];
+	      bucket = XVECTOR_DATA (alist)[indice];
 	      continue;
 	    }
 	}
@@ -458,7 +463,7 @@
 					  XSTRING_DATA (string),
 					  slength, 0)
 			   && 0 <= scmp_1 (XSTRING_DATA (bestmatch),
-					   XSTRING_DATA (string), 
+					   XSTRING_DATA (string),
 					   slength, 0)))
                       {
 			bestmatch = eltstring;
@@ -519,7 +524,7 @@
   Lisp_Object allmatches;
   int list;
   int indice = 0;
-  int obsize = 0;
+  int obsize;
   Lisp_Object bucket;
   Charcount slength;
 
@@ -547,8 +552,13 @@
   tail = alist;
   if (!list)
     {
-      obsize = vector_length (XVECTOR (alist));
-      bucket = vector_data (XVECTOR (alist))[indice];
+      obsize = XVECTOR_LENGTH (alist);
+      bucket = XVECTOR_DATA (alist)[indice];
+    }
+  else /* warning suppression */
+    {
+      obsize = 0;
+      bucket = Qnil;
     }
 
   while (1)
@@ -584,14 +594,14 @@
 	    break;
 	  else
 	    {
-	      bucket = vector_data (XVECTOR (alist))[indice];
+	      bucket = XVECTOR_DATA (alist)[indice];
 	      continue;
 	    }
 	}
 
       /* Is this element a possible completion? */
 
-      if (STRINGP (eltstring) 
+      if (STRINGP (eltstring)
           && (slength <= string_char_length (XSTRING (eltstring)))
 	  /* Reject alternatives that start with space
 	     unless the input starts with space.  */
@@ -629,7 +639,7 @@
 */
 	 ())
 {
-  return (Fcopy_sequence (Vminibuf_prompt));
+  return Fcopy_sequence (Vminibuf_prompt);
 }
 
 xxDEFUN ("minibuffer-prompt-width", Fminibuffer_prompt_width, 0, 0, 0, /*
@@ -637,7 +647,7 @@
 */
 	 ())
 {
-  return (make_int (minibuf_prompt_width));
+  return make_int (minibuf_prompt_width);
 }
 #endif /* 0 */
 
@@ -658,7 +668,7 @@
       Lisp_Object frame;
 
       XSETFRAME (frame, f);
-      return call4 (Qclear_message, label, frame, from_print ? Qt : Qnil, 
+      return call4 (Qclear_message, label, frame, from_print ? Qt : Qnil,
 		    no_restore ? Qt : Qnil);
     }
   else
@@ -698,9 +708,9 @@
      may be valid.  */
   if (length == 0)
     return;
-  
+
   fixup_internal_substring (nonreloc, reloc, offset, &length);
-  
+
   /* also check it here, in case the string was really blank. */
   if (length == 0)
     return;
@@ -715,10 +725,10 @@
 	    nonreloc = XSTRING_DATA (reloc);
 	  obj = make_string (nonreloc + offset, length);
 	}
-      
+
       XSETFRAME (frame, f);
       GCPRO1 (obj);
-      call4 (Qappend_message, label, obj, frame, 
+      call4 (Qappend_message, label, obj, frame,
 	     EQ (label, Qprint) ? Qt : Qnil);
       UNGCPRO;
     }
@@ -748,7 +758,7 @@
      is not empty.  No need to call Lisp code. (Anyway, this function
      is called from redisplay.) */
   struct buffer *echo_buffer = XBUFFER (Vecho_area_buffer);
-  return (BUF_BEGV (echo_buffer) != BUF_ZV (echo_buffer));
+  return BUF_BEGV (echo_buffer) != BUF_ZV (echo_buffer);
 }
 
 Lisp_Object
@@ -760,7 +770,7 @@
       Lisp_Object frame;
 
       XSETFRAME (frame, f);
-      return (call1 (Qcurrent_message_label, frame));
+      return call1 (Qcurrent_message_label, frame);
     }
   else
     return stdout_needs_newline ? Qmessage : Qnil;
@@ -928,7 +938,7 @@
   /* Added by Jareth Hein (jhod@po.iijnet.or.jp) for input system support */
   staticpro (&Vminibuf_preprompt);
   Vminibuf_preprompt = Qnil;
-								
+
   DEFVAR_LISP ("minibuffer-setup-hook", &Vminibuffer_setup_hook /*
 Normal hook run just after entry to minibuffer.
 */ );
--- a/src/msdos.c	Mon Aug 13 09:47:55 2007 +0200
+++ b/src/msdos.c	Mon Aug 13 09:49:09 2007 +0200
@@ -49,14 +49,14 @@
 {
   struct time t;
   unsigned long s;
-  
+
   gettime (&t);
   s = t.ti_min;
   s *= 60;
   s += t.ti_sec;
   s *= 1000;
   s += t.ti_hund * 10;
-  
+
   return s;
 }
 
@@ -258,7 +258,7 @@
 dos_direct_output (int y, int x, char *buf, int len)
 {
   int t = (int) ScreenPrimary + 2 * (x + y * screen_size_X);
-  
+
   while (--len >= 0) {
     dosmemput (buf++, 1, t);
     t += 2;
@@ -324,14 +324,14 @@
 mouse_off_maybe (void)
 {
   int x, y;
-  
+
   if (!mouse_visible)
     return;
-  
+
   mouse_get_xy (&x, &y);
   if (y != new_pos_Y || x < new_pos_X)
     return;
-  
+
   mouse_off ();
 }
 
@@ -378,9 +378,9 @@
   unsigned char *buf, *bp;
 
   if (len == 0) return;
-  
+
   buf = bp = alloca (len * 2);
-  
+
   while (--l >= 0)
     {
       newface = FAST_GLYPH_FACE (*str);
@@ -389,14 +389,14 @@
       ch = FAST_GLYPH_CHAR (*str);
       *bp++ = (unsigned char)ch;
       *bp++ = ScreenAttrib;
-      
+
       if (termscript)
 	fputc (ch, termscript);
       str++;
     }
 
   mouse_off_maybe ();
-  dosmemput (buf, 2 * len, 
+  dosmemput (buf, 2 * len,
 	     (int)ScreenPrimary + 2 * (new_pos_X + screen_size_X * new_pos_Y));
   new_pos_X += len;
 }
@@ -412,7 +412,7 @@
     fprintf (termscript, "<CLR:EOL>");
   i = (j = screen_size_X - new_pos_X) * 2;
   spaces = sp = alloca (i);
-  
+
   while (--j >= 0)
     {
       *sp++ = ' ';
@@ -420,7 +420,7 @@
     }
 
   mouse_off_maybe ();
-  dosmemput (spaces, i, 
+  dosmemput (spaces, i,
 	     (int)ScreenPrimary + 2 * (new_pos_X + screen_size_X * new_pos_Y));
 }
 
@@ -527,14 +527,14 @@
   screen_size_X = ScreenCols ();
   screen_size_Y = ScreenRows ();
   screen_size = screen_size_X * screen_size_Y;
-  
+
   new_pos_X = new_pos_Y = 0;
   current_pos_X = current_pos_Y = -1;
 
   if (term_setup_done)
     return;
   term_setup_done = 1;
-  
+
   startup_screen_size_X = screen_size_X;
   startup_screen_size_Y = screen_size_Y;
 
@@ -560,7 +560,7 @@
 
   if (!term_setup_done)
     return;
-  
+
   ScreenUpdate (startup_screen_buffer);
   ScreenSetCursor (startup_pos_Y, startup_pos_X);
   xfree (startup_screen_buffer);
@@ -653,7 +653,7 @@
 
   if (getenv ("EMACSTEST"))
     termscript = fopen (getenv ("EMACSTEST"), "wt");
-  
+
 #ifndef HAVE_X_WINDOWS
   if (!internal_terminal || inhibit_window_system)
     {
@@ -662,7 +662,7 @@
     }
 
   Vwindow_system = intern ("pc");
- 
+
   bzero (&the_only_x_display, sizeof the_only_x_display);
   the_only_x_display.background_pixel = 7; /* White */
   the_only_x_display.foreground_pixel = 0; /* Black */
@@ -706,7 +706,7 @@
   return 1;
 #else
   return 0;
-#endif  
+#endif
 }
 
 
@@ -784,7 +784,7 @@
   keyboard = keyboard_layout_list[0].keyboard_map;
   keyboard_map_all = always;
   dos_keyboard_layout = 1;
-  
+
   for (i = 0; i < (sizeof (keyboard_layout_list)/sizeof (struct keyboard_layout_list)); i++)
     if (code == keyboard_layout_list[i].country_code)
       {
@@ -874,7 +874,7 @@
   Map | 23,			/* 'o' */
   Map | 24,			/* 'p' */
   Map | 25,			/* '[' */
-  Map | 26,			/* ']' */ 
+  Map | 26,			/* ']' */
   ModFct | 0x0d,		/* Return */
   Ignore,			/* Ctrl */
   Map | 30,			/* 'a' */
@@ -1051,21 +1051,21 @@
   union REGS regs;
   int mask;
   int modifiers = 0;
-  
+
   /* Calculate modifier bits */
   regs.h.ah = extended_kbd ? 0x12 : 0x02;
   int86 (0x16, &regs, &regs);
 
   if (!extended_kbd)
     {
-      mask = regs.h.al & (SHIFT_P | CTRL_P | ALT_P | 
+      mask = regs.h.al & (SHIFT_P | CTRL_P | ALT_P |
 			  SCRLOCK_P | NUMLOCK_P | CAPSLOCK_P);
     }
   else
     {
       mask = regs.h.al & (SHIFT_P |
 			  SCRLOCK_P | NUMLOCK_P | CAPSLOCK_P);
-  
+
       /* Do not break international keyboard support.   */
       /* When Keyb.Com is loaded, the right Alt key is  */
       /* used for accessing characters like { and } 	  */
@@ -1086,7 +1086,7 @@
 	      modifiers |= super_modifier;
 	    }
 	}
-      
+
       if (regs.h.ah & 1)		/* Left CTRL pressed
 	mask |= CTRL_P;
 
@@ -1131,7 +1131,7 @@
 */
        ())
 {
-  Lisp_Object *keys = XVECTOR (recent_doskeys)->contents;
+  Lisp_Object *keys = XVECTOR_DATA (recent_doskeys);
   Lisp_Object val;
 
   if (total_doskeys < NUM_RECENT_DOSKEYS)
@@ -1140,10 +1140,10 @@
     {
       val = Fvector (NUM_RECENT_DOSKEYS, keys);
       bcopy (keys + recent_doskeys_index,
-	     XVECTOR (val)->contents,
+	     XVECTOR_DATA (val),
 	     (NUM_RECENT_DOSKEYS - recent_doskeys_index) * sizeof (Lisp_Object));
       bcopy (keys,
-	     XVECTOR (val)->contents + NUM_RECENT_DOSKEYS - recent_doskeys_index,
+	     XVECTOR_DATA (val) + NUM_RECENT_DOSKEYS - recent_doskeys_index,
 	     recent_doskeys_index * sizeof (Lisp_Object));
       return val;
     }
@@ -1155,12 +1155,12 @@
 {
   struct input_event event;
   union REGS regs;
-  
+
 #ifndef HAVE_X_WINDOWS
   SCREEN_SET_CURSOR ();
   if (!mouse_visible) mouse_on ();
 #endif
-    
+
   /* The following condition is equivalent to `kbhit ()', except that
      it uses the bios to do its job.  This pleases DESQview/X.  */
   while ((regs.h.ah = extended_kbd ? 0x11 : 0x01),
@@ -1178,17 +1178,15 @@
       sc = regs.h.ah;
 
       total_doskeys += 2;
-      XVECTOR (recent_doskeys)->contents[recent_doskeys_index++]
-	= make_int (c);
+      XVECTOR_DATA (recent_doskeys)[recent_doskeys_index++] = make_int (c);
       if (recent_doskeys_index == NUM_RECENT_DOSKEYS)
 	recent_doskeys_index = 0;
-      XVECTOR (recent_doskeys)->contents[recent_doskeys_index++]
-	= make_int (sc);
+      XVECTOR_DATA (recent_doskeys)[recent_doskeys_index++] = make_int (sc);
       if (recent_doskeys_index == NUM_RECENT_DOSKEYS)
 	recent_doskeys_index = 0;
 
       modifiers = dos_get_modifiers (&mask);
-      
+
 #ifndef HAVE_X_WINDOWS
       if (!NILP (Vdos_display_scancodes))
 	{
@@ -1224,7 +1222,7 @@
 	  if ((code = ibmpc_translate_map[sc]) == Ignore)
 	    continue;
 	}
-      
+
       if (c == 0)
 	{
 	  if (code & Alt)
@@ -1234,22 +1232,22 @@
 	  if (code & Shift)
 	    modifiers |= shift_modifier;
 	}
-      
+
       switch (code & 0xf000)
 	{
 	case ModFct:
 	  if (c && !(mask & (SHIFT_P | ALT_P | CTRL_P | HYPER_P | SUPER_P)))
 	    return c;
 	  c = 0;		/* Special */
-	  
+
 	case FctKey:
 	  if (c != 0)
 	    return c;
-	    
+
 	case Special:
 	  code |= 0xff00;
 	  break;
-	  
+
 	case Normal:
 	  if (sc == 0)
 	    {
@@ -1264,7 +1262,7 @@
 	      code = c;
 	      break;
 	    }
-	  
+
 	case Map:
 	  if (c && !(mask & ALT_P) && !((mask & SHIFT_P) && (mask & CTRL_P)))
 	    if (!keyboard_map_all)
@@ -1273,7 +1271,7 @@
 	  code &= 0xff;
 	  if (mask & ALT_P && code <= 10 && code > 0 && dos_keypad_mode & 0x200)
 	    mask |= SHIFT_P;	/* ALT-1 => M-! etc. */
-	  
+
 	  if (mask & SHIFT_P)
 	    {
 	      code = keyboard->shifted[code];
@@ -1296,7 +1294,7 @@
 	      kp_mode = dos_keypad_mode & 0x03;
 	    else
 	      kp_mode = (dos_keypad_mode >> 4) & 0x03;
-	  
+
 	  switch (kp_mode)
 	    {
 	    case 0:
@@ -1312,13 +1310,13 @@
 	      code = keypad_translate_map[code].meta_code;
 	      modifiers = meta_modifier;
 	      break;
-	      
+
 	    case 3:
 	      code = 0xff00 | keypad_translate_map[code].editkey_code;
 	      break;
 	    }
 	  break;
-	  
+
 	case Grey:
 	  code &= 0xff;
 	  kp_mode = ((mask & (NUMLOCK_P|CTRL_P|SHIFT_P|ALT_P)) == NUMLOCK_P) ? 0x04 : 0x40;
@@ -1328,11 +1326,11 @@
 	    code = grey_key_translate_map[code].char_code;
 	  break;
 	}
-      
+
     make_event:
       if (code == 0)
 	continue;
-      
+
       if (code >= 0x100)
 	event.kind = non_ascii_keystroke;
       else
@@ -1727,7 +1725,7 @@
 			state[statecount].x
 			  = state[i].x + state[i].menu->width + 2;
 			state[statecount].y = y;
-			statecount++;			  
+			statecount++;
 		      }
 		  }
 	      }
@@ -2029,7 +2027,7 @@
 {
   union REGS inregs, outregs;
   static int first_time = 1;
-  
+
   break_stat = getcbrk ();
   setcbrk (0);
   install_ctrl_break_check ();
@@ -2039,7 +2037,7 @@
       inregs.h.ah = 0xc0;
       int86 (0x15, &inregs, &outregs);
       extended_kbd = (!outregs.x.cflag) && (outregs.h.ah == 0);
-  
+
       have_mouse = 0;
 
       if (internal_terminal
@@ -2065,7 +2063,7 @@
 	    {
 	      have_mouse = 1;	/* enable mouse */
 	      mouse_visible = 0;
-	      
+
 	      if (outregs.x.bx == 3)
 		{
 		  mouse_button_count = 3;
@@ -2083,7 +2081,7 @@
 	      mouse_init ();
 	    }
 	}
-      
+
       first_time = 0;
     }
 
@@ -2187,13 +2185,13 @@
     mouse_get_xy (&x, &y);
 
   dos_ttcooked ();	/* do it here while 0 = stdin */
-  
+
   dup2 (tempin, 0);
   dup2 (tempout, 1);
   dup2 (tempout, 2);
 
   result = spawnve (P_WAIT, argv[0], argv, envv);
-  
+
   dup2 (inbak, 0);
   dup2 (outbak, 1);
   dup2 (errbak, 2);
@@ -2207,7 +2205,7 @@
       mouse_init ();
       mouse_moveto (x, y);
     }
-  
+
  done:
   chdir (oldwd);
   if (msshell)
@@ -2248,7 +2246,7 @@
 /* When time zones are set from Ms-Dos too many C-libraries are playing
    tricks with time values.  We solve this by defining our own version
    of `gettimeofday' bypassing GO32.  Our version needs to be initialized
-   once and after each call to `tzset' with TZ changed.  That is 
+   once and after each call to `tzset' with TZ changed.  That is
    accomplished by aliasing tzset to init_gettimeofday. */
 
 static struct tm time_rec;
@@ -2260,7 +2258,7 @@
     {
       struct time t;
       struct tm tm;
-      
+
       gettime (&t);
       if (t.ti_hour < time_rec.tm_hour) /* midnight wrap */
 	{
@@ -2270,14 +2268,14 @@
 	  time_rec.tm_mon = d.da_mon - 1;
 	  time_rec.tm_mday = d.da_day;
 	}
-      
+
       time_rec.tm_hour = t.ti_hour;
       time_rec.tm_min = t.ti_min;
       time_rec.tm_sec = t.ti_sec;
 
       tm = time_rec;
       tm.tm_gmtoff = dos_timezone_offset;
-      
+
       tp->tv_sec = mktime (&tm);	/* may modify tm */
       tp->tv_usec = t.ti_hund * (1000000 / 100);
     }
@@ -2313,7 +2311,7 @@
 check_timer (struct time *t)
 {
   gettime (t);
-  
+
   if (t->ti_sec == last_ti_sec)
     return;
   last_ti_sec = t->ti_sec;
@@ -2334,13 +2332,13 @@
 	  else
 	    if (min >= 60)
 	      min -= 60, hour++;
-	  
+
 	  if ((hour -= (tz / 60)) < 0)
 	    hour += 24;
 	  else
 	    hour %= 24;
 	}
-      
+
       if ((dos_country_info[0x11] & 0x01) == 0) /* 12 hour clock */
 	{
 	  hour %= 12;
@@ -2357,7 +2355,7 @@
       dos_direct_output (0, screen_size_X - 9, "        ", 8);
       dos_menubar_clock_displayed = 0;
     }
-  
+
   if (!NILP (Vdos_timer_hooks))
     run_dos_timer_hooks++;
 }
@@ -2384,7 +2382,7 @@
 
   if (nfds != 1)
     abort ();
-  
+
   /* If we are looking only for the terminal, with no timeout,
      just read it and wait -- that's more efficient.  */
   if (!timeout)
@@ -2411,7 +2409,7 @@
 	  cllast = clnow;
 	}
     }
-  
+
   FD_SET (0, rfds);
   return 1;
 }
@@ -2442,7 +2440,7 @@
       tmp += 2;	/* strip drive: KFS 1995-07-06 */
       len -= 2;
     }
-  
+
   if (len > 1 && (tmp[len - 1] == '/'))
     {
       char *tmp1 = (char *) alloca (len + 1);
@@ -2481,7 +2479,7 @@
 {
   char buffer1[200], buffer2[400];
   int i, j;
-  
+
   sprintf (buffer1, "<EMACS FATAL ERROR IN %s LINE %d>", file, line);
   for (i = j = 0; buffer1[i]; i++) {
     buffer2[j++] = buffer1[i];
--- a/src/mule-ccl.c	Mon Aug 13 09:47:55 2007 +0200
+++ b/src/mule-ccl.c	Mon Aug 13 09:49:09 2007 +0200
@@ -165,7 +165,7 @@
 	    unsigned_char_dynarr *dst, int n, int end_flag)
 {
   int code, op, rrr, cc, i, j;
-  CONST unsigned char *s, *s_end;
+  CONST unsigned char *s = NULL, *s_end = NULL;
   int   ic = ccl->ic;
   int *reg = ccl->reg;
   Lisp_Object *prog = ccl->prog;
@@ -432,8 +432,8 @@
   int i;
 
   ccl->saved_vector = val;
-  ccl->prog = XVECTOR (val)->contents;
-  ccl->size = XVECTOR (val)->size;
+  ccl->prog = XVECTOR_DATA (val);
+  ccl->size = XVECTOR_LENGTH (val);
   if (initial_ic == 0)
     ccl->ic = CCL_HEADER_MAIN;
   else
@@ -460,12 +460,12 @@
   CHECK_VECTOR (prog);
   CHECK_VECTOR (status);
 
-  if (vector_length (XVECTOR (status)) != 9)
+  if (XVECTOR_LENGTH (status) != 9)
     signal_simple_error ("Must specify values for the eight registers and IC",
 			 status);
   for (i = 0; i < 8; i++)
     {
-      Lisp_Object regval = XVECTOR (status)->contents[i];
+      Lisp_Object regval = XVECTOR_DATA (status)[i];
       if (NILP (regval))
 	intregs[i] = 0;
       else
@@ -476,7 +476,7 @@
     }
 
   {
-    Lisp_Object lic = XVECTOR (status)->contents[8];
+    Lisp_Object lic = XVECTOR_DATA (status)[8];
     if (NILP (lic))
       ic = 0;
     else
@@ -496,10 +496,10 @@
   int i;
 
   for (i = 0; i < 8; i++)
-    XVECTOR (status)->contents[i] = make_int (ccl->reg[i]);
-  XVECTOR (status)->contents[8] = make_int (ccl->ic);
+    XVECTOR_DATA (status)[i] = make_int (ccl->reg[i]);
+  XVECTOR_DATA (status)[8] = make_int (ccl->ic);
 }
-				  
+
 
 DEFUN ("execute-ccl-program", Fexecute_ccl_program, 2, 2, 0, /*
 Execute CCL-PROGRAM with registers initialized by STATUS.
@@ -614,9 +614,9 @@
       exit (1);
     }
 
-  XVECTOR (ccl_prog)->size = 0;
+  XVECTOR_LENGTH (ccl_prog) = 0;
   while (fscanf (progf, "%x", &i) == 1)
-    XVECTOR (ccl_prog)->contents[XVECTOR (ccl_prog)->size++] = make_int (i);
+    XVECTOR_DATA (ccl_prog)[XVECTOR_LENGTH (ccl_prog)++] = make_int (i);
   set_ccl_program (&ccl, ccl_prog, 0, 0, 0);
 
   outbuf = Dynarr_new (unsigned char);
--- a/src/mule-coding.c	Mon Aug 13 09:47:55 2007 +0200
+++ b/src/mule-coding.c	Mon Aug 13 09:49:09 2007 +0200
@@ -479,7 +479,7 @@
        (coding_system))
 {
   coding_system = Fget_coding_system (coding_system);
-  return (XCODING_SYSTEM_NAME (coding_system));
+  return XCODING_SYSTEM_NAME (coding_system);
 }
 
 static struct Lisp_Coding_System *
@@ -2933,13 +2933,12 @@
 
 DEFUN ("decode-big5-char", Fdecode_big5_char, 1, 1, 0, /*
 Decode a Big5 character CODE of BIG5 coding-system.
-CODE is the character code in BIG5.
+CODE is the character code in BIG5, a cons of two integers.
 Return the corresponding character.
 */
        (code))
 {
   unsigned char c1, c2, b1, b2;
-  Lisp_Object charset;
  
   CHECK_CONS (code);
   CHECK_INT (XCAR (code));
@@ -2949,7 +2948,10 @@
   if (BYTE_BIG5_TWO_BYTE_1_P (b1) &&
       BYTE_BIG5_TWO_BYTE_2_P (b2))
     {
-      DECODE_BIG5 (b1, b2, XCHARSET_LEADING_BYTE (charset), c1, c2);
+      int leading_byte;
+      Lisp_Object charset;
+      DECODE_BIG5 (b1, b2, leading_byte, c1, c2);
+      charset = CHARSET_BY_LEADING_BYTE (leading_byte);
       return make_char (MAKE_CHAR (charset, c1 & 0x7F, c2 & 0x7F));
     }
   else
@@ -3436,19 +3438,15 @@
 	if (iso->esc >= ISO_ESC_2_8 &&
 	    iso->esc <= ISO_ESC_2_15)
 	  {
-	    if (iso->esc >= ISO_ESC_2_12)
-	      type = CHARSET_TYPE_96;
-	    else
-	      type = CHARSET_TYPE_94;
+	    type = ((iso->esc >= ISO_ESC_2_12) ?
+		    CHARSET_TYPE_96 : CHARSET_TYPE_94);
 	    reg = (iso->esc - ISO_ESC_2_8) & 3;
 	  }
 	else if (iso->esc >= ISO_ESC_2_4_8 &&
 		 iso->esc <= ISO_ESC_2_4_15)
 	  {
-	    if (iso->esc >= ISO_ESC_2_4_12)
-	      type = CHARSET_TYPE_96X96;
-	    else
-	      type = CHARSET_TYPE_94X94;
+	    type = ((iso->esc >= ISO_ESC_2_4_12) ?
+		    CHARSET_TYPE_96X96 : CHARSET_TYPE_94X94);
 	    reg = (iso->esc - ISO_ESC_2_4_8) & 3;
 	  }
 	
@@ -4066,8 +4064,8 @@
 
   /* flags for handling composite chars.  We do a little switcharoo
      on the source while we're outputting the composite char. */
-  unsigned int saved_n;
-  CONST unsigned char *saved_src;
+  unsigned int saved_n = 0;
+  CONST unsigned char *saved_src = NULL;
   int in_composite = 0;
 
   CODING_STREAM_DECOMPOSE (str, flags, ch);
--- a/src/mule-wnnfns.c	Mon Aug 13 09:47:55 2007 +0200
+++ b/src/mule-wnnfns.c	Mon Aug 13 09:49:09 2007 +0200
@@ -587,7 +587,7 @@
 */
      (bunNo, dai))
 {
-  int		no, offset;
+  int	no, offset;
   int	snum;
   int	uniq_level;
   CHECK_INT (bunNo);
@@ -597,15 +597,16 @@
   if (EQ(Vwnn_uniq_level, Qwnn_no_uniq)) uniq_level = WNN_NO_UNIQ;
   else if (EQ(Vwnn_uniq_level, Qwnn_uniq)) uniq_level = WNN_UNIQ;
   else uniq_level = WNN_UNIQ_KNJ;
-  if (EQ(dai, Qnil))
+  if (NILP (dai))
     {
-      if (offset = jl_zenkouho (wnnfns_buf[snum],no,WNN_USE_MAE, uniq_level) < 0)
+      if ((offset = jl_zenkouho (wnnfns_buf[snum],no,WNN_USE_MAE,
+				 uniq_level)) < 0)
 	return Qnil;
     }
   else
     {
-      if (offset = jl_zenkouho_dai (wnnfns_buf[snum], no, dai_end (no, snum),
-				    WNN_USE_MAE, uniq_level) < 0)
+      if ((offset = jl_zenkouho_dai (wnnfns_buf[snum], no, dai_end (no, snum),
+				     WNN_USE_MAE, uniq_level)) < 0)
 	return Qnil;
     }
   return make_int (offset);
@@ -1908,7 +1909,7 @@
   w_char	pzy[10];
   int		i, len;
 
-  while (wc = *wp++)
+  while ((wc = *wp++) != 0)
     {
       switch (wc & 0x8080)
 	{
@@ -1948,7 +1949,7 @@
 	  else
 	    *mp++ = lb;
 	  *mp++ = (wc & 0xff00) >> 8;
-	  *mp++ = wc & 0x00ff | 0x80;
+	  *mp++ = (wc & 0x00ff) | 0x80;
 	  break;
 	default:
 	  *mp++ = wc & 0x00ff;
@@ -1963,7 +1964,7 @@
 {
   unsigned int ch;
   
-  while (ch = *mp++)
+  while ((ch = *mp++) != 0)
     {
       if (BUFBYTE_LEADING_BYTE_P (ch))
 	{
@@ -2039,8 +2040,8 @@
 void
 c2m (unsigned char *cp, unsigned char *mp, unsigned char lb)
 {
-  unsigned char		ch;
-  while (ch = *cp)
+  unsigned char	ch;
+  while ((ch = *cp) != 0)
     {
       if (ch & 0x80)
 	{
--- a/src/mule.c	Mon Aug 13 09:47:55 2007 +0200
+++ b/src/mule.c	Mon Aug 13 09:49:09 2007 +0200
@@ -50,8 +50,8 @@
     {
       temp =XCONS (pattern)->car;
       CHECK_VECTOR (temp);
-      CHECK_STRING (XVECTOR (temp)->contents[0]);
-      s = XSTRING (XVECTOR (temp)->contents[0]);
+      CHECK_STRING (XVECTOR_DATA (temp)[0]);
+      s = XSTRING (XVECTOR_DATA (temp)[0]);
       if (!wordbuf[i])
 	wordbuf[i] = (struct re_pattern_buffer *)
 	  xmalloc (sizeof (struct re_pattern_buffer));
--- a/src/objects.c	Mon Aug 13 09:47:55 2007 +0200
+++ b/src/objects.c	Mon Aug 13 09:49:09 2007 +0200
@@ -42,7 +42,7 @@
 void
 finalose (void *ptr)
 {
-  Lisp_Object obj; 
+  Lisp_Object obj;
   XSETOBJ (obj, Lisp_Record, ptr);
 
   signal_simple_error
@@ -74,7 +74,7 @@
   if (!NILP (c->device)) /* Vthe_null_color_instance */
     MAYBE_DEVMETH (XDEVICE (c->device), mark_color_instance, (c, markobj));
 
-  return (c->device);
+  return c->device;
 }
 
 static void
@@ -181,7 +181,7 @@
 */
        (object))
 {
-  return (COLOR_INSTANCEP (object) ? Qt : Qnil);
+  return COLOR_INSTANCEP (object) ? Qt : Qnil;
 }
 
 DEFUN ("color-instance-name", Fcolor_instance_name, 1, 1, 0, /*
@@ -190,7 +190,7 @@
        (color_instance))
 {
   CHECK_COLOR_INSTANCE (color_instance);
-  return (XCOLOR_INSTANCE (color_instance)->name);
+  return XCOLOR_INSTANCE (color_instance)->name;
 }
 
 DEFUN ("color-instance-rgb-components", Fcolor_instance_rgb_components, 1, 1, 0, /*
@@ -298,9 +298,9 @@
 font_instance_equal (Lisp_Object o1, Lisp_Object o2, int depth)
 {
   /* #### should this be moved into a device method? */
-  return (internal_equal (font_instance_truename_internal (o1, ERROR_ME_NOT),
-			  font_instance_truename_internal (o2, ERROR_ME_NOT),
-			  depth + 1));
+  return internal_equal (font_instance_truename_internal (o1, ERROR_ME_NOT),
+			 font_instance_truename_internal (o2, ERROR_ME_NOT),
+			 depth + 1);
 }
 
 static unsigned long
@@ -348,7 +348,7 @@
   f->descent = 0;
   f->width = 1;
   f->proportional_p = 0;
-  
+
   retval = MAYBE_INT_DEVMETH (XDEVICE (device), initialize_font_instance,
 			      (f, name, device, errb));
 
@@ -364,7 +364,7 @@
 */
        (object))
 {
-  return (FONT_INSTANCEP (object) ? Qt : Qnil);
+  return FONT_INSTANCEP (object) ? Qt : Qnil;
 }
 
 DEFUN ("font-instance-name", Ffont_instance_name, 1, 1, 0, /*
@@ -373,7 +373,7 @@
        (font_instance))
 {
   CHECK_FONT_INSTANCE (font_instance);
-  return (XFONT_INSTANCE (font_instance)->name);
+  return XFONT_INSTANCE (font_instance)->name;
 }
 
 DEFUN ("font-instance-ascent", Ffont_instance_ascent, 1, 1, 0, /*
@@ -418,7 +418,7 @@
        (font_instance))
 {
   CHECK_FONT_INSTANCE (font_instance);
-  return (XFONT_INSTANCE (font_instance)->proportional_p ? Qt : Qnil);
+  return XFONT_INSTANCE (font_instance)->proportional_p ? Qt : Qnil;
 }
 
 static Lisp_Object
@@ -532,11 +532,11 @@
 	  Fputhash (instantiator, instance, d->color_instance_cache);
 	}
 
-      return (NILP (instance) ? Qunbound : instance);
+      return NILP (instance) ? Qunbound : instance;
     }
   else if (VECTORP (instantiator))
     {
-      switch (XVECTOR (instantiator)->size)
+      switch (XVECTOR_LENGTH (instantiator))
 	{
 	case 0:
 	  if (DEVICE_TTY_P (d))
@@ -550,16 +550,14 @@
 	    signal_simple_error ("Color specifier not attached to a face",
 				 instantiator);
 	  return (FACE_PROPERTY_INSTANCE_1
-		  (Fget_face (vector_data (XVECTOR (instantiator))[0]),
-		   COLOR_SPECIFIER_FACE_PROPERTY
-		   (XCOLOR_SPECIFIER (specifier)), domain,
-		   ERROR_ME, 0, depth));
+		  (Fget_face (XVECTOR_DATA (instantiator)[0]),
+		   COLOR_SPECIFIER_FACE_PROPERTY (XCOLOR_SPECIFIER (specifier)),
+		   domain, ERROR_ME, 0, depth));
 
 	case 2:
 	  return (FACE_PROPERTY_INSTANCE_1
-		  (Fget_face (vector_data (XVECTOR (instantiator))[0]),
-		   vector_data (XVECTOR (instantiator))[1], domain,
-		   ERROR_ME, 0, depth));
+		  (Fget_face (XVECTOR_DATA (instantiator)[0]),
+		   XVECTOR_DATA (instantiator)[1], domain, ERROR_ME, 0, depth));
 
 	default:
 	  abort ();
@@ -586,17 +584,17 @@
     return;
   if (VECTORP (instantiator))
     {
-      if (XVECTOR (instantiator)->size > 2)
+      if (XVECTOR_LENGTH (instantiator) > 2)
 	signal_simple_error ("Inheritance vector must be of size 0 - 2",
 			     instantiator);
-      else if (XVECTOR (instantiator)->size > 0)
+      else if (XVECTOR_LENGTH (instantiator) > 0)
 	{
-	  Lisp_Object face = vector_data (XVECTOR (instantiator))[0];
-      
+	  Lisp_Object face = XVECTOR_DATA (instantiator)[0];
+
 	  Fget_face (face);
-	  if (XVECTOR (instantiator)->size == 2)
+	  if (XVECTOR_LENGTH (instantiator) == 2)
 	    {
-	      Lisp_Object field = vector_data (XVECTOR (instantiator))[1];
+	      Lisp_Object field = XVECTOR_DATA (instantiator)[1];
 	      if (!EQ (field, Qforeground) && !EQ (field, Qbackground))
 		signal_simple_error
 		  ("Inheritance field must be `foreground' or `background'",
@@ -646,7 +644,7 @@
 */
        (object))
 {
-  return (COLOR_SPECIFIERP (object) ? Qt : Qnil);
+  return COLOR_SPECIFIERP (object) ? Qt : Qnil;
 }
 
 
@@ -731,7 +729,7 @@
 	}
       instantiator = Ffont_instance_name (instantiator);
     }
-  
+
   if (STRINGP (instantiator))
     {
 #ifdef MULE
@@ -782,13 +780,13 @@
 	  Fputhash (instantiator, instance, d->font_instance_cache);
 	}
 
-      return (NILP (instance) ? Qunbound : instance);
+      return NILP (instance) ? Qunbound : instance;
     }
   else if (VECTORP (instantiator))
     {
-      assert (XVECTOR (instantiator)->size == 1);
+      assert (XVECTOR_LENGTH (instantiator) == 1);
       return (face_property_matching_instance
-	      (Fget_face (vector_data (XVECTOR (instantiator))[0]), Qfont,
+	      (Fget_face (XVECTOR_DATA (instantiator)[0]), Qfont,
 	       matchspec, domain, ERROR_ME, 0, depth));
     }
   else if (NILP (instantiator))
@@ -806,12 +804,12 @@
     return;
   if (VECTORP (instantiator))
     {
-      if (vector_length (XVECTOR (instantiator)) != 1)
+      if (XVECTOR_LENGTH (instantiator) != 1)
 	{
 	  signal_simple_error
 	    ("Vector length must be one for font inheritance", instantiator);
 	}
-      Fget_face (vector_data (XVECTOR (instantiator))[0]);
+      Fget_face (XVECTOR_DATA (instantiator)[0]);
     }
   else
     signal_simple_error ("Must be string, vector, or font-instance",
@@ -853,7 +851,7 @@
 */
        (object))
 {
-  return (FONT_SPECIFIERP (object) ? Qt : Qnil);
+  return FONT_SPECIFIERP (object) ? Qt : Qnil;
 }
 
 
@@ -897,11 +895,11 @@
     {
       Lisp_Object retval;
       Lisp_Object prop;
+      int instantiator_len = XVECTOR_LENGTH (instantiator);
 
-      assert (XVECTOR (instantiator)->size >= 1 &&
-	      XVECTOR (instantiator)->size <= 3);
-      if (XVECTOR (instantiator)->size > 1)
-	prop = vector_data (XVECTOR (instantiator))[1];
+      assert (instantiator_len >= 1 && instantiator_len <= 3);
+      if (instantiator_len > 1)
+	prop = XVECTOR_DATA (instantiator)[1];
       else
 	{
 	  if (NILP (FACE_BOOLEAN_SPECIFIER_FACE
@@ -913,12 +911,11 @@
 	}
 
       retval = (FACE_PROPERTY_INSTANCE_1
-		(Fget_face (vector_data (XVECTOR (instantiator))[0]),
+		(Fget_face (XVECTOR_DATA (instantiator)[0]),
 		 prop, domain, ERROR_ME, 0, depth));
 
-      if (XVECTOR (instantiator)->size == 3 &&
-	  !NILP (vector_data (XVECTOR (instantiator))[2]))
-	retval = (NILP (retval) ? Qt : Qnil);
+      if (instantiator_len == 3 && !NILP (XVECTOR_DATA (instantiator)[2]))
+	retval = NILP (retval) ? Qt : Qnil;
 
       return retval;
     }
@@ -934,16 +931,16 @@
   if (NILP (instantiator) || EQ (instantiator, Qt))
     return;
   else if (VECTORP (instantiator) &&
-	   (XVECTOR (instantiator)->size >= 1 &&
-	    XVECTOR (instantiator)->size <= 3))
+	   (XVECTOR_LENGTH (instantiator) >= 1 &&
+	    XVECTOR_LENGTH (instantiator) <= 3))
     {
-      Lisp_Object face = vector_data (XVECTOR (instantiator))[0];
-      
+      Lisp_Object face = XVECTOR_DATA (instantiator)[0];
+
       Fget_face (face);
 
-      if (XVECTOR (instantiator)->size > 1)
+      if (XVECTOR_LENGTH (instantiator) > 1)
 	{
-	  Lisp_Object field = vector_data (XVECTOR (instantiator))[1];
+	  Lisp_Object field = XVECTOR_DATA (instantiator)[1];
 	  if (!EQ (field, Qunderline)
 	      && !EQ (field, Qstrikethru)
 	      && !EQ (field, Qhighlight)
@@ -998,7 +995,7 @@
 */
        (object))
 {
-  return (FACE_BOOLEAN_SPECIFIERP (object) ? Qt : Qnil);
+  return FACE_BOOLEAN_SPECIFIERP (object) ? Qt : Qnil;
 }
 
 
@@ -1084,7 +1081,7 @@
 
     XSETCOLOR_INSTANCE (Vthe_null_color_instance, c);
   }
-  
+
   staticpro (&Vthe_null_font_instance);
   {
     struct Lisp_Font_Instance *f;
@@ -1099,7 +1096,7 @@
     f->descent = 0;
     f->width = 0;
     f->proportional_p = 0;
-  
+
     XSETFONT_INSTANCE (Vthe_null_font_instance, f);
   }
 }
--- a/src/opaque.c	Mon Aug 13 09:47:55 2007 +0200
+++ b/src/opaque.c	Mon Aug 13 09:49:09 2007 +0200
@@ -76,7 +76,7 @@
     assert (!INTP (XOPAQUE (obj)->size_or_chain));
 #endif
   if (INTP (XOPAQUE (obj)->size_or_chain) && XOPAQUE_MARKFUN (obj))
-    return (XOPAQUE_MARKFUN (obj)) (obj, markobj);
+    return XOPAQUE_MARKFUN (obj) (obj, markobj);
   else
     return XOPAQUE (obj)->size_or_chain;
 }
@@ -87,12 +87,11 @@
 {
   char buf[200];
   if (INTP (XOPAQUE (obj)->size_or_chain))
-    sprintf (buf, "#<INTERNAL EMACS BUG (opaque, size=%d) 0x%x>",
-	     (EMACS_INT) XOPAQUE_SIZE (obj),
-	     (EMACS_INT) XPNTR (obj));
+    sprintf (buf, "#<INTERNAL EMACS BUG (opaque, size=%ld) 0x%p>",
+	     (long) XOPAQUE_SIZE (obj), (void *) XPNTR (obj));
   else
-    sprintf (buf, "#<INTERNAL EMACS BUG (opaque, freed) 0x%x>",
-	     (EMACS_INT) XPNTR (obj));
+    sprintf (buf, "#<INTERNAL EMACS BUG (opaque, freed) 0x%p>",
+	     (void *) XPNTR (obj));
   write_c_string (buf, printcharfun);
 }
 
--- a/src/print.c	Mon Aug 13 09:47:55 2007 +0200
+++ b/src/print.c	Mon Aug 13 09:49:09 2007 +0200
@@ -50,7 +50,7 @@
    for the convenience of the debugger.  */
 Lisp_Object Qexternal_debugging_output;
 Lisp_Object Qalternate_debugging_output;
- 
+
 /* Avoid actual stack overflow in print.  */
 static int print_depth;
 
@@ -97,7 +97,7 @@
 int stdout_needs_newline;
 
 /* Write a string (in internal format) to stdio stream STREAM. */
-   
+
 void
 write_string_to_stdio_stream (FILE *stream, struct console *con,
 			      CONST Bufbyte *str,
@@ -308,7 +308,7 @@
       printcharfun = Fselected_frame (Qnil); /* print to minibuffer */
 #endif
     }
-  return (printcharfun);
+  return printcharfun;
 }
 
 
@@ -319,7 +319,7 @@
 
   /* Emacs won't print whilst GCing, but an external debugger might */
   if (gc_in_progress)
-    return (Qnil);
+    return Qnil;
 
   printcharfun = canonicalize_printcharfun (printcharfun);
   if (EQ (printcharfun, Qnil))
@@ -328,13 +328,13 @@
     }
 #if 0 /* Don't bother */
   else if (SUBRP (indirect_function (printcharfun, 0))
-           && (XSUBR (indirect_function (printcharfun, 0)) 
+           && (XSUBR (indirect_function (printcharfun, 0))
                == Sexternal_debugging_output))
     {
       stdio_stream = stderr;
     }
 #endif
-  
+
   return make_print_output_stream (stdio_stream, printcharfun);
 }
 
@@ -422,9 +422,9 @@
 }
 
 Lisp_Object
-internal_with_output_to_temp_buffer (CONST char *bufname, 
+internal_with_output_to_temp_buffer (CONST char *bufname,
                                      Lisp_Object (*function) (Lisp_Object arg),
-                                     Lisp_Object arg, 
+                                     Lisp_Object arg,
                                      Lisp_Object same_frame)
 {
   int speccount = specpdl_depth ();
@@ -542,13 +542,13 @@
   print_internal (object, stream, NILP (noescape));
   print_finish (stream);
   stream = Qnil;                /* No GC surprises! */
-  object = make_string_from_buffer (out, 
+  object = make_string_from_buffer (out,
 				    BUF_BEG (out),
 				    BUF_Z (out) - 1);
   Ferase_buffer (Fcurrent_buffer ());
   Fset_buffer (old);
   UNGCPRO;
-  return (object);
+  return object;
 }
 
 DEFUN ("princ", Fprinc, 1, 2, 0, /*
@@ -569,7 +569,7 @@
   print_internal (obj, the_stream, 0);
   print_finish (the_stream);
   UNGCPRO;
-  return (obj);
+  return obj;
 }
 
 DEFUN ("print", Fprint, 1, 2, 0, /*
@@ -739,9 +739,9 @@
  * largest float, printed in the biggest notation.  This is undoubtably
  * 20d float_output_format, with the negative of the C-constant "HUGE"
  * from <math.h>.
- * 
+ *
  * On the vax the worst case is -1e38 in 20d format which takes 61 bytes.
- * 
+ *
  * I assume that IEEE-754 format numbers can take 329 bytes for the worst
  * case of -1e307 in 20d float_output_format. What is one to do (short of
  * re-writing _doprnt to be more sane)?
@@ -750,7 +750,7 @@
 {
   Bufbyte *cp, c;
   int width;
-      
+
   if (NILP (Vfloat_output_format)
       || !STRINGP (Vfloat_output_format))
   lose:
@@ -774,7 +774,7 @@
 	  width += c - '0';
 	}
 
-      if (*cp != 'e' && *cp != 'f' && *cp != 'g' && *cp != 'E' && *cp != 'G') 
+      if (*cp != 'e' && *cp != 'f' && *cp != 'g' && *cp != 'E' && *cp != 'G')
 	goto lose;
 
       if (width < (int) (*cp != 'e' && *cp != 'E') || width > DBL_DIG)
@@ -821,12 +821,12 @@
 
 static void
 print_vector_internal (CONST char *start, CONST char *end,
-                       Lisp_Object obj, 
+                       Lisp_Object obj,
                        Lisp_Object printcharfun, int escapeflag)
 {
   /* This function can GC */
   int i;
-  int len = vector_length (XVECTOR (obj));
+  int len = XVECTOR_LENGTH (obj);
   int last = len;
   struct gcpro gcpro1, gcpro2;
   GCPRO2 (obj, printcharfun);
@@ -840,7 +840,7 @@
   write_c_string (start, printcharfun);
   for (i = 0; i < last; i++)
     {
-      Lisp_Object elt = vector_data (XVECTOR (obj))[i];
+      Lisp_Object elt = XVECTOR_DATA (obj)[i];
       if (i != 0) write_char_internal (" ", printcharfun);
       print_internal (elt, printcharfun, escapeflag);
     }
@@ -872,9 +872,9 @@
 			 int escapeflag)
 {
   char buf[200];
-  sprintf (buf, "#<INTERNAL OBJECT (XEmacs bug?) (%s) 0x%x>",
-	   XRECORD_LHEADER (obj)->implementation->name,
-	   (EMACS_INT) XPNTR (obj));
+  sprintf (buf, "#<INTERNAL OBJECT (XEmacs bug?) (%s) 0x%p>",
+	   XRECORD_LHEADER (obj)->implementation->name, 
+	   (void *) XPNTR (obj));
   write_c_string (buf, printcharfun);
 }
 
@@ -910,7 +910,7 @@
     {
     case Lisp_Int:
       {
-	sprintf (buf, "%d", XINT (obj));
+	sprintf (buf, "%ld", (long) XINT (obj));
 	write_c_string (buf, printcharfun);
 	break;
       }
@@ -985,7 +985,7 @@
 	    for (i = 0; i < max; i++)
 	      {
 		Bufbyte ch = string_byte (s, i);
-		if (ch == '\"' || ch == '\\' 
+		if (ch == '\"' || ch == '\\'
 		    || (ch == '\n' && print_escape_newlines))
 		  {
 		    if (i > last)
@@ -1146,7 +1146,7 @@
 
 static void
 print_compiled_function_internal (CONST char *start, CONST char *end,
-				  Lisp_Object obj, 
+				  Lisp_Object obj,
 				  Lisp_Object printcharfun, int escapeflag)
 {
   /* This function can GC */
@@ -1249,7 +1249,7 @@
     }
   GCPRO2 (obj, printcharfun);
 
-  if (print_gensym) 
+  if (print_gensym)
     {
       Lisp_Object tem = oblookup (Vobarray, string_data (name), size);
       if (!EQ (tem, obj))
@@ -1279,7 +1279,7 @@
       goto not_yet_confused;
 
     for (; confusing < size; confusing++)
-      { 
+      {
         if (!isdigit (data[confusing]))
           {
             confusing = 0;
@@ -1300,7 +1300,7 @@
     Lisp_Object nameobj;
     Bytecount i;
     Bytecount last = 0;
-        
+
     XSETSTRING (nameobj, name);
     for (i = 0; i < size; i++)
       {
--- a/src/process.c	Mon Aug 13 09:47:55 2007 +0200
+++ b/src/process.c	Mon Aug 13 09:49:09 2007 +0200
@@ -216,7 +216,7 @@
   ((markobj) (proc->instream));
   ((markobj) (proc->outstream));
   ((markobj) (proc->filedesc_stream));
-  return (proc->status_symbol);
+  return proc->status_symbol;
 }
 
 static void
@@ -359,7 +359,7 @@
 int
 network_connection_p (Lisp_Object process)
 {
-  return (GC_CONSP (XPROCESS (process)->pid));
+  return GC_CONSP (XPROCESS (process)->pid);
 }
 #endif
 
@@ -374,7 +374,7 @@
 */
        (obj))
 {
-  return ((PROCESSP (obj)) ? Qt : Qnil);
+  return PROCESSP (obj) ? Qt : Qnil;
 }
 
 DEFUN ("process-list", Fprocess_list, 0, 0, 0, /*
@@ -393,7 +393,7 @@
   Lisp_Object tail;
 
   if (GC_PROCESSP (name))
-    return (name);
+    return name;
 
   if (!gc_in_progress)
     /* this only gets called during GC when emacs is going away as a result
@@ -405,7 +405,7 @@
       Lisp_Object proc = XCAR (tail);
       QUIT;
       if (!NILP (Fequal (name, XPROCESS (proc)->name)))
-        return (XCAR (tail));
+        return XCAR (tail);
     }
   return Qnil;
 }
@@ -503,10 +503,10 @@
 
   pid = XPROCESS (proc)->pid;
   if (network_connection_p (proc))
-    /* return (Qnil); */
-    return (Fcons (Fcar (pid), Fcdr (pid)));
+    /* return Qnil; */
+    return Fcons (Fcar (pid), Fcdr (pid));
   else
-    return (pid);
+    return pid;
 }
 
 DEFUN ("process-name", Fprocess_name, 1, 1, 0, /*
@@ -584,7 +584,7 @@
   XSETPROCESS (val, p);
 
   Vprocess_list = Fcons (val, Vprocess_list);
-  return (val);
+  return val;
 }
 
 #ifdef HAVE_PTYS
@@ -1303,7 +1303,7 @@
 get_internet_address (Lisp_Object host, struct sockaddr_in *address,
 		      Error_behavior errb)
 {
-  struct hostent *host_info_ptr;
+  struct hostent *host_info_ptr = NULL;
 #ifdef TRY_AGAIN
   int count = 0;
 #endif
@@ -1647,7 +1647,7 @@
   if (vs)
     {
       if (!vs->iosb[0])
-	return(0);		/* Really weird if it does this */
+	return 0;		/* Really weird if it does this */
       if (!(vs->iosb[0] & 1))
 	return -1;		/* I/O error */
     }
@@ -1705,7 +1705,7 @@
 #ifdef VMS
       start_vms_process_read (vs);
 #endif
-      return (nchars);
+      return nchars;
     }
 
   /* If no filter, write into buffer if it isn't dead.  */
@@ -1796,7 +1796,7 @@
 #ifdef VMS
   start_vms_process_read (vs);
 #endif
-  return (nchars);
+  return nchars;
 }
 
 /* Sending data to subprocess */
@@ -2031,7 +2031,7 @@
 
   send_process (proc, Fcurrent_buffer (), 0,
                 st, en - st);
-  return (Qnil);
+  return Qnil;
 }
 
 DEFUN ("process-send-string", Fprocess_send_string, 2, 4, 0, /*
@@ -2056,7 +2056,7 @@
   len = bto - bfr;
 
   send_process (proc, string, 0, bfr, len);
-  return (Qnil);
+  return Qnil;
 }
 
 #ifdef MULE
@@ -2207,11 +2207,11 @@
 {
   if (signum >= 0 && signum < NSIG)
 #ifndef VMS
-    return ((CONST char *) sys_siglist[signum]);
+    return (CONST char *) sys_siglist[signum];
 #else
-    return ((CONST char *) sys_errlist[signum]);
+    return (CONST char *) sys_errlist[signum];
 #endif
-  return ((CONST char *) GETTEXT ("unknown signal"));
+  return (CONST char *) GETTEXT ("unknown signal");
 }
 
 /* Compute the Lisp form of the process status from
@@ -2700,7 +2700,7 @@
       else if (EQ (status, Qexit))
 	status = Qclosed;
     }
-  return (status);
+  return status;
 }
 
 DEFUN ("process-exit-status", Fprocess_exit_status, 1, 1, 0, /*
@@ -2710,7 +2710,7 @@
        (proc))
 {
   CHECK_PROCESS (proc);
-  return (make_int (XPROCESS (proc)->exit_code));
+  return make_int (XPROCESS (proc)->exit_code);
 }
 
 
@@ -3316,7 +3316,7 @@
   tem = XPROCESS (proc)->kill_without_query;
   XPROCESS (proc)->kill_without_query = NILP (require_query_p);
 
-  return (tem ? Qnil : Qt);
+  return tem ? Qnil : Qt;
 }
 
 DEFUN ("process-kill-without-query-p", Fprocess_kill_without_query_p, 1, 1, 0, /*
@@ -3325,7 +3325,7 @@
        (proc))
 {
   CHECK_PROCESS (proc);
-  return (XPROCESS (proc)->kill_without_query ? Qt : Qnil);
+  return XPROCESS (proc)->kill_without_query ? Qt : Qnil;
 }
 
 
--- a/src/rangetab.c	Mon Aug 13 09:47:55 2007 +0200
+++ b/src/rangetab.c	Mon Aug 13 09:49:09 2007 +0200
@@ -99,9 +99,9 @@
       if (i > 0)
 	write_c_string (" ", printcharfun);
       if (rte->first == rte->last)
-	sprintf (buf, "%d ", rte->first);
+	sprintf (buf, "%ld ", (long) (rte->first));
       else
-	sprintf (buf, "(%d %d) ", rte->first, rte->last);
+	sprintf (buf, "(%ld %ld) ", (long) (rte->first), (long) (rte->last));
       write_c_string (buf, printcharfun);
       print_internal (rte->val, printcharfun, 1);
     }
@@ -199,7 +199,7 @@
 
 static Lisp_Object
 get_range_table (EMACS_INT pos, int nentries, struct range_table_entry *tab,
-		 Lisp_Object defalt)
+		 Lisp_Object default_)
 {
   int left = 0, right = nentries;
   
@@ -219,7 +219,7 @@
 	return entry->val;
     }
 
-  return defalt;
+  return default_;
 }
 
 DEFUN ("range-table-p", Frange_table_p, 1, 1, 0, /*
@@ -227,7 +227,7 @@
 */
        (object))
 {
-  return (RANGE_TABLEP (object) ? Qt : Qnil);
+  return RANGE_TABLEP (object) ? Qt : Qnil;
 }
 
 DEFUN ("make-range-table", Fmake_range_table, 0, 0, 0, /*
@@ -272,7 +272,7 @@
 Find value for position POS in TABLE.
 If there is no corresponding value, return DEFAULT (defaults to nil).
 */
-       (pos, table, defalt))
+       (pos, table, default_))
 {
   struct Lisp_Range_Table *rt;
   EMACS_INT po;
@@ -284,7 +284,7 @@
   po = XINT (pos);
 
   return get_range_table (po, Dynarr_length (rt->entries),
-			  Dynarr_atp (rt->entries, 0), defalt);
+			  Dynarr_atp (rt->entries, 0), default_);
 }
 
 void
@@ -658,7 +658,7 @@
 
 Lisp_Object
 unified_range_table_lookup (void *unrangetab, EMACS_INT pos,
-			    Lisp_Object defalt)
+			    Lisp_Object default_)
 {
   void *new_dest;
   struct unified_range_table *un;
@@ -667,7 +667,7 @@
   new_dest = (char *) unrangetab + * (char *) unrangetab;
   un = (struct unified_range_table *) new_dest;
 
-  return get_range_table (pos, un->nentries, &un->first, defalt);
+  return get_range_table (pos, un->nentries, &un->first, default_);
 }
 
 /* Return number of entries in a unified range table. */
--- a/src/redisplay-x.c	Mon Aug 13 09:47:55 2007 +0200
+++ b/src/redisplay-x.c	Mon Aug 13 09:49:09 2007 +0200
@@ -1949,8 +1949,8 @@
 x_clear_region (Lisp_Object locale, face_index findex, int x, int y,
 		int width, int height)
 {
-  struct window *w = 0;
-  struct frame *f = 0;
+  struct window *w = NULL;
+  struct frame *f = NULL;
   struct device *d;
   Lisp_Object background_pixmap;
 
@@ -1964,7 +1964,7 @@
     }
   else if (FRAMEP (locale))
     {
-      w = 0;
+      w = NULL;
       f = XFRAME (locale);
     }
   else
@@ -1977,8 +1977,7 @@
   /* #### This function is going to have to be made cursor aware. */
   if (width && height)
     {
-      int values_set = 0;
-      GC gc;
+      GC gc = NULL;
 
       /* #### This isn't quite right for when this function is called
          from the toolbar code. */
@@ -2031,36 +2030,25 @@
 		  bcolor = FACE_BACKGROUND (Vdefault_face, locale);
 		}
 
-	      gc = x_get_gc (d, Qnil, fcolor, bcolor, background_pixmap,
-			     Qnil);
-	      values_set = 1;
+	      gc = x_get_gc (d, Qnil, fcolor, bcolor, background_pixmap, Qnil);
 	    }
 	  else
 	    {
-	      Lisp_Object color;
+	      Lisp_Object color = (w ?
+				   WINDOW_FACE_CACHEL_BACKGROUND (w, findex) :
+				   FACE_BACKGROUND (Vdefault_face, locale));
 
 	      if (UNBOUNDP (background_pixmap))
 		background_pixmap = Qnil;
 
-	      if (w)
-		color = WINDOW_FACE_CACHEL_BACKGROUND (w, findex);
-	      else
-		color = FACE_BACKGROUND (Vdefault_face, locale);
-
-	      gc = x_get_gc (d, Qnil, color, Qnil, background_pixmap,
-			     Qnil);
-	      values_set = 1;
+	      gc = x_get_gc (d, Qnil, color, Qnil, background_pixmap, Qnil);
 	    }
 	}
 
-      if (values_set)
-	{
-	  XFillRectangle (dpy, x_win, gc, x, y, width, height);
-	}
+      if (gc)
+	XFillRectangle (dpy, x_win, gc, x, y, width, height);
       else
-	{
-	  XClearArea (dpy, x_win, x, y, width, height, False);
-	}
+	XClearArea (dpy, x_win, x, y, width, height, False);
     }
 }
 
--- a/src/redisplay.c	Mon Aug 13 09:47:55 2007 +0200
+++ b/src/redisplay.c	Mon Aug 13 09:49:09 2007 +0200
@@ -573,7 +573,7 @@
       for (elt = 0; elt < Dynarr_length (dl->display_blocks); elt++)
 	{
 	  if (Dynarr_at (dl->display_blocks, elt).type == type)
-	    return (Dynarr_atp (dl->display_blocks, elt));
+	    return Dynarr_atp (dl->display_blocks, elt);
 	}
 
       /* There isn't an active block of the desired type, but there
@@ -639,7 +639,7 @@
 static int
 tab_pix_width (struct window *w)
 {
-  return (space_width (w) * tab_char_width (w));
+  return space_width (w) * tab_char_width (w);
 }
 
 /* Given a pixel position in a window, return the pixel location of
@@ -2626,7 +2626,7 @@
      this function if we are already at EOB. */
 
   if (data.bi_bufpos == BI_BUF_ZV (b) && bi_start_pos == BI_BUF_ZV (b))
-    return (data.bi_bufpos + 1); /* Yuck! */
+    return data.bi_bufpos + 1; /* Yuck! */
   else
     return data.bi_bufpos;
 }
@@ -2696,7 +2696,7 @@
   data.db->start_pos = dl->bounds.left_in;
   data.db->end_pos = data.pixpos;
 
-  return (data.pixpos - dl->bounds.left_in);
+  return data.pixpos - dl->bounds.left_in;
 }
 
 /* Add a type of glyph to a margin display block. */
@@ -4846,7 +4846,7 @@
 
 	      if (point >= (dl->bufpos + dl->offset)
 		  && point <= (dl->end_bufpos + dl->offset))
-		return (!dl->clip);
+		return !dl->clip;
 	      else
 		return 1;
 	    }
@@ -4866,7 +4866,7 @@
 int
 window_half_pixpos (struct window *w)
 {
-  return (WINDOW_TEXT_TOP (w) + (WINDOW_TEXT_HEIGHT (w) >> 1));
+  return WINDOW_TEXT_TOP (w) + (WINDOW_TEXT_HEIGHT (w) >> 1);
 }
 
 /* Return the display line which is currently in the middle of the
@@ -5701,7 +5701,7 @@
 
   sprintf (window_line_number_buf, "%d", line);
 
-  return (window_line_number_buf);
+  return window_line_number_buf;
 }
 
 /* Given a character representing an object in a modeline
@@ -6278,7 +6278,7 @@
   if (!Dynarr_length (cache))
     return -1;
   else
-    return (Dynarr_atp (cache, 0)->start);
+    return Dynarr_atp (cache, 0)->start;
 }
 
 /* Return the very last buffer position contained in the given
@@ -6293,7 +6293,7 @@
   if (!Dynarr_length (cache))
     return -1;
   else
-    return (Dynarr_atp (cache, Dynarr_length (cache) - 1)->end);
+    return Dynarr_atp (cache, Dynarr_length (cache) - 1)->end;
 }
 
 /* Return the index of the line POINT is contained within in window
@@ -6622,9 +6622,9 @@
 	    {
 	      w->line_cache_validation_override--;
 	      if (end)
-		return (BUF_ZV (b));
+		return BUF_ZV (b);
 	      else
-		return (BUF_BEGV (b));
+		return BUF_BEGV (b);
 	    }
 	  else
 	    {
@@ -6651,7 +6651,7 @@
 	  if (from >= BUF_ZV (b))
 	    {
 	      w->line_cache_validation_override--;
-	      return (BUF_ZV (b));
+	      return BUF_ZV (b);
 	    }
 
 	  update_line_start_cache (w, from, to, BUF_PT (b), 0);
@@ -6731,7 +6731,7 @@
 	  if (cur_pos <= BUF_BEGV (b))
 	    {
 	      w->line_cache_validation_override--;
-	      return (BUF_BEGV (b));
+	      return BUF_BEGV (b);
 	    }
 
 	  win_char_height = window_char_height (w, 0);
@@ -6772,7 +6772,7 @@
 	cur_elt -= line;
 
       w->line_cache_validation_override--;
-      return (Dynarr_atp (w->line_start_cache, cur_elt)->start);
+      return Dynarr_atp (w->line_start_cache, cur_elt)->start;
     }
   else
     {
@@ -7318,7 +7318,10 @@
   /* This is a safety valve in case this got called with a frame in
      the middle of being deleted. */
   if (!DEVICEP (f->device) || !DEVICE_LIVE_P (XDEVICE (f->device)))
-    device_check_failed = 1;
+    {
+      device_check_failed = 1;
+      d = NULL, cache = NULL; /* Warning suppression */
+    }
   else
     {
       d = XDEVICE (f->device);
--- a/src/s/aix3-1.h	Mon Aug 13 09:47:55 2007 +0200
+++ b/src/s/aix3-1.h	Mon Aug 13 09:49:09 2007 +0200
@@ -87,12 +87,6 @@
 
 /* #define MAIL_USE_FLOCK */
 
-/* Define SHORTNAMES if the C compiler can distinguish only
-   short names.  It means that the stuff in ../shortnames
-   must be run to convert the long names to short ones.  */
-
-/* #define SHORTNAMES */
-
 /* The file containing the kernel's symbol table is called /unix.  */
 
 #define KERNEL_FILE "/unix"
--- a/src/s/aix3-2-5.h	Mon Aug 13 09:47:55 2007 +0200
+++ b/src/s/aix3-2-5.h	Mon Aug 13 09:49:09 2007 +0200
@@ -17,7 +17,6 @@
 /* Perry Smith <pedz@ddivt1.austin.ibm.com> says these are correct.  */
 #define SIGNALS_VIA_CHARACTERS
 #define MAIL_USE_LOCKF
-#define CLASH_DETECTION
 
 /* XEmacs: from dkeller@VNET.IBM.COM */
 #define BROKEN_SIGIO
--- a/src/s/decosf1-3-static.h	Mon Aug 13 09:47:55 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,9 +0,0 @@
-/* Synched up with: Not in FSF. */
-
-#include "decosf1-3.h"
-
-#ifdef NOT_C_CODE
-/* This to get rid of the def in decosf1-3 forcing dynamic linking. */
-#undef LD_SWITCH_SYSTEM
-#define LD_SWITCH_SYSTEM "-non_shared"
-#endif
--- a/src/s/decosf1-3.h	Mon Aug 13 09:47:55 2007 +0200
+++ b/src/s/decosf1-3.h	Mon Aug 13 09:49:09 2007 +0200
@@ -14,18 +14,10 @@
 #define _NO_MALLOC_WARNING_
 
 #ifdef NOT_C_CODE
-/* This to get rid of the -X that Makefile inserts
- * and force dynamic linking and optimization during link time.
- * The ifndef is needed to avoid screwups during configure
- */
+
 #undef LD_SWITCH_SYSTEM
 #define LD_SWITCH_SYSTEM
 
-#undef LD_SWITCH_CALL_SHARED
-#ifndef USE_GCC
-#define LD_SWITCH_CALL_SHARED -call_shared
-#endif /* !USE_GCC */
-
 #undef LD_SWITCH_SHARED
-#define LD_SWITCH_SHARED -shared
+#define LD_SWITCH_SHARED "-shared"
 #endif /* NOT_C_CODE */
--- a/src/s/decosf3-1-static.h	Mon Aug 13 09:47:55 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,9 +0,0 @@
-/* Synched up with: Not in FSF. */
-
-#include "decosf3-1.h"
-
-#ifdef NOT_C_CODE
-/* This to get rid of the def in decosf3-1 forcing dynamic linking. */
-#undef LD_SWITCH_CALL_SHARED
-#define LD_SWITCH_CALL_SHARED -non_shared
-#endif
--- a/src/s/decosf3-2-static.h	Mon Aug 13 09:47:55 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-/* Synched up with: Not in FSF. */
-
-#include "decosf3-2.h"
-
-#ifdef NOT_C_CODE
-/* This is to get rid of the definition that selects dynamic linking. */
-#undef LD_SWITCH_CALL_SHARED
-#ifdef USE_GCC
-#define LD_SWITCH_CALL_SHARED -static -Xlinker -non_shared
-#else
-#define LD_SWITCH_CALL_SHARED -non_shared
-#endif /* USE_GCC */
-#endif /* NOT_C_CODE */
--- a/src/s/decosf4-0-static.h	Mon Aug 13 09:47:55 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-/* Synched up with: Not in FSF. */
-
-#include "decosf4-0.h"
-
-#ifdef NOT_C_CODE
-/* This is to get rid of the definition that selects dynamic linking. */
-#undef LD_SWITCH_CALL_SHARED
-#ifdef USE_GCC
-#define LD_SWITCH_CALL_SHARED -static -Xlinker -non_shared
-#else
-#define LD_SWITCH_CALL_SHARED -non_shared
-#endif /* USE_GCC */
-#endif /* NOT_C_CODE */
--- a/src/s/decosf4-0.h	Mon Aug 13 09:47:55 2007 +0200
+++ b/src/s/decosf4-0.h	Mon Aug 13 09:49:09 2007 +0200
@@ -5,7 +5,7 @@
 #ifndef NOT_C_CODE
 #include "/usr/include/sys/lc_core.h"
 #include "/usr/include/reg_types.h"
-#endif
+#endif /* C code */
 
 #define re_compile_pattern sys_re_compile_pattern
 #define re_search sys_re_search
--- a/src/s/hpux.h	Mon Aug 13 09:47:55 2007 +0200
+++ b/src/s/hpux.h	Mon Aug 13 09:49:09 2007 +0200
@@ -73,16 +73,6 @@
 
 /* #define MAIL_USE_FLOCK */
 
-/* Define SHORTNAMES if the C compiler can distinguish only
-   short names.  It means that the stuff in ../shortnames
-   must be run to convert the long names to short ones.
-
-   Some USG systems support long names.
-   If yours is one, DO NOT change this file!
-   Do #undef SHORTNAMES in the m- file or in config.h.  */
-
-/* #define SHORTNAMES */
-
 /* The file containing the kernel's symbol table is called /hp-ux.  */
 
 #define KERNEL_FILE "/hp-ux"
--- a/src/s/linux-static.h	Mon Aug 13 09:47:55 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-#include "linux.h"
-
-#define LD_SWITCH_SYSTEM "-Bstatic"
--- a/src/s/sol2-static.h	Mon Aug 13 09:47:55 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,24 +0,0 @@
-/* Synched up with: Not in FSF. */
-
-#ifndef DONT_INCLUDE_SOL2_H
-#include "sol2.h"
-#endif
-
-/* Force static linking */
-#ifdef NOT_C_CODE
-
-#undef  LD_SWITCH_SYSTEM
-#define LD_SWITCH_SYSTEM "-Bstatic"
-
-/* static linking and Solaris don't mix real well */
-#undef LIB_STANDARD
-#ifdef I18N4
-# define LIB_STANDARD "-lw -Bdynamic -lc -ldl -Bstatic"
-#else /* !I18N4 */
-# define LIB_STANDARD "-lw -lc -Bdynamic -ldl -Bstatic"
-#endif /* !I18N4 */
-
-#undef LIBS_SYSTEM
-#define LIBS_SYSTEM "-lsocket -lnsl -lelf -lgen"
-
-#endif /* NOT_C_CODE */
--- a/src/s/sol2.h	Mon Aug 13 09:47:55 2007 +0200
+++ b/src/s/sol2.h	Mon Aug 13 09:49:09 2007 +0200
@@ -1,5 +1,4 @@
-/* Synched up with: FSF 19.31. */
-
+/* Synched up with: Completely divergent from FSF. */
 #define SOLARIS2 1
 #define POSIX 1
 
@@ -11,35 +10,44 @@
 #define USG5_4
 #endif
 
-#define __EXTENSIONS__ 1
-
 #undef  _POSIX_C_SOURCE
 
-/* Solaris 2.4 math.h doesn't respect __EXTENSIONS__ */
-#ifndef NOT_C_CODE
-
-#if OS_RELEASE <= 54
-#include <math.h>
-#endif /* <= Solaris 2.4 */
-
-/* Fix understandable GCC lossage on Solaris 2.6 */
-#if OS_RELEASE >= 56
-#ifdef __GNUC__
-#define __GNUC_VA_LIST
-#define _VA_LIST_
-#define _VA_LIST va_list
-typedef void *__gnuc_va_list;
-typedef __gnuc_va_list va_list;
-#endif /* GCC */
-#endif /* >= Solaris 2.6 */
-
-#endif /* C code */
+#if OS_RELEASE > 54
+/* There were some bugs with preprocessor symbol interaction, which
+   were not fixed until 2.5. */
+#define __EXTENSIONS__ 1
 
 #undef  _XOPEN_SOURCE
 #define _XOPEN_SOURCE 1
 
 #undef  _XOPEN_SOURCE_EXTENDED
 #define _XOPEN_SOURCE_EXTENDED 1
+#endif /* > Solaris 2.4 */
+
+/* Fix understandable GCC lossage on Solaris 2.6 */
+#if defined(__GNUC__) && OS_RELEASE >= 56 && !defined(NOT_C_CODE)
+
+/* GCC va_list munging is a little messed up */
+#define __GNUC_VA_LIST
+#define _VA_LIST_
+#define _VA_LIST va_list
+typedef void *__gnuc_va_list;
+typedef __gnuc_va_list va_list;
+
+/* Missing prototypes for functions added in Solaris 2.6 */
+#include <sys/types.h>
+struct msghdr;
+struct sockaddr;
+extern int     __xnet_bind    (int, const struct sockaddr *, size_t);
+extern int     __xnet_listen  (int, int);
+extern int     __xnet_connect (int, const struct sockaddr *, size_t);
+extern ssize_t __xnet_recvmsg (int, struct msghdr *, int);
+extern ssize_t __xnet_sendmsg (int, const struct msghdr *, int);
+extern ssize_t __xnet_sendto  (int, const void *, size_t, int, const struct sockaddr *, size_t);
+extern int     __xnet_socket  (int, int, int);
+extern int     __xnet_socketpair (int, int, int, int *);
+extern int     __xnet_getsockopt (int, int, int, void *, size_t *);
+#endif /* GCC && >= Solaris 2.6 && C code */
 
 #include "usg5-4-2.h"	/* XEmacs change from 5-4 to 5-4-2 */
 #undef PC /* Defined in x86 /usr/include/sys/reg.h */
@@ -85,13 +93,6 @@
 #define BROKEN_XLISTFONTSWITHINFO
 #endif
 
-/* 2.5 now has random back in libc but we don't want to use it. */
-#if OS_RELEASE >= 55
-#undef HAVE_RANDOM
-/* Apparently not necessary here, and it causes 10% CPU chewage. */
-#undef BROKEN_SIGCHLD
-#endif /* >= SunOS 5.5 */
-
 /* XEmacs addition: Raymond Toy says XEmacs completely misses SIGCHLD
    when compiled with GCC 2.7.0 (but not, apparently, with SunPro C?),
    X11R6, and Solaris 2.4.
@@ -105,8 +106,15 @@
 #endif
 
 #if OS_RELEASE < 55
+
+#if __STDC__ == 1 && defined(__SUNPRO_C)
+#define _POSIX_C_SOURCE 1
+#include <setjmp.h>
+#undef _POSIX_C_SOURCE
+#endif /* cc -Xc */
+
 /* Missing prototype, added in Solaris 2.5 */
-extern void *__builtin_alloca(size_t);
+extern void *__builtin_alloca (size_t);
 #endif /* before SunOS 5.5 */
 
 #if OS_RELEASE == 55
@@ -115,41 +123,25 @@
 int getpagesize (void);
 long random (void);
 void srandom (unsigned int seed);
-int usleep(unsigned int useconds);
+int usleep (unsigned int useconds);
 #endif /* SunOS 5.5 */
 
+/* 2.5 now has `random' back in libc but we don't want to use it. */
+#if OS_RELEASE >= 55
+#undef HAVE_RANDOM
+/* Apparently not necessary here, and it causes 10% CPU chewage. */
+#undef BROKEN_SIGCHLD
+#endif /* >= SunOS 5.5 */
+
 #if OS_RELEASE < 56
 /* Missing prototypes, added in Solaris 2.6 */
 struct timeval;
 int utimes (char *file, struct timeval *tvp);
-int gethostname(char *name, int namelen);
+int gethostname (char *name, int namelen);
 #endif /* before SunOS 5.6 */
 
-#if defined(__GNUC__) && OS_RELEASE >= 56
-/* Missing prototypes for functions added in Solaris 2.6 */
-struct msghdr;
-struct sockaddr;
-extern int __xnet_bind(int, const struct sockaddr *, size_t);
-extern int __xnet_listen(int, int);
-extern int __xnet_connect(int, const struct sockaddr *, size_t);
-extern ssize_t __xnet_recvmsg(int, struct msghdr *, int);
-extern ssize_t __xnet_sendmsg(int, const struct msghdr *, int);
-extern ssize_t __xnet_sendto(int, const void *, size_t, int, const struct sockaddr *, size_t);
-extern int __xnet_socket(int, int, int);
-extern int __xnet_socketpair(int, int, int, int *);
-extern int __xnet_getsockopt(int, int, int, void *, size_t *);
-#endif /* GCC && >= SunOS 5.6 */
-
 #include <sys/utsname.h> /* warning: macro redefined: SYS_NMLN */
 
-/* Get non-ANSI functions from ANSI header files in cc -Xc mode.
-   Sun has promised to fix setjmp.h */
-#if __STDC__ == 1 && defined(__SUNPRO_C)
-#define _POSIX_C_SOURCE 1
-#include <setjmp.h>
-#undef _POSIX_C_SOURCE
-#endif /* cc -Xc */
-
 /* XEmacs: Solaris has sigsetjmp but using it leads to core dumps at
    least under 2.4 */
 #undef _setjmp
--- a/src/s/umips.h	Mon Aug 13 09:47:55 2007 +0200
+++ b/src/s/umips.h	Mon Aug 13 09:49:09 2007 +0200
@@ -9,7 +9,8 @@
 
 #define C_SWITCH_SYSTEM "-systype bsd43"
 #define LD_SWITCH_SYSTEM "-systype bsd43"
-#define LIBS_SYSTEM "-lmld"
+#undef LIBS_SYSTEM
+/* #define LIBS_SYSTEM "-lmld" */ /* mrb */
 #define LIBS_DEBUG
 #define START_FILES "pre-crt0.o /lib/crt1.o"
 #define LIB_STANDARD "-lc /usr/lib/crtn.o"
@@ -23,7 +24,8 @@
 #define DONT_DEFINE_NO_REMAP /* `static' hack not needed */
 #include "usg5-2-2.h"
 
-#define LIBS_SYSTEM "-lmld"
+#undef LIBS_SYSTEM
+/* #define LIBS_SYSTEM "-lmld" */ /* mrb */
 #define LIBS_DEBUG
 #define START_FILES "pre-crt0.o /usr/lib/crt1.o"
 #define LIB_STANDARD "-lbsd -lc /usr/lib/crtn.o"
--- a/src/s/unipl5-0.h	Mon Aug 13 09:47:55 2007 +0200
+++ b/src/s/unipl5-0.h	Mon Aug 13 09:49:09 2007 +0200
@@ -62,16 +62,6 @@
 
 /* #define MAIL_USE_FLOCK */
 
-/* Define SHORTNAMES if the C compiler can distinguish only
-   short names.  It means that the stuff in ../shortnames
-   must be run to convert the long names to short ones.
-
-   Some USG systems support long names.
-   If yours is one, DO NOT change this file!
-   Do #undef SHORTNAMES in the m- file or in config.h.  */
-
-#define SHORTNAMES
-
 /* The file containing the kernel's symbol table is called /unix.  */
 
 #define KERNEL_FILE "/unix"
--- a/src/s/unipl5-2.h	Mon Aug 13 09:47:55 2007 +0200
+++ b/src/s/unipl5-2.h	Mon Aug 13 09:49:09 2007 +0200
@@ -61,10 +61,6 @@
 
 /* #define MAIL_USE_FLOCK */
 
-/* Uniplus 5.2 supports long names in C */
-
-/* #define SHORTNAMES */
-
 /* The file containing the kernel's symbol table is called /unix.  */
 
 #define KERNEL_FILE "/unix"
--- a/src/s/usg5-0.h	Mon Aug 13 09:47:55 2007 +0200
+++ b/src/s/usg5-0.h	Mon Aug 13 09:49:09 2007 +0200
@@ -58,12 +58,6 @@
 
 /* #define MAIL_USE_FLOCK */
 
-/* Define SHORTNAMES if the C compiler can distinguish only
-   short names.  It means that the stuff in ../shortnames
-   must be run to convert the long names to short ones.  */
-
-#define SHORTNAMES
-
 /* The file containing the kernel's symbol table is called /unix.  */
 
 #define KERNEL_FILE "/unix"
--- a/src/s/usg5-2.h	Mon Aug 13 09:47:55 2007 +0200
+++ b/src/s/usg5-2.h	Mon Aug 13 09:49:09 2007 +0200
@@ -24,8 +24,6 @@
 
 #undef USG5_0
 
-#undef SHORTNAMES
-
 /* Use terminfo instead of termcap.  */
 
 #define TERMINFO
--- a/src/s/xenix.h	Mon Aug 13 09:47:55 2007 +0200
+++ b/src/s/xenix.h	Mon Aug 13 09:49:09 2007 +0200
@@ -70,12 +70,6 @@
 
 #define MAIL_USE_FLOCK
 
-/* Define SHORTNAMES if the C compiler can distinguish only
-   short names.  It means that the stuff in ../shortnames
-   must be run to convert the long names to short ones.  */
-
-/* #define SHORTNAMES */
-
 /* Compensate for one incompatibility between Xenix and V.0.  */
 #define n_zeroes n_name[0]
 
--- a/src/search.c	Mon Aug 13 09:47:55 2007 +0200
+++ b/src/search.c	Mon Aug 13 09:49:09 2007 +0200
@@ -1144,7 +1144,7 @@
 	    }
 	  else
 	    {
-	      return (n);
+	      return n;
 	    }
 	  n++;
 	}
@@ -1180,11 +1180,11 @@
 	    }
 	  else
 	    {
-	      return (0 - n);
+	      return 0 - n;
 	    }
 	  n--;
 	}
-      return (bufpos);
+      return bufpos;
     }
   else				/* non-RE case */
     /* #### Someone really really really needs to comment the workings
@@ -1323,7 +1323,7 @@
 	     Boolean expressions in an arithmetic context are unsigned.
 	     Using an explicit ?1:0 prevents this.  */
 	  if ((lim - pos - ((direction > 0) ? 1 : 0)) * direction < 0)
-	    return (n * (0 - direction));
+	    return n * (0 - direction);
 	  /* First we do the part we can by pointers (maybe nothing) */
 	  QUIT;
 	  pat = base_pat;
@@ -1495,7 +1495,7 @@
 	      }
 	  /* We have done one clump.  Can we continue? */
 	  if ((lim - pos) * direction < 0)
-	    return ((0 - n) * direction);
+	    return (0 - n) * direction;
 	}
       return bytind_to_bufpos (buf, pos);
     }
@@ -1956,7 +1956,7 @@
 	      /* If SUBSTART is set, we need to also insert the
 		 text from SUBSTART to SUBEND in the original string. */
 	      Charcount substart = -1;
-	      Charcount subend;
+	      Charcount subend   = -1;
 
 	      c = string_char (XSTRING (newtext), strpos);
 	      if (c == '\\')
@@ -2215,11 +2215,10 @@
   n = XINT (num);
   if (n < 0 || n >= search_regs.num_regs)
     args_out_of_range (num, make_int (search_regs.num_regs));
-  if (search_regs.num_regs <= 0
-      || search_regs.start[n] < 0)
+  if (search_regs.num_regs <= 0 ||
+      search_regs.start[n] < 0)
     return Qnil;
-  return (make_int ((beginningp) ? search_regs.start[n]
-		                    : search_regs.end[n]));
+  return make_int (beginningp ? search_regs.start[n] : search_regs.end[n]);
 }
 
 DEFUN ("match-beginning", Fmatch_beginning, 1, 1, 0, /*
--- a/src/sgiplay.c	Mon Aug 13 09:47:55 2007 +0200
+++ b/src/sgiplay.c	Mon Aug 13 09:49:09 2007 +0200
@@ -258,7 +258,7 @@
 restore_audio_port (closure)
      Lisp_Object closure;
 {
-  Lisp_Object * contents = (vector_data (XVECTOR (closure)));
+  Lisp_Object * contents = XVECTOR_DATA (closure);
   saved_device_state[1] = XINT (contents[0]);
   saved_device_state[3] = XINT (contents[1]);
   saved_device_state[5] = XINT (contents[2]);
--- a/src/specifier.c	Mon Aug 13 09:47:55 2007 +0200
+++ b/src/specifier.c	Mon Aug 13 09:49:09 2007 +0200
@@ -148,7 +148,7 @@
        !NILP (rest);
        rest = XSPECIFIER (rest)->next_specifier)
     {
-      struct Lisp_Specifier *sp = XSPECIFIER (rest);      
+      struct Lisp_Specifier *sp = XSPECIFIER (rest);
       /* This effectively changes the specifier specs.
 	 However, there's no need to call
 	 recompute_cached_specifier_everywhere() or the
@@ -598,7 +598,7 @@
   if (EQ (locale_type, Qframe))  return LOCALE_FRAME;
   if (EQ (locale_type, Qwindow)) return LOCALE_WINDOW;
   if (EQ (locale_type, Qbuffer)) return LOCALE_BUFFER;
-  
+
   signal_simple_error ("Invalid specifier locale type", locale_type);
   return LOCALE_GLOBAL; /* not reached */
 }
@@ -732,7 +732,7 @@
   i = 0;
   LIST_LOOP (rest, tag_set)
     tags[i++] = XCAR (rest);
-    
+
   /* Sort the list of tags.  We use a bubble sort here (copied from
      extent_fragment_update()) -- reduces the function call overhead,
      and is the fastest sort for small numbers of items. */
@@ -896,7 +896,7 @@
   Lisp_Object device = Qnil;
 
   XSETDEVICE (device, d);
-  
+
   DEVICE_USER_DEFINED_TAGS (d) = Fcopy_alist (Vuser_defined_tags);
 
   /* Now set up the initial values */
@@ -923,7 +923,7 @@
   struct device *d = decode_device (device);
   Lisp_Object rest, list = Qnil;
   struct gcpro gcpro1;
-  
+
   GCPRO1 (list);
 
   LIST_LOOP (rest, DEVICE_USER_DEFINED_TAGS (d))
@@ -977,7 +977,7 @@
     return list3 (Qlambda, list1 (Qdevice),
 		  list3 (Qeq, list2 (Qquote, tag),
 			 list2 (Qconsole_type, Qdevice)));
-  
+
   if (valid_device_class_p (tag))
     return list3 (Qlambda, list1 (Qdevice),
 		  list3 (Qeq, list2 (Qquote, tag),
@@ -999,7 +999,7 @@
 	    a = XCDR (a);
 	  b = XCDR (b);
 	}
-      
+
       return NILP (a);
     }
   else
@@ -1052,7 +1052,7 @@
 	  retval = call_with_suspended_errors
 	    ((lisp_fn_t) call_validate_method,
 	     Qnil, Qspecifier, errb, 2, opaque, instantiator);
-	  
+
 	  free_opaque_ptr (opaque);
 	  UNGCPRO;
 	}
@@ -1222,7 +1222,7 @@
 	  : (type == LOCALE_BUFFER		\
 	     ? &(XSPECIFIER (specifier)->buffer_specs) \
 	     : 0)))))
-  
+
 static Lisp_Object *
 specifier_get_inst_list (Lisp_Object specifier, Lisp_Object locale,
 			 enum spec_locale_type type)
@@ -1402,7 +1402,7 @@
 	/* no inst-pairs left; remove this locale entirely. */
 	*spec_list = remassq_no_quit (locale, *spec_list);
     }
-  
+
   if (was_removed)
     MAYBE_SPECMETH (XSPECIFIER (specifier), after_change, (specifier, locale));
 }
@@ -1421,7 +1421,7 @@
       int was_removed;
       int remove_spec = 0;
       Lisp_Object spec = XCAR (rest);
-      
+
       /* There may be dead objects floating around */
       /* remember, dead windows can become alive again. */
       if (!WINDOWP (XCAR (spec)) && object_dead_p (XCAR (spec)))
@@ -1594,7 +1594,7 @@
     }
   else
     abort ();
-  
+
   UNGCPRO;
 
   /* call the after-change method */
@@ -1625,7 +1625,7 @@
   /* This algorithm is O(n^2) in running time.
      It's certainly possible to implement an O(n log n) algorithm,
      but I doubt there's any need to. */
-  
+
   LIST_LOOP (rest, *src_list)
     {
       Lisp_Object spec = XCAR (rest);
@@ -1637,7 +1637,7 @@
 	   specifier_process_inst_list (XCDR (spec), tag_set, exact_p, 0, 0),
 	   add_meth);
     }
-}      
+}
 
 /* map MAPFUN over the locales in SPECIFIER that are given in LOCALE.
    CLOSURE is passed unchanged to MAPFUN.  LOCALE can be one of
@@ -1835,7 +1835,7 @@
       Lisp_Object crock3 = XCDR (XCAR (rest));
 
       specifier_add_spec (crock1, crock2, crock3, add_meth);
-    }      
+    }
   recompute_cached_specifier_everywhere (specifier);
   return Qnil;
 }
@@ -2037,7 +2037,7 @@
 static int
 copy_specifier_mapfun (Lisp_Object specifier,
 		       Lisp_Object locale,
-		       enum spec_locale_type locale_type,	
+		       enum spec_locale_type locale_type,
 		       Lisp_Object tag_set,
 		       int exact_p,
 		       void *closure)
@@ -2155,7 +2155,7 @@
 	  retval = call_with_suspended_errors
 	    ((lisp_fn_t) call_validate_matchspec_method,
 	     Qnil, Qspecifier, errb, 2, opaque, matchspec);
-	  
+
 	  free_opaque_ptr (opaque);
 	  UNGCPRO;
 	}
@@ -2198,7 +2198,7 @@
 /* This function is purposely not callable from Lisp.  If a Lisp
    caller wants to set a fallback, they should just set the
    global value. */
-   
+
 void
 set_specifier_fallback (Lisp_Object specifier, Lisp_Object fallback)
 {
@@ -2473,7 +2473,7 @@
 
 See also `specifier-matching-instance'.
 */
-       (specifier, domain, defalt, no_fallback))
+       (specifier, domain, default_, no_fallback))
 {
   Lisp_Object instance;
 
@@ -2482,9 +2482,7 @@
 
   instance = specifier_instance (specifier, Qunbound, domain, ERROR_ME, 0,
 				 !NILP (no_fallback), Qzero);
-  if (UNBOUNDP (instance))
-    return defalt;
-  return instance;
+  return UNBOUNDP (instance) ? default_ : instance;
 }
 
 DEFUN ("specifier-matching-instance", Fspecifier_matching_instance, 2, 5, 0, /*
@@ -2510,7 +2508,7 @@
    font that can display a particular character. (This is what redisplay
    does, in fact.)
 */
-       (specifier, matchspec, domain, defalt, no_fallback))
+       (specifier, matchspec, domain, default_, no_fallback))
 {
   Lisp_Object instance;
 
@@ -2521,9 +2519,7 @@
 
   instance = specifier_instance (specifier, matchspec, domain, ERROR_ME, 0,
 				 !NILP (no_fallback), Qzero);
-  if (UNBOUNDP (instance))
-    return defalt;
-  return instance;
+  return UNBOUNDP (instance) ? default_ : instance;
 }
 
 DEFUN ("specifier-instance-from-inst-list",
@@ -2534,7 +2530,7 @@
 the instantiation fails, DEFAULT is returned.  In most circumstances,
 you should not use this function; use `specifier-instance' instead.
 */
-       (specifier, domain, inst_list, defalt))
+       (specifier, domain, inst_list, default_))
 {
   Lisp_Object val = Qunbound;
   struct Lisp_Specifier *sp = XSPECIFIER (specifier);
@@ -2551,9 +2547,7 @@
 					     built_up_list, ERROR_ME, 0,
 					     Qzero);
   UNGCPRO;
-  if (UNBOUNDP (val))
-    return defalt;
-  return val;
+  return UNBOUNDP (val) ? default_ : val;
 }
 
 DEFUN ("specifier-matching-instance-from-inst-list",
@@ -2568,7 +2562,7 @@
 See that function for a description of exactly how the matching process
 works.
 */
-       (specifier, matchspec, domain, inst_list, defalt))
+       (specifier, matchspec, domain, inst_list, default_))
 {
   Lisp_Object val = Qunbound;
   struct Lisp_Specifier *sp = XSPECIFIER (specifier);
@@ -2587,9 +2581,7 @@
 					     built_up_list, ERROR_ME, 0,
 					     Qzero);
   UNGCPRO;
-  if (UNBOUNDP (val))
-    return defalt;
-  return val;
+  return UNBOUNDP (val) ? default_ : val;
 }
 
 
@@ -2815,7 +2807,7 @@
 */
        (object))
 {
-  return (GENERIC_SPECIFIERP (object) ? Qt : Qnil);
+  return GENERIC_SPECIFIERP (object) ? Qt : Qnil;
 }
 
 
@@ -2836,7 +2828,7 @@
 */
        (object))
 {
-  return (INTEGER_SPECIFIERP (object) ? Qt : Qnil);
+  return INTEGER_SPECIFIERP (object) ? Qt : Qnil;
 }
 
 /************************************************************************/
@@ -2856,7 +2848,7 @@
 */
        (object))
 {
-  return (NATNUM_SPECIFIERP (object) ? Qt : Qnil);
+  return NATNUM_SPECIFIERP (object) ? Qt : Qnil;
 }
 
 /************************************************************************/
@@ -2877,7 +2869,7 @@
 */
        (object))
 {
-  return (BOOLEAN_SPECIFIERP (object) ? Qt : Qnil);
+  return BOOLEAN_SPECIFIERP (object) ? Qt : Qnil;
 }
 
 /************************************************************************/
@@ -2891,7 +2883,7 @@
 {
   if (!NILP(instantiator) &&
       (!VECTORP (instantiator) ||
-       XVECTOR (instantiator)->size != DISP_TABLE_SIZE))
+       XVECTOR_LENGTH (instantiator) != DISP_TABLE_SIZE))
     dead_wrong_type_argument (display_table_specifier_methods->predicate_symbol,
 			      instantiator);
 }
@@ -2901,7 +2893,7 @@
 */
        (object))
 {
-  return (DISPLAYTABLE_SPECIFIERP (object) ? Qt : Qnil);
+  return DISPLAYTABLE_SPECIFIERP (object) ? Qt : Qnil;
 }
 
 
--- a/src/symbols.c	Mon Aug 13 09:47:55 2007 +0200
+++ b/src/symbols.c	Mon Aug 13 09:49:09 2007 +0200
@@ -105,14 +105,14 @@
   XSETSTRING (pname, sym->name);
   ((markobj) (pname));
   if (!symbol_next (sym))
-    return (sym->plist);
+    return sym->plist;
   else
   {
     ((markobj) (sym->plist));
     /* Mark the rest of the symbols in the obarray hash-chain */
     sym = symbol_next (sym);
     XSETSYMBOL (obj, sym);
-    return (obj);
+    return obj;
   }
 }
 
@@ -136,7 +136,7 @@
 static Lisp_Object
 check_obarray (Lisp_Object obarray)
 {
-  while (!VECTORP (obarray) || vector_length (XVECTOR (obarray)) == 0)
+  while (!VECTORP (obarray) || XVECTOR_LENGTH (obarray) == 0)
     {
       /* If Vobarray is now invalid, force it to be valid.  */
       if (EQ (Vobarray, obarray)) Vobarray = initial_obarray;
@@ -152,10 +152,10 @@
   Lisp_Object tem;
   Bytecount len = strlen (str);
   Lisp_Object obarray = Vobarray;
-  if (!VECTORP (obarray) || vector_length (XVECTOR (obarray)) == 0)
+  if (!VECTORP (obarray) || XVECTOR_LENGTH (obarray) == 0)
     obarray = check_obarray (obarray);
   tem = oblookup (obarray, (CONST Bufbyte *) str, len);
-    
+
   if (SYMBOLP (tem))
     return tem;
   return Fintern (((purify_flag)
@@ -186,7 +186,7 @@
     /* Found it */
     return sym;
 
-  ptr = &vector_data (XVECTOR (obarray))[XINT (sym)];
+  ptr = &XVECTOR_DATA (obarray)[XINT (sym)];
 
   if (purify_flag && ! purified (str))
     str = make_pure_pname (XSTRING_DATA (str), len, 0);
@@ -252,18 +252,18 @@
 
   hash = oblookup_last_bucket_number;
 
-  if (EQ (XVECTOR (obarray)->contents[hash], tem))
+  if (EQ (XVECTOR_DATA (obarray)[hash], tem))
     {
       if (XSYMBOL (tem)->next)
-	XSETSYMBOL (XVECTOR (obarray)->contents[hash], XSYMBOL (tem)->next);
+	XSETSYMBOL (XVECTOR_DATA (obarray)[hash], XSYMBOL (tem)->next);
       else
-	XVECTOR (obarray)->contents[hash] = Qzero;
+	XVECTOR_DATA (obarray)[hash] = Qzero;
     }
   else
     {
       Lisp_Object tail, following;
 
-      for (tail = XVECTOR (obarray)->contents[hash];
+      for (tail = XVECTOR_DATA (obarray)[hash];
 	   XSYMBOL (tail)->next;
 	   tail = following)
 	{
@@ -293,10 +293,10 @@
   Lisp_Object bucket;
 
   if (!VECTORP (obarray) ||
-      (obsize = vector_length (XVECTOR (obarray))) == 0)
+      (obsize = XVECTOR_LENGTH (obarray)) == 0)
     {
       obarray = check_obarray (obarray);
-      obsize = vector_length (XVECTOR (obarray));
+      obsize = XVECTOR_LENGTH (obarray);
     }
 #if 0 /* FSFmacs */
   /* #### Huh? */
@@ -306,7 +306,7 @@
   /* Combining next two lines breaks VMS C 2.3.	 */
   hash = hash_string (ptr, size);
   hash %= obsize;
-  bucket = vector_data (XVECTOR (obarray))[hash];
+  bucket = XVECTOR_DATA (obarray)[hash];
   oblookup_last_bucket_number = hash;
   if (ZEROP (bucket))
     ;
@@ -319,13 +319,13 @@
 	    !memcmp (string_data (tail->name), ptr, size))
 	  {
 	    XSETSYMBOL (bucket, tail);
-	    return (bucket);
+	    return bucket;
 	  }
 	tail = symbol_next (tail);
 	if (!tail)
 	  break;
       }
-  return (make_int (hash));
+  return make_int (hash);
 }
 
 #if 0 /* Emacs 19.34 */
@@ -358,7 +358,7 @@
   while (count-- > 0)
     {
       hash = (hash << 4) + *p++;
-      if (g = (hash & 0xf0000000)) {
+      if ((g = (hash & 0xf0000000))) {
 	hash = hash ^ (g >> 24);
 	hash = hash ^ g;
       }
@@ -372,11 +372,11 @@
 	     Lisp_Object arg)
 {
   REGISTER int i;
-  REGISTER Lisp_Object tail;
+  Lisp_Object tail;
   CHECK_VECTOR (obarray);
-  for (i = vector_length (XVECTOR (obarray)) - 1; i >= 0; i--)
+  for (i = XVECTOR_LENGTH (obarray) - 1; i >= 0; i--)
     {
-      tail = vector_data (XVECTOR (obarray))[i];
+      tail = XVECTOR_DATA (obarray)[i];
       if (SYMBOLP (tail))
 	while (1)
 	  {
@@ -449,13 +449,13 @@
   map_obarray (Vobarray, apropos_accum, accumulation);
   accumulation = Fsort (Fcdr (Fcdr (accumulation)), Qstring_lessp);
   UNGCPRO;
-  return (accumulation);
+  return accumulation;
 }
 
 
 /* Extract and set components of symbols */
 
-static void set_up_buffer_local_cache (Lisp_Object sym, 
+static void set_up_buffer_local_cache (Lisp_Object sym,
 				       struct symbol_value_buffer_local *bfwd,
 				       struct buffer *buf,
 				       Lisp_Object new_alist_el,
@@ -467,7 +467,7 @@
        (sym))
 {
   CHECK_SYMBOL (sym);
-  return (UNBOUNDP (find_symbol_value (sym)) ? Qnil : Qt);
+  return UNBOUNDP (find_symbol_value (sym)) ? Qnil : Qt;
 }
 
 DEFUN ("globally-boundp", Fglobally_boundp, 1, 1, 0, /*
@@ -477,7 +477,7 @@
        (sym))
 {
   CHECK_SYMBOL (sym);
-  return (UNBOUNDP (top_level_value (sym)) ? Qnil : Qt);
+  return UNBOUNDP (top_level_value (sym)) ? Qnil : Qt;
 }
 
 DEFUN ("fboundp", Ffboundp, 1, 1, 0, /*
@@ -486,7 +486,7 @@
        (sym))
 {
   CHECK_SYMBOL (sym);
-  return ((UNBOUNDP (XSYMBOL (sym)->function)) ? Qnil : Qt);
+  return (UNBOUNDP (XSYMBOL (sym)->function)) ? Qnil : Qt;
 }
 
 /* Return non-zero if SYM's value or function (the current contents of
@@ -567,7 +567,7 @@
        XSYMBOL_VALUE_MAGIC_TYPE (val) ==
        SYMVAL_SELECTED_CONSOLE_FORWARD)
       )
-    signal_error (Qerror, 
+    signal_error (Qerror,
 		  list2 (build_string ("Symbol may not be buffer-local"),
 			 sym));
 }
@@ -795,7 +795,7 @@
       is currently disallowed because that would entail having
       both console-local and buffer-local variables, which is
       trickier to implement.
-      
+
    SYMVAL_CONST_SELECTED_CONSOLE_FORWARD:
       (declare with DEFVAR_CONST_CONSOLE_LOCAL)
       Same as SYMVAL_SELECTED_CONSOLE_FORWARD except that the
@@ -880,23 +880,23 @@
 			       struct symbol_value_forward);
 
 DEFINE_LRECORD_IMPLEMENTATION ("symbol-value-buffer-local",
-			       symbol_value_buffer_local, 
+			       symbol_value_buffer_local,
 			       mark_symbol_value_buffer_local,
-			       print_symbol_value_magic, 
+			       print_symbol_value_magic,
 			       0, 0, 0,
 			       struct symbol_value_buffer_local);
 
 DEFINE_LRECORD_IMPLEMENTATION ("symbol-value-lisp-magic",
-			       symbol_value_lisp_magic, 
+			       symbol_value_lisp_magic,
 			       mark_symbol_value_lisp_magic,
-			       print_symbol_value_magic, 
+			       print_symbol_value_magic,
 			       0, 0, 0,
 			       struct symbol_value_lisp_magic);
 
 DEFINE_LRECORD_IMPLEMENTATION ("symbol-value-varalias",
-			       symbol_value_varalias, 
+			       symbol_value_varalias,
 			       mark_symbol_value_varalias,
-			       print_symbol_value_magic, 
+			       print_symbol_value_magic,
 			       0, 0, 0,
 			       struct symbol_value_varalias);
 
@@ -913,7 +913,7 @@
   ((markobj) (bfwd->default_value));
   ((markobj) (bfwd->current_value));
   ((markobj) (bfwd->current_buffer));
-  return (bfwd->current_alist_element);
+  return bfwd->current_alist_element;
 }
 
 static Lisp_Object
@@ -931,7 +931,7 @@
       ((markobj) (bfwd->handler[i]));
       ((markobj) (bfwd->harg[i]));
     }
-  return (bfwd->shadowed);
+  return bfwd->shadowed;
 }
 
 static Lisp_Object
@@ -944,18 +944,17 @@
 
   bfwd = XSYMBOL_VALUE_VARALIAS (obj);
   ((markobj) (bfwd->shadowed));
-  return (bfwd->aliasee);
+  return bfwd->aliasee;
 }
 
 /* Should never, ever be called. (except by an external debugger) */
 void
-print_symbol_value_magic (Lisp_Object obj, 
+print_symbol_value_magic (Lisp_Object obj,
 			  Lisp_Object printcharfun, int escapeflag)
 {
   char buf[200];
-  sprintf (buf, "#<INTERNAL EMACS BUG (symfwd %d) 0x%x>",
-	   (EMACS_INT) XSYMBOL_VALUE_MAGIC_TYPE (obj),
-	   (EMACS_INT) XPNTR (obj));
+  sprintf (buf, "#<INTERNAL EMACS BUG (symfwd %d) 0x%p>",
+	   XSYMBOL_VALUE_MAGIC_TYPE (obj), (void *) XPNTR (obj));
   write_c_string (buf, printcharfun);
 }
 
@@ -984,28 +983,23 @@
   CONST struct symbol_value_forward *fwd;
 
   if (!SYMBOL_VALUE_MAGIC_P (valcontents))
-    return (valcontents);
+    return valcontents;
 
   fwd = XSYMBOL_VALUE_FORWARD (valcontents);
   switch (fwd->magic.type)
     {
     case SYMVAL_FIXNUM_FORWARD:
     case SYMVAL_CONST_FIXNUM_FORWARD:
-      return (make_int (*((int *)symbol_value_forward_forward (fwd))));
+      return make_int (*((int *)symbol_value_forward_forward (fwd)));
 
     case SYMVAL_BOOLEAN_FORWARD:
     case SYMVAL_CONST_BOOLEAN_FORWARD:
-      {
-	if (*((int *)symbol_value_forward_forward (fwd)))
-	  return (Qt);
-	else
-	  return (Qnil);
-      }
+      return *((int *)symbol_value_forward_forward (fwd)) ? Qt : Qnil;
 
     case SYMVAL_OBJECT_FORWARD:
     case SYMVAL_CONST_OBJECT_FORWARD:
     case SYMVAL_CONST_SPECIFIER_FORWARD:
-      return (*((Lisp_Object *)symbol_value_forward_forward (fwd)));
+      return *((Lisp_Object *)symbol_value_forward_forward (fwd));
 
     case SYMVAL_DEFAULT_BUFFER_FORWARD:
       return (*((Lisp_Object *)((char *) XBUFFER (Vbuffer_defaults)
@@ -1033,7 +1027,7 @@
 				   - (char *)&console_local_flags))));
 
     case SYMVAL_UNBOUND_MARKER:
-      return (valcontents);
+      return valcontents;
 
     default:
       abort ();
@@ -1054,21 +1048,21 @@
      or symbol-value-buffer-local, and if there's a handler, we should
      have already called it. */
   Lisp_Object valcontents = fetch_value_maybe_past_magic (sym, Qt);
-  CONST struct symbol_value_forward *fwd 
+  CONST struct symbol_value_forward *fwd
     = XSYMBOL_VALUE_FORWARD (valcontents);
-  int offset = ((char *) symbol_value_forward_forward (fwd) 
+  int offset = ((char *) symbol_value_forward_forward (fwd)
 		- (char *) &buffer_local_flags);
   int mask = XINT (*((Lisp_Object *) symbol_value_forward_forward (fwd)));
   int (*magicfun) (Lisp_Object simm, Lisp_Object *val, Lisp_Object in_object,
 		   int flags) = symbol_value_forward_magicfun (fwd);
-  
+
   *((Lisp_Object *) (offset + (char *) XBUFFER (Vbuffer_defaults)))
     = value;
-  
+
   if (mask > 0)		/* Not always per-buffer */
     {
       Lisp_Object tail;
-      
+
       /* Set value in each buffer which hasn't shadowed the default */
       LIST_LOOP (tail, Vbuffer_alist)
 	{
@@ -1077,7 +1071,7 @@
 	    {
 	      if (magicfun)
 		(magicfun) (sym, &value, make_buffer (b), 0);
-	      *((Lisp_Object *) (offset + (char *) b)) = value; 
+	      *((Lisp_Object *) (offset + (char *) b)) = value;
 	    }
 	}
     }
@@ -1096,21 +1090,21 @@
      or symbol-value-buffer-local, and if there's a handler, we should
      have already called it. */
   Lisp_Object valcontents = fetch_value_maybe_past_magic (sym, Qt);
-  CONST struct symbol_value_forward *fwd 
+  CONST struct symbol_value_forward *fwd
     = XSYMBOL_VALUE_FORWARD (valcontents);
-  int offset = ((char *) symbol_value_forward_forward (fwd) 
+  int offset = ((char *) symbol_value_forward_forward (fwd)
 		- (char *) &console_local_flags);
   int mask = XINT (*((Lisp_Object *) symbol_value_forward_forward (fwd)));
   int (*magicfun) (Lisp_Object simm, Lisp_Object *val, Lisp_Object in_object,
 		   int flags) = symbol_value_forward_magicfun (fwd);
-  
+
   *((Lisp_Object *) (offset + (char *) XCONSOLE (Vconsole_defaults)))
     = value;
-  
+
   if (mask > 0)		/* Not always per-console */
     {
       Lisp_Object tail;
-      
+
       /* Set value in each console which hasn't shadowed the default */
       LIST_LOOP (tail, Vconsole_list)
 	{
@@ -1120,7 +1114,7 @@
 	    {
 	      if (magicfun)
 		(magicfun) (sym, &value, dev, 0);
-	      *((Lisp_Object *) (offset + (char *) d)) = value; 
+	      *((Lisp_Object *) (offset + (char *) d)) = value;
 	    }
 	}
     }
@@ -1198,7 +1192,7 @@
 	    *((Lisp_Object *) symbol_value_forward_forward (fwd)) = newval;
 	    return;
 	  }
-	  
+
 	case SYMVAL_DEFAULT_BUFFER_FORWARD:
 	  {
 	    set_default_buffer_slot_variable (sym, newval);
@@ -1211,7 +1205,7 @@
 	      (magicfun) (sym, &newval, make_buffer (current_buffer), 0);
 	    *((Lisp_Object *) ((char *) current_buffer
 			       + ((char *) symbol_value_forward_forward (fwd)
-				  - (char *) &buffer_local_flags))) 
+				  - (char *) &buffer_local_flags)))
 	      = newval;
 	    return;
 	  }
@@ -1228,7 +1222,7 @@
 	      (magicfun) (sym, &newval, Vselected_console, 0);
 	    *((Lisp_Object *) ((char *) XCONSOLE (Vselected_console)
 			       + ((char *) symbol_value_forward_forward (fwd)
-				  - (char *) &console_local_flags))) 
+				  - (char *) &console_local_flags)))
 	      = newval;
 	    return;
 	  }
@@ -1253,9 +1247,9 @@
   if (!NILP (bfwd->current_buffer) &&
       XBUFFER (bfwd->current_buffer) == buffer)
     /* This is just an optimization of the below. */
-    return (bfwd->current_alist_element);
+    return bfwd->current_alist_element;
   else
-    return (assq_no_quit (symbol, buffer->local_var_alist));
+    return assq_no_quit (symbol, buffer->local_var_alist);
 }
 
 /* [Remember that the slot that mirrors CURRENT-VALUE in the
@@ -1302,7 +1296,7 @@
 */
 
 static void
-set_up_buffer_local_cache (Lisp_Object sym, 
+set_up_buffer_local_cache (Lisp_Object sym,
 			   struct symbol_value_buffer_local *bfwd,
 			   struct buffer *buf,
 			   Lisp_Object new_alist_el,
@@ -1351,7 +1345,7 @@
 
   /* Any which are supposed to be permanent,
      make local again, with the same values they had.  */
-     
+
   for (alist = buf->local_var_alist; !NILP (alist); alist = XCDR (alist))
     {
       Lisp_Object sym = XCAR (XCAR (alist));
@@ -1411,7 +1405,7 @@
 
  retry_2:
   if (!SYMBOL_VALUE_MAGIC_P (valcontents))
-    return (valcontents);
+    return valcontents;
 
   switch (XSYMBOL_VALUE_MAGIC_TYPE (valcontents))
     {
@@ -1457,11 +1451,11 @@
 	  }
 	break;
       }
-      
+
     default:
       break;
     }
-  return (do_symval_forwarding (valcontents, buf, con));
+  return do_symval_forwarding (valcontents, buf, con);
 }
 
 
@@ -1552,7 +1546,7 @@
      and Vselected_console is Qnil, early in initialization. */
   struct console *dev;
   Lisp_Object sym = find_it_p ? XCAR (symbol_cons) : symbol_cons;
-  
+
   CHECK_SYMBOL (sym);
   if (CONSOLEP (Vselected_console))
     dev = XCONSOLE (Vselected_console);
@@ -1617,7 +1611,7 @@
 	    /* semi-change-o */
 	    goto retry_2;
 	  }
-	  
+
 	case SYMVAL_VARALIAS:
 	  sym = follow_varalias_pointers (sym,
 					  UNBOUNDP (newval)
@@ -1631,7 +1625,7 @@
 	case SYMVAL_DEFAULT_BUFFER_FORWARD:
 	case SYMVAL_DEFAULT_CONSOLE_FORWARD:
 	  if (UNBOUNDP (newval))
-	    signal_error (Qerror, 
+	    signal_error (Qerror,
 			  list2 (build_string ("Cannot makunbound"), sym));
 	  break;
 
@@ -1673,11 +1667,11 @@
 	       element for the buffer now current and set up
 	       CURRENT-ALIST-ELEMENT.  Then we set CURRENT-VALUE out
 	       of that element, and store into CURRENT-BUFFER.
-	       
+
 	       If we are setting the variable and the current buffer does
 	       not have an alist entry for this variable, an alist entry is
 	       created.
-	       
+
 	       Note that CURRENT-VALUE can be a forwarding pointer.
 	       Each time it is examined or set, forwarding must be
 	       done. */
@@ -1705,7 +1699,7 @@
 		   we're looking at the default value, the cache is invalid; we
 		   need to write it out, and find the new CURRENT-ALIST-ELEMENT
 		   */
-		
+
 		/* Write out the cached value for the old buffer; copy it
 		   back to its alist element.  This works if the current
 		   buffer only sees the default value, too.  */
@@ -1750,7 +1744,7 @@
     }
   store_symval_forwarding (sym, valcontents, newval);
 
-  return (newval);
+  return newval;
 }
 
 
@@ -1771,8 +1765,8 @@
 
  retry_2:
   if (!SYMBOL_VALUE_MAGIC_P (valcontents))
-    return (valcontents);
-    
+    return valcontents;
+
   switch (XSYMBOL_VALUE_MAGIC_TYPE (valcontents))
     {
     case SYMVAL_LISP_MAGIC:
@@ -1810,7 +1804,7 @@
     case SYMVAL_BUFFER_LOCAL:
     case SYMVAL_SOME_BUFFER_LOCAL:
       {
-	struct symbol_value_buffer_local *bfwd = 
+	struct symbol_value_buffer_local *bfwd =
 	  XSYMBOL_VALUE_BUFFER_LOCAL (valcontents);
 
 	/* Handle user-created local variables.	 */
@@ -1819,17 +1813,17 @@
 	   But the current value slot may be more up to date, since
 	   ordinary setq stores just that slot.	 So use that.  */
 	if (NILP (bfwd->current_alist_element))
-	  return (do_symval_forwarding (bfwd->current_value, current_buffer,
-					XCONSOLE (Vselected_console)));
+	  return do_symval_forwarding (bfwd->current_value, current_buffer,
+				       XCONSOLE (Vselected_console));
 	else
-	  return (bfwd->default_value);
+	  return bfwd->default_value;
       }
     default:
       /* For other variables, get the current value.	*/
-      return (do_symval_forwarding (valcontents, current_buffer,
-				    XCONSOLE (Vselected_console)));
+      return do_symval_forwarding (valcontents, current_buffer,
+				   XCONSOLE (Vselected_console));
     }
-  
+
   RETURN_NOT_REACHED(Qnil)	/* suppress compiler warning */
 }
 
@@ -1840,10 +1834,7 @@
 */
        (sym))
 {
-  Lisp_Object value;
-
-  value = default_value (sym);
-  return (UNBOUNDP (value) ? Qnil : Qt);
+  return UNBOUNDP (default_value (sym)) ? Qnil : Qt;
 }
 
 DEFUN ("default-value", Fdefault_value, 1, 1, 0, /*
@@ -1854,12 +1845,9 @@
 */
        (sym))
 {
-  Lisp_Object value;
-
-  value = default_value (sym);
-  if (UNBOUNDP (value))
-    return Fsignal (Qvoid_variable, list1 (sym));
-  return value;
+  Lisp_Object value = default_value (sym);
+
+  return UNBOUNDP (value) ? Fsignal (Qvoid_variable, list1 (sym)) : value;
 }
 
 DEFUN ("set-default", Fset_default, 2, 2, 0, /*
@@ -1888,7 +1876,7 @@
       valcontents = XSYMBOL_VALUE_LISP_MAGIC (valcontents)->shadowed;
       /* semi-change-o */
       goto retry_2;
-	  
+
     case SYMVAL_VARALIAS:
       sym = follow_varalias_pointers (sym, Qset_default);
       /* presto change-o! */
@@ -1896,11 +1884,11 @@
 
     case SYMVAL_CURRENT_BUFFER_FORWARD:
       set_default_buffer_slot_variable (sym, value);
-      return (value);
+      return value;
 
     case SYMVAL_SELECTED_CONSOLE_FORWARD:
       set_default_console_slot_variable (sym, value);
-      return (value);
+      return value;
 
     case SYMVAL_BUFFER_LOCAL:
     case SYMVAL_SOME_BUFFER_LOCAL:
@@ -1914,7 +1902,7 @@
 	 *  we must set the CURRENT-VALUE slot too */
 	if (NILP (bfwd->current_alist_element))
 	  store_symval_forwarding (sym, bfwd->current_value, value);
-	return (value);
+	return value;
       }
 
     default:
@@ -2014,19 +2002,19 @@
 	case SYMVAL_CURRENT_BUFFER_FORWARD:
 	case SYMVAL_BUFFER_LOCAL:
 	  /* Already per-each-buffer */
-	  return (variable);
+	  return variable;
 
 	case SYMVAL_SOME_BUFFER_LOCAL:
 	  /* Transmogrify */
 	  XSYMBOL_VALUE_BUFFER_LOCAL (valcontents)->magic.type =
 	    SYMVAL_BUFFER_LOCAL;
-	  return (variable);
+	  return variable;
 
 	default:
 	  abort ();
 	}
     }
-  
+
   {
     struct symbol_value_buffer_local *bfwd
       = alloc_lcrecord (sizeof (struct symbol_value_buffer_local),
@@ -2116,7 +2104,7 @@
 	    /* Make sure the symbol has a local value in this particular
 	       buffer, by setting it to the same value it already has.	*/
 	    Fset (variable, find_symbol_value (variable));
-	    return (variable);
+	    return variable;
 	  }
 
 	case SYMVAL_SOME_BUFFER_LOCAL:
@@ -2169,7 +2157,7 @@
       current_buffer->local_var_alist =
 	Fcons (bfwd->current_alist_element, current_buffer->local_var_alist);
       store_symval_forwarding (variable, bfwd->current_value, Qnil);
-      return (variable);
+      return variable;
     }
 
   current_buffer->local_var_alist
@@ -2209,7 +2197,7 @@
 	}
     }
 
-  return (variable);
+  return variable;
 }
 
 DEFUN ("kill-local-variable", Fkill_local_variable, 1, 1, "vKill Local Variable: ", /*
@@ -2227,7 +2215,7 @@
 
  retry_2:
   if (!SYMBOL_VALUE_MAGIC_P (valcontents))
-    return (variable);
+    return variable;
 
   switch (XSYMBOL_VALUE_MAGIC_TYPE (valcontents))
     {
@@ -2248,7 +2236,7 @@
       {
 	CONST struct symbol_value_forward *fwd
 	  = XSYMBOL_VALUE_FORWARD (valcontents);
-	int offset = ((char *) symbol_value_forward_forward (fwd) 
+	int offset = ((char *) symbol_value_forward_forward (fwd)
 			       - (char *) &buffer_local_flags);
 	int mask =
 	  XINT (*((Lisp_Object *) symbol_value_forward_forward (fwd)));
@@ -2266,7 +2254,7 @@
 	      = oldval;
 	    current_buffer->local_var_flags &= ~mask;
 	  }
-	return (variable);
+	return variable;
       }
 
     case SYMVAL_BUFFER_LOCAL:
@@ -2295,10 +2283,10 @@
 	   so just go ahead and do that. */
 	set_up_buffer_local_cache (variable, bfwd, current_buffer, Qnil, 1);
       }
-      return (variable);
+      return variable;
 
     default:
-      return (variable);
+      return variable;
     }
   RETURN_NOT_REACHED(Qnil)	/* suppress compiler warning */
 }
@@ -2319,7 +2307,7 @@
 
  retry_2:
   if (!SYMBOL_VALUE_MAGIC_P (valcontents))
-    return (variable);
+    return variable;
 
   switch (XSYMBOL_VALUE_MAGIC_TYPE (valcontents))
     {
@@ -2341,7 +2329,7 @@
       {
 	CONST struct symbol_value_forward *fwd
 	  = XSYMBOL_VALUE_FORWARD (valcontents);
-	int offset = ((char *) symbol_value_forward_forward (fwd) 
+	int offset = ((char *) symbol_value_forward_forward (fwd)
 			       - (char *) &console_local_flags);
 	int mask =
 	  XINT (*((Lisp_Object *) symbol_value_forward_forward (fwd)));
@@ -2359,11 +2347,11 @@
 	      = oldval;
 	    XCONSOLE (Vselected_console)->local_var_flags &= ~mask;
 	  }
-	return (variable);
+	return variable;
       }
 
     default:
-      return (variable);
+      return variable;
     }
   RETURN_NOT_REACHED(Qnil)	/* suppress compiler warning */
 }
@@ -2405,10 +2393,10 @@
 			       symbol_value_forward_forward (fwd)));
 	    if ((mask <= 0) || (buffer && (buffer->local_var_flags & mask)))
 	      /* Already buffer-local */
-	      return (1);
+	      return 1;
 	    else
 	      /* Would be buffer-local after set */
-	      return (-1);
+	      return -1;
 	  }
 	case SYMVAL_BUFFER_LOCAL:
 	case SYMVAL_SOME_BUFFER_LOCAL:
@@ -2417,17 +2405,16 @@
 	      = XSYMBOL_VALUE_BUFFER_LOCAL (valcontents);
 	    if (buffer
 		&& !NILP (buffer_local_alist_element (buffer, symbol, bfwd)))
-	      return (1);
+	      return 1;
 	    else
-	      return ((bfwd->magic.type == SYMVAL_BUFFER_LOCAL)
-		      ? -1	 /* Automatically becomes local when set */
-		      : 0);
+	      /* Automatically becomes local when set */
+	      return bfwd->magic.type == SYMVAL_BUFFER_LOCAL ? -1 : 0;
 	  }
 	default:
-	  return (0);
+	  return 0;
 	}
     }
-  return (0);
+  return 0;
 }
 
 
@@ -2441,9 +2428,9 @@
   CHECK_BUFFER (buffer);
   value = symbol_value_in_buffer (symbol, buffer);
   if (UNBOUNDP (value))
-    return (unbound_value);
+    return unbound_value;
   else
-    return (value);
+    return value;
 }
 
 DEFUN ("symbol-value-in-console", Fsymbol_value_in_console, 2, 3, 0, /*
@@ -2456,9 +2443,9 @@
   CHECK_CONSOLE (console);
   value = symbol_value_in_console (symbol, console);
   if (UNBOUNDP (value))
-    return (unbound_value);
+    return unbound_value;
   else
-    return (value);
+    return value;
 }
 
 DEFUN ("built-in-variable-type", Fbuilt_in_variable_type, 1, 1, 0, /*
@@ -2499,7 +2486,7 @@
 	  valcontents = XSYMBOL_VALUE_LISP_MAGIC (valcontents)->shadowed;
 	  /* semi-change-o */
 	  goto retry_2;
-	  
+
 	case SYMVAL_VARALIAS:
 	  sym = follow_varalias_pointers (sym, Qt);
 	  /* presto change-o! */
@@ -2581,7 +2568,7 @@
        (symbol, buffer, after_set))
 {
   int local_info;
-  
+
   CHECK_SYMBOL (symbol);
   if (!NILP (buffer))
     {
@@ -2592,15 +2579,15 @@
     {
       local_info = symbol_value_buffer_local_info (symbol, 0);
     }
-  
+
   if (NILP (after_set))
-    return ((local_info > 0) ? Qt : Qnil);
+    return local_info > 0 ? Qt : Qnil;
   else
-    return ((local_info != 0) ? Qt : Qnil);
+    return local_info != 0 ? Qt : Qnil;
 }
 
 
-/* 
+/*
 I've gone ahead and partially implemented this because it's
 super-useful for dealing with the compatibility problems in supporting
 the old pointer-shape variables, and preventing people from `setq'ing
@@ -2649,7 +2636,7 @@
 ************************************************************
 NOTE NOTE NOTE NOTE NOTE NOTE NOTE
 
-Real documentation is as follows.  
+Real documentation is as follows.
 
 Set a magic handler for VARIABLE.
 This allows you to specify arbitrary behavior that results from
@@ -2719,7 +2706,7 @@
 
    SYM is the symbol on which the function was called, and is always
    the first argument to the function.
-   
+
    ARGS are the remaining arguments in the original call (i.e. all
    but the first).  In the case of `set-value' in particular,
    the first element of ARGS is the value to which the variable
@@ -2727,15 +2714,15 @@
    actually given.  For example, whenever `nil' is passed to an
    argument and it means `current-buffer', the current buffer is
    substituted instead.
-   
+
    FUN is a symbol indicating which function is being called.
    For many of the functions, you can determine the corresponding
    function of a different class using
    `symbol-function-corresponding-function'.
-   
+
    HARG is the argument that was given in the call
    to `set-symbol-value-handler' for SYM and HANDLER-TYPE.
-   
+
    HANDLERS is a structure containing the remaining handlers
    for the variable; to call one of them, use
    `chain-to-symbol-value-handler'.
@@ -2748,18 +2735,13 @@
 static enum lisp_magic_handler
 decode_magic_handler_type (Lisp_Object symbol)
 {
-  if (EQ (symbol, Qget_value))
-    return MAGIC_HANDLER_GET_VALUE;
-  if (EQ (symbol, Qset_value))
-    return MAGIC_HANDLER_SET_VALUE;
-  if (EQ (symbol, Qbound_predicate))
-    return MAGIC_HANDLER_BOUND_PREDICATE;
-  if (EQ (symbol, Qmake_unbound))
-    return MAGIC_HANDLER_MAKE_UNBOUND;
-  if (EQ (symbol, Qlocal_predicate))
-    return MAGIC_HANDLER_LOCAL_PREDICATE;
-  if (EQ (symbol, Qmake_local))
-    return MAGIC_HANDLER_MAKE_LOCAL;
+  if (EQ (symbol, Qget_value))       return MAGIC_HANDLER_GET_VALUE;
+  if (EQ (symbol, Qset_value))       return MAGIC_HANDLER_SET_VALUE;
+  if (EQ (symbol, Qbound_predicate)) return MAGIC_HANDLER_BOUND_PREDICATE;
+  if (EQ (symbol, Qmake_unbound))    return MAGIC_HANDLER_MAKE_UNBOUND;
+  if (EQ (symbol, Qlocal_predicate)) return MAGIC_HANDLER_LOCAL_PREDICATE;
+  if (EQ (symbol, Qmake_local))      return MAGIC_HANDLER_MAKE_LOCAL;
+
   signal_simple_error ("Unrecognized symbol value handler type", symbol);
   abort ();
   return MAGIC_HANDLER_MAX;
@@ -2957,7 +2939,7 @@
 follow_varalias_pointers (Lisp_Object object,
 			  Lisp_Object follow_past_lisp_magic)
 {
-  Lisp_Object tortoise = object; 
+  Lisp_Object tortoise = object;
   Lisp_Object hare = object;
 
   /* quick out just in case */
@@ -2983,7 +2965,7 @@
 	(XSYMBOL_VALUE_VARALIAS (value));
 
       if (EQ (hare, tortoise))
-	return (Fsignal (Qcyclic_variable_indirection, list1 (object)));
+	return Fsignal (Qcyclic_variable_indirection, list1 (object));
     }
 
   return hare;
@@ -3022,7 +3004,7 @@
 	}
       return Qnil;
     }
-      
+
   CHECK_SYMBOL (alias);
   if (SYMBOL_VALUE_VARALIAS_P (valcontents))
     {
@@ -3041,7 +3023,7 @@
   bfwd->magic.type = SYMVAL_VARALIAS;
   bfwd->aliasee = alias;
   bfwd->shadowed = valcontents;
-  
+
   XSETSYMBOL_VALUE_MAGIC (valcontents, bfwd);
   XSYMBOL (variable)->value = valcontents;
   return Qnil;
@@ -3122,11 +3104,11 @@
   XSYMBOL (Qnil)->name->plist = Qnil;
   XSYMBOL (Qnil)->value = Qnil; /* Nihil ex nihil */
   XSYMBOL (Qnil)->plist = Qnil;
-  
+
 #ifndef Qzero
   Qzero = make_int (0);	/* Only used if Lisp_Object is a union type */
 #endif
-  
+
   Vobarray = make_vector (OBARRAY_SIZE, Qzero);
   initial_obarray = Vobarray;
   staticpro (&initial_obarray);
@@ -3135,19 +3117,19 @@
     /* These locals are to kludge around a pyramid compiler bug. */
     int hash;
     Lisp_Object *tem;
-    
+
     hash = hash_string (string_data (XSYMBOL (Qnil)->name), 3);
     /* Separate statement here to avoid VAXC bug. */
     hash %= OBARRAY_SIZE;
-    tem = &vector_data (XVECTOR (Vobarray))[hash];
+    tem = &XVECTOR_DATA (Vobarray)[hash];
     *tem = Qnil;
   }
-  
+
   {
     /* Required to get around a GCC syntax error on certain
        architectures */
     struct symbol_value_magic *tem = &guts_of_unbound_marker;
-    
+
     XSETSYMBOL_VALUE_MAGIC (Qunbound, tem);
   }
   if ((CONST void *) XPNTR (Qunbound) !=
@@ -3161,9 +3143,9 @@
       memcpy (urk, &guts_of_unbound_marker, sizeof (*urk));
       XSETSYMBOL_VALUE_MAGIC (Qunbound, urk);
     }
-  
+
   XSYMBOL (Qnil)->function = Qunbound;
-  
+
   defsymbol (&Qt, "t");
   XSYMBOL (Qt)->value = Qt;	/* Veritas aetera */
   Vquit_flag = Qnil;
@@ -3201,7 +3183,7 @@
       assert (subr->max_args <= SUBR_MAX_ARGS);
       assert (subr->min_args <= subr->max_args);
     }
-  
+
   assert (UNBOUNDP (XSYMBOL (sym)->function));
 #endif /* DEBUG_XEMACS */
 
@@ -3306,7 +3288,7 @@
 
 /* Create and initialize a variable whose value is forwarded to C data */
 void
-defvar_mumble (CONST char *namestring, 
+defvar_mumble (CONST char *namestring,
 	       CONST void *magic, int sizeof_magic)
 {
   Lisp_Object kludge;
--- a/src/toolbar.c	Mon Aug 13 09:47:55 2007 +0200
+++ b/src/toolbar.c	Mon Aug 13 09:49:09 2007 +0200
@@ -60,7 +60,7 @@
 {
   struct toolbar_data *data = (struct toolbar_data *) XPNTR (obj);
   ((markobj) (data->last_toolbar_buffer));
-  return (data->toolbar_buttons);
+  return data->toolbar_buttons;
 }
 
 DEFINE_LRECORD_IMPLEMENTATION ("toolbar-data", toolbar_data,
@@ -81,7 +81,7 @@
   ((markobj) (data->cap_disabled_glyph));
   ((markobj) (data->callback));
   ((markobj) (data->enabled_p));
-  return (data->help_string);
+  return data->help_string;
 }
 
 static void
@@ -109,7 +109,7 @@
 */
        (object))
 {
-  return (TOOLBAR_BUTTONP (object) ? Qt : Qnil);
+  return TOOLBAR_BUTTONP (object) ? Qt : Qnil;
 }
 
 /* Only query functions are provided for toolbar buttons.  They are
@@ -129,7 +129,7 @@
 {
   CHECK_TOOLBAR_BUTTON (button);
 
-  return (XTOOLBAR_BUTTON (button)->callback);
+  return XTOOLBAR_BUTTON (button)->callback;
 }
 
 DEFUN ("toolbar-button-help-string", Ftoolbar_button_help_string, 1, 1, 0, /*
@@ -139,7 +139,7 @@
 {
   CHECK_TOOLBAR_BUTTON (button);
 
-  return (XTOOLBAR_BUTTON (button)->help_string);
+  return XTOOLBAR_BUTTON (button)->help_string;
 }
 
 DEFUN ("toolbar-button-enabled-p", Ftoolbar_button_enabled_p, 1, 1, 0, /*
@@ -149,7 +149,7 @@
 {
   CHECK_TOOLBAR_BUTTON (button);
 
-  return (XTOOLBAR_BUTTON (button)->enabled ? Qt : Qnil);
+  return XTOOLBAR_BUTTON (button)->enabled ? Qt : Qnil;
 }
 
 DEFUN ("set-toolbar-button-down-flag", Fset_toolbar_button_down_flag, 2, 2, 0, /*
@@ -195,7 +195,7 @@
     }
 
   return Qnil;
-}    
+}
 
 Lisp_Object
 get_toolbar_button_glyph (struct window *w, struct toolbar_button *tb)
@@ -218,7 +218,7 @@
 	glyph = tb->cap_down_glyph;
       else if (!tb->enabled)
 	glyph = tb->cap_disabled_glyph;
-      
+
       if (NILP (glyph))
 	glyph = tb->cap_up_glyph;
     }
@@ -248,7 +248,7 @@
   if (EQ (position, Qleft))   return LEFT_TOOLBAR;
   if (EQ (position, Qright))  return RIGHT_TOOLBAR;
   signal_simple_error ("Invalid toolbar position", position);
-  
+
   return TOP_TOOLBAR; /* not reached */
 }
 
@@ -304,7 +304,7 @@
   Lisp_Object *elt, glyphs, retval, buffer;
   struct gcpro gcpro1, gcpro2;
 
-  elt = vector_data (XVECTOR (desc));
+  elt = XVECTOR_DATA (desc);
   buffer = XWINDOW (FRAME_LAST_NONMINIBUF_WINDOW (f))->buffer;
 
   if (!tb)
@@ -345,6 +345,7 @@
       int pos;
       int style_seen = 0;
       int size_seen = 0;
+      int len = XVECTOR_LENGTH (desc);
 
       if (!tb->blank)
 	{
@@ -352,7 +353,7 @@
 	  tb->dirty = 1;
 	}
 
-      for (pos = 0; pos < vector_length (XVECTOR (desc)); pos += 2)
+      for (pos = 0; pos < len; pos += 2)
 	{
 	  Lisp_Object key = elt[pos];
 	  Lisp_Object val = elt[pos + 1];
@@ -729,7 +730,7 @@
   FRAME_TOOLBAR_DATA (f, pos)->last_toolbar_buffer = buffer;
   FRAME_TOOLBAR_DATA (f, pos)->toolbar_buttons = buttons;
 
-  return (visible);
+  return visible;
 }
 
 #define COMPUTE_TOOLBAR_DATA(position)					 \
@@ -921,9 +922,7 @@
       if ((x_coord >= x) && (x_coord < (x + width)))			\
 	{								\
 	  if ((y_coord >= y) && (y_coord < (y + height)))		\
-	    {								\
-	      return (FRAME_TOOLBAR_DATA (f, pos)->toolbar_buttons);	\
-	    }								\
+	    return FRAME_TOOLBAR_DATA (f, pos)->toolbar_buttons;	\
 	}								\
     } while (0)
 
@@ -1045,9 +1044,9 @@
 
   if (!VECTORP (button))
     CTB_ERROR ("toolbar button descriptors must be vectors");
-  elt = vector_data (XVECTOR (button));
+  elt = XVECTOR_DATA (button);
 
-  if (vector_length (XVECTOR (button)) == 2)
+  if (XVECTOR_LENGTH (button) == 2)
     {
       if (!EQ (Q_style, check_toolbar_button_keywords (button, elt[0],
 						       elt[1], errb)))
@@ -1056,7 +1055,7 @@
       return Qt;
     }
 
-  if (vector_length (XVECTOR (button)) != 4)
+  if (XVECTOR_LENGTH (button) != 4)
     CTB_ERROR ("toolbar button descriptors must be 2 or 4 long");
 
   /* The first element must be a list of glyphs of length 1-6.  The
@@ -1110,7 +1109,7 @@
   len = XINT (Flength (value));
   if (len < 1)
     CTB_ERROR ("toolbar button glyph list must have at least 1 entry");
-  
+
   if (len > 6)
     CTB_ERROR ("toolbar button glyph list can have at most 6 entries");
 
@@ -1202,7 +1201,7 @@
 */
        (object))
 {
-  return (TOOLBAR_SPECIFIERP (object) ? Qt : Qnil);
+  return TOOLBAR_SPECIFIERP (object) ? Qt : Qnil;
 }
 
 
@@ -1347,7 +1346,7 @@
 specifier_vars_of_toolbar (void)
 {
   Lisp_Object elt;
-      
+
   DEFVAR_SPECIFIER ("default-toolbar", &Vdefault_toolbar /*
 Specifier for a fallback toolbar.
 Use `set-specifier' to change this.
--- a/src/tooltalk.c	Mon Aug 13 09:47:55 2007 +0200
+++ b/src/tooltalk.c	Mon Aug 13 09:49:09 2007 +0200
@@ -184,23 +184,23 @@
 static Lisp_Object
 make_tooltalk_message (Tt_message m)
 {
-  struct Lisp_Tooltalk_Message *msg
+  struct Lisp_Tooltalk_Message *message_
     = alloc_lcrecord (sizeof (struct Lisp_Tooltalk_Message),
 		      lrecord_tooltalk_message);
   Lisp_Object val;
 
-  msg->m = m;
-  msg->callback = Qnil;
-  msg->plist_sym = Fmake_symbol (Tooltalk_Message_plist_str);
-  XSETTOOLTALK_MESSAGE (val, msg);
+  message_->m = m;
+  message_->callback = Qnil;
+  message_->plist_sym = Fmake_symbol (Tooltalk_Message_plist_str);
+  XSETTOOLTALK_MESSAGE (val, message_);
   return val;
 }
 
 Tt_message
-unbox_tooltalk_message (Lisp_Object msg)
+unbox_tooltalk_message (Lisp_Object message_)
 {
-  CHECK_TOOLTALK_MESSAGE (msg);
-  return XTOOLTALK_MESSAGE (msg)->m;
+  CHECK_TOOLTALK_MESSAGE (message_);
+  return XTOOLTALK_MESSAGE (message_)->m;
 }
 
 DEFUN ("tooltalk-message-p", Ftooltalk_message_p, 1, 1, 0, /*
@@ -208,7 +208,7 @@
 */
        (object))
 {
-  return (TOOLTALK_MESSAGEP (object) ? Qt : Qnil);
+  return TOOLTALK_MESSAGEP (object) ? Qt : Qnil;
 }
 
 
@@ -285,7 +285,7 @@
 */
        (object))
 {
-  return (TOOLTALK_PATTERNP (object) ? Qt : Qnil);
+  return TOOLTALK_PATTERNP (object) ? Qt : Qnil;
 }
 
 
@@ -318,13 +318,12 @@
 {
   /* This function can GC */
   Tt_message mess = tt_message_receive ();
-  Lisp_Object msg = make_tooltalk_message (mess);
+  Lisp_Object message_ = make_tooltalk_message (mess);
   struct gcpro gcpro1;
 
-  GCPRO1 (msg);
+  GCPRO1 (message_);
   if (mess != NULL && !NILP (Vtooltalk_unprocessed_message_hook))
-    va_run_hook_with_args (Qtooltalk_unprocessed_message_hook, 1,
-			   msg);
+    va_run_hook_with_args (Qtooltalk_unprocessed_message_hook, 1, message_);
   UNGCPRO;
 
   /* see comment in event-stream.c about this return value. */
@@ -336,7 +335,7 @@
 {
   /* This function can GC */
   Lisp_Object cb;
-  Lisp_Object msg;
+  Lisp_Object message_;
   Lisp_Object pattern;
   struct gcpro gcpro1, gcpro2;
 
@@ -354,22 +353,22 @@
   fflush (tooltalk_log_file);
 #endif
 
-  VOID_TO_LISP (msg, tt_message_user (m, TOOLTALK_MESSAGE_KEY));
+  VOID_TO_LISP (message_, tt_message_user (m, TOOLTALK_MESSAGE_KEY));
   pattern = make_tooltalk_pattern (p);
-  cb = XTOOLTALK_MESSAGE (msg)->callback;
-  GCPRO2 (msg, pattern);
+  cb = XTOOLTALK_MESSAGE (message_)->callback;
+  GCPRO2 (message_, pattern);
   if (!NILP (Vtooltalk_message_handler_hook))
-    va_run_hook_with_args (Qtooltalk_message_handler_hook, 2, msg,
-			   pattern);
+    va_run_hook_with_args (Qtooltalk_message_handler_hook, 2,
+			   message_, pattern);
 
   if ((SYMBOLP (cb) && EQ (Qt, Ffboundp (cb))) ||
       (CONSP (cb) && EQ (Qlambda, Fcar (cb)) &&
        !NILP (Flistp (Fcar (Fcdr (cb))))))
-    call2 (cb, msg, pattern);
+    call2 (cb, message_, pattern);
   UNGCPRO;
 
   tt_message_destroy (m);
-  Fremhash (msg, Vtooltalk_message_gcpro);
+  Fremhash (message_, Vtooltalk_message_gcpro);
 
   return TT_CALLBACK_PROCESSED;
 }
@@ -379,7 +378,7 @@
 {
   /* This function can GC */
   Lisp_Object cb;
-  Lisp_Object msg;
+  Lisp_Object message_;
   Lisp_Object pattern;
   struct gcpro gcpro1, gcpro2;
 
@@ -397,16 +396,16 @@
   fflush (tooltalk_log_file);
 #endif
 
-  msg = make_tooltalk_message (m);
+  message_ = make_tooltalk_message (m);
   VOID_TO_LISP (pattern, tt_pattern_user (p, TOOLTALK_PATTERN_KEY));
   cb = XTOOLTALK_PATTERN (pattern)->callback;
-  GCPRO2 (msg, pattern);
+  GCPRO2 (message_, pattern);
   if (!NILP (Vtooltalk_pattern_handler_hook))
-    va_run_hook_with_args (Qtooltalk_pattern_handler_hook, 2, msg,
-			   pattern);
+    va_run_hook_with_args (Qtooltalk_pattern_handler_hook, 2,
+			   message_, pattern);
 
   if (SYMBOLP (cb) && EQ (Qt, Ffboundp (cb)))
-    call2 (cb, msg, pattern);
+    call2 (cb, message_, pattern);
   UNGCPRO;
 
   tt_message_destroy (m);
@@ -543,7 +542,8 @@
   return make_string (value, len);
 }
 
-DEFUN ("get-tooltalk-message-attribute", Fget_tooltalk_message_attribute, 2, 3, 0, /*
+DEFUN ("get-tooltalk-message-attribute",
+       Fget_tooltalk_message_attribute, 2, 3, 0, /*
 Return the indicated Tooltalk message attribute.  Attributes are
 identified by symbols with the same name (underscores and all) as the
 suffix of the Tooltalk tt_message_<attribute> function that extracts the value.
@@ -573,9 +573,9 @@
 Emacs Lisp stores the lengths of strings explicitly (unlike C) so treating the
 value returned by 'arg_bval like a string is fine.
 */
-       (msg, attribute, argn))
+       (message_, attribute, argn))
 {
-  Tt_message m = unbox_tooltalk_message (msg);
+  Tt_message m = unbox_tooltalk_message (message_);
   int n = 0;
 
   CHECK_SYMBOL (attribute);
@@ -668,14 +668,14 @@
     return make_int (tt_message_uid (m));
   
   else if (EQ (attribute, Qtt_callback))
-    return XTOOLTALK_MESSAGE (msg)->callback;
+    return XTOOLTALK_MESSAGE (message_)->callback;
 
   else if (EQ (attribute, Qtt_prop))
-    return Fget (XTOOLTALK_MESSAGE (msg)->plist_sym, argn, Qnil);
+    return Fget (XTOOLTALK_MESSAGE (message_)->plist_sym, argn, Qnil);
 
   else if (EQ (attribute, Qtt_plist))
-    return Fcopy_sequence (Fsymbol_plist (XTOOLTALK_MESSAGE (msg)->
-					  plist_sym));
+    return Fcopy_sequence (Fsymbol_plist
+			   (XTOOLTALK_MESSAGE (message_)->plist_sym));
 
   else
     signal_simple_error ("invalid value for `get-tooltalk-message-attribute'",
@@ -703,9 +703,9 @@
 'arg_bval then argn must be the number of an already created argument.
 New arguments can be added to a message with add-tooltalk-message-arg.
 */
-       (value, msg, attribute, argn))
+       (value, message_, attribute, argn))
 {
-  Tt_message m = unbox_tooltalk_message (msg);
+  Tt_message m = unbox_tooltalk_message (message_);
   int n = 0;
 
   CHECK_SYMBOL (attribute);
@@ -831,11 +831,11 @@
   else if (EQ (attribute, Qtt_callback))
     {
       CHECK_SYMBOL (value);
-      XTOOLTALK_MESSAGE (msg)->callback = value;
+      XTOOLTALK_MESSAGE (message_)->callback = value;
     }
   else if (EQ (attribute, Qtt_prop))
     {
-      return Fput (XTOOLTALK_MESSAGE (msg)->plist_sym, argn, value);
+      return Fput (XTOOLTALK_MESSAGE (message_)->plist_sym, argn, value);
     }
   else
     signal_simple_error ("invalid value for `set-tooltalk-message-attribute'",
@@ -849,9 +849,9 @@
 a reply all message arguments whose mode is TT_INOUT or TT_OUT should
 have been filled in - see set-tooltalk-message-attribute.
 */
-       (msg, mode))
+       (message_, mode))
 {
-  Tt_message m = unbox_tooltalk_message (msg);
+  Tt_message m = unbox_tooltalk_message (message_);
 
   if (NILP (mode))
     mode = Qtt_reply;
@@ -883,14 +883,14 @@
        (no_callback))
 {
   Tt_message m = tt_message_create ();
-  Lisp_Object msg = make_tooltalk_message (m);
+  Lisp_Object message_ = make_tooltalk_message (m);
   if (NILP (no_callback))
     {
       tt_message_callback_add (m, tooltalk_message_callback);
     }
   tt_message_session_set (m, tt_default_session ());
-  tt_message_user_set (m, TOOLTALK_MESSAGE_KEY, LISP_TO_VOID (msg));
-  return msg;
+  tt_message_user_set (m, TOOLTALK_MESSAGE_KEY, LISP_TO_VOID (message_));
+  return message_;
 }
 
 DEFUN ("destroy-tooltalk-message", Fdestroy_tooltalk_message, 1, 1, 0, /*
@@ -899,9 +899,9 @@
 a message or pattern callback; the Lisp/Tooltalk callback machinery does
 this for you.
 */
-       (msg))
+       (message_))
 {
-  Tt_message m = unbox_tooltalk_message (msg);
+  Tt_message m = unbox_tooltalk_message (message_);
 
   if (VALID_TOOLTALK_MESSAGEP (m))
     /* #### Should we call Fremhash() here?  It seems that
@@ -937,9 +937,9 @@
 want to initialize the argument with a string that can contain
 embedded nulls (use 'arg_bval).
 */
-       (msg, mode, vtype, value))
+       (message_, mode, vtype, value))
 {
-  Tt_message m = unbox_tooltalk_message (msg);
+  Tt_message m = unbox_tooltalk_message (message_);
   Tt_mode n;
 
   CHECK_STRING (vtype);
@@ -973,14 +973,14 @@
 Once the message has been sent it's almost always a good idea to get rid of
 it with `destroy-tooltalk-message'.
 */
-       (msg))
+       (message_))
 {
-  Tt_message m = unbox_tooltalk_message (msg);
+  Tt_message m = unbox_tooltalk_message (message_);
 
   if (VALID_TOOLTALK_MESSAGEP (m))
     {
       tt_message_send (m);
-      Fputhash (msg, Qnil, Vtooltalk_message_gcpro);
+      Fputhash (message_, Qnil, Vtooltalk_message_gcpro);
     }
 
   return Qnil;
@@ -1227,8 +1227,8 @@
        (pattern))
 {
   CHECK_TOOLTALK_PATTERN (pattern);
-  return Fcopy_sequence
-    (Fsymbol_plist (XTOOLTALK_PATTERN (pattern)->plist_sym));
+  return
+    Fcopy_sequence (Fsymbol_plist (XTOOLTALK_PATTERN (pattern)->plist_sym));
 }
 
 DEFUN ("tooltalk-default-procid", Ftooltalk_default_procid, 0, 0, 0, /*
@@ -1312,7 +1312,7 @@
   if (noninteractive)
     error ("Can't connect to ToolTalk in batch mode.");
   init_tooltalk ();
-  return (NILP (Vtooltalk_fd) ? Qnil : Qt);
+  return NILP (Vtooltalk_fd) ? Qnil : Qt;
 }
 
 
--- a/src/unexalpha.c	Mon Aug 13 09:47:55 2007 +0200
+++ b/src/unexalpha.c	Mon Aug 13 09:49:09 2007 +0200
@@ -23,6 +23,9 @@
 
 
 #include <config.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
 #include <sys/types.h>
 #include <sys/file.h>
 #include <sys/stat.h>
@@ -34,8 +37,8 @@
 #include <scnhdr.h>
 #include <syms.h>
 
-static void fatal_unexec ();
-static void mark_x ();
+static void fatal_unexec (char *, char *);
+static void mark_x (char *);
 
 #define READ(_fd, _buffer, _size, _error_message, _error_arg) \
 	errno = EEOF; \
@@ -141,8 +144,8 @@
 
   if (nhdr.fhdr.f_opthdr != sizeof (nhdr.aout))
     {
-      fprintf (stderr, "unexec: input a.out header is %d bytes, not %d.\n",
-	       nhdr.fhdr.f_opthdr, sizeof (nhdr.aout));
+      fprintf (stderr, "unexec: input a.out header is %d bytes, not %ld.\n",
+	       nhdr.fhdr.f_opthdr, (long) (sizeof (nhdr.aout)));
       exit (1);
     }
   if (nhdr.aout.magic != ZMAGIC)
@@ -346,6 +349,7 @@
   close (old);
   close (new);
   mark_x (new_name);
+  return 0;
 }
 
 
@@ -421,8 +425,7 @@
  */
 
 static void
-mark_x (name)
-     char *name;
+mark_x (char *name)
 {
   struct stat sbuf;
   int um = umask (777);
@@ -435,9 +438,7 @@
 }
 
 static void
-fatal_unexec (s, arg)
-     char *s;
-     char *arg;
+fatal_unexec (char *s, char *arg)
 {
   if (errno == EEOF)
     fputs ("unexec: unexpected end of file, ", stderr);
--- a/src/window.c	Mon Aug 13 09:47:55 2007 +0200
+++ b/src/window.c	Mon Aug 13 09:49:09 2007 +0200
@@ -213,7 +213,7 @@
   ((markobj) (window->dedicated));
   mark_face_cachels (window->face_cachels, markobj);
   mark_glyph_cachels (window->glyph_cachels, markobj);
-  return (Qnil);
+  return Qnil;
 }
 
 static void
@@ -353,7 +353,7 @@
   p->windows_changed = 1;
   p->shadow_thickness_changed = 1;
 
-  return (val);
+  return val;
 }
 #undef INIT_DISP_VARIABLE
 
@@ -949,7 +949,7 @@
 
   /* At the user level the margin is always specified in characters.
      Internally however it is manipulated in terms of pixels. */
-  return (margin_cwidth * font_width);
+  return margin_cwidth * font_width;
 }
 
 int
@@ -1117,7 +1117,7 @@
 */
        (obj))
 {
-  return (WINDOWP (obj) ? Qt : Qnil);
+  return WINDOWP (obj) ? Qt : Qnil;
 }
 
 DEFUN ("window-live-p", Fwindow_live_p, 1, 1, 0, /*
@@ -1125,7 +1125,7 @@
 */
        (obj))
 {
-  return (WINDOWP (obj) && WINDOW_LIVE_P (XWINDOW (obj)) ? Qt : Qnil);
+  return WINDOWP (obj) && WINDOW_LIVE_P (XWINDOW (obj)) ? Qt : Qnil;
 }
 
 DEFUN ("selected-window", Fselected_window, 0, 1, 0, /*
@@ -1167,7 +1167,7 @@
 */
        (window))
 {
-  return (MINI_WINDOW_P (decode_window (window)) ? Qt : Qnil);
+  return MINI_WINDOW_P (decode_window (window)) ? Qt : Qnil;
 }
 
 DEFUN ("window-first-hchild", Fwindow_first_hchild, 1, 1, 0, /*
@@ -1341,7 +1341,7 @@
 */
        (window))
 {
-  return (make_int (decode_window (window)->pixel_height));
+  return make_int (decode_window (window)->pixel_height);
 }
 
 DEFUN ("window-width", Fwindow_width, 0, 1, 0, /*
@@ -1350,7 +1350,7 @@
 */
        (window))
 {
-  return (make_int (window_char_width (decode_window (window), 0)));
+  return make_int (window_char_width (decode_window (window), 0));
 }
 
 DEFUN ("window-pixel-width", Fwindow_pixel_width, 0, 1, 0, /*
@@ -1358,7 +1358,7 @@
 */
        (window))
 {
-  return (make_int (decode_window (window)->pixel_width));
+  return make_int (decode_window (window)->pixel_width);
 }
 
 DEFUN ("window-hscroll", Fwindow_hscroll, 0, 1, 0, /*
@@ -1366,7 +1366,7 @@
 */
        (window))
 {
-  return (make_int (decode_window (window)->hscroll));
+  return make_int (decode_window (window)->hscroll);
 }
 
 DEFUN ("set-window-hscroll", Fset_window_hscroll, 2, 2, 0, /*
@@ -1495,7 +1495,7 @@
   else
     {
       Bufpos startp = marker_position (w->start[CURRENT_DISP]);
-      return (make_int (end_of_last_line (w, startp)));
+      return make_int (end_of_last_line (w, startp));
     }
 }
 
@@ -2567,10 +2567,7 @@
 	}
     }
 
-  if (type == GET_BUFFER_WINDOW_COUNT)
-    return (make_int (count));
-  else
-    return (best_window);
+  return type == GET_BUFFER_WINDOW_COUNT ? make_int (count) : best_window;
 }
 
 #if 0 /* not currently used */
@@ -2651,7 +2648,7 @@
   if (NILP (w)) abort ();
 #endif
 
-  return (w);
+  return w;
 }
 
 DEFUN ("get-largest-window", Fget_largest_window, 0, 2, 0, /*
@@ -5032,6 +5029,8 @@
       else
 	set_frame_selected_window (f, config->current_window);
     }
+  else
+    old_window_config = Qnil; /* Warning suppression */
 
   /* Restore the minimum heights recorded in the configuration.  */
   window_min_height = config->min_height;
--- a/src/xselect.c	Mon Aug 13 09:47:55 2007 +0200
+++ b/src/xselect.c	Mon Aug 13 09:49:09 2007 +0200
@@ -68,7 +68,7 @@
 /* If this is a smaller number than the max-request-size of the display,
    emacs will use INCR selection transfer when the selection is larger
    than this.  The max-request-size is usually around 64k, so if you want
-   emacs to use incremental selection transfers when the selection is 
+   emacs to use incremental selection transfers when the selection is
    smaller than that, set this.  I added this mostly for debugging the
    incremental transfer stuff, but it might improve server performance.
  */
@@ -92,12 +92,15 @@
 
 /* This is an alist whose CARs are selection-types (whose names are the same
    as the names of X Atoms) and whose CDRs are the names of Lisp functions to
-   call to convert the given Emacs selection value to a string representing 
+   call to convert the given Emacs selection value to a string representing
    the given selection type.  This is for elisp-level extension of the emacs
    selection handling.
  */
 Lisp_Object Vselection_converter_alist;
 
+/* "Selection owner couldn't convert selection" */
+Lisp_Object Qselection_conversion_error;
+
 /* If the selection owner takes too long to reply to a selection request,
    we give up on it.  This is in seconds (0 = no timeout).
  */
@@ -128,14 +131,14 @@
 static void unexpect_property_change (int);
 static int waiting_for_other_props_on_window (Display *, Window);
 
-/* This converts a Lisp symbol to a server Atom, avoiding a server 
+/* This converts a Lisp symbol to a server Atom, avoiding a server
    roundtrip whenever possible.
  */
 Atom
 symbol_to_x_atom (struct device *d, Lisp_Object sym, int only_if_exists)
 {
   Display *display = DEVICE_X_DISPLAY (d);
-  Atom val;
+
   if (NILP (sym))	    return XA_PRIMARY;
   if (EQ (sym, Qt))	    return XA_SECONDARY;
   if (EQ (sym, QPRIMARY))   return XA_PRIMARY;
@@ -145,13 +148,13 @@
   if (EQ (sym, QATOM))	    return XA_ATOM;
   if (EQ (sym, QCLIPBOARD)) return DEVICE_XATOM_CLIPBOARD (d);
   if (EQ (sym, QTIMESTAMP)) return DEVICE_XATOM_TIMESTAMP (d);
-  if (EQ (sym, QTEXT))	    return DEVICE_XATOM_TEXT (d);
-  if (EQ (sym, QDELETE))    return DEVICE_XATOM_DELETE (d);
-  if (EQ (sym, QMULTIPLE))  return DEVICE_XATOM_MULTIPLE (d);
-  if (EQ (sym, QINCR))	    return DEVICE_XATOM_INCR (d);
+  if (EQ (sym, QTEXT))	    return DEVICE_XATOM_TEXT      (d);
+  if (EQ (sym, QDELETE))    return DEVICE_XATOM_DELETE    (d);
+  if (EQ (sym, QMULTIPLE))  return DEVICE_XATOM_MULTIPLE  (d);
+  if (EQ (sym, QINCR))	    return DEVICE_XATOM_INCR      (d);
   if (EQ (sym, QEMACS_TMP)) return DEVICE_XATOM_EMACS_TMP (d);
-  if (EQ (sym, QTARGETS))   return DEVICE_XATOM_TARGETS (d);
-  if (EQ (sym, QNULL))	    return DEVICE_XATOM_NULL (d);
+  if (EQ (sym, QTARGETS))   return DEVICE_XATOM_TARGETS   (d);
+  if (EQ (sym, QNULL))	    return DEVICE_XATOM_NULL      (d);
   if (EQ (sym, QATOM_PAIR)) return DEVICE_XATOM_ATOM_PAIR (d);
   if (EQ (sym, QCOMPOUND_TEXT)) return DEVICE_XATOM_COMPOUND_TEXT (d);
 #ifdef EPOCH
@@ -179,15 +182,15 @@
   if (EQ (sym, QCUT_BUFFER5)) return XA_CUT_BUFFER5;
   if (EQ (sym, QCUT_BUFFER6)) return XA_CUT_BUFFER6;
   if (EQ (sym, QCUT_BUFFER7)) return XA_CUT_BUFFER7;
-#endif
+#endif /* CUT_BUFFER_SUPPORT */
+
   {
     CONST char *nameext;
     Lisp_Object namesym;
     XSETSTRING (namesym, XSYMBOL (sym)->name);
     GET_C_STRING_CTEXT_DATA_ALLOCA (namesym, nameext);
-    val = XInternAtom (display, nameext, only_if_exists ? True : False);
+    return XInternAtom (display, nameext, only_if_exists ? True : False);
   }
-  return val;
 }
 
 
@@ -197,7 +200,6 @@
 Lisp_Object
 x_atom_to_symbol (struct device *d, Atom atom)
 {
-  char *str;
   Display *display = DEVICE_X_DISPLAY (d);
 
   if (! atom) return Qnil;
@@ -208,13 +210,13 @@
   if (atom == XA_ATOM)	       return QATOM;
   if (atom == DEVICE_XATOM_CLIPBOARD (d)) return QCLIPBOARD;
   if (atom == DEVICE_XATOM_TIMESTAMP (d)) return QTIMESTAMP;
-  if (atom == DEVICE_XATOM_TEXT (d))      return QTEXT;
-  if (atom == DEVICE_XATOM_DELETE (d))    return QDELETE;
-  if (atom == DEVICE_XATOM_MULTIPLE (d))  return QMULTIPLE;
-  if (atom == DEVICE_XATOM_INCR (d))      return QINCR;
+  if (atom == DEVICE_XATOM_TEXT      (d)) return QTEXT;
+  if (atom == DEVICE_XATOM_DELETE    (d)) return QDELETE;
+  if (atom == DEVICE_XATOM_MULTIPLE  (d)) return QMULTIPLE;
+  if (atom == DEVICE_XATOM_INCR      (d)) return QINCR;
   if (atom == DEVICE_XATOM_EMACS_TMP (d)) return QEMACS_TMP;
-  if (atom == DEVICE_XATOM_TARGETS (d))   return QTARGETS;
-  if (atom == DEVICE_XATOM_NULL (d))      return QNULL;
+  if (atom == DEVICE_XATOM_TARGETS   (d)) return QTARGETS;
+  if (atom == DEVICE_XATOM_NULL      (d)) return QNULL;
   if (atom == DEVICE_XATOM_ATOM_PAIR (d)) return QATOM_PAIR;
   if (atom == DEVICE_XATOM_COMPOUND_TEXT (d)) return QCOMPOUND_TEXT;
 
@@ -244,22 +246,21 @@
   if (atom == XA_CUT_BUFFER7) return QCUT_BUFFER7;
 #endif
 
-  str = XGetAtomName (display, atom);
-  if (! str) return Qnil;
   {
     CONST char *intstr;
-    Lisp_Object val;
+    char *str = XGetAtomName (display, atom);
+
+    if (! str) return Qnil;
 
     GET_C_CHARPTR_INT_CTEXT_DATA_ALLOCA (str, intstr);
-    val = intern (intstr);
     XFree (str);
-    return val;
+    return intern (intstr);
   }
 }
 
 
 /* Do protocol to assert ourself as a selection owner.
-   Update the Vselection_alist so that we can reply to later requests for 
+   Update the Vselection_alist so that we can reply to later requests for
    our selection.
  */
 static void
@@ -269,7 +270,7 @@
   Display *display = DEVICE_X_DISPLAY (d);
   struct frame *sel_frame = selected_frame ();
   Window selecting_window = XtWindow (FRAME_X_TEXT_WIDGET (sel_frame));
-  /* Use the time of the last-read mouse or keyboard event. 
+  /* Use the time of the last-read mouse or keyboard event.
      For selection purposes, we use this as a sleazy way of knowing what the
      current time is in server-time.  This assumes that the most recently read
      mouse or keyboard event has something to do with the assertion of the
@@ -391,7 +392,7 @@
 		ptr += 2;
 		continue;
 	      }
- 
+
 	    chartypes = WORLD;
 	    break;
 	  }
@@ -497,19 +498,19 @@
 	   XCAR (target_type) == QMULTIPLE)
     {
       Lisp_Object pairs = XCDR (target_type);
-      int size = XVECTOR (pairs)->size;
+      int len = XVECTOR_LENGTH (pairs);
       int i;
       /* If the target is MULTIPLE, then target_type looks like
 	  (MULTIPLE . [[SELECTION1 TARGET1] [SELECTION2 TARGET2] ... ])
 	 We modify the second element of each pair in the vector and
 	 return it as [[SELECTION1 <value1>] [SELECTION2 <value2>] ... ]
        */
-      for (i = 0; i < size; i++)
+      for (i = 0; i < len; i++)
 	{
-	  Lisp_Object pair = vector_data (XVECTOR (pairs)) [i];
-	  vector_data (XVECTOR (pair)) [1] =
-	    x_get_local_selection (vector_data (XVECTOR (pair)) [0],
-				   vector_data (XVECTOR (pair)) [1]);
+	  Lisp_Object pair = XVECTOR_DATA (pairs) [i];
+	  XVECTOR_DATA (pair) [1] =
+	    x_get_local_selection (XVECTOR_DATA (pair) [0],
+				   XVECTOR_DATA (pair) [1]);
 	}
       return pairs;
     }
@@ -531,7 +532,7 @@
   check = value;
   if (CONSP (value) && SYMBOLP (XCAR (value)))
     check = XCDR (value);
-  
+
   /* Strings, vectors, and symbols are converted to selection data format in
      the obvious way.  Integers are converted to 16 bit quantities if they're
      small enough, otherwise 32 bits are used.
@@ -555,7 +556,7 @@
 	     INTP (XCAR (XCDR (check))) &&
 	     NILP (XCDR (XCDR (check))))))
     return value;
-  /* Otherwise the lisp converter function returned something unrecognized. 
+  /* Otherwise the lisp converter function returned something unrecognized.
    */
   else
     signal_error (Qerror,
@@ -576,16 +577,15 @@
 x_decline_selection_request (XSelectionRequestEvent *event)
 {
   XSelectionEvent reply;
-  reply.type = SelectionNotify;
-  reply.display = event->display;
+  reply.type      = SelectionNotify;
+  reply.display   = event->display;
   reply.requestor = event->requestor;
   reply.selection = event->selection;
-  reply.time = event->time;
-  reply.target = event->target;
-  reply.property = None;
+  reply.time      = event->time;
+  reply.target    = event->target;
+  reply.property  = None;
 
-  (void) XSendEvent (reply.display, reply.requestor, False, 0L,
-		     (XEvent *) &reply);
+  XSendEvent (reply.display, reply.requestor, False, 0L, (XEvent *) &reply);
   XFlush (reply.display);
 }
 
@@ -625,13 +625,13 @@
   int max_bytes = SELECTION_QUANTUM (display);
   if (max_bytes > MAX_SELECTION_QUANTUM) max_bytes = MAX_SELECTION_QUANTUM;
 
-  reply.type = SelectionNotify;
-  reply.display = display;
+  reply.type      = SelectionNotify;
+  reply.display   = display;
   reply.requestor = window;
   reply.selection = event->selection;
-  reply.time = event->time;
-  reply.target = event->target;
-  reply.property = (event->property == None ? event->target : event->property);
+  reply.time      = event->time;
+  reply.target    = event->target;
+  reply.property  = (event->property == None ? event->target : event->property);
 
   /* #### XChangeProperty can generate BadAlloc, and we must handle it! */
 
@@ -648,7 +648,7 @@
       XChangeProperty (display, window, reply.property, type, format,
 		       PropModeReplace, data, size);
       /* At this point, the selection was successfully stored; ack it. */
-      (void) XSendEvent (display, window, False, 0L, (XEvent *) &reply);
+      XSendEvent (display, window, False, 0L, (XEvent *) &reply);
       XFlush (display);
     }
   else
@@ -669,7 +669,7 @@
 		       &bytes_remaining, 1);
       XSelectInput (display, window, PropertyChangeMask);
       /* Tell 'em the INCR data is there... */
-      (void) XSendEvent (display, window, False, 0L, (XEvent *) &reply);
+      XSendEvent (display, window, False, 0L, (XEvent *) &reply);
       XFlush (display);
 
       /* First, wait for the requestor to ack by deleting the property.
@@ -732,18 +732,18 @@
 
   GCPRO3 (local_selection_data, converted_selection, target_symbol);
 
-  reply.type = SelectionNotify;		/* Construct the reply event */
-  reply.display = event->display;
+  reply.type      = SelectionNotify;		/* Construct the reply event */
+  reply.display   = event->display;
   reply.requestor = event->requestor;
   reply.selection = event->selection;
-  reply.time = event->time;
-  reply.target = event->target;
-  reply.property = (event->property == None ? event->target : event->property);
+  reply.time      = event->time;
+  reply.target    = event->target;
+  reply.property  = (event->property == None ? event->target : event->property);
 
   selection_symbol = x_atom_to_symbol (d, event->selection);
 
   local_selection_data = assq_no_quit (selection_symbol, Vselection_alist);
-  
+
 #if 0
 # define CDR(x) (XCDR (x))
 # define CAR(x) (XCAR (x))
@@ -789,12 +789,12 @@
   if (EQ (target_symbol, QMULTIPLE))
     target_symbol = fetch_multiple_target (event);
 #endif
-  
+
   /* Convert lisp objects back into binary data */
-  
+
   converted_selection =
     x_get_local_selection (selection_symbol, target_symbol);
-  
+
   if (! NILP (converted_selection))
     {
       unsigned char *data;
@@ -803,7 +803,7 @@
       Atom type;
       lisp_data_to_selection_data (d, converted_selection,
 				   &data, &type, &size, &format);
-      
+
       x_reply_selection_request (event, format, data, size, type);
       successful_p = Qt;
       /* Tell x_selection_request_lisp_error() it's cool. */
@@ -816,8 +816,7 @@
 
   UNGCPRO;
 
-  /* Let random lisp code notice that the selection has been asked for.
-   */
+  /* Let random lisp code notice that the selection has been asked for. */
   {
     Lisp_Object rest;
     Lisp_Object val = Vx_sent_selection_hooks;
@@ -844,7 +843,7 @@
   struct device *d = get_device_from_display (display);
   Atom selection = event->selection;
   Time changed_owner_time = event->time;
-  
+
   Lisp_Object selection_symbol, local_selection_data;
   Time local_selection_time;
 
@@ -1046,26 +1045,24 @@
 {
   Lisp_Object vec;
   int i;
-  int size;
+  int len;
   if (CONSP (obj))
     return Fcons (XCAR (obj), copy_multiple_data (XCDR (obj)));
-    
+
   CHECK_VECTOR (obj);
-  size = XVECTOR (obj)->size;
-  vec = make_vector (size, Qnil);
-  for (i = 0; i < size; i++)
+  len = XVECTOR_LENGTH (obj);
+  vec = make_vector (len, Qnil);
+  for (i = 0; i < len; i++)
     {
-      Lisp_Object vec2 = vector_data (XVECTOR (obj)) [i];
+      Lisp_Object vec2 = XVECTOR_DATA (obj) [i];
       CHECK_VECTOR (vec2);
-      if (XVECTOR (vec2)->size != 2)
+      if (XVECTOR_LENGTH (vec2) != 2)
 	signal_error (Qerror, list2 (build_string
 				     ("vectors must be of length 2"),
                                      vec2));
-      vector_data (XVECTOR (vec)) [i] = make_vector (2, Qnil);
-      vector_data (XVECTOR (vector_data (XVECTOR (vec)) [i])) [0] =
-	vector_data (XVECTOR (vec2)) [0];
-      vector_data (XVECTOR (vector_data (XVECTOR (vec)) [i])) [1] =
-	vector_data (XVECTOR (vec2)) [1];
+      XVECTOR_DATA (vec) [i] = make_vector (2, Qnil);
+      XVECTOR_DATA (XVECTOR_DATA (vec) [i]) [0] = XVECTOR_DATA (vec2) [0];
+      XVECTOR_DATA (XVECTOR_DATA (vec) [i]) [1] = XVECTOR_DATA (vec2) [1];
     }
   return vec;
 }
@@ -1111,13 +1108,9 @@
   Time requestor_time = DEVICE_X_MOUSE_TIMESTAMP (d);
   Atom target_property = DEVICE_XATOM_EMACS_TMP (d);
   Atom selection_atom = symbol_to_x_atom (d, selection_symbol, 0);
-  Atom type_atom;
   int speccount;
-
-  if (CONSP (target_type))
-    type_atom = symbol_to_x_atom (d, XCAR (target_type), 0);
-  else
-    type_atom = symbol_to_x_atom (d, target_type, 0);
+  Atom type_atom = symbol_to_x_atom (d, (CONSP (target_type) ?
+					 XCAR (target_type) : target_type), 0);
 
   XConvertSelection (display, selection_atom, type_atom, target_property,
 		     requestor_window, requestor_time);
@@ -1167,7 +1160,7 @@
   int result;
   int buffer_size = SELECTION_QUANTUM (display);
   if (buffer_size > MAX_SELECTION_QUANTUM) buffer_size = MAX_SELECTION_QUANTUM;
-  
+
   /* First probe the thing to find out how big it is. */
   result = XGetWindowProperty (display, window, property,
 			       0, 0, False, AnyPropertyType,
@@ -1181,7 +1174,7 @@
       return;
     }
   XFree ((char *) tmp_data);
-  
+
   if (*actual_type_ret == None || *actual_format_ret == 0)
     {
       if (delete_p) XDeleteProperty (display, window, property);
@@ -1192,7 +1185,7 @@
 
   total_size = bytes_remaining + 1;
   *data_ret = (unsigned char *) xmalloc (total_size);
-  
+
   /* Now read, until weve gotten it all. */
   while (bytes_remaining)
     {
@@ -1305,7 +1298,7 @@
   Atom actual_type;
   int actual_format;
   unsigned long actual_size;
-  unsigned char *data = 0;
+  unsigned char *data = NULL;
   int bytes = 0;
   Lisp_Object val;
   struct device *d = get_device_from_display (display);
@@ -1314,26 +1307,27 @@
 			 &actual_type, &actual_format, &actual_size, 1);
   if (! data)
     {
-      int there_is_a_selection_owner;
-      there_is_a_selection_owner =
-	XGetSelectionOwner (display, selection_atom);
-      signal_error (Qerror,
-        (there_is_a_selection_owner
-	 ? Fcons (build_string ("selection owner couldn't convert"),
-		  (actual_type
-		   ? list2 (target_type,
-			    x_atom_to_symbol (d, actual_type))
-		   : list1 (target_type)))
-	 : list2 (build_string ("no selection"),
-		  x_atom_to_symbol (d, selection_atom))));
+      if (XGetSelectionOwner (display, selection_atom))
+	/* there is a selection owner */
+	signal_error
+	  (Qselection_conversion_error,
+	   Fcons (build_string ("selection owner couldn't convert"),
+		  Fcons (x_atom_to_symbol (d, selection_atom),
+			 actual_type ?
+			 list2 (target_type, x_atom_to_symbol (d, actual_type)) :
+			 list1 (target_type))));
+      else
+	signal_error (Qerror,
+		      list2 (build_string ("no selection"),
+			     x_atom_to_symbol (d, selection_atom)));
     }
-  
+
   if (actual_type == DEVICE_XATOM_INCR (d))
     {
-      /* Ok, that data wasnt *the* data, it was just the beginning. */
+      /* Ok, that data wasn't *the* data, it was just the beginning. */
 
       unsigned int min_size_bytes = * ((unsigned int *) data);
-      XFree ((char *) data);
+      xfree (data);
       receive_incremental_selection (display, window, property, target_type,
 				     min_size_bytes, &data, &bytes,
 				     &actual_type, &actual_format,
@@ -1341,11 +1335,10 @@
     }
 
   /* It's been read.  Now convert it to a lisp object in some semi-rational
-     manner.
-   */
+     manner. */
   val = selection_data_to_lisp_data (d, data, bytes,
 				     actual_type, actual_format);
-  
+
   xfree (data);
   return val;
 }
@@ -1395,8 +1388,8 @@
   /* Convert any 8-bit data to a string, for compactness. */
   else if (format == 8)
     return make_ext_string (data, size,
-			    type == DEVICE_XATOM_TEXT (d)
-			    || type == DEVICE_XATOM_COMPOUND_TEXT (d)
+			    type == DEVICE_XATOM_TEXT (d) ||
+			    type == DEVICE_XATOM_COMPOUND_TEXT (d)
 			    ? FORMAT_CTEXT : FORMAT_BINARY);
 
   /* Convert a single atom to a Lisp_Symbol.  Convert a set of atoms to
@@ -1568,17 +1561,17 @@
        */
       int i;
 
-      if (SYMBOLP (vector_data (XVECTOR (obj)) [0]))
+      if (SYMBOLP (XVECTOR_DATA (obj) [0]))
 	/* This vector is an ATOM set */
 	{
 	  if (NILP (type)) type = QATOM;
-	  *size_ret = XVECTOR (obj)->size;
+	  *size_ret = XVECTOR_LENGTH (obj);
 	  *format_ret = 32;
 	  *data_ret = (unsigned char *) xmalloc ((*size_ret) * sizeof (Atom));
 	  for (i = 0; i < *size_ret; i++)
-	    if (SYMBOLP (vector_data (XVECTOR (obj)) [i]))
+	    if (SYMBOLP (XVECTOR_DATA (obj) [i]))
 	      (*(Atom **) data_ret) [i] =
-		symbol_to_x_atom (d, vector_data (XVECTOR (obj)) [i], 0);
+		symbol_to_x_atom (d, XVECTOR_DATA (obj) [i], 0);
 	    else
               signal_error (Qerror, /* Qselection_error */
                             list2 (build_string
@@ -1586,28 +1579,28 @@
                                    obj));
 	}
 #if 0 /* #### MULTIPLE doesn't work yet */
-      else if (VECTORP (vector_data (XVECTOR (obj)) [0]))
+      else if (VECTORP (XVECTOR_DATA (obj) [0]))
 	/* This vector is an ATOM_PAIR set */
 	{
 	  if (NILP (type)) type = QATOM_PAIR;
-	  *size_ret = XVECTOR (obj)->size;
+	  *size_ret = XVECTOR_LENGTH (obj);
 	  *format_ret = 32;
 	  *data_ret = (unsigned char *)
 	    xmalloc ((*size_ret) * sizeof (Atom) * 2);
 	  for (i = 0; i < *size_ret; i++)
-	    if (VECTORP (vector_data (XVECTOR (obj)) [i]))
+	    if (VECTORP (XVECTOR_DATA (obj) [i]))
 	      {
-		Lisp_Object pair = vector_data (XVECTOR (obj)) [i];
-		if (XVECTOR (pair)->size != 2)
+		Lisp_Object pair = XVECTOR_DATA (obj) [i];
+		if (XVECTOR_LENGTH (pair) != 2)
 		  signal_error (Qerror,
-                                list2 (build_string 
+                                list2 (build_string
        ("elements of the vector must be vectors of exactly two elements"),
 				  pair));
-		
+
 		(*(Atom **) data_ret) [i * 2] =
-		  symbol_to_x_atom (d, vector_data (XVECTOR (pair)) [0], 0);
+		  symbol_to_x_atom (d, XVECTOR_DATA (pair) [0], 0);
 		(*(Atom **) data_ret) [(i * 2) + 1] =
-		  symbol_to_x_atom (d, vector_data (XVECTOR (pair)) [1], 0);
+		  symbol_to_x_atom (d, XVECTOR_DATA (pair) [1], 0);
 	      }
 	    else
 	      signal_error (Qerror,
@@ -1619,13 +1612,13 @@
       else
 	/* This vector is an INTEGER set, or something like it */
 	{
-	  *size_ret = XVECTOR (obj)->size;
+	  *size_ret = XVECTOR_LENGTH (obj);
 	  if (NILP (type)) type = QINTEGER;
 	  *format_ret = 16;
 	  for (i = 0; i < *size_ret; i++)
-	    if (CONSP (vector_data (XVECTOR (obj)) [i]))
+	    if (CONSP (XVECTOR_DATA (obj) [i]))
 	      *format_ret = 32;
-	    else if (!INTP (vector_data (XVECTOR (obj)) [i]))
+	    else if (!INTP (XVECTOR_DATA (obj) [i]))
 	      signal_error (Qerror, /* Qselection_error */
                             list2 (build_string
 	("all elements of the vector must be integers or conses of integers"),
@@ -1635,10 +1628,10 @@
 	  for (i = 0; i < *size_ret; i++)
 	    if (*format_ret == 32)
 	      (*((unsigned long **) data_ret)) [i] =
-		lisp_to_word (vector_data (XVECTOR (obj)) [i]);
+		lisp_to_word (XVECTOR_DATA (obj) [i]);
 	    else
 	      (*((unsigned short **) data_ret)) [i] =
-		(unsigned short) lisp_to_word (vector_data (XVECTOR (obj)) [i]);
+		(unsigned short) lisp_to_word (XVECTOR_DATA (obj) [i]);
 	}
     }
   else
@@ -1671,14 +1664,14 @@
   if (VECTORP (obj))
     {
       int i;
-      int size = XVECTOR (obj)->size;
+      int len = XVECTOR_LENGTH (obj);
       Lisp_Object copy;
-      if (size == 1)
-	return clean_local_selection_data (vector_data (XVECTOR (obj)) [0]);
-      copy = make_vector (size, Qnil);
-      for (i = 0; i < size; i++)
-	vector_data (XVECTOR (copy)) [i] =
-	  clean_local_selection_data (vector_data (XVECTOR (obj)) [i]);
+      if (len == 1)
+	return clean_local_selection_data (XVECTOR_DATA (obj) [0]);
+      copy = make_vector (len, Qnil);
+      for (i = 0; i < len; i++)
+	XVECTOR_DATA (copy) [i] =
+	  clean_local_selection_data (XVECTOR_DATA (obj) [i]);
       return copy;
     }
   return obj;
@@ -1692,22 +1685,13 @@
 x_handle_selection_notify (XSelectionEvent *event)
 {
   if (! reading_selection_reply)
-    {
-      message ("received an unexpected SelectionNotify event");
-      return;
-    }
-  if (event->requestor != reading_selection_reply)
-    {
-      message ("received a SelectionNotify event for the wrong window");
-      return;
-    }
-  if (event->selection != reading_which_selection)
-    {
-      message ("received the wrong selection type in SelectionNotify!");
-      return;
-    }
-
-  reading_selection_reply = 0; /* we're done now. */
+    message ("received an unexpected SelectionNotify event");
+  else if (event->requestor != reading_selection_reply)
+    message ("received a SelectionNotify event for the wrong window");
+  else if (event->selection != reading_which_selection)
+    message ("received the wrong selection type in SelectionNotify!");
+  else
+    reading_selection_reply = 0; /* we're done now. */
 }
 
 
@@ -1732,8 +1716,8 @@
  */
 DEFUN ("x-get-selection-internal", Fx_get_selection_internal, 2, 2, 0, /*
 Return text selected from some X window.
-SELECTION is a symbol, typically PRIMARY, SECONDARY, or CLIPBOARD.
-TYPE is the type of data desired, typically STRING or COMPOUND_TEXT.
+SELECTION_SYMBOL is a symbol, typically PRIMARY, SECONDARY, or CLIPBOARD.
+TARGET_TYPE is the type of data desired, typically STRING or COMPOUND_TEXT.
 Under Mule, if the resultant data comes back as 8-bit data in type
 TEXT or COMPOUND_TEXT, it will be decoded as Compound Text.
 */
@@ -1761,20 +1745,18 @@
 
   if (NILP (val))
     {
-      val = x_get_foreign_selection (selection_symbol,
-				     target_type);
-      goto DONE_LABEL;
+      val = x_get_foreign_selection (selection_symbol, target_type);
     }
-
-  if (CONSP (val) &&
-      SYMBOLP (XCAR (val)))
+  else
     {
-      val = XCDR (val);
-      if (CONSP (val) && NILP (XCDR (val)))
-	val = XCAR (val);
+      if (CONSP (val) && SYMBOLP (XCAR (val)))
+	{
+	  val = XCDR (val);
+	  if (CONSP (val) && NILP (XCDR (val)))
+	    val = XCAR (val);
+	}
+      val = clean_local_selection_data (val);
     }
-  val = clean_local_selection_data (val);
- DONE_LABEL:
   UNGCPRO;
   return val;
 }
@@ -1836,11 +1818,9 @@
 {
   CHECK_SYMBOL (selection);
   if (EQ (selection, Qnil)) selection = QPRIMARY;
-  if (EQ (selection, Qt)) selection = QSECONDARY;
-  
-  if (NILP (Fassq (selection, Vselection_alist)))
-    return Qnil;
-  return Qt;
+  if (EQ (selection, Qt))   selection = QSECONDARY;
+
+  return NILP (Fassq (selection, Vselection_alist)) ? Qnil: Qt;
 }
 
 DEFUN ("x-selection-exists-p", Fx_selection_exists_p, 0, 1, 0, /*
@@ -1851,14 +1831,13 @@
 */
        (selection))
 {
-  Window owner;
   struct device *d = decode_x_device (Qnil);
   Display *dpy = DEVICE_X_DISPLAY (d);
   CHECK_SYMBOL (selection);
   if (!NILP (Fx_selection_owner_p (selection)))
     return Qt;
-  owner = XGetSelectionOwner (dpy, symbol_to_x_atom (d, selection, 0));
-  return (owner ? Qt : Qnil);
+  return XGetSelectionOwner (dpy, symbol_to_x_atom (d, selection, 0)) != NULL ?
+    Qt : Qnil;
 }
 
 
@@ -1971,7 +1950,7 @@
      The ICCCM requires that this be so, and other clients assume it,
      as we do ourselves in initialize_cut_buffers.  */
 
-#ifdef MULE 
+#ifdef MULE
   /* Optimize for the common ASCII case */
   for (ptr = data, end = ptr + bytes; ptr <= end; )
     {
@@ -1980,7 +1959,7 @@
 	  ptr++;
 	  continue;
 	}
-      
+
       if ((*ptr) == LEADING_BYTE_LATIN_ISO8859_1 ||
 	  (*ptr) == LEADING_BYTE_CONTROL_1)
 	{
@@ -1988,7 +1967,7 @@
 	  ptr += 2;
 	  continue;
 	}
-      
+
       chartypes = WORLD;
       break;
     }
@@ -1998,7 +1977,7 @@
   else if (chartypes == WORLD)
     GET_STRING_CTEXT_DATA_ALLOCA  (string, data, bytes);
 #endif /* MULE */
-  
+
   bytes_remaining = bytes;
 
   while (bytes_remaining)
@@ -2104,7 +2083,7 @@
   defsymbol (&QWM_HINTS, "WM_HINTS");
   defsymbol (&QWM_SIZE_HINTS, "WM_SIZE_HINTS");
 #endif /* EPOCH */
-  
+
 #ifdef CUT_BUFFER_SUPPORT
   defsymbol (&QCUT_BUFFER0, "CUT_BUFFER0");
   defsymbol (&QCUT_BUFFER1, "CUT_BUFFER1");
@@ -2114,7 +2093,11 @@
   defsymbol (&QCUT_BUFFER5, "CUT_BUFFER5");
   defsymbol (&QCUT_BUFFER6, "CUT_BUFFER6");
   defsymbol (&QCUT_BUFFER7, "CUT_BUFFER7");
-#endif
+#endif /* CUT_BUFFER_SUPPORT */
+
+  deferror (&Qselection_conversion_error,
+	    "selection-conversion-error",
+	    "selection-conversion error", Qio_error);
 }
 
 void
--- a/version.sh	Mon Aug 13 09:47:55 2007 +0200
+++ b/version.sh	Mon Aug 13 09:49:09 2007 +0200
@@ -1,5 +1,5 @@
 #!/bin/sh
 emacs_major_version=20
 emacs_minor_version=3
-emacs_beta_version=12
-xemacs_codename="Helsinki"
+emacs_beta_version=13
+xemacs_codename="Brussels"